*/
if (sscanf (str, "%"SCNu64"%c", &size, &type) == 2) {
switch (type) {
- case 'k': case 'K': size *= 1024; break;
- case 'm': case 'M': size *= 1024 * 1024; break;
- case 'g': case 'G': size *= 1024 * 1024 * 1024; break;
+ case 'k': case 'K': size *= 1024L; break;
+ 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 's': size *= 512; break;
default:
fprintf (stderr, _("could not parse size specification '%s'\n"), str);
" <nn>K or <nn>KB number of kilobytes\n"
" <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>sects number of 512 byte sectors\n"));
else if (strcasecmp (cmd, "echo") == 0)
printf (_("echo - display a line of text\n"
" <nn>K or <nn>KB number of kilobytes\n"
" <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>sects number of 512 byte sectors\n"));
else if (strcasecmp (cmd, "time") == 0)
printf (_("time - measure time taken to run command\n"