On Fri, 30 Sep 2005, Matthew Wilcox wrote: > > There's precedent for binary data in sysfs -- pci config space is one. In general, if the data has no semantic meaning (ie it's just a blob), and there really is some point to exporting it, it should be exported as a binary blob. There's no point in doing some random "ASCII conversion" if the data doesn't have any known semantics. Bytes? Words? Longwords? Byteorder? It's simply not a sensible operation, and the only sane interface is to just read a binary blob with the raw data. That's true in general of PCI config space. Of course, _some_ parts of PCI config space do indeed have meaning, so you'll find the "device" and "vendor" and other things like that as separate nodes in /sysfs with ASCII representations. So sometimes you may have mixtures (but it would be stupid to try to "remove" the semantic data from the blob - then it would turn into a _true_ monster). So it's not like binary blobs are not allowed. In general, the rule should be: - all independent values should show up as independent files (never mix stuff up that you don't need to) - anything with semantic meaning should have the appropriate semantic textual format (ie formatted ASCII, not just raw data). The _goal_ is that you can look at sysfs with a file manager, and the results should make sense. Linus - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html