diff options
author | Karel Zak | 2006-12-07 00:26:30 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:26:30 +0100 |
commit | a47f2e66141271cde40ee5190acf93d7878bc93d (patch) | |
tree | f41145d1e432fdb55aabcf600fb9311b7d83d75c /mount/sundries.c | |
parent | Imported from util-linux-2.12l tarball. (diff) | |
download | kernel-qcow2-util-linux-a47f2e66141271cde40ee5190acf93d7878bc93d.tar.gz kernel-qcow2-util-linux-a47f2e66141271cde40ee5190acf93d7878bc93d.tar.xz kernel-qcow2-util-linux-a47f2e66141271cde40ee5190acf93d7878bc93d.zip |
Imported from util-linux-2.12m tarball.
Diffstat (limited to 'mount/sundries.c')
-rw-r--r-- | mount/sundries.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mount/sundries.c b/mount/sundries.c index af5bb884c..2118ce285 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); |