Use geom disk list instead camcontrol identify.

The new way works for almost any disk, while the old only for ATA.

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2016-03-11 13:06:11 +00:00
parent c66784839b
commit cdba914b3f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296654

View file

@ -82,8 +82,8 @@ do
esac
fi
# Try and find some identification information with camcontrol
NEWLINE=$(camcontrol identify $DEV 2>/dev/null | sed -ne 's/^device model *//p')
# Try and get some identification information from GEOM
NEWLINE=$(geom disk list $DEV 2>/dev/null | sed -ne 's/^ descr: *//p')
if [ -z "$NEWLINE" ]; then
NEWLINE=" <Unknown Device>"
fi