summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pb-protocol/pb-protocol.c10
-rw-r--r--lib/pb-protocol/pb-protocol.h6
-rw-r--r--lib/types/types.h8
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index 64bd161..1e72d19 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -215,7 +215,7 @@ int pb_protocol_boot_len(const struct boot_command *boot)
4 + optional_strlen(boot->console);
}
-int pb_protocol_boot_status_len(const struct boot_status *status)
+int pb_protocol_boot_status_len(const struct status *status)
{
return 4 +
4 + optional_strlen(status->message) +
@@ -401,7 +401,7 @@ int pb_protocol_serialise_boot_command(const struct boot_command *boot,
return 0;
}
-int pb_protocol_serialise_boot_status(const struct boot_status *status,
+int pb_protocol_serialise_boot_status(const struct status *status,
char *buf, int buf_len)
{
char *pos = buf;
@@ -821,7 +821,7 @@ out:
return rc;
}
-int pb_protocol_deserialise_boot_status(struct boot_status *status,
+int pb_protocol_deserialise_boot_status(struct status *status,
const struct pb_protocol_message *message)
{
unsigned int len;
@@ -838,8 +838,8 @@ int pb_protocol_deserialise_boot_status(struct boot_status *status,
status->type = __be32_to_cpu(*(uint32_t *)(pos));
switch (status->type) {
- case BOOT_STATUS_ERROR:
- case BOOT_STATUS_INFO:
+ case STATUS_ERROR:
+ case STATUS_INFO:
break;
default:
goto out;
diff --git a/lib/pb-protocol/pb-protocol.h b/lib/pb-protocol/pb-protocol.h
index f850520..a8cd206 100644
--- a/lib/pb-protocol/pb-protocol.h
+++ b/lib/pb-protocol/pb-protocol.h
@@ -36,7 +36,7 @@ void pb_protocol_dump_device(const struct device *dev, const char *text,
int pb_protocol_device_len(const struct device *dev);
int pb_protocol_boot_option_len(const struct boot_option *opt);
int pb_protocol_boot_len(const struct boot_command *boot);
-int pb_protocol_boot_status_len(const struct boot_status *status);
+int pb_protocol_boot_status_len(const struct status *status);
int pb_protocol_system_info_len(const struct system_info *sysinfo);
int pb_protocol_config_len(const struct config *config);
int pb_protocol_url_len(const char *url);
@@ -55,7 +55,7 @@ int pb_protocol_serialise_boot_option(const struct boot_option *opt,
char *buf, int buf_len);
int pb_protocol_serialise_boot_command(const struct boot_command *boot,
char *buf, int buf_len);
-int pb_protocol_serialise_boot_status(const struct boot_status *status,
+int pb_protocol_serialise_boot_status(const struct status *status,
char *buf, int buf_len);
int pb_protocol_serialise_system_info(const struct system_info *sysinfo,
char *buf, int buf_len);
@@ -79,7 +79,7 @@ int pb_protocol_deserialise_boot_option(struct boot_option *opt,
int pb_protocol_deserialise_boot_command(struct boot_command *cmd,
const struct pb_protocol_message *message);
-int pb_protocol_deserialise_boot_status(struct boot_status *status,
+int pb_protocol_deserialise_boot_status(struct status *status,
const struct pb_protocol_message *message);
int pb_protocol_deserialise_system_info(struct system_info *sysinfo,
diff --git a/lib/types/types.h b/lib/types/types.h
index d660d6b..b22c0b0 100644
--- a/lib/types/types.h
+++ b/lib/types/types.h
@@ -70,10 +70,10 @@ struct boot_command {
char *console;
};
-struct boot_status {
- enum {
- BOOT_STATUS_INFO,
- BOOT_STATUS_ERROR,
+struct status {
+ enum status_type {
+ STATUS_INFO,
+ STATUS_ERROR,
} type;
char *message;
char *detail;
OpenPOWER on IntegriCloud