From owner-svn-src-all@FreeBSD.ORG Thu Sep 16 08:16:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 092561065672; Thu, 16 Sep 2010 08:16:54 +0000 (UTC) (envelope-from brian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE3D28FC18; Thu, 16 Sep 2010 08:16:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8G8GrCF065810; Thu, 16 Sep 2010 08:16:53 GMT (envelope-from brian@svn.freebsd.org) Received: (from brian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8G8Grmj065808; Thu, 16 Sep 2010 08:16:53 GMT (envelope-from brian@svn.freebsd.org) Message-Id: <201009160816.o8G8Grmj065808@svn.freebsd.org> From: Brian Somers Date: Thu, 16 Sep 2010 08:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212724 - head/sbin/fdisk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2010 08:16:54 -0000 Author: brian Date: Thu Sep 16 08:16:53 2010 New Revision: 212724 URL: http://svn.freebsd.org/changeset/base/212724 Log: Add support for identifying a journaled root filesystem. Fix support for identifying the given /dev/vinum/root example. MFC after: 3 weeks Modified: head/sbin/fdisk/fdisk.c Modified: head/sbin/fdisk/fdisk.c ============================================================================== --- head/sbin/fdisk/fdisk.c Thu Sep 16 07:56:34 2010 (r212723) +++ head/sbin/fdisk/fdisk.c Thu Sep 16 08:16:53 2010 (r212724) @@ -1462,6 +1462,7 @@ sanitize_partition(struct dos_partition * /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));