Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1204475
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names |
| Date | 2015-08-10 20:40 +0200 |
| Message-ID | <pW09k-643-25@gated-at.bofh.it> (permalink) |
| References | <pVYTT-4mq-3@gated-at.bofh.it> <pVYTT-4mq-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 10, 2015 at 12:31:20PM -0400, Gabriel L. Somlo wrote: > From: "Gabriel Somlo" <somlo@cmu.edu> > > 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/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/fw_cfg/by_select 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. Shouldn't all of this be done in userspace with the symlinks and all? It seems like you are trying to duplicate the /dev/block/by-name and such. Policy decisions like symlinks and naming should be done there, in userspace, and not directly in sysfs if at all possible. Again, why can't this be a bunch of character device nodes? It seems like you want to access them that way (read/write, ioctl, etc.) thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/3] SysFS driver for QEMU firmware config device (fw_cfg) "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
[PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 20:40 +0200
Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 21:10 +0200
Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 21:20 +0200
[PATCH 2/3] kobject: export kset_find_obj() to be used from modules "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from modules Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 20:40 +0200
Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from modules Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 21:00 +0200
Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from modules "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 21:10 +0200
Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from modules "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 21:10 +0200
[PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
Re: [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 20:40 +0200
csiph-web