X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=test-tool%2Ftest-tool.c;h=223cafca4ae232ec493c725ce17a964d4bf24efe;hb=6e9b06d99058bdd4d8792506054ec3cd8cb8c736;hp=f38490a741085e377de7acc3742c391b4af244a3;hpb=c372c7c23a298a940b8a0868396ef2ae0d824e4d;p=libguestfs.git diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c index f38490a..223cafc 100644 --- a/test-tool/test-tool.c +++ b/test-tool/test-tool.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include @@ -41,6 +43,13 @@ #define N_(str) str #endif +#if !ENABLE_NLS +#undef textdomain +#define textdomain(Domainname) /* empty */ +#undef bindtextdomain +#define bindtextdomain(Domainname, Dirname) /* empty */ +#endif + #define STREQ(a,b) (strcmp((a),(b)) == 0) #define STRCASEEQ(a,b) (strcasecmp((a),(b)) == 0) #define STRNEQ(a,b) (strcmp((a),(b)) != 0) @@ -85,6 +94,10 @@ usage (void) int main (int argc, char *argv[]) { + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEBASEDIR); + textdomain (PACKAGE); + static const char *options = "t:?"; static const struct option long_options[] = { { "help", 0, 0, '?' }, @@ -225,7 +238,7 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } - if (guestfs_mount (g, "/dev/sda1", "/") == -1) { + if (guestfs_mount_options (g, "", "/dev/sda1", "/") == -1) { fprintf (stderr, _("libguestfs-test-tool: failed to mount /dev/sda1 on /\n")); exit (EXIT_FAILURE);