Commit b73feb98 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

compel hgen: option -o is required

Without this check, if -o is not given, compel will fail with
the following error:

	Can't open (null)

It's non-trivial to figure out that it means -o is required.

While at it, initialize the corresponding field.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent ac2c9999
......@@ -29,6 +29,7 @@
piegen_opt_t opts = {
.input_filename = NULL,
.output_filename = NULL,
.uapi_dir = "piegen/uapi",
.stream_name = "stream",
.prefix_name = "__",
......@@ -225,6 +226,9 @@ int main(int argc, char *argv[])
if (!opts.input_filename) {
return usage(1);
}
if (!opts.output_filename) {
return usage(1);
}
compel_log_init(&cli_log, log_level);
return piegen();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment