mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Using option --by-interface with a non-existent network interface name results in an unexpected duplicate warning message: $ lszdev --by-interface xx Could not open directory /sys/class/net/xx: No such file or directory Could not open directory /sys/class/net/xx: No such file or directory lszdev: Could not determine device that provides xx (xx) Fix this by checking for the existence of the associated /sys/class/net directory before initiating the associated directory traversal. Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>