This is a discussion on getmntopts.c within the mailing.openbsd.tech forums, part of the OpenBSD category; --> I propose a merge of /usr/src/sbin/mount/getmntopts.c and /usr/src/sbin/mount_nfs/getmntopts.c, as well as mntopts.h There's really no reason for existence of ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I propose a merge of /usr/src/sbin/mount/getmntopts.c and /usr/src/sbin/mount_nfs/getmntopts.c, as well as mntopts.h There's really no reason for existence of two getmntopts.c files when the only difference is one argument (&altflags). In FreeBSD, mntopts.h and getmntopts.c are the newer versions that we have in mount_nfs, and all the calls that do not need altflags were fixed as this: getmntopts(optarg, mopts, &mntflags, 0); I think it would be good to do the same in our source tree. Currently, procfs uses nfs getmntopts() and changes Makefile accordingly, while other filesystems use mount/getmntopts.c. With the proposed change, all Makefiles would remain the same for the current and future filesystems, and there would be a single copy of getmntopts.c and mntopts.h to maintain in /usr/sbin/mount/ The change in the call to getmntopts() in mount_xxx/ (14 calls) and Makefiles in mount_nfs and mount_procfs is trivial. Although, I'd change 0 to NULL to better indicate a pointer argument. If you agree with the proposal, but nobody's willing to do the patch, I'd be willing to send a patch. Regards, -- Zvezdan Petkovic <zvezdan@cs.wm.edu> http://www.cs.wm.edu/~zvezdan/ |