ofpathname : avoid duplicate entries of vFC devices
ofpathname : avoid duplicate entries of vFC devices

Adding support to avoid the duplicate entries of a Open Firmware device path to
logical device path for vfc-client devices.

The problem can be reproduced with the bootlist command

# bootlist -m normal /dev/sdd /dev/sds /dev/sdf /dev/sdv
# bootlist -m normal -r
/vdevice/vfc-client@30000899/disk@500507680b2255fe
/vdevice/vfc-client@30000899/disk@500507680b2255ff
/vdevice/vfc-client@3000089a/disk@500507680b2255fe
/vdevice/vfc-client@3000089a/disk@500507680b2255ff
# bootlist -m normal -o
sda---------------->expected "sdd"
sdp---------------->expected "sds"
sda---------------->expected "sdf"
sdp---------------->expected "sdv"

So, this patch check the duplicate entries of logical names of vFC devices at of2l_vfc()
and display specified bootlist :

# bootlist -m normal -r
/vdevice/vfc-client@30000899/disk@500507680b2255fe
/vdevice/vfc-client@30000899/disk@500507680b2255ff
/vdevice/vfc-client@3000089a/disk@500507680b2255fe
/vdevice/vfc-client@3000089a/disk@500507680b2255ff
# bootlist -m normal -o
sdd
sds
sdf
sdv

Signed-off-by: Pawan K Singh5 <ea951558c417329e13ad1c680fa19c7d87aa15de@linux.vnet.ibm.com>
Signed-off-by: Tyrel Datwyler <f4a317f2a73d762775eb462a22d913f1ae21c433@linux.vnet.ibm.com>

shenki/powerpc-utils,shenki/powerpc-utils,shenki/powerpc-utils