SVN: geninitrd/trunk/functions

wiget wiget at pld-linux.org
Wed Feb 2 17:23:35 CET 2011


Author: wiget
Date: Wed Feb  2 17:23:35 2011
New Revision: 12102

Modified:
   geninitrd/trunk/functions
Log:
Simplify dm_longname()

Modified: geninitrd/trunk/functions
==============================================================================
--- geninitrd/trunk/functions	(original)
+++ geninitrd/trunk/functions	Wed Feb  2 17:23:35 2011
@@ -148,10 +148,6 @@
 # try to resolve /dev/dm-0 to item from /dev/mapper dir
 dm_longname() {
 	local node="$1"
-	local ret
-	local dm_major=$(awk '$2 == "device-mapper" {print $1}' /proc/devices)
-	local dm_minor=${node#/dev/dm-}
-
-	local dm_name=$(dmsetup info -c --noheadings -j $dm_major -m $dm_minor | awk -F: '{print $1}')
+	local dm_name=$(dmsetup info -c --noheadings $node | awk -F: '{print $1}')
 	echo "/dev/mapper/$dm_name"
 }


More information about the pld-cvs-commit mailing list