X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Falloc.c;h=a7d115a9cede750c512b3825e7d417c54e0ebad6;hp=594d0a5641a65da5c5ce2dbd223c3a4d688b8a1f;hb=4c54721ad46b77c52eb6bb7e3ffe74325ac52797;hpb=05712b2457a44ee0f0020eced77db03c2aa419a1 diff --git a/fish/alloc.c b/fish/alloc.c index 594d0a5..a7d115a 100644 --- a/fish/alloc.c +++ b/fish/alloc.c @@ -1,5 +1,5 @@ /* guestfish - the filesystem interactive shell - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,15 +36,15 @@ do_alloc (const char *cmd, int argc, char *argv[]) int fd; if (argc != 2) { - fprintf (stderr, "use 'alloc file size' to create an image\n"); + fprintf (stderr, _("use 'alloc file size' to create an image\n")); return -1; } if (parse_size (argv[1], &size) == -1) return -1; - if (g_launched) { - fprintf (stderr, "can't allocate or add disks after launching\n"); + if (!guestfs_is_config (g)) { + fprintf (stderr, _("can't allocate or add disks after launching\n")); return -1; } @@ -91,14 +91,14 @@ parse_size (const char *str, off_t *size_rtn) case 'g': case 'G': size *= 1024 * 1024 * 1024; break; case 's': size *= 512; break; default: - fprintf (stderr, "could not parse size specification '%s'\n", str); + fprintf (stderr, _("could not parse size specification '%s'\n"), str); return -1; } } else if (sscanf (str, "%"SCNu64, &size) == 1) size *= 1024; else { - fprintf (stderr, "could not parse size specification '%s'\n", str); + fprintf (stderr, _("could not parse size specification '%s'\n"), str); return -1; }