mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
generator: actions: Move variant functions to a separate file.
This is just code motion.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -341,6 +341,7 @@ Makefile.in
|
||||
/sparsify/virt-sparsify
|
||||
/sparsify/virt-sparsify.1
|
||||
/src/actions.c
|
||||
/src/actions-variants.c
|
||||
/src/bindtests.c
|
||||
/src/errnostring.c
|
||||
/src/errnostring-gperf.c
|
||||
|
||||
@@ -1388,11 +1388,28 @@ and generate_client_actions () =
|
||||
|
||||
List.iter (
|
||||
fun f -> generate_daemon_stub f
|
||||
) daemon_functions;
|
||||
) daemon_functions
|
||||
|
||||
(* Functions which have optional arguments have two or three
|
||||
* generated variants.
|
||||
*)
|
||||
and generate_client_actions_variants () =
|
||||
generate_header CStyle LGPLv2plus;
|
||||
|
||||
pr "\
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include \"guestfs.h\"
|
||||
#include \"guestfs-internal.h\"
|
||||
#include \"guestfs-internal-actions.h\"
|
||||
|
||||
";
|
||||
|
||||
(* Functions which have optional arguments have two or three
|
||||
* generated variants.
|
||||
*)
|
||||
let generate_va_variants { name = name; c_name = c_name;
|
||||
style = ret, args, optargs as style } =
|
||||
assert (optargs <> []); (* checked by caller *)
|
||||
|
||||
@@ -83,8 +83,6 @@ Run it from the top source directory using the command
|
||||
output_to "src/guestfs_protocol.x" generate_xdr;
|
||||
output_to "src/guestfs.h" generate_guestfs_h;
|
||||
output_to "src/guestfs-internal-actions.h" generate_internal_actions_h;
|
||||
output_to "src/actions.c" generate_client_actions;
|
||||
output_to "src/free-structs.c" generate_client_free_structs;
|
||||
output_to "src/bindtests.c" generate_bindtests;
|
||||
output_to "src/guestfs-structs.pod" generate_structs_pod;
|
||||
output_to "src/guestfs-actions.pod" generate_actions_pod;
|
||||
@@ -94,6 +92,11 @@ Run it from the top source directory using the command
|
||||
output_to "src/errnostring.h" generate_errnostring_h;
|
||||
output_to "src/MAX_PROC_NR" generate_max_proc_nr;
|
||||
output_to "src/libguestfs.syms" generate_linker_script;
|
||||
|
||||
output_to "src/free-structs.c" generate_client_free_structs;
|
||||
output_to "src/actions.c" generate_client_actions;
|
||||
output_to "src/actions-variants.c" generate_client_actions_variants;
|
||||
|
||||
output_to "daemon/actions.h" generate_daemon_actions_h;
|
||||
output_to "daemon/stubs.c" generate_daemon_actions;
|
||||
output_to "daemon/names.c" generate_daemon_names;
|
||||
|
||||
@@ -217,6 +217,7 @@ rescue/virt-rescue.c
|
||||
resize/progress-c.c
|
||||
ruby/ext/guestfs/_guestfs.c
|
||||
src/actions-support.c
|
||||
src/actions-variants.c
|
||||
src/actions.c
|
||||
src/appliance.c
|
||||
src/bindtests.c
|
||||
|
||||
@@ -24,6 +24,7 @@ generator_built = \
|
||||
guestfs.h \
|
||||
guestfs-internal-actions.h \
|
||||
actions.c \
|
||||
actions-variants.c \
|
||||
bindtests.c \
|
||||
errnostring-gperf.gperf \
|
||||
errnostring.c \
|
||||
@@ -125,6 +126,7 @@ libguestfs_la_SOURCES = \
|
||||
guestfs_protocol.h \
|
||||
actions.c \
|
||||
actions-support.c \
|
||||
actions-variants.c \
|
||||
appliance.c \
|
||||
bindtests.c \
|
||||
command.c \
|
||||
|
||||
Reference in New Issue
Block a user