diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-27 10:52:54 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-27 10:52:54 +0000 |
commit | a8ad364a7f7d57967d53c45d232c474016c007af (patch) | |
tree | 189333b1b66e8cd8d8cb7db0446b70f1ebe889e7 /sbin/fdisk/fdisk.c | |
parent | b6f33850e0b8ee9cc071000b1ed108a9144a8609 (diff) | |
download | src-a8ad364a7f7d57967d53c45d232c474016c007af.tar.gz src-a8ad364a7f7d57967d53c45d232c474016c007af.zip |
Fix the regexp evilness so that fdisk can (again?) find the device
root is on from the root mount path.
Spotted by: imp
Notes
Notes:
svn path=/head/; revision=106033
Diffstat (limited to 'sbin/fdisk/fdisk.c')
-rw-r--r-- | sbin/fdisk/fdisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 5f1b5f97ca8c..e10929a54890 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -1342,7 +1342,7 @@ get_rootdisk(void) if (statfs("/", &rootfs) == -1) err(1, "statfs(\"/\")"); - if ((rv = regcomp(&re, "^(/dev/.*)(\\d+(s\\d+)?[a-h])?$", + if ((rv = regcomp(&re, "^(/dev/[a-z]+[0-9]+)([sp][0-9]+)?[a-h]?$", REG_EXTENDED)) != 0) errx(1, "regcomp() failed (%d)", rv); if ((rv = regexec(&re, rootfs.f_mntfromname, NMATCHES, rm, 0)) != 0) |