最終更新:2022-08-24 (水) 18:55:02 (617d)  

configfs_item_operations
Top / configfs_item_operations

/*
 * 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.
 * If the group has commit(), it supports pending and committed (active)
 * items.
 */
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);
};

むかし

  • struct configfs_item_operations {
    	void (*release)(struct config_item *);
    	ssize_t	(*show_attribute)(struct config_item *, struct configfs_attribute *,char *);
    	ssize_t	(*store_attribute)(struct config_item *,struct configfs_attribute *,const char *, size_t);
    	int (*allow_link)(struct config_item *src, struct config_item *target);
    	int (*drop_link)(struct config_item *src, struct config_item *target);
    };