extras: path_id - add comment about readdir() rebase logic

This commit is contained in:
Kay Sievers 2012-03-13 12:55:53 +01:00
parent 3bfc7a97b1
commit 746b5152cc

View file

@ -265,6 +265,11 @@ static struct udev_device *handle_scsi_default(struct udev_device *parent, char
i = strtoul(&dent->d_name[4], &rest, 10);
if (rest[0] != '\0')
continue;
/*
* find the smallest number; the host really needs to export its
* own instance number per parent device; relying on the global host
* enumeration and plainly rebasing the numbers sounds unreliable
*/
if (basenum == -1 || i < basenum)
basenum = i;
}