summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/boot.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-08-03 09:14:02 +0000
committerjhb <jhb@FreeBSD.org>2000-08-03 09:14:02 +0000
commite165b852ded88acff34e4cb4f334647dcb33c319 (patch)
treea0d78fd9b77c781f88bf64107578f9e585421ff5 /sys/boot/common/boot.c
parent1f9890b495e04d1e7d9e102fd9df269969c2885c (diff)
downloadFreeBSD-src-e165b852ded88acff34e4cb4f334647dcb33c319.zip
FreeBSD-src-e165b852ded88acff34e4cb4f334647dcb33c319.tar.gz
Cleanup warnings. Most of these are signed/unsigned warnings, as well as
some added const's.
Diffstat (limited to 'sys/boot/common/boot.c')
-rw-r--r--sys/boot/common/boot.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/boot/common/boot.c b/sys/boot/common/boot.c
index 7c02e56..ae3cb77 100644
--- a/sys/boot/common/boot.c
+++ b/sys/boot/common/boot.c
@@ -38,7 +38,7 @@
static char *getbootfile(int try);
/* List of kernel names to try (may be overwritten by boot.config) XXX should move from here? */
-static char *default_bootfiles = "kernel;kernel.old";
+static const char *default_bootfiles = "kernel;kernel.old";
static int autoboot_tried;
@@ -53,7 +53,6 @@ command_boot(int argc, char *argv[])
struct preloaded_file *fp;
char *cp;
int try;
- int i;
/*
* See if the user has specified an explicit kernel to boot.
@@ -164,7 +163,7 @@ autoboot_maybe()
}
int
-autoboot(int delay, char *prompt)
+autoboot(int timeout, char *prompt)
{
time_t when, otime, ntime;
int c, yes;
@@ -172,19 +171,19 @@ autoboot(int delay, char *prompt)
autoboot_tried = 1;
- if (delay == -1) {
+ if (timeout == -1) {
/* try to get a delay from the environment */
if ((cp = getenv("autoboot_delay"))) {
- delay = strtol(cp, &ep, 0);
+ timeout = strtol(cp, &ep, 0);
if (cp == ep)
- delay = -1;
+ timeout = -1;
}
}
- if (delay == -1) /* all else fails */
- delay = 10;
+ if (timeout == -1) /* all else fails */
+ timeout = 10;
otime = time(NULL);
- when = otime + delay; /* when to boot */
+ when = otime + timeout; /* when to boot */
yes = 0;
/* XXX could try to work out what we might boot */
@@ -228,7 +227,7 @@ getbootfile(int try)
{
static char *name = NULL;
char *spec, *ep;
- int len;
+ size_t len;
/* we use dynamic storage */
if (name != NULL) {
OpenPOWER on IntegriCloud