mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user