#include <getopt.h>
#include <stdbool.h>
#include <sys/utsname.h>
+#include <locale.h>
#include "internal.h"
#include "buf.h"
static void
vah_usage(void)
{
- fprintf(stdout, _("\n%s [options] [< def.xml]\n\n
- Options:\n
- -a | --add load profile\n
- -c | --create create profile from template\n
- -D | --delete unload and delete profile\n
- -f | --add-file <file> add file to profile\n
- -F | --append-file <file> append file to profile\n
- -r | --replace reload profile\n
- -R | --remove unload profile\n
- -h | --help this help\n
- -u | --uuid <uuid> uuid (profile name)\n
-\n", progname);
-
- fputs(_("This command is intended to be used by libvirtd "
- "and not used directly.\n"));
+ printf(_("\n%s [options] [< def.xml]\n\n"
+ " Options:\n"
+ " -a | --add load profile\n"
+ " -c | --create create profile from template\n"
+ " -D | --delete unload and delete profile\n"
+ " -f | --add-file <file> add file to profile\n"
+ " -F | --append-file <file> append file to profile\n"
+ " -r | --replace reload profile\n"
+ " -R | --remove unload profile\n"
+ " -h | --help this help\n"
+ " -u | --uuid <uuid> uuid (profile name)\n"
+ "\n"), progname);
+
+ puts(_("This command is intended to be used by libvirtd "
+ "and not used directly.\n"));
return;
}
}
if (VIR_CLOSE(fd) != 0) {
- vah_error(NULL, 0, _("failed to close or write to profile")_;
+ vah_error(NULL, 0, _("failed to close or write to profile"));
goto clean;
}
rc = 0;
}
if (VIR_CLOSE(fd) != 0) {
- vah_error(NULL, 0, _("failed to close or write to profile")_;
+ vah_error(NULL, 0, _("failed to close or write to profile"));
goto clean_all;
}
rc = 0;
case 'f':
case 'F':
if ((ctl->newfile = strdup(optarg)) == NULL)
- vah_error(ctl, 1, _("could not allocate memory for disk")_;
+ vah_error(ctl, 1, _("could not allocate memory for disk"));
ctl->append = arg == 'F';
break;
case 'h':
if (setlocale(LC_ALL, "") == NULL ||
bindtextdomain(PACKAGE, LOCALEDIR) == NULL ||
textdomain(PACKAGE) == NULL) {
- fprintf(stderr, _("%s: initialization failed\n"), argv0);
+ fprintf(stderr, _("%s: initialization failed\n"), argv[0]);
exit(EXIT_FAILURE);
}