Commit cf0fe4d
committed
tree: gracefully handle empty dirs
When no devices are present, /sys/class/nvme and
/sys/class/nvme-subsystem directories may not exist. scandir returns
-1 with errno set to ENOENT.
nvme_scan treats this as a fatal error instead it should just ignore it.
There is just nothing to scan.
This fixes the python-create-ctrl-object and python-sigsegv-during-gc tests
that fail when no NVMe devices are present in the test environment.
Signed-off-by: Daniel Wagner <[email protected]>1 parent 48b15b4 commit cf0fe4d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
0 commit comments