diff options
Diffstat (limited to 'commands')
-rw-r--r-- | commands/ubi.c | 8 | ||||
-rw-r--r-- | commands/usbgadget.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/commands/ubi.c b/commands/ubi.c index 65d2d256a8..26b521f374 100644 --- a/commands/ubi.c +++ b/commands/ubi.c @@ -14,10 +14,9 @@ static int do_ubiupdatevol(int argc, char *argv[]) { - int fd_img, fd_vol, ret = 0; + int count, fd_img, fd_vol, ret = 0; uint64_t size = 0; struct stat st; - unsigned int count; void *buf; if (argc - optind < 2) @@ -66,9 +65,10 @@ static int do_ubiupdatevol(int argc, char *argv[]) break; } - ret = write(fd_vol, buf, count); - if (ret < 0) { + count = write(fd_vol, buf, count); + if (count < 0) { perror("write"); + ret = 1; break; } diff --git a/commands/usbgadget.c b/commands/usbgadget.c index fc2252ad09..a7e8d6c0c3 100644 --- a/commands/usbgadget.c +++ b/commands/usbgadget.c @@ -96,7 +96,7 @@ BAREBOX_CMD_HELP_OPT ("-a", "Create CDC ACM function") BAREBOX_CMD_HELP_OPT ("-s", "Create Generic Serial function") BAREBOX_CMD_HELP_OPT ("-A <desc>", "Create Android Fastboot function") BAREBOX_CMD_HELP_OPT ("-D <desc>", "Create DFU function") -BAREBOX_CMD_HELP_OPT ("-d", "Disable the serial gadget") +BAREBOX_CMD_HELP_OPT ("-d", "Disable the currently running gadget") BAREBOX_CMD_HELP_END BAREBOX_CMD_START(usbgadget) |