summaryrefslogtreecommitdiffstats
path: root/lib/mountlist.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mountlist.h')
-rw-r--r--lib/mountlist.h40
1 files changed, 14 insertions, 26 deletions
diff --git a/lib/mountlist.h b/lib/mountlist.h
index 9e550a08..7f5a6f77 100644
--- a/lib/mountlist.h
+++ b/lib/mountlist.h
@@ -1,7 +1,7 @@
1/* mountlist.h -- declarations for list of mounted filesystems 1/* mountlist.h -- declarations for list of mounted file systems
2 2
3 Copyright (C) 1991, 1992, 1998, 2000, 2001, 2002, 2003 Free 3 Copyright (C) 1991, 1992, 1998, 2000, 2001, 2002, 2003, 2004, 2005
4 Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
@@ -15,39 +15,27 @@
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation, 17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19
20#ifndef MOUNTLIST_H_
21# define MOUNTLIST_H_
22
23# include <stdbool.h>
24# include <sys/types.h>
19 25
20/* A mount table entry. */ 26/* A mount table entry. */
21struct mount_entry 27struct mount_entry
22{ 28{
23 char *me_devname; /* Device node pathname, including "/dev/". */ 29 char *me_devname; /* Device node name, including "/dev/". */
24 char *me_mountdir; /* Mount point directory pathname. */ 30 char *me_mountdir; /* Mount point directory name. */
25 char *me_type; /* "nfs", "4.2", etc. */ 31 char *me_type; /* "nfs", "4.2", etc. */
26 dev_t me_dev; /* Device number of me_mountdir. */ 32 dev_t me_dev; /* Device number of me_mountdir. */
27 unsigned int me_dummy : 1; /* Nonzero for dummy filesystems. */ 33 unsigned int me_dummy : 1; /* Nonzero for dummy file systems. */
28 unsigned int me_remote : 1; /* Nonzero for remote fileystems. */ 34 unsigned int me_remote : 1; /* Nonzero for remote fileystems. */
29 unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */ 35 unsigned int me_type_malloced : 1; /* Nonzero if me_type was malloced. */
30 struct mount_entry *me_next; 36 struct mount_entry *me_next;
31}; 37};
32 38
33struct mount_entry *read_filesystem_list (int need_fs_type); 39struct mount_entry *read_file_system_list (bool need_fs_type);
34
35#ifndef ME_DUMMY
36# define ME_DUMMY(Fs_name, Fs_type) \
37 (!strcmp (Fs_type, "autofs") \
38 /* for Irix 6.5 */ \
39 || !strcmp (Fs_type, "ignore"))
40#endif
41 40
42#undef STREQ
43#define STREQ(a, b) (strcmp ((a), (b)) == 0)
44
45#ifndef ME_REMOTE
46/* A file system is `remote' if its Fs_name contains a `:'
47 or if (it is of type smbfs and its Fs_name starts with `//'). */
48# define ME_REMOTE(Fs_name, Fs_type) \
49 (strchr ((Fs_name), ':') != 0 \
50 || ((Fs_name)[0] == '/' \
51 && (Fs_name)[1] == '/' \
52 && STREQ (Fs_type, "smbfs")))
53#endif 41#endif