Skip to content

Commit b850c1a

Browse files
committed
Fixed the date-time shell command function API form.
1 parent 3542062 commit b850c1a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

zephyr/subsys/bacnet_shell/bacnet_shell_datetime.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "bacnet/bactext.h"
1616
#include "bacnet/datetime.h"
1717

18-
static void cmd_date_time(const struct shell *shell, int argc, char **argv)
18+
static int cmd_date_time(const struct shell *shell, int argc, char **argv)
1919
{
2020
BACNET_DATE bdate = { 0 };
2121
BACNET_TIME btime = { 0 };
@@ -32,15 +32,17 @@ static void cmd_date_time(const struct shell *shell, int argc, char **argv)
3232
datetime_timesync(&bdate, &btime, false);
3333
} else {
3434
shell_print(shell, " date time format: YYYY/MM/DD HH:MM:SS.hh");
35-
return;
35+
return -EINVAL;
3636
}
3737
}
3838
datetime_local(&bdate, &btime, &utc_offset_minutes, &dst_active);
3939
datetime_date_to_ascii(&bdate, date_string, sizeof(date_string));
4040
datetime_time_to_ascii(&btime, time_string, sizeof(time_string));
4141
shell_print(shell, "%s %s", date_string, time_string);
42+
return 0;
4243
} else {
4344
shell_help(shell);
45+
return -EINVAL;
4446
}
4547
}
4648

0 commit comments

Comments
 (0)