fish: Allow <nn>P and <nn>E for petabyte and exabyte allocations.

This commit is contained in:
Richard Jones
2009-11-04 21:51:35 +00:00
parent 3266e51054
commit 857954dfbd
3 changed files with 22 additions and 0 deletions

View File

@@ -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);

View File

@@ -958,6 +958,8 @@ display_builtin_command (const char *cmd)
" <nn>M or <nn>MB number of megabytes\n"
" <nn>G or <nn>GB number of gigabytes\n"
" <nn>T or <nn>TB number of terabytes\n"
" <nn>P or <nn>PB number of petabytes\n"
" <nn>E or <nn>EB number of exabytes\n"
" <nn>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)
" <nn>M or <nn>MB number of megabytes\n"
" <nn>G or <nn>GB number of gigabytes\n"
" <nn>T or <nn>TB number of terabytes\n"
" <nn>P or <nn>PB number of petabytes\n"
" <nn>E or <nn>EB number of exabytes\n"
" <nn>sects number of 512 byte sectors\n"));
else if (strcasecmp (cmd, "time") == 0)
printf (_("time - measure time taken to run command\n"

View File

@@ -457,6 +457,14 @@ number of gigabytes
number of terabytes
=item C<nn>P or C<nn>PB
number of petabytes
=item C<nn>E or C<nn>EB
number of exabytes
=item C<nn>sects
number of 512 byte sectors
@@ -570,6 +578,14 @@ number of gigabytes
number of terabytes
=item C<nn>P or C<nn>PB
number of petabytes
=item C<nn>E or C<nn>EB
number of exabytes
=item C<nn>sects
number of 512 byte sectors