1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3  * mntent_compat.h
4  * Copyright (C) Kevin DeKorte 2006 <kdekorte@gmail.com>
5  *
6  * mntent_compat.h is free software.
7  *
8  * You may redistribute it and/or modify it under the terms of the
9  * GNU General Public License, as published by the Free Software
10  * Foundation; either version 2 of the License, or (at your option)
11  * any later version.
12  *
13  * mntent_compat.h is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with mntent_compat.h.  If not, write to:
20  * 	The Free Software Foundation, Inc.,
21  * 	51 Franklin Street, Fifth Floor
22  * 	Boston, MA  02110-1301, USA.
23  */
24 
25 #ifdef HAVE_MNTENT_H
26 #include <mntent.h>
27 #else
28 
29 #ifndef mntent_h_
30 #define mntent_h_
31 
32 #include <stdio.h>
33 #include <stdlib.h>
34 #include <string.h>
35 #include <sys/param.h>
36 #ifdef HAVE_SYS_UCRED_H
37 #include <sys/ucred.h>
38 #endif
39 #ifdef HAVE_SYS_MOUNT_H
40 #include <sys/mount.h>
41 #endif
42 #define MOUNTED "mounted"
43 #define MNTTYPE_NFS "nfs"
44 
45 //#define MOPTSLEN (256 - (MNAMELEN * 2 + MFSNAMELEN + 2 * sizeof(int)))
46 
47 struct mntent {
48     char *mnt_fsname;           /* file system name */
49     char *mnt_dir;              /* file system path prefix */
50     char *mnt_type;             /* dbg, efs, nfs */
51     char *mnt_opts;             /* ro, hide, etc. */
52     int mnt_freq;               /* dump frequency, in days */
53     int mnt_passno;             /* pass number on parallel fsck */
54 };
55 
56 FILE *setmntent(char *filep, char *type);
57 struct mntent *getmntent(FILE * filep);
58 //char * hasmntopt(struct mntent * mnt, char * opt);
59 int endmntent(FILE * filep);
60 
61 #endif                          /* mntent_h_ */
62 #endif                          /* not HAVE_MNTENT_H */
63