C mount() system call - help!

C mount() system call - help!

Post by Edward Christopher Brenn » Tue, 05 Dec 1995 04:00:00



Has anyone out there successfully written some C code
to utilize the mount() system function?  I wish to attempt to mount a floppy
disk, and if any errors occur, such as a floppy disk
not in the drive, I wish to return these errors.  I can
detect a write-protect tab through use of the errno system
variable, but if a floppy disk is not in the drive, it seems
that the program tries forever to mount it.  
If after a period of time I inserrt a disk into the
drive, the program will detect it and successfully mount it.
Is there a way to tell mount() to stop after so many retries?  I saw something
dealing with setting a softmount  with the vfsmount () function.
Can I detect a condition where the floppy disk is not present in the
drive?
Please email me with solutions, code to:

Thanks

 
 
 

C mount() system call - help!

Post by Lee Dunc » Wed, 06 Dec 1995 04:00:00


ECB> Has anyone out there successfully written some C code to utilize
ECB> the mount() system function?  I wish to attempt to mount a floppy
ECB> disk, and if any errors occur, such as a floppy disk not in the
ECB> drive, I wish to return these errors.  I can detect a
ECB> write-protect tab through use of the errno system variable, but
ECB> if a floppy disk is not in the drive, it seems that the program
ECB> tries forever to mount it.  If after a period of time I inserrt a
ECB> disk into the drive, the program will detect it and successfully
ECB> mount it.  Is there a way to tell mount() to stop after so many
ECB> retries?  I saw something dealing with setting a softmount with
ECB> the vfsmount () function.  Can I detect a condition where the
ECB> floppy disk is not present in the drive?  Please email me with

*If* you want to manually do this (since Volume Management does it for
you (;0)), you can open the floppy using the O_NDELAY flag, then use
the FDGETCHANGE ioctl to check for floppy presence.  NOTE, though,
that this steps the floppy motor on most SPARC drives (i.e. all but
the voyager, which has auto-detect floppy hardware), so programmer
beware.
--

He who wonders discovers that this in itself is wonder.  -- M. C. Escher

 
 
 

1. mount a remote file system(NFS) using mount() call

Hi,
        A friend of mine needs some information regarding the mount() call on
        Solaris 2.3 or Solaris 2.4.

        How to mount a remote file system(NFS) using a mount() system call?
        The "nfs_args" structure has the following fields:
        "syncaddr", "addr" and "knconf". How should these be setup? for the
        mount() call to work?

Thanks,
-Paresh

2. ioremap, {in,out}_le32 unresolved symbol

3. HELP: mount() system call

4. Need addresses for Source Code Licences (BSD4.3 and Sys V)

5. How I could add a new system call to linux or modify a system calls

6. Perl5.001 error msg: can't find library 'libdb.so.1'

7. How to use open system call in a new system call

8. syslogd takes a few seconds to start

9. "Interrupted system call" at "low level" - system calls

10. Can't understand mount system call

11. question about mount() system call

12. where is mount system call?

13. Floppy mount system call