> The problem is not "how" (which is already dealt with), but "why". I.e.,
one could say that some sysfs attributes for SCSI devices are created after the uevent is sent. That's why we have the WAIT_FOR_SYSFS rule that waits for "ioerr_cnt".

But it will be certainly better to show where exactly this takes place (i.e., the scsi_sysfs_add_sdev() function from drivers/scsi/scsi_sysfs.c). This function, in its very end, creates all sysfs attributes listed in the scsi_sysfs_sdev_attrs[] array. Upon examining the contents of that array, it is clearly seen that the "ioerr_cnt" is really the last attribute created.

The "why" can be taken too far. Is understanding the scsi_sysfs_add_sdev() function really of interest to most people? I don't think most of us care to know the programming internals of the Linux kernel to that degree. I wager to say that most people just like to know when/why devices are created, but it sounds like this may be going too in depth.



--
Gerard Beekmans

/* If Linux doesn't have the solution, you have the wrong problem */

--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to