Rename boot_status() to device_handler_boot_status() and make it
accessible by files that include device-handler.h. This enables the boot
status to be updated from additional callers, in particular within
parser functions.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
-static void boot_status(void *arg, struct boot_status *status)
+void device_handler_boot_status(void *arg, struct boot_status *status)
{
struct device_handler *handler = arg;
{
struct device_handler *handler = arg;
platform_pre_boot();
handler->pending_boot = boot(handler, handler->default_boot_option,
platform_pre_boot();
handler->pending_boot = boot(handler, handler->default_boot_option,
- NULL, handler->dry_run, boot_status, handler);
+ NULL, handler->dry_run, device_handler_boot_status,
+ handler);
handler->pending_boot_is_default = true;
return 0;
}
handler->pending_boot_is_default = true;
return 0;
}
status->message = talloc_asprintf(status, _("Processing %s device %s"),
device_type_display_name(dev->device->type),
dev->device->id);
status->message = talloc_asprintf(status, _("Processing %s device %s"),
device_type_display_name(dev->device->type),
dev->device->id);
- boot_status(handler, status);
+ device_handler_boot_status(handler, status);
process_boot_option_queue(handler);
process_boot_option_queue(handler);
*/
status->message = talloc_asprintf(status,_("Processing %s complete"),
dev->device->id);
*/
status->message = talloc_asprintf(status,_("Processing %s complete"),
dev->device->id);
- boot_status(handler, status);
+ device_handler_boot_status(handler, status);
talloc_free(status);
talloc_free(ctx);
talloc_free(status);
talloc_free(ctx);
*/
status->message = talloc_asprintf(status, _("Processing dhcp event on %s"),
dev->device->id);
*/
status->message = talloc_asprintf(status, _("Processing dhcp event on %s"),
dev->device->id);
- boot_status(handler, status);
+ device_handler_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);
*/
status->message = talloc_asprintf(status,_("Processing %s complete"),
dev->device->id);
*/
status->message = talloc_asprintf(status,_("Processing %s complete"),
dev->device->id);
- boot_status(handler, status);
+ device_handler_boot_status(handler, status);
talloc_free(status);
talloc_free(ctx);
talloc_free(status);
talloc_free(ctx);
status = talloc_zero(handler, struct boot_status);
status->type = BOOT_STATUS_INFO;
status->message = talloc_asprintf(status, _("Processing user config"));
status = talloc_zero(handler, struct boot_status);
status->type = BOOT_STATUS_INFO;
status->message = talloc_asprintf(status, _("Processing user config"));
- boot_status(handler, status);
+ device_handler_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);
status->message = talloc_asprintf(status,
_("Processing user config complete"));
status->message = talloc_asprintf(status,
_("Processing user config complete"));
- boot_status(handler, status);
+ device_handler_boot_status(handler, status);
talloc_free(status);
talloc_free(ctx);
talloc_free(status);
talloc_free(ctx);
platform_pre_boot();
handler->pending_boot = boot(handler, opt, cmd, handler->dry_run,
platform_pre_boot();
handler->pending_boot = boot(handler, opt, cmd, handler->dry_run,
+ device_handler_boot_status, handler);
handler->pending_boot_is_default = false;
}
handler->pending_boot_is_default = false;
}
status->message = talloc_asprintf(status, _("Config file %s parsed"),
pb_url->file);
msg:
status->message = talloc_asprintf(status, _("Config file %s parsed"),
pb_url->file);
msg:
- boot_status(handler, status);
+ device_handler_boot_status(handler, status);
#include <stdbool.h>
#include <list/list.h>
#include <stdbool.h>
#include <list/list.h>
+#include <types/types.h>
struct device_handler;
struct discover_device;
struct device_handler;
struct discover_device;
void device_handler_remove(struct device_handler *handler,
struct discover_device *device);
void device_handler_remove(struct device_handler *handler,
struct discover_device *device);
+void device_handler_boot_status(void *arg, struct boot_status *status);
+
struct discover_context *device_handler_discover_context_create(
struct device_handler *handler,
struct discover_device *device);
struct discover_context *device_handler_discover_context_create(
struct device_handler *handler,
struct discover_device *device);