if (ret < 0)
return ret;
- return sprintf(buf, "%d\n", ret);
+ return sysfs_emit(buf, "%d\n", ret);
}
static ssize_t post_reset_wdog_store(struct device *dev,
if (action < 0)
return action;
- return sprintf(buf, "%s\n", mlxbf_bootctl_action_to_string(action));
+ return sysfs_emit(buf, "%s\n", mlxbf_bootctl_action_to_string(action));
}
static int mlxbf_bootctl_store(int smc_op, const char *buf, size_t count)
* due to using the test bits.
*/
if (test_state) {
- return sprintf(buf, "%s(test)\n",
+ return sysfs_emit(buf, "%s(test)\n",
mlxbf_bootctl_lifecycle_states[lc_state]);
} else if (use_dev_key &&
(lc_state == MLXBF_BOOTCTL_SB_LIFECYCLE_GA_SECURE)) {
- return sprintf(buf, "Secured (development)\n");
+ return sysfs_emit(buf, "Secured (development)\n");
}
- return sprintf(buf, "%s\n", mlxbf_bootctl_lifecycle_states[lc_state]);
+ return sysfs_emit(buf, "%s\n", mlxbf_bootctl_lifecycle_states[lc_state]);
}
static ssize_t secure_boot_fuse_state_show(struct device *dev,
else
status = valid ? "Invalid" : "Free";
}
- buf_len += sprintf(buf + buf_len, "%d:%s ", key, status);
+ buf_len += sysfs_emit(buf + buf_len, "%d:%s ", key, status);
}
- buf_len += sprintf(buf + buf_len, "\n");
+ buf_len += sysfs_emit(buf + buf_len, "\n");
return buf_len;
}