From mboxrd@z Thu Jan 1 00:00:00 1970 From: fruktopus@gmail.com (=?UTF-8?B?U3RlcGhhbiBNw7xsbGVy?=) Date: Fri, 26 Jun 2015 10:00:03 +0200 Subject: Filesize in sysfs, debugfs, ... Message-ID: <558D0683.8080205@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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