summaryrefslogtreecommitdiffstats
path: root/libmount/src/utils.c
diff options
context:
space:
mode:
authorKarel Zak2014-06-09 11:54:32 +0200
committerKarel Zak2014-06-09 11:54:32 +0200
commitd4eaabc86ad36af8f2d0e37ebfc56d53d5a8a21d (patch)
treee400911d82bef85e70d7316099a92ab3e1227435 /libmount/src/utils.c
parentlib/fileutils: add mkdir_p() from libmount (diff)
downloadkernel-qcow2-util-linux-d4eaabc86ad36af8f2d0e37ebfc56d53d5a8a21d.tar.gz
kernel-qcow2-util-linux-d4eaabc86ad36af8f2d0e37ebfc56d53d5a8a21d.tar.xz
kernel-qcow2-util-linux-d4eaabc86ad36af8f2d0e37ebfc56d53d5a8a21d.zip
lib/fileutils: add stripoff_last_component() from libmount
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/utils.c')
-rw-r--r--libmount/src/utils.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
index 7700d805a..d97390e94 100644
--- a/libmount/src/utils.c
+++ b/libmount/src/utils.c
@@ -117,18 +117,6 @@ static int fstype_cmp(const void *v1, const void *v2)
return strcmp(s1, s2);
}
-/* returns basename and keeps dirname in the @path, if @path is "/" (root)
- * then returns empty string */
-char *stripoff_last_component(char *path)
-{
- char *p = path ? strrchr(path, '/') : NULL;
-
- if (!p)
- return NULL;
- *p = '\0';
- return p + 1;
-}
-
/*
* Note that the @target has to be an absolute path (so at least "/"). The
* @filename returns an allocated buffer with the last path component, for example: