]> git.ipfire.org Git - thirdparty/util-linux.git/blob - include/pathnames.h
lib: [loopdev.c] add module for work loop devices
[thirdparty/util-linux.git] / include / pathnames.h
1 /*
2 * Vaguely based on
3 * @(#)pathnames.h 5.3 (Berkeley) 5/9/89
4 * This code is in the public domain.
5 */
6 #ifndef PATHNAMES_H
7 #define PATHNAMES_H
8
9 #ifdef HAVE_PATHS_H
10 #include <paths.h>
11 #endif
12
13 #ifndef __STDC__
14 # error "we need an ANSI compiler"
15 #endif
16
17 /* used by kernel in /proc (e.g. /proc/swaps) for deleted files */
18 #define PATH_DELETED_SUFFIX "\\040(deleted)"
19 #define PATH_DELETED_SUFFIX_SZ (sizeof(PATH_DELETED_SUFFIX) - 1)
20
21 /* DEFPATHs from <paths.h> don't include /usr/local */
22 #undef _PATH_DEFPATH
23 #define _PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin"
24
25 #undef _PATH_DEFPATH_ROOT
26 #define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
27
28 #define _PATH_SECURETTY "/etc/securetty"
29 #define _PATH_WTMPLOCK "/etc/wtmplock"
30
31 #define _PATH_HUSHLOGIN ".hushlogin"
32
33 #ifndef _PATH_MAILDIR
34 #define _PATH_MAILDIR "/var/spool/mail"
35 #endif
36 #define _PATH_MOTDFILE "/etc/motd"
37 #define _PATH_NOLOGIN "/etc/nologin"
38
39 #define _PATH_LOGIN "/bin/login"
40 #define _PATH_INITTAB "/etc/inittab"
41 #define _PATH_RC "/etc/rc"
42 #define _PATH_REBOOT "/sbin/reboot"
43 #define _PATH_SHUTDOWN "/sbin/shutdown"
44 #define _PATH_SINGLE "/etc/singleboot"
45 #define _PATH_SHUTDOWN_CONF "/etc/shutdown.conf"
46
47 #define _PATH_SECURE "/etc/securesingle"
48 #define _PATH_USERTTY "/etc/usertty"
49
50 /* used in login-utils/shutdown.c */
51
52 /* used in login-utils/setpwnam.h and login-utils/islocal.c */
53 #define _PATH_PASSWD "/etc/passwd"
54
55 /* used in login-utils/newgrp */
56 #define _PATH_GSHADOW "/etc/gshadow"
57
58 /* used in login-utils/setpwnam.h */
59 #define _PATH_PTMP "/etc/ptmp"
60 #define _PATH_PTMPTMP "/etc/ptmptmp"
61 #define _PATH_GROUP "/etc/group"
62 #define _PATH_GTMP "/etc/gtmp"
63 #define _PATH_GTMPTMP "/etc/gtmptmp"
64 #define _PATH_SHADOW_PASSWD "/etc/shadow"
65 #define _PATH_SHADOW_PTMP "/etc/sptmp"
66 #define _PATH_SHADOW_PTMPTMP "/etc/sptmptmp"
67 #define _PATH_SHADOW_GROUP "/etc/gshadow"
68 #define _PATH_SHADOW_GTMP "/etc/sgtmp"
69 #define _PATH_SHADOW_GTMPTMP "/etc/sgtmptmp"
70
71 /* used in term-utils/agetty.c */
72 #define _PATH_ISSUE "/etc/issue"
73
74 /* used in misc-utils/look.c */
75 #define _PATH_WORDS "/usr/share/dict/words"
76 #define _PATH_WORDS_ALT "/usr/share/dict/web2"
77
78 /* mount paths */
79 #define _PATH_UMOUNT "/bin/umount"
80
81 #define _PATH_FILESYSTEMS "/etc/filesystems"
82 #define _PATH_PROC_SWAPS "/proc/swaps"
83 #define _PATH_PROC_FILESYSTEMS "/proc/filesystems"
84 #define _PATH_PROC_MOUNTS "/proc/mounts"
85 #define _PATH_PROC_PARTITIONS "/proc/partitions"
86 #define _PATH_PROC_DEVICES "/proc/devices"
87 #define _PATH_PROC_MOUNTINFO "/proc/self/mountinfo"
88
89 #define _PATH_SYS_BLOCK "/sys/block"
90 #define _PATH_SYS_DEVBLOCK "/sys/dev/block"
91
92 #ifndef _PATH_MOUNTED
93 # ifdef MOUNTED /* deprecated */
94 # define _PATH_MOUNTED MOUNTED
95 # else
96 # define _PATH_MOUNTED "/etc/mtab"
97 # endif
98 #endif
99
100 #ifndef _PATH_MNTTAB
101 # ifdef MNTTAB /* deprecated */
102 # define _PATH_MNTTAB MNTTAB
103 # else
104 # define _PATH_MNTTAB "/etc/fstab"
105 # endif
106 #endif
107
108 #define _PATH_MNTTAB_DIR _PATH_MNTTAB ".d"
109
110 #define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~"
111 #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp"
112
113 #ifndef _PATH_DEV
114 /*
115 * The tailing '/' in _PATH_DEV is there for compatibility with libc.
116 */
117 # define _PATH_DEV "/dev/"
118 #endif
119
120 #define _PATH_DEV_LOOP "/dev/loop"
121 #define _PATH_DEV_TTY "/dev/tty"
122
123 /* udev paths */
124 #define _PATH_DEV_BYLABEL "/dev/disk/by-label"
125 #define _PATH_DEV_BYUUID "/dev/disk/by-uuid"
126 #define _PATH_DEV_BYID "/dev/disk/by-id"
127 #define _PATH_DEV_BYPATH "/dev/disk/by-path"
128
129 #endif /* PATHNAMES_H */
130