@@ -1137,7 +1137,7 @@ static ssize_t mode_show(struct kobject *kobj, struct kobj_attribute *attr, char
1137
1137
val = REBOOT_UNDEFINED_STR ;
1138
1138
}
1139
1139
1140
- return sprintf (buf , "%s\n" , val );
1140
+ return sysfs_emit (buf , "%s\n" , val );
1141
1141
}
1142
1142
static ssize_t mode_store (struct kobject * kobj , struct kobj_attribute * attr ,
1143
1143
const char * buf , size_t count )
@@ -1167,7 +1167,7 @@ static struct kobj_attribute reboot_mode_attr = __ATTR_RW(mode);
1167
1167
#ifdef CONFIG_X86
1168
1168
static ssize_t force_show (struct kobject * kobj , struct kobj_attribute * attr , char * buf )
1169
1169
{
1170
- return sprintf (buf , "%d\n" , reboot_force );
1170
+ return sysfs_emit (buf , "%d\n" , reboot_force );
1171
1171
}
1172
1172
static ssize_t force_store (struct kobject * kobj , struct kobj_attribute * attr ,
1173
1173
const char * buf , size_t count )
@@ -1214,7 +1214,7 @@ static ssize_t type_show(struct kobject *kobj, struct kobj_attribute *attr, char
1214
1214
val = REBOOT_UNDEFINED_STR ;
1215
1215
}
1216
1216
1217
- return sprintf (buf , "%s\n" , val );
1217
+ return sysfs_emit (buf , "%s\n" , val );
1218
1218
}
1219
1219
static ssize_t type_store (struct kobject * kobj , struct kobj_attribute * attr ,
1220
1220
const char * buf , size_t count )
@@ -1247,7 +1247,7 @@ static struct kobj_attribute reboot_type_attr = __ATTR_RW(type);
1247
1247
#ifdef CONFIG_SMP
1248
1248
static ssize_t cpu_show (struct kobject * kobj , struct kobj_attribute * attr , char * buf )
1249
1249
{
1250
- return sprintf (buf , "%d\n" , reboot_cpu );
1250
+ return sysfs_emit (buf , "%d\n" , reboot_cpu );
1251
1251
}
1252
1252
static ssize_t cpu_store (struct kobject * kobj , struct kobj_attribute * attr ,
1253
1253
const char * buf , size_t count )
0 commit comments