summaryrefslogtreecommitdiff
path: root/mount-deprecated/devname.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-11-02 20:15:39 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-11-02 20:15:39 +0400
commitb13154de3eca5ba28fbb4854d916cd0be5febeed (patch)
tree30f2e9e89ab71a2df837076ac68c3ba770230294 /mount-deprecated/devname.c
downloadutil-linux-upstream.tar.gz
Imported Upstream version 2.22upstream/2.22upstream
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 0000000..76dfe91
--- /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);
+}