summaryrefslogtreecommitdiffstats
path: root/mount-deprecated/devname.c
diff options
context:
space:
mode:
authorKarel Zak2012-05-30 17:16:11 +0200
committerKarel Zak2012-06-26 20:48:22 +0200
commitd2feb47fb1ddc0d8ac946328e77ed86ea6937bef (patch)
tree3333ca26eb3b4f5df76714f93c41e7e300b45c66 /mount-deprecated/devname.c
parentbuild-sys: convert login-utils/ to module (diff)
downloadkernel-qcow2-util-linux-d2feb47fb1ddc0d8ac946328e77ed86ea6937bef.tar.gz
kernel-qcow2-util-linux-d2feb47fb1ddc0d8ac946328e77ed86ea6937bef.tar.xz
kernel-qcow2-util-linux-d2feb47fb1ddc0d8ac946328e77ed86ea6937bef.zip
build-sys: convert mount/ to module, rename to mount-deprecated/
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount-deprecated/devname.c')
-rw-r--r--mount-deprecated/devname.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/mount-deprecated/devname.c b/mount-deprecated/devname.c
new file mode 100644
index 000000000..76dfe91ef
--- /dev/null
+++ b/mount-deprecated/devname.c
@@ -0,0 +1,14 @@
+#include "fsprobe.h"
+
+#include "devname.h"
+#include "sundries.h" /* for xstrdup */
+
+const char *
+spec_to_devname(const char *spec)
+{
+ if (!spec)
+ return NULL;
+ if (nocanonicalize || is_pseudo_fs(spec))
+ return xstrdup(spec);
+ return fsprobe_get_devname_by_spec(spec);
+}