Doing NFS mounts from within C program under IRIX 3.3.1

Vernon Schryver vjs at rhyolite.wpd.sgi.com
Wed May 29 07:02:02 AEST 1991


In article <2140 at ccsg.tau.ac.il>, mosh at 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 at sgi.com.



More information about the Comp.sys.sgi mailing list