diff options
Diffstat (limited to 'misc-utils/docfdisk.c')
-rw-r--r-- | misc-utils/docfdisk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/misc-utils/docfdisk.c b/misc-utils/docfdisk.c index 9956de5..b363662 100644 --- a/misc-utils/docfdisk.c +++ b/misc-utils/docfdisk.c @@ -275,7 +275,11 @@ int main(int argc, char **argv) show_header(mhoffs); printf("\nReady to update device. Type 'yes' to proceed, anything else to abort: "); - fgets(line, sizeof(line), stdin); + if (!fgets(line, sizeof(line), stdin)) { + printf("Failed to retrieve input chars!\n"); + return 1; + } + if (strcmp("yes\n", line)) return 0; printf("Updating MediaHeader...\n"); |