Subject: Re: SYSFS "errors"

From: Mauro Carvalho Chehab <[email-masked]>
Date: Tue, 19 Feb 2013 10:50:48 -0300

Em Tue, 19 Feb 2013 15:38:09 +0200
Felipe Balbi <[email-masked]> escreveu:

> Hi,
> 
> On Tue, Feb 19, 2013 at 02:28:54PM +0100, Borislav Petkov wrote:
> > On Tue, Feb 19, 2013 at 03:15:00PM +0200, Felipe Balbi wrote:
> > > what's the problem with that ?
> > 
> > Not a problem - simply annoying.
> > 
> > $ ./test.sh
> > cat: /path/to/file/that/doesnt/exist.txt: No such file or directory
> > Setting scrubrate to:
> > 
> > I'm sure someone would ask themselves why all of a sudden the file is
> > gone.
> > 
> > > $ cat /path/to/file/that/doesnt/exist.txt
> > > cat: /path/to/file/that/doesnt/exist.txt: No such file or directory
> > > 
> > > Didn't see any gates to hell opening here...
> > 
> > And I don't see why we have to debate such a trivial thing when we can
> > fix it *properly* without *absolutely* *not* upsetting userspace.
> 
> because changing the permission will cause the same issue:

It is actually worse, as if someone is using a C code to open the device
with
	fp = open ("/sys/devices/system/edac/mc/mc0/sdram_scrub_rate", O_RDWR);

It will now start to fail if the device doesn't have both permissions.

Regards,
Mauro