Re: /sys/.../power/autosuspend format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Samstag, 28. August 2010, 23:01:54 schrieb Alan Stern:
> On Sat, 28 Aug 2010, Oliver Neukum wrote:
> 
> > Am Freitag, 27. August 2010, 17:36:53 schrieb Alan Stern:

> > It seems to me that the standard for /sys is to use miliseconds.
> 
> "45 minutes" expressed in milliseconds isn't very easy to comprehend;
> it comes out as "2700000".  Compare this to "45:00.000".  I'm not sure
> that's the best way to go.

But that is the decision that has been made for all other fields.
The simple number is easy to process for a programm. Thus the
compromise has been made. It is better to keep all attribute files
in the same format.

> > And that seems to be reasonable. We'd fare better with a second
> > field and to truncate the output on the old field.
> 
> I don't understand.  You mean a second field in the same file?  What 
> would that field contain?  And what do you mean by "truncate the output 
> on the old field"?  An example or two would help.

I mean we should have two files. The existing attribute expressing
the delay in seconds and a new attribute expressing it in miliseconds.
They should refer to the same value, the legacy field being a truncated
version of the new field.

> Besides, doesn't this violate the "one file, one value" rule for sysfs?

I'd say this is an implication going only one way.

	Regards
		Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux