[comp.sys.next] mount

abe@mace.cc.purdue.edu (Vic Abell) (02/24/89)

Has anyone managed to make the mount system call work?  All I ever
get is a "No device" error, using the syntax of the man page - e. g.,

	mount("/dev/od0a", path, 0);

Are there more arguments or a different order?

The umount syscall does not exist in libc.a.  There is a unmount
function there -- is its name a typo?

leach@neptune.uucp (Tom Leach) (02/24/89)

In article <1826@mace.cc.purdue.edu> abe@mace.cc.purdue.edu (Vic Abell) writes:
>Has anyone managed to make the mount system call work?  All I ever
>get is a "No device" error, using the syntax of the man page - e. g.,


Vic, I sent you an email description of what happened, but then I
thought that this is something the entire net would be interested in.

It appears that the mount (and UNMOUNT) system calls (section 2) use the
same format as a Sun (or any BSD system with NFS).  The current pages
for mount and umount (umount not unmount) are from generic BSD without
NFS support.  It's the NFS stuff that produced the new version.  I've
taken BSD source from a microVax (running NFS) and compiled and executed
it on our cube with no problems.  Therefore, I'm ASSUMING that you can
use the Sun man page for mount and unmount with no major problems.  
(I just gave up and did a system() and executed /etc/mount, so I haven't
tested this extensively)

Tom Leach
leach@oce.orst.edu



Internet:leach@OCE.ORST.EDU   UUCP:{tektronix, hp-pcd}!orstcs!OCE.ORST.EDU!leach
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Middle-of-the-road, man, it stanks.  Let's run over Lionel Richie with a tank.
   >>>Disclaim: It's me, not OCE.<<<	 B. Catt, Deathtongue. (c 1986) 

guy@auspex.UUCP (Guy Harris) (02/25/89)

 >Has anyone managed to make the mount system call work?  All I ever
 >get is a "No device" error, using the syntax of the man page - e. g.,
 >
 >	mount("/dev/od0a", path, 0);
 >
 >Are there more arguments or a different order?

Possibly.  If you have a Sun handy, check its MOUNT(2) man page.  Check
both the 3.x and 4.0 man page; the interface was changed.

 >The umount syscall does not exist in libc.a.  There is a unmount
 >function there -- is its name a typo?

No.

The latter change looks like a change made by Sun when NFS was
introduced; since when mounting an NFS file system you don't specify a
block special file (since you're not mounting a disk partition), you
can't specify that as the sole argument on an unmount operation. 
"unmount" takes the name of the mount point as the argument, which is a
file-system-independent way of indicating what you want to unmount.

Given that, and given that NexT supports NFS, they may have adopted the
SunOS version of "mount" as well, which permits you to mount things
other than block special files (e.g., NFS-exported directories).

In any case, if the documentation is still the old 4.xBSD documentation,
complain to NExT and mention that the SunOS documentation (which may be
distributed with the NFS source distribution) may apply here....