Merging upstream version 2.13.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
adb2e5e05d
commit
8599c7290c
579 changed files with 6165 additions and 1687 deletions
|
@ -565,8 +565,7 @@ static int eol_plp_failure_mode(int argc, char **argv, struct command *cmd,
|
|||
OPT_BYTE("mode", 'm', &cfg.mode, mode),
|
||||
OPT_FLAG("save", 's', &cfg.save, save),
|
||||
OPT_BYTE("sel", 'S', &cfg.sel, sel),
|
||||
OPT_FLAG("no-uuid", 'n', NULL,
|
||||
"Skip UUID index search (UUID index not required for OCP 1.0)"));
|
||||
OPT_FLAG("no-uuid", 'n', NULL, no_uuid));
|
||||
|
||||
err = parse_and_open(&dev, argc, argv, desc, opts);
|
||||
if (err)
|
||||
|
@ -2026,8 +2025,7 @@ static int set_dssd_power_state_feature(int argc, char **argv, struct command *c
|
|||
OPT_ARGS(opts) = {
|
||||
OPT_BYTE("power-state", 'p', &cfg.power_state, power_state),
|
||||
OPT_FLAG("save", 's', &cfg.save, save),
|
||||
OPT_FLAG("no-uuid", 'n', NULL,
|
||||
"Skip UUID index search (UUID index not required for OCP 1.0)"),
|
||||
OPT_FLAG("no-uuid", 'n', NULL, no_uuid),
|
||||
OPT_END()
|
||||
};
|
||||
|
||||
|
@ -2117,8 +2115,7 @@ static int get_dssd_power_state_feature(int argc, char **argv, struct command *c
|
|||
OPT_ARGS(opts) = {
|
||||
OPT_BYTE("sel", 'S', &cfg.sel, sel),
|
||||
OPT_FLAG("all", 'a', NULL, all),
|
||||
OPT_FLAG("no-uuid", 'n', NULL,
|
||||
"Skip UUID index search (UUID index not required for OCP 1.0)"),
|
||||
OPT_FLAG("no-uuid", 'n', NULL, no_uuid),
|
||||
OPT_END()
|
||||
};
|
||||
|
||||
|
@ -2176,8 +2173,7 @@ static int set_plp_health_check_interval(int argc, char **argv, struct command *
|
|||
OPT_ARGS(opts) = {
|
||||
OPT_BYTE("plp_health_interval", 'p', &cfg.plp_health_interval, plp_health_interval),
|
||||
OPT_FLAG("save", 's', &cfg.save, save),
|
||||
OPT_FLAG("no-uuid", 'n', NULL,
|
||||
"Skip UUID index search (UUID index not required for OCP 1.0)"),
|
||||
OPT_FLAG("no-uuid", 'n', NULL, no_uuid),
|
||||
OPT_END()
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#if !defined(OCP_NVME) || defined(CMD_HEADER_MULTI_READ)
|
||||
#define OCP_NVME
|
||||
|
||||
#define OCP_PLUGIN_VERSION "2.11.0"
|
||||
#define OCP_PLUGIN_VERSION "2.12.0"
|
||||
#include "cmd.h"
|
||||
|
||||
PLUGIN(NAME("ocp", "OCP cloud SSD extensions", OCP_PLUGIN_VERSION),
|
||||
|
|
|
@ -464,15 +464,19 @@ void json_add_formatted_u32_str(struct json_object *pobject, const char *msg, un
|
|||
void json_add_formatted_var_size_str(struct json_object *pobject, const char *msg, __u8 *pdata,
|
||||
unsigned int data_size)
|
||||
{
|
||||
char description_str[256] = "";
|
||||
char *description_str = NULL;
|
||||
char temp_buffer[3] = { 0 };
|
||||
|
||||
/* Allocate 2 chars for each value in the data + 2 bytes for the null terminator */
|
||||
description_str = (char *) calloc(1, data_size*2 + 2);
|
||||
|
||||
for (size_t i = 0; i < data_size; ++i) {
|
||||
sprintf(temp_buffer, "%02X", pdata[i]);
|
||||
strcat(description_str, temp_buffer);
|
||||
}
|
||||
|
||||
json_object_add_value_string(pobject, msg, description_str);
|
||||
free(description_str);
|
||||
}
|
||||
#endif /* CONFIG_JSONC */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue