From 857954dfbdd287d2e00d40c8c60f6cbe5b5730e2 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 4 Nov 2009 21:51:35 +0000 Subject: [PATCH] fish: Allow P and E for petabyte and exabyte allocations. --- fish/alloc.c | 2 ++ fish/fish.c | 4 ++++ guestfish.pod | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/fish/alloc.c b/fish/alloc.c index 3b0de27..fd5be2c 100644 --- a/fish/alloc.c +++ b/fish/alloc.c @@ -144,6 +144,8 @@ parse_size (const char *str, off_t *size_rtn) case 'm': case 'M': size *= 1024L * 1024; break; case 'g': case 'G': size *= 1024L * 1024 * 1024; break; case 't': case 'T': size *= 1024L * 1024 * 1024 * 1024; break; + case 'p': case 'P': size *= 1024L * 1024 * 1024 * 1024 * 1024; break; + case 'e': case 'E': size *= 1024L * 1024 * 1024 * 1024 * 1024 * 1024; break; case 's': size *= 512; break; default: fprintf (stderr, _("could not parse size specification '%s'\n"), str); diff --git a/fish/fish.c b/fish/fish.c index 1039bad..3ab09b5 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -958,6 +958,8 @@ display_builtin_command (const char *cmd) " 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" @@ -1049,6 +1051,8 @@ display_builtin_command (const char *cmd) " 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" diff --git a/guestfish.pod b/guestfish.pod index 9b49fe1..8ae1800 100644 --- a/guestfish.pod +++ b/guestfish.pod @@ -457,6 +457,14 @@ number of gigabytes number of terabytes +=item CP or CPB + +number of petabytes + +=item CE or CEB + +number of exabytes + =item Csects number of 512 byte sectors @@ -570,6 +578,14 @@ number of gigabytes number of terabytes +=item CP or CPB + +number of petabytes + +=item CE or CEB + +number of exabytes + =item Csects number of 512 byte sectors -- 1.8.3.1