diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-24 11:50:01 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-08-24 11:50:01 +0200 |
commit | 45e178eaa3ba620dfc8364aa73a1deeb9b609a2b (patch) | |
tree | 8204b6a504a52e8f6db49c046401acd1a70d2c7a | |
parent | a1b99a3f03a5908ea7e263658343451440326aea (diff) | |
download | px4-firmware-45e178eaa3ba620dfc8364aa73a1deeb9b609a2b.tar.gz px4-firmware-45e178eaa3ba620dfc8364aa73a1deeb9b609a2b.tar.bz2 px4-firmware-45e178eaa3ba620dfc8364aa73a1deeb9b609a2b.zip |
Made error message more verbose
-rw-r--r-- | apps/systemcmds/eeprom/eeprom.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/systemcmds/eeprom/eeprom.c b/apps/systemcmds/eeprom/eeprom.c index afa7b43b8..e59cb33e3 100644 --- a/apps/systemcmds/eeprom/eeprom.c +++ b/apps/systemcmds/eeprom/eeprom.c @@ -174,6 +174,9 @@ eeprom_ioctl(unsigned operation) static void eeprom_save(const char *name) { + if (!name) + err(1, "missing argument for device name, try '/eeprom'"); + int fd = open(name, O_WRONLY | O_CREAT | O_EXCL); if (fd < 0) @@ -193,6 +196,9 @@ eeprom_save(const char *name) static void eeprom_load(const char *name) { + if (!name) + err(1, "missing argument for device name, try '/eeprom'"); + int fd = open(name, O_RDONLY); if (fd < 0) |