Send a short message to the UI to inform the user a device is being
parsed for boot options. This helps slightly in environments when the UI
appears well before devices are available for parsing, giving the user
an indication that work is still being done.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
struct discover_device *dev)
{
struct discover_context *ctx;
struct discover_device *dev)
{
struct discover_context *ctx;
+ struct boot_status *status;
+ status = talloc_zero(handler, struct boot_status);
+ status->type = BOOT_STATUS_INFO;
+ status->message = talloc_asprintf(status, "Processing %s device %s",
+ device_type_display_name(dev->device->type),
+ dev->device->id);
+ boot_status(handler, status);
+
process_boot_option_queue(handler);
/* create our context */
process_boot_option_queue(handler);
/* create our context */
device_handler_discover_context_commit(handler, ctx);
out:
device_handler_discover_context_commit(handler, ctx);
out:
+ status->message = talloc_asprintf(status,"Processing %s complete\n",
+ dev->device->id);
+ boot_status(handler, status);
+
+ talloc_free(status);
talloc_free(ctx);
return 0;
talloc_free(ctx);
return 0;
struct discover_device *dev, struct event *event)
{
struct discover_context *ctx;
struct discover_device *dev, struct event *event)
{
struct discover_context *ctx;
+ struct boot_status *status;
+
+ status = talloc_zero(handler, struct boot_status);
+ status->type = BOOT_STATUS_INFO;
+ status->message = talloc_asprintf(status, "Processing dhcp event on %s",
+ dev->device->id);
+ boot_status(handler, status);
/* create our context */
ctx = device_handler_discover_context_create(handler, dev);
/* create our context */
ctx = device_handler_discover_context_create(handler, dev);
device_handler_discover_context_commit(handler, ctx);
device_handler_discover_context_commit(handler, ctx);
+ status->message = talloc_asprintf(status,"Processing %s complete\n",
+ dev->device->id);
+ boot_status(handler, status);
+
+ talloc_free(status);
talloc_free(ctx);
return 0;
talloc_free(ctx);
return 0;
struct discover_device *dev, struct pb_url *url)
{
struct discover_context *ctx;
struct discover_device *dev, struct pb_url *url)
{
struct discover_context *ctx;
+ struct boot_status *status;
+
+ status = talloc_zero(handler, struct boot_status);
+ status->type = BOOT_STATUS_INFO;
+ status->message = talloc_asprintf(status, "Processing user config");
+ boot_status(handler, status);
/* create our context */
ctx = device_handler_discover_context_create(handler, dev);
/* create our context */
ctx = device_handler_discover_context_create(handler, dev);
device_handler_discover_context_commit(handler, ctx);
device_handler_discover_context_commit(handler, ctx);
+ status->message = talloc_asprintf(status,
+ "Processing user config complete");
+ boot_status(handler, status);
+
+ talloc_free(status);
talloc_free(ctx);
return 0;
talloc_free(ctx);
return 0;