Subject: Re: /sbin/umount should support umount_* (PR#698)
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
Date: 03/13/2003 17:15:01
On Thursday 13 March 2003 15:48, Greg A. Woods wrote:
> I have just implemented a more-or-less SysVr4-like "df -g" for NetBSD
> (the frag size and filename length fields are faked, at least for now
> since the necessary information isn't (yet) in struct statfs and I
> didn't bother doing the extra pathconf(foo, _PC_NAME_MAX) for the latter).
> As you can see in the sample output from it below the filesystem type is
> indeed already always available.
> A basic re-implementation of umount(1) that handles special user-land
> interactions with filesystems could simply do what 'df' does to get all
> these struct statfs values (getmntinfo() for "umount -a" or statfs() for
> a single FS) and then it could append the f_fstypename field's value to
> "/sbin/umount_" and exec the resulting pathname (forking first for
> multiple operations), passing the mount point and device name as
> command-line parameters. Each /sbin/umount_* program could do any
> special actions necessary before and/or after calling umount(2). If the
> exec fails then umount(1) would just call umount(2) under the assumption
> nothing else special needes to be done.
Sounds pretty simple. Got diffs? :-)
D'Arcy J.M. Cain <firstname.lastname@example.org>