]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - mount/sundries.h
3 * Support function prototypes. Functions are in sundries.c.
12 #if !defined(bool_t) && !defined(__GLIBC__)
13 #include <rpc/types.h>
16 extern int mount_quiet
;
20 #define streq(s, t) (strcmp ((s), (t)) == 0)
22 /* Functions in sundries.c that are used in mount.c and umount.c */
23 void block_signals (int how
);
24 char *canonicalize (const char *path
);
25 void error (const char *fmt
, ...);
26 int matching_type (const char *type
, const char *types
);
27 void *xmalloc (size_t size
);
28 char *xstrdup (const char *s
);
29 char *xstrndup (const char *s
, int n
);
30 char *xstrconcat2 (const char *, const char *);
31 char *xstrconcat3 (const char *, const char *, const char *);
32 char *xstrconcat4 (const char *, const char *, const char *, const char *);
34 void die (int errcode
, const char *fmt
, ...);
37 int nfsmount (const char *spec
, const char *node
, int *flags
,
38 char **orig_opts
, char **opt_args
, int *version
, int running_bg
);
41 /* exit status - bits below are ORed */
42 #define EX_USAGE 1 /* incorrect invocation or permission */
43 #define EX_SYSERR 2 /* out of memory, cannot fork, ... */
44 #define EX_SOFTWARE 4 /* internal mount bug or wrong version */
45 #define EX_USER 8 /* user interrupt */
46 #define EX_FILEIO 16 /* problems writing, locking, ... mtab/fstab */
47 #define EX_FAIL 32 /* mount failure */
48 #define EX_SOMEOK 64 /* some mount succeeded */
50 #define EX_BG 256 /* retry in background (internal only) */