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>
va_end(ap);
status.type = type;
va_end(ap);
status.type = type;
- status.progress = -1;
- status.detail = NULL;
pb_debug("boot status: [%d] %s\n", type, status.message);
pb_debug("boot status: [%d] %s\n", type, status.message);
struct status status;
status.type = STATUS_INFO;
struct status status;
status.type = STATUS_INFO;
- status.progress = -1;
- status.detail = NULL;
status.message = talloc_asprintf(handler,
_("Booting in %d sec: %s"), sec, opt->option->name);
status.message = talloc_asprintf(handler,
_("Booting in %d sec: %s"), sec, opt->option->name);
handler->default_boot_option = NULL;
status.type = STATUS_INFO;
handler->default_boot_option = NULL;
status.type = STATUS_INFO;
- status.progress = -1;
- status.detail = NULL;
status.message = _("Default boot cancelled");
discover_server_notify_boot_status(handler->server, &status);
status.message = _("Default boot cancelled");
discover_server_notify_boot_status(handler->server, &status);
struct param *param;
status = talloc(handler, struct status);
struct param *param;
status = talloc(handler, struct status);
status->type = STATUS_ERROR;
status->type = STATUS_ERROR;
- status->progress = 0;
- status->detail = talloc_asprintf(status,
- _("Received config URL %s"), url);
if (!handler->network) {
status->message = talloc_asprintf(handler,
if (!handler->network) {
status->message = talloc_asprintf(handler,
{
return 4 +
4 + optional_strlen(status->message) +
{
return 4 +
4 + optional_strlen(status->message) +
- 4 + optional_strlen(status->detail) +
pos += sizeof(uint32_t);
pos += pb_protocol_serialise_string(pos, status->message);
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;
assert(pos <= buf + buf_len);
(void)buf_len;
pos += sizeof(uint32_t);
len -= sizeof(uint32_t);
pos += sizeof(uint32_t);
len -= sizeof(uint32_t);
- /* message and detail strings */
if (read_string(status, &pos, &len, &status->message))
goto out;
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;
-
STATUS_ERROR,
} type;
char *message;
STATUS_ERROR,
} type;
char *message;
- char *detail;
- int progress;
};
struct interface_info {
};
struct interface_info {
printf("status:\n");
printf("\ttype: %d\n", status->type);
printf("\tmessage: %s\n", status->message);
printf("status:\n");
printf("\ttype: %d\n", status->type);
printf("\tmessage: %s\n", status->message);
- printf("\tdetail: %s\n", status->detail);
- printf("\tprogress: %d\n", status->progress);