mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
utils: Split out structs cleanups and printing into common/structs.
These won't be used by the daemon, so interferes with us using common/utils in the daemon, so they are moved to a different library.
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -136,10 +136,10 @@ Makefile.in
|
||||
/common/protocol/guestfs_protocol.h
|
||||
/common/protocol/guestfs_protocol.x
|
||||
/common/qemuopts/qemuopts-tests
|
||||
/common/utils/guestfs-internal-frontend-cleanups.h
|
||||
/common/utils/structs-cleanup.c
|
||||
/common/utils/structs-print.c
|
||||
/common/utils/structs-print.h
|
||||
/common/structs/structs-cleanups.c
|
||||
/common/structs/structs-cleanups.h
|
||||
/common/structs/structs-print.c
|
||||
/common/structs/structs-print.h
|
||||
/compile
|
||||
/config.cache
|
||||
/config.guess
|
||||
|
||||
@@ -38,7 +38,9 @@ SUBDIRS += gnulib/tests
|
||||
endif
|
||||
|
||||
# Basic source for the library.
|
||||
SUBDIRS += common/errnostring common/protocol common/qemuopts common/utils
|
||||
SUBDIRS += common/errnostring common/protocol common/qemuopts
|
||||
SUBDIRS += common/utils
|
||||
SUBDIRS += common/structs
|
||||
SUBDIRS += lib docs examples po
|
||||
|
||||
# The daemon and the appliance.
|
||||
|
||||
@@ -31,6 +31,7 @@ virt_alignment_scan_SOURCES = \
|
||||
virt_alignment_scan_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/common/parallel -I$(top_builddir)/common/parallel \
|
||||
@@ -46,6 +47,7 @@ virt_alignment_scan_CFLAGS = \
|
||||
virt_alignment_scan_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/parallel/libparallel.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "getprogname.h"
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "structs-cleanups.h"
|
||||
#include "options.h"
|
||||
#include "display-options.h"
|
||||
#include "parallel.h"
|
||||
|
||||
@@ -39,6 +39,7 @@ virt_cat_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/common/windows -I$(top_builddir)/common/windows \
|
||||
@@ -51,6 +52,7 @@ virt_cat_CFLAGS = \
|
||||
virt_cat_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/windows/libwindows.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
@@ -65,6 +67,7 @@ virt_filesystems_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/common/windows -I$(top_builddir)/common/windows \
|
||||
@@ -77,6 +80,7 @@ virt_filesystems_CFLAGS = \
|
||||
virt_filesystems_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/windows/libwindows.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
@@ -91,6 +95,7 @@ virt_log_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/common/windows -I$(top_builddir)/common/windows \
|
||||
@@ -102,6 +107,7 @@ virt_log_CFLAGS = \
|
||||
|
||||
virt_log_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
@@ -116,6 +122,7 @@ virt_ls_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/visit \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
@@ -129,6 +136,7 @@ virt_ls_CFLAGS = \
|
||||
virt_ls_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/visit/libvisit.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
@@ -143,6 +151,7 @@ virt_tail_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/common/windows -I$(top_builddir)/common/windows \
|
||||
@@ -155,6 +164,7 @@ virt_tail_CFLAGS = \
|
||||
virt_tail_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/windows/libwindows.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "getprogname.h"
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "structs-cleanups.h"
|
||||
#include "options.h"
|
||||
#include "display-options.h"
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "getprogname.h"
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "structs-cleanups.h"
|
||||
#include "options.h"
|
||||
#include "display-options.h"
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "ignore-value.h"
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "structs-cleanups.h"
|
||||
#include "options.h"
|
||||
#include "display-options.h"
|
||||
#include "windows.h"
|
||||
|
||||
@@ -74,6 +74,7 @@ OCAMLPACKAGES = \
|
||||
-I $(top_builddir)/gnulib/lib/.libs \
|
||||
-I $(top_builddir)/ocaml \
|
||||
-I $(top_builddir)/common/utils/.libs \
|
||||
-I $(top_builddir)/common/structs/.libs \
|
||||
-I $(top_builddir)/common/visit/.libs \
|
||||
-I $(builddir)
|
||||
OCAMLPACKAGES_TESTS = $(MLVISIT_CMA)
|
||||
@@ -115,7 +116,7 @@ visit_tests_DEPENDENCIES = \
|
||||
$(top_srcdir)/ocaml-link.sh
|
||||
visit_tests_LINK = \
|
||||
$(top_srcdir)/ocaml-link.sh \
|
||||
-cclib '-lvisit -lutils $(LIBXML2_LIBS) -lgnu' -- \
|
||||
-cclib '-lvisit -lstructs -lutils $(LIBXML2_LIBS) -lgnu' -- \
|
||||
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \
|
||||
$(OCAMLPACKAGES) $(OCAMLPACKAGES_TESTS) \
|
||||
$(visit_tests_THEOBJECTS) -o $@
|
||||
|
||||
44
common/structs/Makefile.am
Normal file
44
common/structs/Makefile.am
Normal file
@@ -0,0 +1,44 @@
|
||||
# libguestfs
|
||||
# Copyright (C) 2017 Red Hat Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
generator_built = \
|
||||
structs-cleanups.c \
|
||||
structs-cleanups.h \
|
||||
structs-print.c \
|
||||
structs-print.h
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(generator_built)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
noinst_LTLIBRARIES = libstructs.la
|
||||
|
||||
libstructs_la_SOURCES = \
|
||||
../../lib/guestfs.h \
|
||||
$(BUILT_SOURCES)
|
||||
libstructs_la_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib
|
||||
libstructs_la_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(GCC_VISIBILITY_HIDDEN)
|
||||
@@ -17,18 +17,6 @@
|
||||
|
||||
include $(top_srcdir)/subdir-rules.mk
|
||||
|
||||
generator_built = \
|
||||
guestfs-internal-frontend-cleanups.h \
|
||||
structs-cleanup.c \
|
||||
structs-print.c \
|
||||
structs-print.h
|
||||
|
||||
BUILT_SOURCES = \
|
||||
$(generator_built)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
noinst_LTLIBRARIES = libutils.la
|
||||
|
||||
libutils_la_SOURCES = \
|
||||
@@ -37,11 +25,7 @@ libutils_la_SOURCES = \
|
||||
cleanups.h \
|
||||
gnulib-cleanups.c \
|
||||
guestfs-internal-frontend.h \
|
||||
guestfs-internal-frontend-cleanups.h \
|
||||
libxml2-cleanups.c \
|
||||
structs-cleanup.c \
|
||||
structs-print.c \
|
||||
structs-print.h \
|
||||
utils.c
|
||||
libutils_la_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
|
||||
@@ -63,11 +63,6 @@ extern void guestfs_int_fadvise_noreuse (int fd);
|
||||
//extern void guestfs_int_fadvise_willneed (int fd);
|
||||
extern char *guestfs_int_shell_unquote (const char *str);
|
||||
|
||||
/* These are in a separate header so the header can be generated.
|
||||
* Don't include the following file directly:
|
||||
*/
|
||||
#include "guestfs-internal-frontend-cleanups.h"
|
||||
|
||||
/* Not all language bindings know how to deal with Pointer arguments.
|
||||
* Those that don't will use this macro which complains noisily and
|
||||
* returns NULL.
|
||||
|
||||
@@ -27,7 +27,8 @@ libvisit_la_CPPFLAGS = \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs
|
||||
libvisit_la_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(GCC_VISIBILITY_HIDDEN)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal-frontend.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
#include "visit.h"
|
||||
|
||||
|
||||
@@ -206,6 +206,7 @@ AC_CONFIG_FILES([Makefile
|
||||
common/progress/Makefile
|
||||
common/protocol/Makefile
|
||||
common/qemuopts/Makefile
|
||||
common/structs/Makefile
|
||||
common/utils/Makefile
|
||||
common/visit/Makefile
|
||||
common/windows/Makefile
|
||||
|
||||
@@ -36,6 +36,7 @@ virt_df_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/common/parallel -I$(top_builddir)/common/parallel \
|
||||
@@ -50,6 +51,7 @@ virt_df_CFLAGS = \
|
||||
virt_df_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/parallel/libparallel.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
1
df/df.c
1
df/df.c
@@ -27,6 +27,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "structs-cleanups.h"
|
||||
#include "options.h"
|
||||
#include "domains.h"
|
||||
#include "virt-df.h"
|
||||
|
||||
@@ -44,6 +44,7 @@ virt_diff_CFLAGS = \
|
||||
virt_diff_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/visit/libvisit.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
@@ -42,14 +42,14 @@ common/progress/progress.h
|
||||
common/qemuopts/qemuopts-tests.c
|
||||
common/qemuopts/qemuopts.c
|
||||
common/qemuopts/qemuopts.h
|
||||
common/structs/structs-cleanups.c
|
||||
common/structs/structs-cleanups.h
|
||||
common/structs/structs-print.c
|
||||
common/structs/structs-print.h
|
||||
common/utils/cleanups.c
|
||||
common/utils/cleanups.h
|
||||
common/utils/guestfs-internal-frontend-cleanups.h
|
||||
common/utils/guestfs-internal-frontend.h
|
||||
common/utils/libxml2-cleanups.c
|
||||
common/utils/structs-cleanup.c
|
||||
common/utils/structs-print.c
|
||||
common/utils/structs-print.h
|
||||
common/utils/utils.c
|
||||
common/visit/visit.c
|
||||
common/visit/visit.h
|
||||
|
||||
@@ -137,6 +137,11 @@ and the daemon running inside the appliance is defined here.
|
||||
|
||||
Mini-library for writing qemu command lines and qemu config files.
|
||||
|
||||
=item F<common/structs>
|
||||
|
||||
Common code for printing and freeing libguestfs structs, used by the
|
||||
library and some tools.
|
||||
|
||||
=item F<common/utils>
|
||||
|
||||
Various utility functions used throughout the library and tools.
|
||||
|
||||
@@ -108,10 +108,12 @@ librc_protocol_la_CFLAGS = -Wall -Wno-unused -fno-strict-aliasing
|
||||
libcmds_la_SOURCES = cmds-gperf.c
|
||||
libcmds_la_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(srcdir)/../gnulib/lib -I../gnulib/lib
|
||||
libcmds_la_CFLAGS =
|
||||
libcmds_la_LIBADD = \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(LTLIBINTL)
|
||||
|
||||
@@ -124,6 +126,7 @@ guestfish_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/edit -I$(top_builddir)/common/edit \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
@@ -141,6 +144,7 @@ guestfish_LDADD = \
|
||||
$(top_builddir)/common/edit/libedit.la \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/progress/libprogress.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
@@ -794,20 +794,17 @@ and generate_internal_actions_h () =
|
||||
pr "\n";
|
||||
pr "#endif /* GUESTFS_INTERNAL_ACTIONS_H_ */\n"
|
||||
|
||||
(* Generate guestfs-internal-frontend-cleanups.h file. *)
|
||||
and generate_internal_frontend_cleanups_h () =
|
||||
(* Generate structs-cleanups.h file. *)
|
||||
and generate_client_structs_cleanups_h () =
|
||||
generate_header CStyle LGPLv2plus;
|
||||
|
||||
pr "\
|
||||
/* These CLEANUP_* macros automatically free the struct or struct list
|
||||
* pointed to by the local variable at the end of the current scope.
|
||||
*
|
||||
* Don't include this file directly! To use these cleanups in library
|
||||
* bindings and tools, include \"guestfs-internal-frontend.h\" only.
|
||||
*/
|
||||
|
||||
#ifndef GUESTFS_INTERNAL_FRONTEND_CLEANUPS_H_
|
||||
#define GUESTFS_INTERNAL_FRONTEND_CLEANUPS_H_
|
||||
#ifndef GUESTFS_STRUCTS_CLEANUPS_H_
|
||||
#define GUESTFS_STRUCTS_CLEANUPS_H_
|
||||
|
||||
#ifdef HAVE_ATTRIBUTE_CLEANUP
|
||||
";
|
||||
@@ -846,7 +843,7 @@ and generate_internal_frontend_cleanups_h () =
|
||||
) structs;
|
||||
|
||||
pr "\n";
|
||||
pr "#endif /* GUESTFS_INTERNAL_FRONTEND_CLEANUPS_H_ */\n"
|
||||
pr "#endif /* GUESTFS_STRUCTS_CLEANUPS_H_ */\n"
|
||||
|
||||
(* Functions to free structures. *)
|
||||
and generate_client_structs_free () =
|
||||
@@ -1166,7 +1163,7 @@ and generate_client_structs_copy () =
|
||||
) structs
|
||||
|
||||
(* Functions to free structures used by the CLEANUP_* macros. *)
|
||||
and generate_client_structs_cleanup () =
|
||||
and generate_client_structs_cleanups_c () =
|
||||
generate_header CStyle LGPLv2plus;
|
||||
|
||||
pr "\
|
||||
@@ -1176,7 +1173,7 @@ and generate_client_structs_cleanup () =
|
||||
#include <stdlib.h>
|
||||
|
||||
#include \"guestfs.h\"
|
||||
#include \"guestfs-internal-frontend.h\"
|
||||
#include \"structs-cleanups.h\"
|
||||
|
||||
";
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ val generate_actions_pod : unit -> unit
|
||||
val generate_availability_pod : unit -> unit
|
||||
val generate_client_actions : Types.action list -> unit -> unit
|
||||
val generate_client_actions_variants : unit -> unit
|
||||
val generate_client_structs_cleanup : unit -> unit
|
||||
val generate_client_structs_cleanups_h : unit -> unit
|
||||
val generate_client_structs_cleanups_c : unit -> unit
|
||||
val generate_client_structs_compare : unit -> unit
|
||||
val generate_client_structs_copy : unit -> unit
|
||||
val generate_client_structs_free : unit -> unit
|
||||
@@ -35,7 +36,6 @@ val generate_client_structs_print_c : unit -> unit
|
||||
val generate_event_string_c : unit -> unit
|
||||
val generate_guestfs_h : unit -> unit
|
||||
val generate_internal_actions_h : unit -> unit
|
||||
val generate_internal_frontend_cleanups_h : unit -> unit
|
||||
val generate_linker_script : unit -> unit
|
||||
val generate_max_proc_nr : unit -> unit
|
||||
val generate_structs_pod : unit -> unit
|
||||
|
||||
@@ -586,6 +586,7 @@ and generate_java_c actions () =
|
||||
#include \"com_redhat_et_libguestfs_GuestFS.h\"
|
||||
#include \"guestfs.h\"
|
||||
#include \"guestfs-internal-frontend.h\"
|
||||
#include \"structs-cleanups.h\"
|
||||
|
||||
/* Note that this function returns. The exception is not thrown
|
||||
* until after the wrapper function returns.
|
||||
|
||||
@@ -86,13 +86,13 @@ Run it from the top source directory using the command
|
||||
Errnostring.generate_errnostring_h;
|
||||
output_to "common/protocol/guestfs_protocol.x"
|
||||
XDR.generate_xdr;
|
||||
output_to "common/utils/guestfs-internal-frontend-cleanups.h"
|
||||
C.generate_internal_frontend_cleanups_h;
|
||||
output_to "common/utils/structs-cleanup.c"
|
||||
C.generate_client_structs_cleanup;
|
||||
output_to "common/utils/structs-print.c"
|
||||
output_to "common/structs/structs-cleanups.h"
|
||||
C.generate_client_structs_cleanups_h;
|
||||
output_to "common/structs/structs-cleanups.c"
|
||||
C.generate_client_structs_cleanups_c;
|
||||
output_to "common/structs/structs-print.c"
|
||||
C.generate_client_structs_print_c;
|
||||
output_to "common/utils/structs-print.h"
|
||||
output_to "common/structs/structs-print.h"
|
||||
C.generate_client_structs_print_h;
|
||||
output_to "lib/uefi.c"
|
||||
UEFI.generate_uefi_c;
|
||||
|
||||
@@ -48,6 +48,7 @@ let rec generate_c_api_tests () =
|
||||
|
||||
#include \"guestfs.h\"
|
||||
#include \"guestfs-internal-frontend.h\"
|
||||
#include \"structs-cleanups.h\"
|
||||
|
||||
#include \"tests.h\"
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ virt_inspector_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/fish \
|
||||
@@ -70,6 +71,7 @@ virt_inspector_CFLAGS = \
|
||||
|
||||
virt_inspector_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "getprogname.h"
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "structs-cleanups.h"
|
||||
#include "options.h"
|
||||
#include "display-options.h"
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ libguestfs_jni_la_SOURCES = \
|
||||
libguestfs_jni_la_CPPFLAGS = \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib
|
||||
|
||||
libguestfs_jni_la_CFLAGS = \
|
||||
@@ -116,6 +117,7 @@ libguestfs_jni_la_CFLAGS = \
|
||||
$(JNI_CFLAGS)
|
||||
|
||||
libguestfs_jni_la_LIBADD = \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ libguestfs_la_SOURCES = \
|
||||
../common/protocol/guestfs_protocol.h \
|
||||
../common/qemuopts/qemuopts.h \
|
||||
../common/utils/guestfs-internal-frontend.h \
|
||||
../common/utils/guestfs-internal-frontend-cleanups.h \
|
||||
../common/structs/structs-cleanups.h \
|
||||
guestfs.h \
|
||||
guestfs-internal.h \
|
||||
guestfs-internal-all.h \
|
||||
@@ -140,6 +140,7 @@ libguestfs_la_CPPFLAGS = \
|
||||
-I$(top_srcdir)/common/protocol -I$(top_builddir)/common/protocol \
|
||||
-I$(top_srcdir)/common/qemuopts -I$(top_builddir)/common/qemuopts \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
|
||||
|
||||
libguestfs_la_CFLAGS = \
|
||||
@@ -155,6 +156,7 @@ libguestfs_la_LIBADD = \
|
||||
../common/errnostring/liberrnostring.la \
|
||||
../common/protocol/libprotocol.la \
|
||||
../common/qemuopts/libqemuopts.la \
|
||||
../common/structs/libstructs.la \
|
||||
../common/utils/libutils.la \
|
||||
$(PCRE_LIBS) $(MAGIC_LIBS) \
|
||||
$(LIBVIRT_LIBS) $(LIBXML2_LIBS) \
|
||||
@@ -216,6 +218,7 @@ unit_tests_SOURCES = unit-tests.c
|
||||
unit_tests_CPPFLAGS = \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I.
|
||||
unit_tests_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS)
|
||||
@@ -223,6 +226,7 @@ unit_tests_CFLAGS = \
|
||||
# non-exported functions we have to link with the objects not the
|
||||
# library.
|
||||
unit_tests_LDADD = \
|
||||
../common/structs/libstructs.la \
|
||||
../common/utils/libutils.la \
|
||||
$(libguestfs_la_OBJECTS) \
|
||||
$(libguestfs_la_LIBADD)
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "guestfs-internal-actions.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
static int
|
||||
compare (const void *vp1, const void *vp2)
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "guestfs-internal-actions.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
#if HAVE_FUSE
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "guestfs-internal-actions.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
#ifdef DB_DUMP
|
||||
static struct guestfs_application2_list *list_applications_rpm (guestfs_h *g, struct inspect_fs *fs);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
/* Debian/Ubuntu install disks are easy ...
|
||||
*
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "guestfs-internal-actions.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
COMPILE_REGEXP (re_windows_version, "^(\\d+)\\.(\\d+)", 0)
|
||||
COMPILE_REGEXP (re_boot_ini_os_header, "^\\[operating systems\\]\\s*$", 0)
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
static int check_filesystem (guestfs_h *g, const char *mountable,
|
||||
const struct guestfs_internal_mountable *m,
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "guestfs-internal.h"
|
||||
#include "guestfs-internal-actions.h"
|
||||
#include "guestfs_protocol.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
static struct backend {
|
||||
struct backend *next;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "guestfs-internal-actions.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
/* List filesystems.
|
||||
*
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal.h"
|
||||
#include "guestfs-internal-actions.h"
|
||||
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
char *
|
||||
guestfs_impl_mountable_device (guestfs_h *g, const char *mountable)
|
||||
|
||||
@@ -31,6 +31,7 @@ virt_make_fs_CPPFLAGS = \
|
||||
-DGUESTFS_WARN_DEPRECATED=1 \
|
||||
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
|
||||
-I$(top_srcdir)/fish \
|
||||
@@ -42,6 +43,7 @@ virt_make_fs_CFLAGS = \
|
||||
|
||||
virt_make_fs_LDADD = \
|
||||
$(top_builddir)/common/options/liboptions.la \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "xstrtol.h"
|
||||
#include "getprogname.h"
|
||||
|
||||
#include "structs-cleanups.h"
|
||||
#include "options.h"
|
||||
#include "display-options.h"
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ XOBJECTS = $(BOBJECTS:.cmo=.cmx)
|
||||
OCAMLPACKAGES = \
|
||||
-package str,unix \
|
||||
-I $(top_builddir)/common/utils/.libs \
|
||||
-I $(top_builddir)/common/structs/.libs \
|
||||
-I $(top_builddir)/lib/.libs \
|
||||
-I $(top_builddir)/gnulib/lib/.libs \
|
||||
-I $(top_builddir)/ocaml \
|
||||
@@ -122,6 +123,7 @@ endif
|
||||
|
||||
OCAMLCLIBS = \
|
||||
-lvisit \
|
||||
-lstructs \
|
||||
-lutils \
|
||||
$(LIBTINFO_LIBS) \
|
||||
$(LIBCRYPT_LIBS) \
|
||||
|
||||
@@ -93,12 +93,14 @@ tests_CPPFLAGS = \
|
||||
-DGUESTFS_PRIVATE=1 \
|
||||
-I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \
|
||||
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
|
||||
-I$(top_srcdir)/common/structs -I$(top_builddir)/common/structs \
|
||||
-I$(top_srcdir)/lib -I$(top_builddir)/lib
|
||||
tests_CFLAGS = \
|
||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
|
||||
$(PCRE_CFLAGS)
|
||||
tests_LDADD = \
|
||||
$(PCRE_LIBS) \
|
||||
$(top_builddir)/common/structs/libstructs.la \
|
||||
$(top_builddir)/common/utils/libutils.la \
|
||||
$(top_builddir)/lib/libguestfs.la \
|
||||
$(LIBXML2_LIBS) \
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "guestfs.h"
|
||||
#include "guestfs-internal-frontend.h"
|
||||
#include "structs-cleanups.h"
|
||||
|
||||
#include "tests.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user