From: krw Date: Sat, 4 Aug 2018 15:36:41 +0000 (+0000) Subject: Rename local variable 'secs' to 'ui' to be consistant with all other X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=914b34750670cbc49b48d4f591e7261503f7c83f;p=openbsd Rename local variable 'secs' to 'ui' to be consistant with all other uses of getuint64(). No change to executable. --- diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index a9c2686d0d6..16230623966 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $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 @@ -706,7 +706,7 @@ editor_resize(struct disklabel *lp, char *p) { 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; @@ -735,15 +735,15 @@ editor_resize(struct disklabel *lp, char *p) 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; } @@ -755,12 +755,12 @@ editor_resize(struct disklabel *lp, char *p) 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);