On Mon, 22 Jun 2009, Frans Pop wrote: > One more question. Should we also try to keep the formatting the same as > the devices file? > > For example, from /proc/bus/usb/devices: > T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 4 > versus the script: > T: Bus=1 Lev=0 Prnt=0 Port=0 Cnt=0 Dev#=1 Spd=480 MxCh=4 > > It should be relatively easy to make them the same, but I'm in two minds > about it myself. > > Advantage of the formatting is that lines of the same type will line up > nicely. OTOH, the formatting in the file is rather inconsistent (leading > spaces versus zeros) and having spaces in a 'xxx=<value>' is also not all > that great for either readability or parsing. > > Thoughts? The details of the formatting don't matter too much to me; I can read it okay either way. While there is something to be said for having all the entries line up, it doesn't matter much because lines of the same type don't occur next to each other. Which means that the script's formatting has a slight edge. (Not to mention that leading 0's seem to suggest a value is octal or hex, even when it isn't.) Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html