Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109677675
D21475.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21475.diff
View Options
Index: head/sys/compat/linuxkpi/common/include/linux/sysfs.h
===================================================================
--- head/sys/compat/linuxkpi/common/include/linux/sysfs.h
+++ head/sys/compat/linuxkpi/common/include/linux/sysfs.h
@@ -152,6 +152,29 @@
sysctl_remove_name(kobj->oidp, attr->name, 1, 1);
}
+static inline int
+sysfs_create_files(struct kobject *kobj, const struct attribute * const *attrs)
+{
+ int error = 0;
+ int i;
+
+ for (i = 0; attrs[i] && !error; i++)
+ error = sysfs_create_file(kobj, attrs[i]);
+ while (error && --i >= 0)
+ sysfs_remove_file(kobj, attrs[i]);
+
+ return (error);
+}
+
+static inline void
+sysfs_remove_files(struct kobject *kobj, const struct attribute * const *attrs)
+{
+ int i;
+
+ for (i = 0; attrs[i]; i++)
+ sysfs_remove_file(kobj, attrs[i]);
+}
+
static inline void
sysfs_remove_group(struct kobject *kobj, const struct attribute_group *grp)
{
Index: head/sys/sys/param.h
===================================================================
--- head/sys/sys/param.h
+++ head/sys/sys/param.h
@@ -60,7 +60,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1300043 /* Master, propagated to newvers */
+#define __FreeBSD_version 1300044 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 9, 6:15 AM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16546196
Default Alt Text
D21475.diff (1 KB)
Attached To
Mode
D21475: LinuxKPI: Add sysfs create/remove functions that handles multiple files in one call.
Attached
Detach File
Event Timeline
Log In to Comment