Would you be so kind to please elaborate on why we need sed here at all?
Further looking at http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=extras/volume_id/vol_id.c;h=3e44c3b069794b81a1e61338c98eef0fa7671bf3;hb=HEAD#l254 shows vol_id always return a static string in this case, as well as error status 4.
# /lib/udev/vol_id --type /dev/null 2>&1 unknown or non-unique volume type (--probe-all lists possibly conflicting types) # echo $? 4
Even if we want to keep it 'dynamic' for unknown string, why not keep it simple then?
@@ -25,2 +25 @@ -pattern=`echo $dev | sed 's/\//\\\\\//g'` -unknown=`/lib/udev/vol_id -t /dev/null 2>&1 | sed "s/\/dev\/null/$pattern/g"` +unknown=`/lib/udev/vol_id -t /dev/null 2>&1`
Thanks for looking into this!
Would you be so kind to please elaborate on why we need sed here at all?
Further looking at http:// git.kernel. org/?p= linux/hotplug/ udev.git; a=blob; f=extras/ volume_ id/vol_ id.c;h= 3e44c3b069794b8 1a1e61338c98eef 0fa7671bf3; hb=HEAD# l254 shows vol_id always return a static string in this case, as well as error status 4.
# /lib/udev/vol_id --type /dev/null 2>&1
unknown or non-unique volume type (--probe-all lists possibly conflicting types)
# echo $?
4
Even if we want to keep it 'dynamic' for unknown string, why not keep it simple then?
@@ -25,2 +25 @@ `/lib/udev/ vol_id -t /dev/null 2>&1 | sed "s/\/dev\ /null/$ pattern/ g"` `/lib/udev/ vol_id -t /dev/null 2>&1`
-pattern=`echo $dev | sed 's/\//\\\\\//g'`
-unknown=
+unknown=
Thanks for looking into this!