]> git.ozlabs.org Git - petitboot/blobdiff - lib/pb-protocol/pb-protocol.c
ui/ncurses: Reset console options on boot
[petitboot] / lib / pb-protocol / pb-protocol.c
index 315efc4cf000555f9575b20c489d01441aeca0e3..7c563c8e0ad17de54e8dd1ad86ae786949a11422 100644 (file)
@@ -223,7 +223,7 @@ int pb_protocol_boot_status_len(const struct status *status)
        return  4 +     /* type */
                4 + optional_strlen(status->message) +
                4 +     /* backlog */
        return  4 +     /* type */
                4 + optional_strlen(status->message) +
                4 +     /* backlog */
-               4;
+               4;      /* boot_active */
 }
 
 int pb_protocol_system_info_len(const struct system_info *sysinfo)
 }
 
 int pb_protocol_system_info_len(const struct system_info *sysinfo)
@@ -457,6 +457,9 @@ int pb_protocol_serialise_boot_status(const struct status *status,
        *(bool *)pos = __cpu_to_be32(status->backlog);
        pos += sizeof(bool);
 
        *(bool *)pos = __cpu_to_be32(status->backlog);
        pos += sizeof(bool);
 
+       *(bool *)pos = __cpu_to_be32(status->boot_active);
+       pos += sizeof(bool);
+
        assert(pos <= buf + buf_len);
        (void)buf_len;
 
        assert(pos <= buf + buf_len);
        (void)buf_len;
 
@@ -952,6 +955,10 @@ int pb_protocol_deserialise_boot_status(struct status *status,
        status->backlog = *(bool *)pos;
        pos += sizeof(status->backlog);
 
        status->backlog = *(bool *)pos;
        pos += sizeof(status->backlog);
 
+       /* boot_active */
+       status->boot_active = *(bool *)pos;
+       pos += sizeof(status->boot_active);
+
        rc = 0;
 
 out:
        rc = 0;
 
 out: