zoslib
z/OS C/C++ Library
Loading...
Searching...
No Matches
mount.h
Go to the documentation of this file.
1
2// Licensed Materials - Property of IBM
3// ZOSLIB
4// (C) Copyright IBM Corp. 2022. All Rights Reserved.
5// US Government Users Restricted Rights - Use, duplication
6// or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
8
9#ifndef ZOS_SYS_MOUNT_H_
10#define ZOS_SYS_MOUNT_H_
11
12#include "zos-macros.h"
13
14#include <sys/types.h>
15
16#define MFSNAMELEN 15 /* length of fs type name, not inc. nul */
17#define MNAMELEN 90 /* length of buffer for returned name */
18
19#define MNT_WAIT 1
20#define MNT_NOWAIT 2 /* only NOWAIT supported with getmntinfo */
21
22#if defined(__cplusplus)
23extern "C" {
24#endif
25
26struct statfs {
27#if 0 /* not implemented yet */
28 short f_otype; /* type of file system (reserved: zero) */
29 short f_oflags; /* copy of mount flags (reserved: zero) */
30 long f_bsize; /* fundamental file system block size */
31 long f_iosize; /* optimal transfer block size */
32 long f_blocks; /* total data blocks in file system */
33 long f_bfree; /* free blocks in fs */
34 long f_bavail; /* free blocks avail to non-superuser */
35 long f_files; /* total file nodes in file system */
36 long f_ffree; /* free file nodes in fs */
37 fsid_t f_fsid; /* file system id */
38 uid_t f_owner; /* user that mounted the file system */
39 short f_reserved1; /* reserved for future use */
40 short f_type; /* type of file system (reserved) */
41 long f_flags; /* copy of mount flags (reserved) */
42 long f_reserved2[2]; /* reserved for future use */
43#else
44 long f_reserved[16]; /* reserved as 0 */
45#endif
46 char f_fstypename[MFSNAMELEN]; /* fs type name */
47 char f_mntonname[MNAMELEN]; /* directory on which mounted */
48 char f_mntfromname[MNAMELEN]; /* mounted file system */
49};
50
51__Z_EXPORT int getmntinfo(struct statfs **mntbufp, int flags);
52
53#if defined(__cplusplus)
54}
55#endif
56
57#endif
#define MFSNAMELEN
Definition mount.h:16
__Z_EXPORT int getmntinfo(struct statfs **mntbufp, int flags)
Definition zos-mount.c:24
#define MNAMELEN
Definition mount.h:17
Definition mount.h:26
long f_reserved[16]
Definition mount.h:44
char f_mntonname[MNAMELEN]
Definition mount.h:47
char f_mntfromname[MNAMELEN]
Definition mount.h:48
char f_fstypename[MFSNAMELEN]
Definition mount.h:46
unsigned long long fsid_t
Definition types.h:11
#define __Z_EXPORT
Definition zos-macros.h:13