From owner-freebsd-bugs Thu Nov 8 8:40:10 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D8A6037B41A for ; Thu, 8 Nov 2001 08:40:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fA8Ge3U24274; Thu, 8 Nov 2001 08:40:03 -0800 (PST) (envelope-from gnats) Date: Thu, 8 Nov 2001 08:40:03 -0800 (PST) Message-Id: <200111081640.fA8Ge3U24274@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Makoto Matsushita Subject: Re: bin/31009: Installing current snapshot fails at sysintall/install.c:installFilesystems() Reply-To: Makoto Matsushita Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/31009; it has been noted by GNATS. From: Makoto Matsushita To: freebsd-gnats-submit@FreeBSD.org Cc: jkh@FreeBSD.org Subject: Re: bin/31009: Installing current snapshot fails at sysintall/install.c:installFilesystems() Date: Fri, 09 Nov 2001 01:36:51 +0900 Hiroo-san's patch has a bug: if kernel does know about DEVFS, libdisk doesn't do mknod(2) even if it's actually not DEVFS. This causes that current 5-current's sysinstall(8) fails to create filesystem while a fresh installation procedure. I've reported this bug (sysinstall fails to create filesystem) from users of snapshots.jp.FreeBSD.org, and confirmed that hiroo-san's patch is not an actual fix. Jordan, would you please check my patch? If you are OK, please commit or I'll do. P.S.: I've already discussed with hiroo-san about this patch. -- - Makoto `MAR' MATSUSHITA Index: create_chunk.c =================================================================== RCS file: /home/ncvs/src/lib/libdisk/create_chunk.c,v retrieving revision 1.62 diff -u -r1.62 create_chunk.c --- create_chunk.c 10 Oct 2001 07:46:04 -0000 1.62 +++ create_chunk.c 8 Nov 2001 16:23:17 -0000 @@ -17,10 +17,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -282,18 +282,22 @@ char buf[BUFSIZ], buf2[BUFSIZ]; struct group *grp; struct passwd *pwd; + struct statfs fs; uid_t owner; gid_t group; - int mib[4]; - size_t miblen; *buf2 = '\0'; - miblen = sizeof(mib)/sizeof(mib[0]); if (isDebug()) msgDebug("MakeDev: Called with %s on path %s\n", p, path); if (!strcmp(p, "X")) return 0; - if (!sysctlnametomib("vfs.devfs.generation", &mib, &miblen)) { + if (statfs(path, &fs) != 0) { +#ifdef DEBUG + warn("statfs(%s) failed\n", path); +#endif + return 0; + } + if (strcmp(fs.f_fstypename, "devfs") == 0) { if (isDebug()) msgDebug("MakeDev: No need to mknod(2) with DEVFS.\n"); return 1; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message