]> git.ipfire.org Git - thirdparty/util-linux.git/blame - mount/sundries.h
Imported from util-linux-2.12o tarball.
[thirdparty/util-linux.git] / mount / sundries.h
CommitLineData
6dbe3af9 1/*
2b6fc908 2 * sundries.h
6dbe3af9 3 * Support function prototypes. Functions are in sundries.c.
6dbe3af9
KZ
4 */
5
6#include <sys/types.h>
6dbe3af9 7#include <fcntl.h>
6dbe3af9 8#include <limits.h>
6dbe3af9
KZ
9#include <signal.h>
10#include <stdarg.h>
11#include <stdlib.h>
2b6fc908 12#if !defined(bool_t) && !defined(__GLIBC__)
fd6b7a7f 13#include <rpc/types.h>
726f69e2
KZ
14#endif
15
726f69e2 16extern int mount_quiet;
fd6b7a7f 17extern int verbose;
2b6fc908 18extern int sloppy;
6dbe3af9
KZ
19
20#define streq(s, t) (strcmp ((s), (t)) == 0)
21
6dbe3af9
KZ
22/* Functions in sundries.c that are used in mount.c and umount.c */
23void block_signals (int how);
24char *canonicalize (const char *path);
6dbe3af9 25void error (const char *fmt, ...);
364cda48 26int matching_type (const char *type, const char *types);
95f1bdee 27int matching_opts (const char *options, const char *test_opts);
6dbe3af9
KZ
28void *xmalloc (size_t size);
29char *xstrdup (const char *s);
fd6b7a7f
KZ
30char *xstrndup (const char *s, int n);
31char *xstrconcat2 (const char *, const char *);
32char *xstrconcat3 (const char *, const char *, const char *);
33char *xstrconcat4 (const char *, const char *, const char *, const char *);
6dbe3af9 34
6dbe3af9 35void die (int errcode, const char *fmt, ...);
6dbe3af9
KZ
36
37#ifdef HAVE_NFS
38int nfsmount (const char *spec, const char *node, int *flags,
364cda48 39 char **orig_opts, char **opt_args, int *version, int running_bg);
6dbe3af9
KZ
40#endif
41
fd6b7a7f
KZ
42/* exit status - bits below are ORed */
43#define EX_USAGE 1 /* incorrect invocation or permission */
44#define EX_SYSERR 2 /* out of memory, cannot fork, ... */
45#define EX_SOFTWARE 4 /* internal mount bug or wrong version */
46#define EX_USER 8 /* user interrupt */
47#define EX_FILEIO 16 /* problems writing, locking, ... mtab/fstab */
48#define EX_FAIL 32 /* mount failure */
49#define EX_SOMEOK 64 /* some mount succeeded */
2b6fc908
KZ
50
51#define EX_BG 256 /* retry in background (internal only) */