Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!sgi!vjs@rhyolite.wpd.sgi.com From: vjs@rhyolite.wpd.sgi.com (Vernon Schryver) Newsgroups: comp.sys.sgi Subject: Re: Doing NFS mounts from within C program under IRIX 3.3.1 Keywords: NFS, mount, IRIX 3.3.1 Message-ID: <106483@sgi.sgi.com> Date: 28 May 91 21:02:02 GMT References: <2140@ccsg.tau.ac.il> Sender: guest@sgi.sgi.com Distribution: comp Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 31 In article <2140@ccsg.tau.ac.il>, mosh@VIRGO.MATH.TAU.AC.IL (Moshe Shemesh) writes: > > Does any of you know how should I do it? My main problem is that I don't > know what parameters should I pass to the mount (2) system call assuming it > is the right system call to use. > > I am quite familiar with RPC / XDR stuff So you can mention their details > in your answer. > > I am not considering: > > system("mount host:/dir /localdir") > > as an answer. (I got this answer from SGI representatives in ISRAEL. No, it > wasn't their idea. It came from SGI - USA). I don't know who suggested system(3), but that sounds like the right answer. Any other solution is likely to stop working in some future release, as the stuff used to parse /etc/fstab and other things change. A bug report complaining that a home grown mount command had stopped working would meet little sympathy. There is no plausible speed problem with system(3) applied to an NFS mount, because the mounting overhead will dominate all else. The automounter is probably a better alternative to meeting the need, as opposed to implementing the currently chosen solution. Vernon Schryver, vjs@sgi.com.