Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* question on mount system call on OSF1
@ 1994-10-25 22:42 Junhe Liu
  1994-10-26 22:08 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  0 siblings, 1 reply; 2+ messages in thread
From: Junhe Liu @ 1994-10-25 22:42 UTC (permalink / raw)


Hi,

    A user of mine wants to mount and umount CDs by himself (actually
    I prefer that, too).  I understand suid Shell program is not a safe
    route to go, so I am thinking of writing a one line C program that
    mounts and umounts.

    The mount system call man page says mount() has 4 arguments:

       mount(
          int type,
          char *mnt-path,
          int mnt_flag,
          caddr_t data );

    There is no argument for the CD device.  How can I tell mount()
    to the CD device?  Also, may I just leave "caddr_t data" to be
    NULL?  Seems that field is only for some special purpose.

Thanks in advance,

Junhe Liu
junhe@cs.stanford.edu



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: question on mount system call on OSF1
  1994-10-25 22:42 question on mount system call on OSF1 Junhe Liu
@ 1994-10-26 22:08 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Rollow - Dr. File System's Home for Wayward Inodes. @ 1994-10-26 22:08 UTC (permalink / raw)



In article <38k1jq$nc0@Times.Stanford.EDU>, junhe@Xenon.Stanford.EDU (Junhe Liu) writes:

>    A user of mine wants to mount and umount CDs by himself (actually
>    I prefer that, too).  I understand suid Shell program is not a safe
>    route to go, so I am thinking of writing a one line C program that
>    mounts and umounts.
>
>    The mount system call man page says mount() has 4 arguments:
>
>       mount(int type, char *mnt-path, int mnt_flag, caddr_t data);
>
>    There is no argument for the CD device.  How can I tell mount()
>    to the CD device?  Also, may I just leave "caddr_t data" to be
>    NULL?  Seems that field is only for some special purpose.

The type field specifies the file system type.  If the CD has
a UFS file system on then you want MOUNT_UFS for the type.  If
its the ISO kind of file system, then you want MOUNT_CDFS.

The "data" structure passed is a file system specific structure
for passing the remaining arguments; one of which is almost
certainly the path name of the block special device.  In fact
if you look at the /usr/include/sys/mount.h include file you'll
see the different data structure declared (struct cdfs_args).
Unfortunately, this isn't clear from the manual page.

>Thanks in advance,
>
>Junhe Liu
>junhe@cs.stanford.edu
>
>
--
Alan Rollow				alan@nabeth.cxo.dec.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-10-26 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-10-25 22:42 question on mount system call on OSF1 Junhe Liu
1994-10-26 22:08 ` Alan Rollow - Dr. File System's Home for Wayward Inodes.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox