mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-01 08:27:59 +00:00
Add support for identifying a journaled root filesystem.
Fix support for identifying the given /dev/vinum/root example. MFC after: 3 weeks
This commit is contained in:
parent
6e7a4f6c36
commit
6a5ffa0630
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212724
@ -1462,6 +1462,7 @@ sanitize_partition(struct dos_partition *partp)
|
||||
* /dev/da0a => /dev/da0
|
||||
* /dev/vinum/root => /dev/vinum/root
|
||||
* A ".eli" part is removed if it exists (see geli(8)).
|
||||
* A ".journal" ending is removed if it exists (see gjournal(8)).
|
||||
*/
|
||||
static char *
|
||||
get_rootdisk(void)
|
||||
@ -1476,7 +1477,7 @@ get_rootdisk(void)
|
||||
if (statfs("/", &rootfs) == -1)
|
||||
err(1, "statfs(\"/\")");
|
||||
|
||||
if ((rv = regcomp(&re, "^(/dev/[a-z/]+[0-9]+)([sp][0-9]+)?[a-h]?$",
|
||||
if ((rv = regcomp(&re, "^(/dev/[a-z/]+[0-9]*)([sp][0-9]+)?[a-h]?(\\.journal)?$",
|
||||
REG_EXTENDED)) != 0)
|
||||
errx(1, "regcomp() failed (%d)", rv);
|
||||
strlcpy(dev, rootfs.f_mntfromname, sizeof (dev));
|
||||
|
Loading…
Reference in New Issue
Block a user