- Moved (u)mount prototypes from unistd.h to sys/mount.h.

- Prepared mount system call to accept multiple mount flags
   instead of just read_only (however, it remains backwards
   compatible).
 - Updated the man mount(2) to reflect new header file usage. 
 - Updated badblocks, newroot, mount, and umount commands to use the
   new header file.
This commit is contained in:
Thomas Veerman
2009-08-12 19:57:37 +00:00
parent 1defc4fc3a
commit c2ffe723d1
8 changed files with 37 additions and 11 deletions

21
include/sys/mount.h Executable file
View File

@@ -0,0 +1,21 @@
/* <sys/mount.h>
* definitions for mount(2)
*/
#ifndef _MOUNT_H
#define _MOUNT_H
#define MS_RDONLY 0x001 /* Mount device read only */
#define MS_REUSE 0x002 /* Tell RS to try reusing binary from memory */
/* Function Prototypes. */
#ifndef _ANSI_H
#include <ansi.h>
#endif
_PROTOTYPE( int mount, (char *_spec, char *_name, int _mountflags,
char *type, char *args) );
_PROTOTYPE( int umount, (const char *_name) );
#endif /* _MOUNT_H */

View File

@@ -171,13 +171,10 @@ _PROTOTYPE( int mknod, (const char *_name, _mnx_Mode_t _mode, Dev_t _addr) );
_PROTOTYPE( int mknod4, (const char *_name, _mnx_Mode_t _mode, Dev_t _addr,
long _size) );
_PROTOTYPE( char *mktemp, (char *_template) );
_PROTOTYPE( int mount, (char *_spec, char *_name, int _flag,
char *type, char *args) );
_PROTOTYPE( long ptrace, (int _req, pid_t _pid, long _addr, long _data) );
_PROTOTYPE( char *sbrk, (int _incr) );
_PROTOTYPE( int sync, (void) );
_PROTOTYPE( int fsync, (int fd) );
_PROTOTYPE( int umount, (const char *_name) );
_PROTOTYPE( int reboot, (int _how, ...) );
_PROTOTYPE( int gethostname, (char *_hostname, size_t _len) );
_PROTOTYPE( int getdomainname, (char *_domain, size_t _len) );