search for: getprogname

Displaying 20 results from an estimated 108 matches for "getprogname".

2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi, this series update libguestfs to a recent gnulib version, so that we can use its new getprogname module, and solve altogether one of the porting issues (the need for 'program_name' by the error module of gnulib), and have a single way to get the name of the current program. A number of changes in tools mostly, although mechanical. Thanks, Pino Toscano (3): Update gnulib to latest...
2019 Dec 03
7
[p2v PATCH 0/6] Use GLib a bit more
In an effort to reduce the code, start to use few bits of GLib: - replace the gnulib c-type module - replace the gnulib getprogname module - use g_spawn_sync to launch curl, and drop a file reading function Pino Toscano (6): Include glib.h in p2v.h Use g_ascii_isspace instead of c_isspace from gnulib Use g_get_prgname instead of getprogname from gnulib build: remove no more used gnulib modules Use g_spawn_sync to lau...
2017 Mar 31
0
[PATCH 2/3] Use Unicode single quotes ‘’ in place of `' in strings throughout.
...b/align/scan.c @@ -76,7 +76,7 @@ static void __attribute__((noreturn)) usage (int status) { if (status != EXIT_SUCCESS) - fprintf (stderr, _("Try `%s --help' for more information.\n"), + fprintf (stderr, _("Try ‘%s --help’ for more information.\n"), getprogname ()); else { printf (_("%s: check alignment of virtual machine partitions\n" diff --git a/cat/cat.c b/cat/cat.c index 90f6fb0d6..9fa8b4fed 100644 --- a/cat/cat.c +++ b/cat/cat.c @@ -56,7 +56,7 @@ static void __attribute__((noreturn)) usage (int status) { if (status != EXIT_SUC...
2016 Aug 18
5
[PATCH v2 0/4] New getprogname module
Hi, as discussed in [1], this series adds a new getprogname module. All it does is providing a getprogname function, much like what is found on e.g. *BSD systems, and using it in gnulib instead of progname. Also, using it explicitly by modules avoids gnulib users the need of either use the progname module (GPL), or to provide program_name (and call set_prog...
2015 Feb 09
0
[PATCH 4/5] macosx/bsd: Use getprogname() where available
....ac | 1 + src/guestfs-internal-frontend.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index a2fb99e..0f7f97e 100644 --- a/configure.ac +++ b/configure.ac @@ -315,6 +315,7 @@ AC_CHECK_FUNCS([\ be32toh \ fsync \ futimens \ + getprogname \ getxattr \ htonl \ htons \ diff --git a/src/guestfs-internal-frontend.h b/src/guestfs-internal-frontend.h index 2b9070b..d496655 100644 --- a/src/guestfs-internal-frontend.h +++ b/src/guestfs-internal-frontend.h @@ -133,6 +133,8 @@ extern void guestfs___cleanup_pclose (void *ptr);...
2015 Feb 07
1
Re: Patchable build problems on OS X 10.10
On 6 February 2015 at 10:03, Richard W.M. Jones <rjones@redhat.com> wrote: [...] > Linux doesn't have getprogname. One way around this is to add > getprogname to the list of functions in configure.ac AC_CHECK_FUNCS. > That will cause a macro to be defined which you can use like this: > > #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1 > # define program_name program_invocation_short_name...
2017 Apr 20
1
[PATCH] tests: Replace test-max-disks with several tests.
....h> +#include <errno.h> +#include <error.h> +#include <pwd.h> +#include <sys/types.h> +#include <sys/time.h> +#include <sys/resource.h> +#include <assert.h> + +#include <guestfs.h> +#include "guestfs-internal-frontend.h" + +#include "getprogname.h" + +static ssize_t get_max_disks (guestfs_h *g); +static void do_test (guestfs_h *g, size_t ndisks, bool just_add); +static void make_disks (const char *tmpdir); +static void rm_disks (void); + +static size_t ndisks; +static char **disks; + +static void __attribute__((noreturn)) +usage (int...
2017 Mar 21
0
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
...+#include <stdlib.h> +#include <stdarg.h> +#include <fcntl.h> +#include <errno.h> +#include <libintl.h> +#include <time.h> +#include <sys/ioctl.h> + +#include <math.h> + +#ifdef HAVE_LINUX_RTC_H +#include <linux/rtc.h> +#endif + +#include "getprogname.h" +#include "ignore-value.h" + +#include "p2v.h" + +#ifndef HAVE_LINUX_RTC_H +void +get_rtc_config (struct rtc_config *rtc) +{ + fprintf (stderr, "%s: RTC: compiled without support for /dev/rtc\n", + getprogname ()); + + rtc->offset = 0; + rtc-&gt...
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
....h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <errno.h> +#include <libintl.h> + +#ifdef HAVE_LIBVIRT +#include <libvirt/libvirt.h> +#include <libvirt/virterror.h> +#endif + +#include <libxml/xpath.h> + +#include "getprogname.h" +#include "ignore-value.h" + +#include "p2v.h" + +static void +free_cpu_config (struct cpu_config *cpu) +{ + if (cpu->vendor) + free (cpu->vendor); + if (cpu->model) + free (cpu->model); + memset (cpu, 0, sizeof *cpu); +} + +/** + * Read flags from F...
2017 Mar 21
2
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
Unlike the <cpu> node (see the other thread on the libguestfs ML), reading the Real Time Clock doesn't require libvirt and does work :-) For reference, read: https://libvirt.org/formatdomain.html#elementsTime https://en.wikipedia.org/wiki/Time_zone To test this you can run virt-p2v under qemu with a RTC offset: make -C p2v \ run-virt-p2v-in-a-vm \
2015 Feb 05
4
Patchable build problems on OS X 10.10
...Apple's xdr.h: "If your code invokes an xdrproc_t callback, it must be modified to pass a third parameter, which may simply be zero." * OS X does not provide open_memstream(). * src/guestfs-internal-frontend.h and gnulib/lib/error.c need monkey-patching to replace program_name with getprogname(). The patch I'm using right now to get libguestfs to successfully compile is here: https://gist.github.com/shulima/c194c5057e88dbd8f686 Configure flags are --disable-probes, --disable-daemon, --disable-appliance. -- Margaret
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
...t; #include <string.h> #include <errno.h> +#include <error.h> #include <libintl.h> -#ifdef HAVE_LIBVIRT -#include <libvirt/libvirt.h> -#include <libvirt/virterror.h> -#endif - -#include <libxml/xpath.h> - +#include "c-ctype.h" #include "getprogname.h" #include "ignore-value.h" @@ -65,235 +57,166 @@ free_cpu_config (struct cpu_config *cpu) } /** - * Read flags from F</proc/cpuinfo>. + * Get the output of lscpu as a list of (key, value) pairs (as a + * flattened list of strings). */ -static void -cpuinfo_flags (str...
2017 Jun 15
0
[PATCH v6 11/41] utils: Rename ‘guestfs-internal-frontend.h’ to ‘utils.h’.
...ls.h /qemu-wrapper.sh /rescue/stamp-virt-rescue.pod /rescue/virt-rescue diff --git a/builder/index-validate.c b/builder/index-validate.c index 224cd674a..a830ad8c6 100644 --- a/builder/index-validate.c +++ b/builder/index-validate.c @@ -31,7 +31,7 @@ #include <guestfs.h> #include "getprogname.h" -#include "guestfs-internal-frontend.h" +#include "utils.h" #include "index-struct.h" #include "index-parse.h" diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index ef37849ed..296d0d170 100644 --- a/builder/pxzcat-c.c +++ b/builder/pxzcat-c.c...
2017 Jun 19
0
[PATCH v7 12/13] utils: Rename ‘guestfs-internal-frontend.h’ to ‘guestfs-utils.h’.
...uestfs-utils.h /python/ignore-value.h /python/MANIFEST /python/module.c diff --git a/builder/index-validate.c b/builder/index-validate.c index 224cd674a..98c4e8279 100644 --- a/builder/index-validate.c +++ b/builder/index-validate.c @@ -31,7 +31,7 @@ #include <guestfs.h> #include "getprogname.h" -#include "guestfs-internal-frontend.h" +#include "guestfs-utils.h" #include "index-struct.h" #include "index-parse.h" diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c index ef37849ed..436914ba6 100644 --- a/builder/pxzcat-c.c +++ b/builder/px...
2002 Dec 31
0
openssh-3.5p1 && heimdal
...ir=/usr/lib/ssh \ --with-tcp-wrappers \ --with-pam \ --with-kerberos5=/usr/local/heimdal \ --with-ssl-dir=/usr \ --with-mantype=man \ --with-md5-passwords \ --with-shadow \ --with-ipv4-default But I had to remove the kerberos5 option: /usr/local/heimdal/lib/libroken.a(getprogname.o): In function `get_progname': getprogname.o(.text+0x10): multiple definition of `get_progname' /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14. openbsd-compat//libopenbsd-compat.a(bsd-misc.o):/home/net/SSH/openssh-3.5p1/openbsd-compat/bsd-misc.c:30: first defined here /usr/b...
2016 Oct 03
0
[PATCH v3 1/2] New tool: virt-tail.
...s.h> +#include <unistd.h> +#include <getopt.h> +#include <signal.h> +#include <errno.h> +#include <error.h> +#include <locale.h> +#include <assert.h> +#include <libintl.h> +#include <sys/types.h> +#include <sys/stat.h> + +#include "getprogname.h" +#include "ignore-value.h" + +#include "guestfs.h" +#include "options.h" +#include "display-options.h" +#include "windows.h" + +/* Currently open libguestfs handle. */ +guestfs_h *g; + +int read_only = 1; +int live = 0; +int verbose = 0; +in...
2016 Oct 03
3
[PATCH v2 0/2] New tool: virt-tail.
Nothing new in the virt-tail command itself, but the second commit includes a simple test. Rich.
2016 Oct 03
1
Re: [PATCH v2 1/2] New tool: virt-tail.
...etopt.h> > +#include <signal.h> > +#include <errno.h> > +#include <error.h> > +#include <locale.h> > +#include <assert.h> > +#include <libintl.h> > +#include <sys/types.h> > +#include <sys/stat.h> > + > +#include "getprogname.h" > +#include "ignore-value.h" > + > +#include "guestfs.h" > +#include "options.h" > +#include "display-options.h" > +#include "windows.h" > + > +/* Currently open libguestfs handle. */ > +guestfs_h *g; > + > +...
2016 Oct 03
0
[PATCH v2 1/2] New tool: virt-tail.
...s.h> +#include <unistd.h> +#include <getopt.h> +#include <signal.h> +#include <errno.h> +#include <error.h> +#include <locale.h> +#include <assert.h> +#include <libintl.h> +#include <sys/types.h> +#include <sys/stat.h> + +#include "getprogname.h" +#include "ignore-value.h" + +#include "guestfs.h" +#include "options.h" +#include "display-options.h" +#include "windows.h" + +/* Currently open libguestfs handle. */ +guestfs_h *g; + +int read_only = 1; +int live = 0; +int verbose = 0; +in...
2016 Oct 01
1
[PATCH] New tool: virt-tail.
This adds a new tool which does a follow operation (ie. tail -f) on one or more log/text files inside the guest. I've only done limited testing, but it works for me for tailing various long-running builds inside guests which I'm doing at the moment. There are no tests at present. Rich.