1996-01-17 17:13:48 +00:00
|
|
|
/* Header file for mounting/unmount Linux filesystems.
|
1997-05-07 15:31:21 +00:00
|
|
|
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
1996-12-10 03:08:06 +00:00
|
|
|
This file is part of the GNU C Library.
|
1996-01-17 17:13:48 +00:00
|
|
|
|
1996-12-10 03:08:06 +00:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
License, or (at your option) any later version.
|
1996-01-17 17:13:48 +00:00
|
|
|
|
1996-12-10 03:08:06 +00:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
1996-01-17 17:13:48 +00:00
|
|
|
|
1996-12-10 03:08:06 +00:00
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
|
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
1996-01-17 17:13:48 +00:00
|
|
|
|
1997-05-07 15:31:21 +00:00
|
|
|
/* This is taken from /usr/include/linux/fs.h. */
|
|
|
|
|
1996-01-17 17:13:48 +00:00
|
|
|
#ifndef _SYS_MOUNT_H
|
|
|
|
|
1996-12-10 03:08:06 +00:00
|
|
|
#define _SYS_MOUNT_H 1
|
1996-01-17 17:13:48 +00:00
|
|
|
#include <features.h>
|
|
|
|
|
1997-05-07 15:31:21 +00:00
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
1996-01-17 17:13:48 +00:00
|
|
|
__BEGIN_DECLS
|
|
|
|
|
1997-05-07 15:31:21 +00:00
|
|
|
#define BLOCK_SIZE 1024
|
|
|
|
#define BLOCK_SIZE_BITS 10
|
|
|
|
|
|
|
|
|
|
|
|
/* These are the fs-independent mount-flags: up to 16 flags are
|
|
|
|
supported */
|
|
|
|
#define MS_RDONLY 1 /* Mount read-only. */
|
|
|
|
#define MS_NOSUID 2 /* Ignore suid and sgid bits. */
|
|
|
|
#define MS_NODEV 4 /* Disallow access to device special files. */
|
|
|
|
#define MS_NOEXEC 8 /* Disallow program execution. */
|
|
|
|
#define MS_SYNCHRONOUS 16 /* Writes are synced at once. */
|
|
|
|
#define MS_REMOUNT 32 /* Alter flags of a mounted FS. */
|
|
|
|
#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS. */
|
|
|
|
#define S_WRITE 128 /* Write on file/directory/symlink. */
|
|
|
|
#define S_APPEND 256 /* Append-only file. */
|
|
|
|
#define S_IMMUTABLE 512 /* Immutable file. */
|
|
|
|
#define MS_NOATIME 1024 /* Do not update access times. */
|
|
|
|
|
|
|
|
|
|
|
|
/* Flags that can be altered by MS_REMOUNT */
|
|
|
|
#define MS_RMT_MASK (MS_RDONLY | MS_MANDLOCK)
|
|
|
|
|
|
|
|
|
|
|
|
/* Magic mount flag number. Has to be or-ed to the flag values. */
|
|
|
|
|
|
|
|
#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
|
|
|
|
#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
|
|
|
|
|
|
|
|
|
|
|
|
/* The read-only stuff doesn't really belong here, but any other place
|
|
|
|
is probably as bad and I don't want to create yet another include
|
|
|
|
file. */
|
|
|
|
|
|
|
|
#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
|
|
|
|
#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
|
|
|
|
#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
|
|
|
|
#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
|
|
|
|
#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
|
|
|
|
#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
|
|
|
|
#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
|
|
|
|
|
|
|
|
|
1996-01-17 17:13:48 +00:00
|
|
|
/* Mount a filesystem. */
|
1996-12-10 03:08:06 +00:00
|
|
|
extern int mount __P ((__const char *__special_file, __const char *__dir,
|
|
|
|
__const char *__fstype, unsigned long int __rwflag,
|
|
|
|
__const void *__data));
|
1996-01-17 17:13:48 +00:00
|
|
|
|
|
|
|
/* Unmount a filesystem. */
|
1996-12-10 03:08:06 +00:00
|
|
|
extern int umount __P ((__const char *__special_file));
|
1996-01-17 17:13:48 +00:00
|
|
|
|
|
|
|
__END_DECLS
|
|
|
|
|
|
|
|
#endif /* _SYS_MOUNT_H */
|