[os/linux] check if /sys/devices.. exist before reading it