[SPDK] why discarding error output in setup.sh

Crane Chu <cranechu at gmail.com>
Newsgroups dev.linux.lists.spdk
Message-ID <CAPtQi4Tfv3e1meBQ7z0wu8wGhOoema_08OM=8hSuz+CRYFLArg@mail.gmail.com>
Hi,

We have a question in spdk/scripts/setup.sh. In this commit
<https://github.com/spdk/spdk/commit/21173cd036e1af988463ea7a678347a27b555cb7#diff-1d889b31bb06cb578abde8e2253d043aR34>.
We can find that "2>/dev/null" was added:
echo "$bdf" > "/sys/bus/pci/drivers/$driver_name/bind" 2> /dev/null || true

May I know any specific reason for this? We tried to remove "2>/dev/null",
and indeed found error output:

> echo: write error: No such device
>
But the function of the script was still OK.

Thanks,
-Crane
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.