[dpdk-dev] [PATCH v3 2/2] eal/linux: Add support for handling built-in kernel modules
Panu Matilainen
pmatilai at redhat.com
Tue Dec 8 08:25:23 CET 2015
On 12/07/2015 10:55 PM, Stephen Hemminger wrote:
> On Mon, 7 Dec 2015 19:36:05 +0100
> Kamil Rytarowski <Kamil.Rytarowski at caviumnetworks.com> wrote:
>
>> + /* Check if there is sysfs mounted */
>> + if (stat("/sys/module", &st) != 0) {
>> + RTE_LOG(DEBUG, EAL, "Open /sys/module failed: %s\n",
>> + strerror(errno));
>> return -1;
>> }
>
> This check is useless.
> If /sys/module does not exist then /sys/module/XXX won't exist either.
Yes, but non-mounted sysfs is an error whereas /sys/module/XXX is merely
an existence test, and the current sole caller in pci_vfio_enable() even
bothers checking for the difference. So its perhaps a bit academic but
its not incorrect.
At any rate, the debug messages are incorrect/misleading. It's certainly
not trying to *open* these directories so it should not claim to do so.
- Panu -
More information about the dev
mailing list