scripts/common.sh: print error msg to stderr
Error msg in common.sh should be printed into stderr in order to avoid improper usage. For example: If env has no lspci and pciconf, then function iter_all_pci_class_code will return the error msg back, every word in error msg will be used by caller wrongly. Change-Id: I6a875e49527539ba82bd331c8878e972e26cbc39 Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1227 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
328a221299
commit
f2bfad5908
@ -53,7 +53,7 @@ function iter_all_pci_class_code() {
|
||||
cut -d$'\t' -f1 | sed -e 's/^[a-zA-Z0-9_]*@pci//g' | tr ':' ' '))
|
||||
printf "%04x:%02x:%02x:%x\n" ${addr[0]} ${addr[1]} ${addr[2]} ${addr[3]}
|
||||
else
|
||||
echo "Missing PCI enumeration utility"
|
||||
echo "Missing PCI enumeration utility" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@ -73,7 +73,7 @@ function iter_all_pci_dev_id() {
|
||||
cut -d$'\t' -f1 | sed -e 's/^[a-zA-Z0-9_]*@pci//g' | tr ':' ' '))
|
||||
printf "%04x:%02x:%02x:%x\n" ${addr[0]} ${addr[1]} ${addr[2]} ${addr[3]}
|
||||
else
|
||||
echo "Missing PCI enumeration utility"
|
||||
echo "Missing PCI enumeration utility" >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user