Comment 3 for bug 1492175

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Hi Michael,

I'm trying to understand this patch, one of your changes is to not require the /drm/card* suffix on the syspath. Do you know why this was there before? Does it matter it's not checked for now?

The replacement of "end - 13" with skipping the prefix seems much safer. You could also drop the "end" variable as it's no longer used. I would also be nicer to replace the 19 magic number with a strlen ("/devices/pci/0000:00") although this is also unsafe and could run you off the end of the array. I'm happy to make these changes if you don't want to.