/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * configfs.h - definitions for the device driver filesystem * * Based on sysfs: * sysfs is Copyright (C) 2001, 2002, 2003 Patrick Mochel * * Based on kobject.h: * Copyright (c) 2002-2003 Patrick Mochel * Copyright (c) 2002-2003 Open Source Development Labs * * configfs Copyright (C) 2005 Oracle. All rights reserved. * * Please read Documentation/filesystems/configfs.rst before using * the configfs interface, ESPECIALLY the parts about reference counts and * item destructors.
*/
/** * group - a group of config_items of a specific type, belonging * to a specific subsystem.
*/ struct config_group { struct config_item cg_item; struct list_head cg_children; struct configfs_subsystem *cg_subsys; struct list_head default_groups; struct list_head group_entry;
};
/* * If allow_link() exists, the item can symlink(2) out to other * items. If the item is a group, it may support mkdir(2). * Groups supply one of make_group() and make_item(). If the * group supports make_group(), one can create group children. If it * supports make_item(), one can create config_item children. make_group() * and make_item() return ERR_PTR() on errors. If it has * default_groups on group->default_groups, it has automatically created * group children. default_groups may coexist alongsize make_group() or * make_item(), but if the group wishes to have only default_groups * children (disallowing mkdir(2)), it need not provide either function.
*/ struct configfs_item_operations { void (*release)(struct config_item *); int (*allow_link)(struct config_item *src, struct config_item *target); void (*drop_link)(struct config_item *src, struct config_item *target);
};
/* These functions can sleep and can alloc with GFP_KERNEL */ /* WARNING: These cannot be called underneath configfs callbacks!! */ int configfs_depend_item(struct configfs_subsystem *subsys, struct config_item *target); void configfs_undepend_item(struct config_item *target);
/* * These functions can sleep and can alloc with GFP_KERNEL * NOTE: These should be called only underneath configfs callbacks. * NOTE: First parameter is a caller's subsystem, not target's. * WARNING: These cannot be called on newly created item * (in make_group()/make_item() callback)
*/ int configfs_depend_item_unlocked(struct configfs_subsystem *caller_subsys, struct config_item *target);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.