summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2012-03-18 03:24:01 +0000
committerkrw <krw@openbsd.org>2012-03-18 03:24:01 +0000
commit117239d3f70d826095b901035062a9c7ea08395c (patch)
treec44418cf17f4cf0db1a8e69f9f9fd9e9bce6aca9
parentWrap some long lines I keep fixing, shrinking various diffs. No (diff)
downloadwireguard-openbsd-117239d3f70d826095b901035062a9c7ea08395c.tar.xz
wireguard-openbsd-117239d3f70d826095b901035062a9c7ea08395c.zip
getuint() -> getuint64() to make it crystal clear. No functional
change.
-rw-r--r--sbin/disklabel/editor.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c
index 8d15c3c0342..7ba9b2ae8c8 100644
--- a/sbin/disklabel/editor.c
+++ b/sbin/disklabel/editor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: editor.c,v 1.267 2012/03/18 03:07:05 krw Exp $ */
+/* $OpenBSD: editor.c,v 1.268 2012/03/18 03:24:01 krw Exp $ */
/*
* Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -39,7 +39,7 @@
#include "extern.h"
#include "pathnames.h"
-/* flags for getuint() */
+/* flags for getuint64() */
#define DO_CONVERSIONS 0x00000001
#define DO_ROUNDING 0x00000002
@@ -127,7 +127,7 @@ void editor_help(void);
void editor_modify(struct disklabel *, char *);
void editor_name(struct disklabel *, char *);
char *getstring(char *, char *, char *);
-u_int64_t getuint(struct disklabel *, char *, char *, u_int64_t, u_int64_t,
+u_int64_t getuint64(struct disklabel *, char *, char *, u_int64_t, u_int64_t,
u_int64_t, int);
int has_overlap(struct disklabel *);
int partition_cmp(const void *, const void *);
@@ -743,7 +743,7 @@ editor_resize(struct disklabel *lp, char *p)
fputs("Cannot resize spoofed partition\n", stderr);
return;
}
- secs = getuint(lp, "[+|-]new size (with unit)",
+ secs = getuint64(lp, "[+|-]new size (with unit)",
"new size or amount to grow (+) or shrink (-) partition including unit",
sz, editor_countfree(lp), 0, DO_CONVERSIONS);
@@ -1141,7 +1141,7 @@ getstring(char *prompt, char *helpstring, char *oval)
* Usually only called by helper functions.
*/
u_int64_t
-getuint(struct disklabel *lp, char *prompt, char *helpstring,
+getuint64(struct disklabel *lp, char *prompt, char *helpstring,
u_int64_t oval, u_int64_t maxval, u_int64_t offset, int flags)
{
char buf[BUFSIZ], *endptr, *p, operator = '\0';
@@ -1396,7 +1396,7 @@ edit_parms(struct disklabel *lp)
/* sectors/track */
for (;;) {
- ui = getuint(lp, "sectors/track",
+ ui = getuint64(lp, "sectors/track",
"The Number of sectors per track.", lp->d_nsectors,
lp->d_nsectors, 0, 0);
if (ui == ULLONG_MAX - 1) {
@@ -1412,7 +1412,7 @@ edit_parms(struct disklabel *lp)
/* tracks/cylinder */
for (;;) {
- ui = getuint(lp, "tracks/cylinder",
+ ui = getuint64(lp, "tracks/cylinder",
"The number of tracks per cylinder.", lp->d_ntracks,
lp->d_ntracks, 0, 0);
if (ui == ULLONG_MAX - 1) {
@@ -1428,7 +1428,7 @@ edit_parms(struct disklabel *lp)
/* sectors/cylinder */
for (;;) {
- ui = getuint(lp, "sectors/cylinder",
+ ui = getuint64(lp, "sectors/cylinder",
"The number of sectors per cylinder (Usually sectors/track "
"* tracks/cylinder).", lp->d_secpercyl, lp->d_secpercyl,
0, 0);
@@ -1445,7 +1445,7 @@ edit_parms(struct disklabel *lp)
/* number of cylinders */
for (;;) {
- ui = getuint(lp, "number of cylinders",
+ ui = getuint64(lp, "number of cylinders",
"The total number of cylinders on the disk.",
lp->d_ncylinders, lp->d_ncylinders, 0, 0);
if (ui == ULLONG_MAX - 1) {
@@ -1463,7 +1463,7 @@ edit_parms(struct disklabel *lp)
for (;;) {
u_int64_t nsec = MAX(DL_GETDSIZE(lp),
(u_int64_t)lp->d_ncylinders * lp->d_secpercyl);
- ui = getuint(lp, "total sectors",
+ ui = getuint64(lp, "total sectors",
"The total number of sectors on the disk.",
nsec, nsec, 0, 0);
if (ui == ULLONG_MAX - 1) {
@@ -1614,7 +1614,7 @@ set_bounds(struct disklabel *lp)
/* Starting sector */
do {
- ui = getuint(lp, "Starting sector",
+ ui = getuint64(lp, "Starting sector",
"The start of the OpenBSD portion of the disk.",
starting_sector, DL_GETDSIZE(lp), 0, 0);
if (ui == ULLONG_MAX - 1) {
@@ -1626,7 +1626,7 @@ set_bounds(struct disklabel *lp)
/* Size */
do {
- ui = getuint(lp, "Size ('*' for entire disk)",
+ ui = getuint64(lp, "Size ('*' for entire disk)",
"The size of the OpenBSD portion of the disk ('*' for the "
"entire disk).", ending_sector - starting_sector,
DL_GETDSIZE(lp) - start_temp, 0, 0);
@@ -1899,7 +1899,7 @@ get_offset(struct disklabel *lp, int partno)
u_int64_t ui, maxsize;
int i, fstype;
- ui = getuint(lp, "offset",
+ ui = getuint64(lp, "offset",
"Starting sector for this partition.",
DL_GETPOFFSET(pp),
DL_GETPOFFSET(pp), 0, DO_CONVERSIONS |
@@ -1948,7 +1948,7 @@ get_size(struct disklabel *lp, int partno)
maxsize = max_partition_size(lp, partno);
- ui = getuint(lp, "size", "Size of the partition. "
+ ui = getuint64(lp, "size", "Size of the partition. "
"You may also say +/- amount for a relative change.",
DL_GETPSIZE(pp), maxsize, DL_GETPOFFSET(pp),
DO_CONVERSIONS | ((pp->p_fstype == FS_BSDFFS ||
@@ -1994,7 +1994,7 @@ get_fsize(struct disklabel *lp, int partno)
frag = 8;
for (;;) {
- ui = getuint(lp, "fragment size",
+ ui = getuint64(lp, "fragment size",
"Size of ffs block fragments. A multiple of the disk "
"sector-size.", fsize, ULLONG_MAX-2, 0, 0);
if (ui == ULLONG_MAX - 1) {
@@ -2036,7 +2036,7 @@ get_bsize(struct disklabel *lp, int partno)
frag = DISKLABELV1_FFS_FRAG(pp->p_fragblock);
for (;;) {
- ui = getuint(lp, "block size",
+ ui = getuint64(lp, "block size",
"Size of ffs blocks. A multiple of the ffs fragment size.",
fsize * frag, ULLONG_MAX - 2, 0, 0);
@@ -2126,7 +2126,7 @@ get_fstype(struct disklabel *lp, int partno)
}
} else {
for (;;) {
- ui = getuint(lp, "FS type (decimal)",
+ ui = getuint64(lp, "FS type (decimal)",
"Filesystem type as a decimal number; usually 7 "
"(4.2BSD) or 1 (swap).",
pp->p_fstype, pp->p_fstype, 0, 0);