Unix Technical Forum

getmntopts.c

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 06:43 AM
Zvezdan Petkovic
 
Posts: n/a
Default getmntopts.c

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/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:37 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com