From owner-freebsd-current Tue May 30 10:49:26 2000 Delivered-To: freebsd-current@freebsd.org Received: from almso1.proxy.att.com (almso1.att.com [192.128.167.69]) by hub.freebsd.org (Postfix) with ESMTP id 20C3237B589; Tue, 30 May 2000 10:49:19 -0700 (PDT) (envelope-from myevmenkin@att.com) Received: from flf960r1.ems.att.com ([135.71.244.37]) by almso1.proxy.att.com (AT&T IPNS/MSO-2.2) with ESMTP id NAA17677; Tue, 30 May 2000 13:49:17 -0400 (EDT) Received: from njb140bh3.ems.att.com by flf960r1.ems.att.com (8.8.8+Sun/ATTEMS-1.4.1 sol2) id NAA01596; Tue, 30 May 2000 13:46:53 -0400 (EDT) Received: by njb140bh3.ems.att.com with Internet Mail Service (5.5.2650.21) id ; Tue, 30 May 2000 13:49:16 -0400 Message-ID: From: "Yevmenkin, Maksim N, CSCIO" To: "'freebsd-hackers@freebsd.org'" Cc: "'freebsd-current@freebsd.org'" Subject: stupid FS questions Date: Tue, 30 May 2000 13:49:15 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="koi8-r" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello All, i've been looking at ``mount_xxx'' code and have noticed "strange" thing. all ``mount_xxx'' utilities have common part of code, like error = getvfsbyname("xxx", &vfc); if (error && vfsisloadable("xxx")) { if (vfsload("xxx")) err(EX_OSERR, "vfsload(xxx)"); endvfsent(); /* flush cache */ error = getvfsbyname("xxx", &vfc); } if (error) errx(1, "xxx filesystem is not available"); if (mount(vfc.vfc_name, dir, mntflags, &args) < 0) err(1, NULL); 1) what is the reason for this? why can't move this code to ``mount''? 2) what is the purpose of the following code in ``/sys/kern/vfs_syscalls.c''? ... for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) if (!strcmp(vfsp->vfc_name, fstypename)) break; if (vfsp == NULL) { linker_file_t lf; /* Refuse to load modules if securelevel raised */ if (securelevel > 0) { vput(vp); return EPERM; } /* Only load modules for root (very important!) */ if ((error = suser(p)) != 0) { vput(vp); return error; } error = linker_load_file(fstypename, &lf); if (error || lf == NULL) { vput(vp); if (lf == NULL) error = ENODEV; return error; } ... from my understanding this is done to load FS module. or did i miss someting? thanks, emax To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message