#2085 NORM CTest: Thou shalt not arbitrarily munge data.

Zarro Boogs per Child bugtracker at laptop.org
Fri Jul 13 14:45:21 EDT 2007


#2085: Thou shalt not arbitrarily munge data.
---------------------+------------------------------------------------------
  Reporter:  krstic  |       Owner:  dilinger          
      Type:  defect  |      Status:  new               
  Priority:  normal  |   Milestone:  CTest             
 Component:  kernel  |     Version:  Git as of bug date
Resolution:          |    Keywords:                    
  Verified:  0       |  
---------------------+------------------------------------------------------
Comment (by wmb at firmworks.com):

 Regarding dilinger's comment above:

 Adding a newline is not a good idea.  Device tree properties in general
 contain binary information.  Adding a newline destroys the data integrity.

 The rationale of making "cat" output look better is not salient.  "cat" is
 not a user interface tool; it utility as one is accidental at best, and
 only just happens to work for the special case of text files.  "cat" can't
 display binary files in /bin, /lib, etc.  Linux has many tools for
 displaying human-readable representations of various file formats.  "cat"
 only works as a human interface tool in the narrow case where the file
 happens to be in text format.

 Think of the outcry that would result if a disk filesystem gratuitously
 added or deleted characters from files.

 The only sane policy for a filesystem is to present its data faithfully,
 without alteration.  The sysfs policy of presenting data in text format
 does not extend to this case, because sysfs is the primary definer of the
 kernel data that it exposes.  ofwfs is not the primary definer of its
 data, but rather a conduit of externally-defined data (the primary
 definition is the OFW specification - IEEE1275-1994).

 Passing through data without alteration is the right answer for all
 architectures. It is the only possible right answer.  Reformatting data
 for human readability is not the job of a filesystem.

-- 
Ticket URL: <http://dev.laptop.org/ticket/2085#comment:4>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list