diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-11-03 15:49:36 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-11-03 18:48:56 +0000 |
commit | 2066805a5d93b62beaf6653324715f0b62b06a05 (patch) | |
tree | 393ec11feb514069cf5cfb102b24a4d3a75d7e40 /src/Makefile.am | |
parent | d859c283c469b9d9124d90d0ac32024671372ed5 (diff) | |
download | libguestfs-2066805a5d93b62beaf6653324715f0b62b06a05.tar.gz libguestfs-2066805a5d93b62beaf6653324715f0b62b06a05.tar.xz libguestfs-2066805a5d93b62beaf6653324715f0b62b06a05.zip |
lib: Expose errno through new API guestfs_last_errno.
If either the daemon sends back an errno, or a system call
fails in the library, save the errno in the handle and then
make it available to callers through the guestfs_last_errno
function.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 4c5468bc..4bcf7e9e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,15 +24,19 @@ generator_built = \ guestfs-internal-actions.h \ actions.c \ bindtests.c \ + errnostring_gperf.gperf \ + errnostring.c \ + errnostring.h guestfs-actions.pod \ guestfs-availability.pod \ guestfs-structs.pod \ libguestfs.syms BUILT_SOURCES = \ - $(generator_built) \ - guestfs_protocol.c \ - guestfs_protocol.h + $(generator_built) \ + guestfs_protocol.c \ + guestfs_protocol.h \ + errnostring_gperf.c EXTRA_DIST = \ $(BUILT_SOURCES) \ @@ -52,6 +56,19 @@ libprotocol_la_SOURCES = \ libprotocol_la_CFLAGS = +# Build the errnostring perfect hash code. The generated code has lots +# of warnings so we must compile it in a separate mini-library. +liberrnostring_la_SOURCES = \ + errnostring_gperf.c \ + errnostring.h \ + errnostring.c +liberrnostring_la_CFLAGS = + +errnostring_gperf.c: errnostring_gperf.gperf + rm -f $@ + $(GPERF) -t $< > $@-t + mv $@-t $@ + # From the libtool info file, with comments: # # | 1. Start with version information of `0:0:0' for each libtool library. @@ -115,9 +132,9 @@ libguestfs_la_SOURCES = \ libguestfs_la_LIBADD = $(HIVEX_LIBS) $(AUGEAS_LIBS) $(LIBPCRE) $(LIBMAGIC) $(LTLIBTHREAD) ../gnulib/lib/libgnu.la -# Make libguestfs include the convenience library. -noinst_LTLIBRARIES = libprotocol.la -libguestfs_la_LIBADD += libprotocol.la +# Make libguestfs include the convenience libraries. +noinst_LTLIBRARIES = liberrnostring.la libprotocol.la +libguestfs_la_LIBADD += liberrnostring.la libprotocol.la libguestfs_la_CFLAGS = \ -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \ |