diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/cbfstool/cbfstool.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index c823dc8209..2d8483ba0b 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -70,6 +70,7 @@ static struct param { uint32_t cbfsoffset; uint32_t cbfsoffset_assigned; uint32_t arch; + bool u64val_assigned; bool fill_partial_upward; bool fill_partial_downward; bool show_immutable; @@ -716,6 +717,10 @@ static int cbfs_add_flat_binary(void) static int cbfs_add_integer(void) { + if (!param.u64val_assigned) { + ERROR("You need to specify a value to write.\n"); + return 1; + } return cbfs_add_integer_component(param.name, param.u64val, param.baseaddress, @@ -1452,6 +1457,7 @@ int main(int argc, char **argv) break; case 'i': param.u64val = strtoull(optarg, &suffix, 0); + param.u64val_assigned = 1; if (!*optarg || (suffix && *suffix)) { ERROR("Invalid int parameter '%s'.\n", optarg); |