summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-02-12 16:32:55 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-02-12 16:32:55 +0000
commita75ab90b5b66d139b6b1f411062fdeabcd2d47f0 (patch)
tree264026b943d919911108daf5fc4a5bf326020e82
parente0b96d5c8e5e949aaf39255d78f56ebd4ab4a75a (diff)
max partition letter is 'a' + MAXPARTITIONS - 1, not 'h'. ok (and
help) miod@
-rw-r--r--sbin/fsck_ffs/setup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c
index 12701c7899b..85643ddf382 100644
--- a/sbin/fsck_ffs/setup.c
+++ b/sbin/fsck_ffs/setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setup.c,v 1.26 2007/02/09 19:52:32 otto Exp $ */
+/* $OpenBSD: setup.c,v 1.27 2007/02/12 16:32:54 otto Exp $ */
/* $NetBSD: setup.c,v 1.27 1996/09/27 22:45:19 christos Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setup.c 8.5 (Berkeley) 11/23/94";
#else
-static const char rcsid[] = "$OpenBSD: setup.c,v 1.26 2007/02/09 19:52:32 otto Exp $";
+static const char rcsid[] = "$OpenBSD: setup.c,v 1.27 2007/02/12 16:32:54 otto Exp $";
#endif
#endif /* not lint */
@@ -495,7 +495,8 @@ calcsb(char *dev, int devfd, struct fs *fs)
int i;
cp = strchr(dev, '\0') - 1;
- if ((cp == (char *)-1 || (*cp < 'a' || *cp > 'h')) && !isdigit(*cp)) {
+ if ((cp == (char *)-1 || (*cp < 'a' || *cp >= 'a' + MAXPARTITIONS)) &&
+ !isdigit(*cp)) {
pfatal("%s: CANNOT FIGURE OUT FILE SYSTEM PARTITION\n", dev);
return (0);
}