aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/sysfs.txt (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-01-23Documentation/filesystems/sysfs.txt: fix device_attribute declarationAndre Richter1-3/+3
Fix a wrong device_attribute declaration example. Signed-off-by: Andre Richter <andre.o.richter@gmail.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-01-03sysfs: propagate umode_tAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-08-22docs/sysfs: Specify ABI documentation requirementsBart Van Assche1-1/+9
Although it is expected nowadays that every new sysfs attribute is documented under Documentation/ABI, this is not yet mentioned in the kernel documentation. This patch adds a note in the sysfs documentation about that requirement. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-02-03docs/sysfs: show() methods should use scnprintf().Bart Van Assche1-3/+3
Since snprintf() may return a value that exceeds its second argument, show() methods should use scnprintf() instead of snprintf(). This patch updates the example in the sysfs documentation accordingly. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Tejun Heo <tj@kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-03docs/sysfs: Update directory/kobject documentation.Bart Van Assche1-4/+6
Some time ago the way how sysfs stores a pointer to a kobject corresponding to a directory was modified. This patch brings the documentation again in sync with the implementation. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Cc: Tejun Heo <tj@kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-05sysfs: Fix one more signature discrepancy between sysfs implementation and docs.Ira Weiny1-2/+2
Signed-off-by: Ira Weiny <weiny2@llnl.gov> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-05sysfs: fix discrepancies between implementation and documentationBart Van Assche1-19/+25
Fix all discrepancies I know of between the sysfs implementation and its documentation. Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23Driver core: driver_attribute parameters can often be const*Phil Carmody1-2/+2
Many struct driver_attribute descriptors are purely read-only structures, and there's no need to change them. Therefore make the promise not to, which will let those descriptors be put in a ro section. Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-23Driver core: device_attribute parameters can often be const*Phil Carmody1-4/+4
Most device_attributes are const, and are begging to be put in a ro section. However, the create and remove file interfaces were failing to propagate the const promise which the only functions they call offer. Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28driver core: documentation: make it clear that sysfs is optionalLucian Adrian Grijincu1-1/+2
The original text suggested that sysfs is mandatory and always compiled in the kernel. Signed-off-by: Lucian Adrian Grijincu <lgrijincu@ixiacom.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-22PATCH [2/2] Documentation/filesystems/sysfs.txt: fix descriptions of device attributesMike Murphy1-22/+28
Fix descriptions of device attributes to be consistent with the actual implementations in include/linux/device.h Signed-off-by: Mike Murphy <mamurph[at]cs.clemson.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21sysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minorDan Williams1-0/+6
Why?: There are occasions where userspace would like to access sysfs attributes for a device but it may not know how sysfs has named the device or the path. For example what is the sysfs path for /dev/disk/by-id/ata-ST3160827AS_5MT004CK? With this change a call to stat(2) returns the major:minor then userspace can see that /sys/dev/block/8:32 links to /sys/block/sdc. What are the alternatives?: 1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce the need to proliferate ioctl interfaces into the kernel, so this seems counter productive. 2/ Use udev to create these symlinks: Also doable, but it adds a udev dependency to utilities that might be running in a limited environment like an initramfs. 3/ Do a full-tree search of sysfs. [kay.sievers@vrfy.org: fix duplicate registrations] [kay.sievers@vrfy.org: cleanup suggestions] Cc: Neil Brown <neilb@suse.de> Cc: Tejun Heo <htejun@gmail.com> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Reviewed-by: SL Baur <steve@xemacs.org> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Acked-by: Mark Lord <lkml@rtr.ca> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-19sysfs: refill attribute buffer when reading from offset 0Dan Williams1-2/+7
Requiring userspace to close and re-open sysfs attributes has been the policy since before 2.6.12. It allows userspace to get a consistent snapshot of kernel state and consume it with incremental reads and seeks. Now, if the file position is zero the kernel assumes userspace wants to see the new value. The application for this change is to allow a userspace RAID metadata handler to check the state of an array without causing any memory allocations. Thus not causing writeback to a raid array that might be blocked waiting for userspace to take action. Cc: Neil Brown <neilb@suse.de> Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-20docs/sysfs: add missing word to sysfs attribute explanationShaun Zinck1-1/+1
Add the obvious missing word. Signed-off-by: Shaun Zinck <shaun.zinck@gmail.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2006-10-03Fix typos in Documentation/: 'D'-'E'Matt LaPlante1-1/+1
This patch fixes typos in various Documentation txts. This patch addresses some words starting with the letters 'D'-'E'. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-04-26[doc] add paragraph about 'fs' subsystem to sysfs.txtMiklos Szeredi1-0/+5
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
2005-09-05[PATCH] Driver core: Documentation: use S_IRUSR | ... in stead of 0644Jan Veldeman1-2/+2
Change filemode to use defines in stead of 0644, based on suggestions by Walter Harms and Domen Puncer. Signed-off-by: Jan Veldeman <Jan.Veldeman@advalvas.be> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-05[PATCH] Driver core: Documentation: fix whitespace between parametersJan Veldeman1-13/+13
Fix whitespace after comma between parameters. Signed-off-by: Jan Veldeman <Jan.Veldeman@advalvas.be> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-20[PATCH] Driver core: Documentation: update device attribute callbacksYani Ioannou1-1/+1
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+341
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!