lkml.org 
[lkml]   [2019]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v10 02/18] counter: Documentation: Add Generic Counter sysfs documentation
From
Date
On 4/8/19 4:55 PM, Pavel Machek wrote:
>
> pavel@amd:~$ cat /sys/power/state
> freeze mem disk
>
> And we use [] to mark current selection:

I know this is used elsewhere, but I don't think it is a good pattern
to copy. Parsing it from user-space is annoying. Also it breaks the
sysfs rule of "one item per file" since it tells us two things - the
list of possible values _and_ the current active value.

>
> pavel@amd:~$ cat /sys/class/leds/tpacpi\:\:thinkvantage/trigger
> [none] bluetooth-power rfkill-any rfkill-none kbd-scrolllock
> kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock
> kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock
> kbd-ctrlrlock AC-online BAT0-charging-or-full BAT0-charging BAT0-full
> BAT0-charging-blink-full-solid rfkill0 phy0rx phy0tx phy0assoc
> phy0radio phy0tpt mmc0 timer heartbeat audio-mute audio-micmute
> rfkill1
>
> Note this only works if you have less than PAGE_SIZE of entries... and
> will never have more.
>
> Pavel
>

\
 
 \ /
  Last update: 2019-04-09 15:13    [W:0.084 / U:3.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site