summaryrefslogtreecommitdiff
path: root/util/nvramtool
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvramtool')
-rw-r--r--util/nvramtool/cli/nvramtool.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/nvramtool/cli/nvramtool.c b/util/nvramtool/cli/nvramtool.c
index 11a1a702af..bcb10bbf34 100644
--- a/util/nvramtool/cli/nvramtool.c
+++ b/util/nvramtool/cli/nvramtool.c
@@ -143,7 +143,11 @@ int main(int argc, char *argv[])
if (fd_stat.st_size < 128) {
lseek(fd, 127, SEEK_SET);
- write(fd, "\0", 1);
+ if (write(fd, "\0", 1) != 1) {
+ fprintf(stderr, "Unable to extended '%s' to its full size.\n",
+ nvramtool_op_modifiers[NVRAMTOOL_MOD_USE_CMOS_FILE].param);
+ exit(1);
+ }
fsync(fd);
}