ui/common: Add code to send cancel-default messages
[petitboot] / ui / common / discover-client.c
index 107d0314d2de24f563e6c87bbe0d66ec4f733330..ae5d5cd2e50b00e03cfca47b41fb6b0c8e23d0eb 100644 (file)
@@ -278,3 +278,16 @@ int discover_client_boot(struct discover_client *client,
 
        return rc;
 }
+
+int discover_client_cancel_default(struct discover_client *client)
+{
+       struct pb_protocol_message *message;
+
+       message = pb_protocol_create_message(client,
+                       PB_PROTOCOL_ACTION_CANCEL_DEFAULT, 0);
+
+       if (!message)
+               return -1;
+
+       return pb_protocol_write_message(client->fd, message);
+}