cmdline: print error after usage and before fatal

This commit is contained in:
Robert Swiecki 2017-09-27 00:47:57 +02:00
parent 7b2b2194ca
commit f0e38692a8
2 changed files with 2 additions and 2 deletions

View File

@ -824,8 +824,8 @@ bool cmdlineParse(int argc, char *argv[], struct nsjconf_t * nsjconf)
nsjconf->argv = &argv[optind];
}
if (nsjconf->argv == NULL || nsjconf->argv[0] == NULL) {
LOG_E("No command provided");
cmdlineUsage(argv[0]);
LOG_E("No command provided");
return false;
}
if (nsjconf->exec_file == NULL) {

View File

@ -26,7 +26,7 @@
#include "common.h"
bool containSetupFD(struct nsjconf_t * nsjconf, int fd_in, int fd_out, int fd_err);
bool containSetupFD(struct nsjconf_t *nsjconf, int fd_in, int fd_out, int fd_err);
bool containContain(struct nsjconf_t *nsjconf);
#endif /* NS_CONTAIN_H */