mosh@VIRGO.MATH.TAU.AC.IL (Moshe Shemesh) (05/28/91)
Hi netlanders, I am trying to write a simple program C program under IRIX 3.3.1 which needs to do an NFS mount to a remote file system. The problem is that the man page of the mount system call (assuming this is the system I should use) doesn't mention how this should be done. It only deals with UFS alone although it hints that this should be the right system call. It has two optional arguments called data and datalen but there is no reference for them in the man page. 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). You can e-mail me directly or answer in this newsgroup. Thanks in advance Moshe Shemesh Tel-Aviv University School of Mathematics Tel-Aviv ISRAEL e-mail: INTERNET: mosh@math.tau.ac.il BITNET: mosh@taurus.BITNET
vjs@rhyolite.wpd.sgi.com (Vernon Schryver) (05/29/91)
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.