mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
make hook parameter for villas-hook optional
This commit is contained in:
parent
b145f63536
commit
d40e3cd06f
1 changed files with 2 additions and 2 deletions
|
@ -69,13 +69,13 @@ int main(int argc, char *argv[])
|
|||
log_init(&log, log.level, LOG_ALL);
|
||||
memory_init(DEFAULT_NR_HUGEPAGES);
|
||||
|
||||
if (argc < optind + 2) {
|
||||
if (argc < optind + 1) {
|
||||
usage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
name = argv[optind];
|
||||
parameter = argv[optind + 1];
|
||||
parameter = argc >= optind + 2 ? argv[optind + 1] : NULL;
|
||||
|
||||
p = plugin_lookup(PLUGIN_TYPE_HOOK, name);
|
||||
if (!p)
|
||||
|
|
Loading…
Add table
Reference in a new issue