include/linux/iscsi_boot_sysfs.h

Source file repositories/reference/linux-study-clean/include/linux/iscsi_boot_sysfs.h

File Facts

System
Linux kernel
Corpus path
include/linux/iscsi_boot_sysfs.h
Extension
.h
Size
3796 bytes
Lines
140
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct iscsi_boot_kobj {
	struct kobject kobj;
	struct attribute_group *attr_group;
	struct list_head list;

	/*
	 * Pointer to store driver specific info. If set this will
	 * be freed for the LLD when the kobj release function is called.
	 */
	void *data;
	/*
	 * Driver specific show function.
	 *
	 * The enum of the type. This can be any value of the above
	 * properties.
	 */
	ssize_t (*show) (void *data, int type, char *buf);

	/*
	 * Drivers specific visibility function.
	 * The function should return if they the attr should be readable
	 * writable or should not be shown.
	 *
	 * The enum of the type. This can be any value of the above
	 * properties.
	 */
	umode_t (*is_visible) (void *data, int type);

	/*
	 * Driver specific release function.
	 *
	 * The function should free the data passed in.
	 */
	void (*release) (void *data);
};

struct iscsi_boot_kset {
	struct list_head kobj_list;
	struct kset *kset;
};

struct iscsi_boot_kobj *
iscsi_boot_create_initiator(struct iscsi_boot_kset *boot_kset, int index,
			    void *data,
			    ssize_t (*show) (void *data, int type, char *buf),
			    umode_t (*is_visible) (void *data, int type),
			    void (*release) (void *data));

struct iscsi_boot_kobj *
iscsi_boot_create_ethernet(struct iscsi_boot_kset *boot_kset, int index,
			   void *data,
			   ssize_t (*show) (void *data, int type, char *buf),
			   umode_t (*is_visible) (void *data, int type),
			   void (*release) (void *data));
struct iscsi_boot_kobj *
iscsi_boot_create_target(struct iscsi_boot_kset *boot_kset, int index,
			 void *data,
			 ssize_t (*show) (void *data, int type, char *buf),
			 umode_t (*is_visible) (void *data, int type),
			 void (*release) (void *data));

struct iscsi_boot_kobj *
iscsi_boot_create_acpitbl(struct iscsi_boot_kset *boot_kset, int index,
			  void *data,
			  ssize_t (*show)(void *data, int type, char *buf),
			  umode_t (*is_visible)(void *data, int type),
			  void (*release)(void *data));

struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name);
struct iscsi_boot_kset *iscsi_boot_create_host_kset(unsigned int hostno);
void iscsi_boot_destroy_kset(struct iscsi_boot_kset *boot_kset);

#endif

Annotation

Implementation Notes