Change guestfs___* to guestfs_int_*

libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.

The first step is to replace all guestfs___* (3 underscores) with
guestfs_int_*.  We've used guestfs_int_* elsewhere already as a prefix
for internal identifiers.

This is an entirely mechanical change done using:
  git ls-files | xargs perl -pi.bak -e 's/guestfs___/guestfs_int_/g'

Reference: http://stackoverflow.com/a/228797
This commit is contained in:
Richard W.M. Jones
2015-02-14 15:14:48 +00:00
parent 46010912ef
commit bfbcc01403
109 changed files with 1348 additions and 1348 deletions

View File

@@ -88,7 +88,7 @@ static void __attribute__((noreturn))
fuse_help (void)
{
static struct fuse_operations null_operations;
const char *tmp_argv[] = { guestfs___program_name, "--help", NULL };
const char *tmp_argv[] = { guestfs_int_program_name, "--help", NULL };
fuse_main (2, (char **) tmp_argv, &null_operations, NULL);
exit (EXIT_SUCCESS);
}
@@ -98,7 +98,7 @@ usage (int status)
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
guestfs___program_name);
guestfs_int_program_name);
else {
fprintf (stdout,
_("%s: FUSE module for libguestfs\n"
@@ -131,7 +131,7 @@ usage (int status)
" -w|--rw Mount read-write\n"
" -x|--trace Trace guestfs API calls\n"
),
guestfs___program_name, guestfs___program_name, guestfs___program_name);
guestfs_int_program_name, guestfs_int_program_name, guestfs_int_program_name);
}
exit (status);
}
@@ -245,12 +245,12 @@ main (int argc, char *argv[])
} else if (STREQ (long_options[option_index].name, "fd")) {
if (sscanf (optarg, "%d", &pipe_fd) != 1 || pipe_fd < 0) {
fprintf (stderr, _("%s: unable to parse --fd option value: %s\n"),
guestfs___program_name, optarg);
guestfs_int_program_name, optarg);
exit (EXIT_FAILURE);
}
} else {
fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
guestfs___program_name, long_options[option_index].name, option_index);
guestfs_int_program_name, long_options[option_index].name, option_index);
exit (EXIT_FAILURE);
}
break;
@@ -320,7 +320,7 @@ main (int argc, char *argv[])
if (!drvs || !(mps || inspector)) {
fprintf (stderr,
_("%s: must have at least one -a/-d and at least one -m/-i option\n"),
guestfs___program_name);
guestfs_int_program_name);
exit (EXIT_FAILURE);
}
} else {
@@ -330,14 +330,14 @@ main (int argc, char *argv[])
if (read_only) {
fprintf (stderr,
_("%s: --live is not compatible with --ro option\n"),
guestfs___program_name);
guestfs_int_program_name);
exit (EXIT_FAILURE);
}
if (inspector) {
fprintf (stderr,
_("%s: --live is not compatible with -i option\n"),
guestfs___program_name);
guestfs_int_program_name);
exit (EXIT_FAILURE);
}
@@ -352,14 +352,14 @@ main (int argc, char *argv[])
if (count_d != 1) {
fprintf (stderr,
_("%s: with --live, you must use exactly one -d option\n"),
guestfs___program_name);
guestfs_int_program_name);
exit (EXIT_FAILURE);
}
if (count_other != 0) {
fprintf (stderr,
_("%s: --live is not compatible with -a option\n"),
guestfs___program_name);
guestfs_int_program_name);
exit (EXIT_FAILURE);
}
}
@@ -368,7 +368,7 @@ main (int argc, char *argv[])
if (optind+1 != argc) {
fprintf (stderr,
_("%s: you must specify a mountpoint in the host filesystem\n"),
guestfs___program_name);
guestfs_int_program_name);
exit (EXIT_FAILURE);
}