Gabriel Somlo 246c46ebae 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 <somlo@cmu.edu>
Cc: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-09 17:37:39 -08:00
..
2011-10-24 16:52:39 +02:00
evm
2011-07-18 12:29:40 -04:00
2015-05-06 10:28:39 -04:00
2013-03-23 16:11:31 -07:00
2011-03-31 11:26:23 -03:00
2012-04-23 14:23:32 +03:00
2011-03-22 04:53:09 -03:00
2015-06-25 17:00:38 -07:00
2011-03-31 11:26:23 -03:00
2015-12-16 00:21:40 +08:00
2013-10-17 00:36:06 +02:00
2013-06-21 11:32:51 +02:00
2015-04-30 22:15:04 +01:00
2011-04-29 18:09:34 -07:00
2012-06-25 13:48:15 +02:00
2015-12-08 14:50:12 +01:00