diff options
| author | Gabriel Somlo <[email protected]> | 2016-01-28 14:23:13 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-02-10 01:37:39 +0000 |
| commit | 246c46ebaeaef17814dc5a8830d16e7f1b01116b (patch) | |
| tree | 0a55991f6e99de4f2895b7921569a55a3b8d5837 /drivers/base/component.c | |
| parent | firmware: introduce sysfs driver for QEMU's fw_cfg device (diff) | |
| download | kernel-246c46ebaeaef17814dc5a8830d16e7f1b01116b.tar.gz kernel-246c46ebaeaef17814dc5a8830d16e7f1b01116b.zip | |
firmware: create directory hierarchy for sysfs fw_cfg entries
Each fw_cfg entry of type "file" has an associated 56-char,
nul-terminated ASCII string which represents its name. While
the fw_cfg device doesn't itself impose any specific naming
convention, QEMU developers have traditionally used path name
semantics (i.e. "etc/acpi/rsdp") to descriptively name the
various fw_cfg "blobs" passed into the guest.
This patch attempts, on a best effort basis, to create a
directory hierarchy representing the content of fw_cfg file
names, under /sys/firmware/qemu_fw_cfg/by_name.
Upon successful creation of all directories representing the
"dirname" portion of a fw_cfg file, a symlink will be created
to represent the "basename", pointing at the appropriate
/sys/firmware/qemu_fw_cfg/by_key entry. If a file name is not
suitable for this procedure (e.g., if its basename or dirname
components collide with an already existing dirname component
or basename, respectively) the corresponding fw_cfg blob is
skipped and will remain available in sysfs only by its selector
key value.
Signed-off-by: Gabriel Somlo <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/base/component.c')
0 files changed, 0 insertions, 0 deletions
