X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_date.c;h=9f50f8956e5fad880887f29fd3ed2f9dab15e20c;hb=c758e947aa7d39a2be607ecdedd818ad300807b2;hp=b4d9649bddea8de360049da09672badc282a4633;hpb=6d0f6bcf337c5261c08fabe12982178c2c489d76;p=u-boot diff --git a/common/cmd_date.c b/common/cmd_date.c index b4d9649bdd..9f50f8956e 100644 --- a/common/cmd_date.c +++ b/common/cmd_date.c @@ -35,7 +35,11 @@ const char *weekdays[] = { "Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur", }; +#ifdef CONFIG_RELOC_FIXUP_WORKS +#define RELOC(a) a +#else #define RELOC(a) ((typeof(a))((unsigned long)(a) + gd->reloc_off)) +#endif int mk_date (char *, struct rtc_time *); @@ -89,7 +93,7 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) break; default: - printf ("Usage:\n%s\n", cmdtp->usage); + cmd_usage(cmdtp); rcode = 1; } @@ -214,9 +218,9 @@ int mk_date (char *datestr, struct rtc_time *tmp) U_BOOT_CMD( date, 2, 1, do_date, - "date - get/set/reset date & time\n", + "get/set/reset date & time", "[MMDDhhmm[[CC]YY][.ss]]\ndate reset\n" " - without arguments: print date & time\n" " - with numeric argument: set the system date & time\n" - " - with 'reset' argument: reset the RTC\n" + " - with 'reset' argument: reset the RTC" );