X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=3ab09b5ce63579f34fef8f7e270fce84d9aa099f;hb=3cf719bc077a5f0d4f1a79279a5ba6e41d53c9b9;hp=f6996032b889ca03431fa7ceea143adcb2091b68;hpb=ec02f0da1550e37acd95d615ff4fcf88569bcf2c;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index f699603..3ab09b5 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -874,6 +874,8 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) r = do_more (cmd, argc, argv); else if (strcasecmp (cmd, "reopen") == 0) r = do_reopen (cmd, argc, argv); + else if (strcasecmp (cmd, "sparse") == 0) + r = do_sparse (cmd, argc, argv); else if (strcasecmp (cmd, "time") == 0) r = do_time (cmd, argc, argv); else @@ -927,6 +929,8 @@ list_builtin_commands (void) printf ("%-20s %s\n", "reopen", _("close and reopen libguestfs handle")); printf ("%-20s %s\n", + "sparse", _("allocate a sparse image file")); + printf ("%-20s %s\n", "time", _("measure time taken to run command")); /* actions are printed after this (see list_commands) */ @@ -953,6 +957,9 @@ display_builtin_command (const char *cmd) " K or KB number of kilobytes\n" " M or MB number of megabytes\n" " G or GB number of gigabytes\n" + " T or TB number of terabytes\n" + " P or PB number of petabytes\n" + " E or EB number of exabytes\n" " sects number of 512 byte sectors\n")); else if (strcasecmp (cmd, "echo") == 0) printf (_("echo - display a line of text\n" @@ -1020,6 +1027,33 @@ display_builtin_command (const char *cmd) "Close and reopen the libguestfs handle. It is not necessary to use\n" "this normally, because the handle is closed properly when guestfish\n" "exits. However this is occasionally useful for testing.\n")); + else if (strcasecmp (cmd, "sparse") == 0) + printf (_("sparse - allocate a sparse image file\n" + " sparse \n" + "\n" + " This creates an empty sparse file of the given size,\n" + " and then adds so it can be further examined.\n" + "\n" + " In all respects it works the same as the 'alloc'\n" + " command, except that the image file is allocated\n" + " sparsely, which means that disk blocks are not assigned\n" + " to the file until they are needed. Sparse disk files\n" + " only use space when written to, but they are slower\n" + " and there is a danger you could run out of real disk\n" + " space during a write operation.\n" + "\n" + " For more advanced image creation, see qemu-img utility.\n" + "\n" + " Size can be specified (where means a number):\n" + " number of kilobytes\n" + " eg: 1440 standard 3.5\" floppy\n" + " K or KB number of kilobytes\n" + " M or MB number of megabytes\n" + " G or GB number of gigabytes\n" + " T or TB number of terabytes\n" + " P or PB number of petabytes\n" + " E or EB number of exabytes\n" + " sects number of 512 byte sectors\n")); else if (strcasecmp (cmd, "time") == 0) printf (_("time - measure time taken to run command\n" " time [ ...]\n"