mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator: fix daemon functions with optional params but no mandatory params
The struct guestfs_$function_args args; declaration was not emitted in that case, leading to build failure.
This commit is contained in:
@@ -1658,9 +1658,9 @@ and generate_client_actions hash () =
|
||||
let args_passed_to_daemon =
|
||||
List.filter (function FileIn _ | FileOut _ -> false | _ -> true)
|
||||
args in
|
||||
(match args_passed_to_daemon with
|
||||
| [] -> ()
|
||||
| _ -> pr " struct guestfs_%s_args args;\n" name
|
||||
(match args_passed_to_daemon, optargs with
|
||||
| [], [] -> ()
|
||||
| _, _ -> pr " struct guestfs_%s_args args;\n" name
|
||||
);
|
||||
|
||||
pr " guestfs_message_header hdr;\n";
|
||||
|
||||
Reference in New Issue
Block a user