Use the getprogname gnulib module

Make use of the recently added 'getprogname' module in gnulib: replace
our guestfs_int_program_name with the getprogname() provided by the
module, since it does the same thing, and in a portable way.
As consequence of the above, use gnulib in a couple of tests that use
getprogname().

Since guestfs_int_program_name is gone, drop the configure checks
associated with it.
This commit is contained in:
Pino Toscano
2016-09-07 19:20:21 +02:00
parent 1f65143a42
commit eea210dbf7
47 changed files with 252 additions and 206 deletions

View File

@@ -38,6 +38,8 @@
#include <libvirt/virterror.h>
#endif
#include "getprogname.h"
#include "guestfs.h"
#include "options.h"
#include "display-options.h"
@@ -73,7 +75,7 @@ usage (int status)
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs_int_program_name);
getprogname ());
else {
printf (_("%s: check alignment of virtual machine partitions\n"
"Copyright (C) 2011 Red Hat Inc.\n"
@@ -93,8 +95,8 @@ usage (int status)
" -V|--version Display version and exit\n"
" -x Trace libguestfs API calls\n"
"For more information, see the manpage %s(1).\n"),
guestfs_int_program_name, guestfs_int_program_name,
guestfs_int_program_name, guestfs_int_program_name);
getprogname (), getprogname (),
getprogname (), getprogname ());
}
exit (status);
}