kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* Filesize in sysfs, debugfs, ...
@ 2015-06-26  8:00 Stephan Müller
  0 siblings, 0 replies; only message in thread
From: Stephan Müller @ 2015-06-26  8:00 UTC (permalink / raw)
  To: kernelnewbies

Hi all, 

I have a question, what is the policy on file size in sysfs and especially in debugfs?

Many (but not all) of the files report a size of 0. Recently I diffed against a file in sysfs. The files were identical, despite the fact one reported size 0. I got the unpleasant result

diff -as file1 file2                (treat both as text, report identical files)
Files file1 and file2 are identical

diff -asq file1 file2               (treat both as text, report just yes/no)
Files file1 and file2 differ

In brief mode diff looks first for file sizes and stops if they don't match. 

For files which don't differ in size (e.q, exposing a bool) it would be easy to set the proper size for others it's not.


   Thank you,
   Stephan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-26  8:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-26  8:00 Filesize in sysfs, debugfs, Stephan Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).