Lines Matching +full:directory +full:- +full:based
1 .. SPDX-License-Identifier: GPL-2.0
4 sysfs - _The_ filesystem for exporting kernel objects
18 sysfs is a ram-based filesystem initially based on ramfs. It provides
23 Documentation/core-api/kobject.rst for more information concerning the kobject
33 mount -t sysfs sysfs /sys
36 Directory Creation
39 For every kobject that is registered with the system, a directory is
40 created for it in sysfs. That directory is created as a subdirectory
42 userspace. Top-level directories in sysfs represent the common
47 directory in the kernfs_node object associated with the directory. In
151 Subsystem-Specific Callbacks
182 ssize_t ret = -EIO;
184 if (dev_attr->show)
185 ret = dev_attr->show(dev, dev_attr, buf);
188 dev_attr->show);
214 - On read(2), the show() method should fill the entire buffer.
223 - On write(2), sysfs expects the entire buffer to be passed during the
237 - Writing causes the show() method to be rearmed regardless of current
240 - The buffer will always be PAGE_SIZE bytes in length. On i386, this
243 - show() methods should return the number of bytes printed into the
246 - show() should only use sysfs_emit() or sysfs_emit_at() when formatting
249 - store() should return the number of bytes used from the buffer. If the
252 - show() or store() can always return errors. If a bad value comes
255 - The object passed to the methods will be pinned in memory via sysfs
266 return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
272 snprintf(dev->name, sizeof(dev->name), "%.*s",
273 (int)min(count, sizeof(dev->name) - 1), buf);
284 Top Level Directory Layout
287 The sysfs directory arrangement exposes the relationship of kernel
290 The top level sysfs directory looks like::
305 bus/ contains flat directory layout of the various bus types in the
306 kernel. Each bus's directory contains two subdirectories::
312 that point to the device's directory under root/.
314 drivers/ contains a directory for each device driver that is loaded
318 fs/ contains a directory for some filesystems. Currently each
324 point to the sysfs directory for the given device. /sys/dev provides a
328 More information can driver-model specific features can be found in
329 Documentation/driver-api/driver-model/.
342 --------------------------------
364 ------------------------------------
386 ---------------------------------------
411 The sysfs directory structure and the attributes in each directory define an