1
0
Fork 0
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:
Steffen Vogel 2017-03-14 11:18:12 -03:00
parent b145f63536
commit d40e3cd06f

View file

@ -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)