-/* $OpenBSD: editor.c,v 1.341 2018/08/02 16:30:01 krw Exp $ */
+/* $OpenBSD: editor.c,v 1.342 2018/08/04 15:36:41 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
{
struct disklabel label;
struct partition *pp, *prev;
- u_int64_t secs, sz, off;
+ u_int64_t ui, sz, off;
int partno, i, flags;
label = *lp;
return;
}
flags = DO_CONVERSIONS;
- secs = getuint64(lp, "[+|-]new size (with unit)",
+ ui = getuint64(lp, "[+|-]new size (with unit)",
"new size or amount to grow (+) or shrink (-) partition including "
"unit", sz, sz + editor_countfree(lp), &flags);
- if (secs == CMD_ABORTED)
+ if (ui == CMD_ABORTED)
return;
- else if (secs == CMD_BADVALUE)
+ else if (ui == CMD_BADVALUE)
return;
- else if (secs == 0) {
+ else if (ui == 0) {
fputs("The size must be > 0 sectors\n", stderr);
return;
}
secs = ((secs + cylsecs - 1) / cylsecs) * cylsecs;
}
#endif
- if (DL_GETPOFFSET(pp) + secs > ending_sector) {
+ if (DL_GETPOFFSET(pp) + ui > ending_sector) {
fputs("Amount too big\n", stderr);
return;
}
- DL_SETPSIZE(pp, secs);
+ DL_SETPSIZE(pp, ui);
get_fsize(&label, partno);
get_bsize(&label, partno);
get_cpg(&label, partno);