Rewrite the part that retrieves shelf/slot from sysfs path.