diff options
-rw-r--r-- | sbin/bsdlabel/bsdlabel.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 9012282..d1d5f02 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -1152,22 +1152,27 @@ checklabel(struct disklabel *lp) case '%': total_percent += size; break; - case 'k': - case 'K': + case 't': + case 'T': size *= 1024ULL; - break; - case 'm': - case 'M': - size *= 1024ULL * 1024ULL; - break; + /* FALLTHROUGH */ case 'g': case 'G': - size *= 1024ULL * 1024ULL * 1024ULL; + size *= 1024ULL; + /* FALLTHROUGH */ + case 'm': + case 'M': + size *= 1024ULL; + /* FALLTHROUGH */ + case 'k': + case 'K': + size *= 1024ULL; break; case '\0': break; default: - warnx("unknown size specifier '%c' (K/M/G are valid)",part_size_type[i]); + warnx("unknown multiplier prefix '%c' for partition %c (should be K, M, G or T)", + part_size_type[i], i + 'a'); break; } /* don't count %'s yet */ |