summaryrefslogtreecommitdiff
path: root/mount/sundries.h
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2007-10-25 10:12:51 +0200
committerKarel Zak <kzak@redhat.com>2007-10-25 21:50:59 +0200
commit26f95c7da28d94f663566e9d2132d4c71a1af098 (patch)
tree2bfcac3c931973d61080335b70f606f11cfe02e6 /mount/sundries.h
parentab9dd9385c1c517477b0cc6362fdbff763b61b6c (diff)
downloadutil-linux-old-26f95c7da28d94f663566e9d2132d4c71a1af098.tar.gz
mount: cleanup error() and die()
* moves error() and die() to sundries.h * removes at_die * adds __attribute__ ((__format__ (__printf__ ))) Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/sundries.h')
-rw-r--r--mount/sundries.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/mount/sundries.h b/mount/sundries.h
index 3d6a1bd2..010eece4 100644
--- a/mount/sundries.h
+++ b/mount/sundries.h
@@ -22,9 +22,14 @@ extern int sloppy;
#define streq(s, t) (strcmp ((s), (t)) == 0)
-/* Functions in sundries.c that are used in mount.c and umount.c */
+/* Functions in sundries.c that are used in mount.c and umount.c */
void block_signals (int how);
-void error (const char *fmt, ...);
+
+void error (const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+void die(int err, const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+
int matching_type (const char *type, const char *types);
int matching_opts (const char *options, const char *test_opts);
void *xmalloc (size_t size);
@@ -35,8 +40,6 @@ char *xstrconcat4 (char *, const char *, const char *, const char *);
int parse_spec(const char *spec, char **name, char **value);
-void die (int errcode, const char *fmt, ...);
-
/* exit status - bits below are ORed */
#define EX_USAGE 1 /* incorrect invocation or permission */
#define EX_SYSERR 2 /* out of memory, cannot fork, ... */