dom0: add missing 2> /dev/null to unbind_pci_device.sh (#550)

This commit is contained in:
Marek Marczykowski 2012-04-26 14:29:19 +02:00
parent 07e1ca35e7
commit 0c43635806

View File

@ -32,7 +32,7 @@ if [ -e /sys/bus/pci/drivers/pciback/$BDF ]; then
# Check if device not assigned to any RUNNING VM
XS_PATH=/local/domain/0/backend/pci
GREP_RE="^$XS_PATH/[0-9]*/[0-9]*/dev-[0-9]* = \"$BDF\""
if xenstore-ls -f $XS_PATH | grep -q "$GREP_RE"; then
if xenstore-ls -f $XS_PATH 2> /dev/null | grep -q "$GREP_RE"; then
DOMID=`xenstore-ls -f $XS_PATH | grep "$GREP_RE"|cut -d/ -f7`
echo "ERROR: Device already attached to the running VM '`xl domname $DOMID`'" >&2
exit 1