summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2016-12-07 11:30:27 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2016-12-20 15:04:18 +1100
commit211d7eb1de2d3a9cd97846deb9a85a934dae2981 (patch)
tree335449f626e1b0c5fee6f6d9492323142fd036b2 /lib
parent4b06a4645e19830581505a675075773adc0857c2 (diff)
downloadtalos-petitboot-211d7eb1de2d3a9cd97846deb9a85a934dae2981.tar.gz
talos-petitboot-211d7eb1de2d3a9cd97846deb9a85a934dae2981.zip
types: Remove detail and progress from struct status
Nothing used these, and the serialisation was buggy anyway. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/pb-protocol/pb-protocol.c20
-rw-r--r--lib/types/types.h2
2 files changed, 1 insertions, 21 deletions
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index 1e72d19..8bc8820 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -219,7 +219,6 @@ int pb_protocol_boot_status_len(const struct status *status)
{
return 4 +
4 + optional_strlen(status->message) +
- 4 + optional_strlen(status->detail) +
4;
}
@@ -410,10 +409,6 @@ int pb_protocol_serialise_boot_status(const struct status *status,
pos += sizeof(uint32_t);
pos += pb_protocol_serialise_string(pos, status->message);
- pos += pb_protocol_serialise_string(pos, status->detail);
-
- *(uint32_t *)pos = __cpu_to_be32(status->type);
- pos += sizeof(uint32_t);
assert(pos <= buf + buf_len);
(void)buf_len;
@@ -848,23 +843,10 @@ int pb_protocol_deserialise_boot_status(struct status *status,
pos += sizeof(uint32_t);
len -= sizeof(uint32_t);
- /* message and detail strings */
+ /* message string */
if (read_string(status, &pos, &len, &status->message))
goto out;
- if (read_string(status, &pos, &len, &status->detail))
- goto out;
-
- /* and finally, progress */
- if (len < sizeof(uint32_t))
- goto out;
-
- status->progress = __be32_to_cpu(*(uint32_t *)(pos));
-
- /* clamp to 100% */
- if (status->progress > 100)
- status->progress = 100;
-
rc = 0;
out:
diff --git a/lib/types/types.h b/lib/types/types.h
index b22c0b0..506510b 100644
--- a/lib/types/types.h
+++ b/lib/types/types.h
@@ -76,8 +76,6 @@ struct status {
STATUS_ERROR,
} type;
char *message;
- char *detail;
- int progress;
};
struct interface_info {
OpenPOWER on IntegriCloud