summaryrefslogtreecommitdiff
path: root/mount/sundries.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2006-12-07 00:26:30 +0100
committerKarel Zak <kzak@redhat.com>2006-12-07 00:26:30 +0100
commita47f2e66141271cde40ee5190acf93d7878bc93d (patch)
treef41145d1e432fdb55aabcf600fb9311b7d83d75c /mount/sundries.c
parent5213517f54c70a784c06ee85c066aa2b4f375c4b (diff)
downloadutil-linux-old-a47f2e66141271cde40ee5190acf93d7878bc93d.tar.gz
Imported from util-linux-2.12m tarball.
Diffstat (limited to 'mount/sundries.c')
-rw-r--r--mount/sundries.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/mount/sundries.c b/mount/sundries.c
index af5bb884..2118ce28 100644
--- a/mount/sundries.c
+++ b/mount/sundries.c
@@ -32,6 +32,17 @@ xmalloc (size_t size) {
return t;
}
+void *
+xrealloc (void *p, size_t size) {
+ void *t;
+
+ t = realloc(p, size);
+ if (t == NULL)
+ die (EX_SYSERR, _("not enough memory"));
+
+ return t;
+}
+
char *
xstrdup (const char *s) {
char *t;
@@ -278,11 +289,12 @@ canonicalize (const char *path) {
if (path == NULL)
return NULL;
+#if 1
if (streq(path, "none") ||
streq(path, "proc") ||
streq(path, "devpts"))
return xstrdup(path);
-
+#endif
if (myrealpath (path, canonical, PATH_MAX+1))
return xstrdup(canonical);