From owner-cvs-all Tue Jan 7 3:56:55 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B25137B401; Tue, 7 Jan 2003 03:56:54 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD8C043E4A; Tue, 7 Jan 2003 03:56:53 -0800 (PST) (envelope-from joerg@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h07Burfh032937; Tue, 7 Jan 2003 03:56:53 -0800 (PST) (envelope-from joerg@repoman.freebsd.org) Received: (from joerg@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h07BurBc032936; Tue, 7 Jan 2003 03:56:53 -0800 (PST) Message-Id: <200301071156.h07BurBc032936@repoman.freebsd.org> From: Joerg Wunsch Date: Tue, 7 Jan 2003 03:56:53 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern vfs_conf.c X-FreeBSD-CVS-Branch: RELENG_4 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG joerg 2003/01/07 03:56:53 PST Modified files: (Branch: RELENG_4) sys/kern vfs_conf.c Log: When parsing the name of the root device, do not assume all the world is a Va^W^W^W^W everything before a slash must be _PATH_DEV. Instead, verify this assumption, and only skip "/dev/" if it is known to be there. Also, slightly defer the complaint about a "missing unit number" in order to allow drivers to pre-allocate the variable "rootdev", and return this one if the major number of the parsed driver matches the major number of this pre-allocated rootdev. This will allow volume managers to pre-allocate rootdev with something they obtained knowledge through other ways, so the root file system can be located e. g. on a vinum volume. This is arguably more a hack than any clean solution, but a clean solution is simply impossible on RELENG_4 without a major code reorg (which is nothing we'd like to have now). A solution for -current needs to be completely different and can probably be a lot cleaner (i. e. each driver could/should be allowed to parse the given string for a root device name), but i more urgently needed this feature on -stable by now for production machines. Thus the method has been chosen that has the least impact and risk of introducing new bugs. (What doesn't work: since mountroot() cannot really parse the name given, boot -a cannot translate e. g. ufs:/dev/vinum/root into a valid device, but it can still parse ufs:/dev/da0a etc. to provide a fallback for error recovery.) Reviewed by: grog Revision Changes Path 1.49.2.5 +14 -10 src/sys/kern/vfs_conf.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message