ui/test: Add boot status messages to test client
authorJeremy Kerr <jk@ozlabs.org>
Tue, 21 May 2013 07:14:15 +0000 (15:14 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 21 May 2013 07:29:43 +0000 (15:29 +0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/test/discover-test.c

index 8f7c2c22a9709bccb991a7b0d2fdd10ac1389c5d..5077937d3f17f49e4a0a725c43a47b1c885aeb07 100644 (file)
@@ -53,10 +53,22 @@ static void print_device_remove(struct device *device,
        printf("\tname: %s\n", device->name);
 }
 
+static void print_status(struct boot_status *status,
+       void __attribute__((unused)) *arg)
+{
+       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);
+
+}
+
 static struct discover_client_ops client_ops = {
        .device_add = print_device_add,
        .boot_option_add = print_boot_option_add,
        .device_remove = print_device_remove,
+       .update_status = print_status,
 };
 
 int main(void)