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)
*(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;
if (!total_len)
return 0;
- pb_log("%s: failed: %s\n", __func__, strerror(errno));
+ pb_log_fn("failed: %s\n", strerror(errno));
return -1;
}
struct pb_protocol_message *message;
if (payload_len > PB_PROTOCOL_MAX_PAYLOAD_SIZE) {
- pb_log("%s: payload too big %u/%u\n", __func__, payload_len,
+ pb_log_fn("payload too big %u/%u\n", payload_len,
PB_PROTOCOL_MAX_PAYLOAD_SIZE);
return NULL;
}
m.action = __be32_to_cpu(m.action);
if (m.payload_len > PB_PROTOCOL_MAX_PAYLOAD_SIZE) {
- pb_log("%s: payload too big %u/%u\n", __func__, m.payload_len,
+ pb_log_fn("payload too big %u/%u\n", m.payload_len,
PB_PROTOCOL_MAX_PAYLOAD_SIZE);
return NULL;
}
if (rc <= 0) {
talloc_free(message);
- pb_log("%s: failed (%u): %s\n", __func__, len,
+ pb_log_fn("failed (%u): %s\n", len,
strerror(errno));
return NULL;
}
status->backlog = *(bool *)pos;
pos += sizeof(status->backlog);
+ /* boot_active */
+ status->boot_active = *(bool *)pos;
+ pos += sizeof(status->boot_active);
+
rc = 0;
out: