X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcmd_fdos.c;h=fbee8614cabc7f3e23511a17e678af1552ff28c3;hb=d1df0fd37388fe0dc77a75f5aece04f70cc3f7e6;hp=a8822d91b07c5c64dd5106de5eba136faa2c041b;hpb=47e26b1bf91ddef69f4a3892815c857db094cef9;p=u-boot diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c index a8822d91b0..fbee8614ca 100644 --- a/common/cmd_fdos.c +++ b/common/cmd_fdos.c @@ -1,6 +1,6 @@ /* * (C) Copyright 2002 - * Stäubli Faverges - + * Stäubli Faverges - * Pierre AUBERT p.aubert@staubli.com * * See file CREDITS for list of people who contributed to this @@ -40,7 +40,6 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) char *name; char *ep; int size; - int rcode = 0; char buf [12]; int drive = CONFIG_SYS_FDC_DRIVE_NUMBER; @@ -73,7 +72,7 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) name = argv [2]; break; default: - return cmd_usage(cmdtp); + return CMD_RET_USAGE; } /* Init physical layer */ @@ -98,16 +97,7 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("Floppy DOS load complete: %d bytes loaded to 0x%lx\n", size, load_addr); - /* Check if we should attempt an auto-start */ - if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { - char *local_args[2]; - extern int do_bootm (cmd_tbl_t *, int, int, char *[]); - local_args[0] = argv[0]; - local_args[1] = NULL; - printf ("Automatic boot of image at addr 0x%08lX ...\n", load_addr); - rcode = do_bootm (cmdtp, 0, 1, local_args); - } - return rcode; + return bootm_maybe_autostart(cmdtp, argv[0]); } /*-----------------------------------------------------------------------------