/***************************************************************************
*
* hotplug.c : HAL-internal hotplug events
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Licensed under the Academic Free License version 2.1
*
**************************************************************************/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <glib.h>
#include <dbus/dbus-glib.h>
#include "../osspec.h"
#include "../logger.h"
#include "../hald.h"
#include "../device_info.h"
#include "osspec_solaris.h"
#include "hotplug.h"
#include "devinfo.h"
/** Queue of ordered hotplug events */
/** List of HotplugEvent objects we are currently processing */
void
{
}
static void
{
if (d != NULL) {
/* XXX */
HAL_ERROR (("devpath %s already present in store, ignore event", hotplug_event->un.devfs.devfs_path));
goto out;
}
/* find parent */
} else {
}
/* only root node is allowed to be orphan */
HAL_ERROR (("Parent is NULL devfs_path=%s parent_udi=%s", hotplug_event->un.devfs.devfs_path, parent_udi ? parent_udi : "<null>"));
goto out;
}
}
/* children of ignored parent should be ignored */
goto out;
}
/* custom or generic add function */
if (begin_add_func == NULL) {
}
(void *) hotplug_event);
return;
out:
g_object_unref (hotplug_event->d);
hotplug_event_end ((void *) hotplug_event);
return;
}
static void
{
if (d == NULL) {
hotplug_event_end ((void *) hotplug_event);
return;
}
(void *) hotplug_event);
}
static void
{
HalDevice *d;
"solaris.devfs_path",
} else {
g_object_unref (hotplug_event->d);
hotplug_event_end ((void *) hotplug_event);
}
}
static void
{
switch (hotplug_event->type) {
case HOTPLUG_EVENT_DEVFS:
break;
default:
g_object_unref (hotplug_event->d);
hotplug_event_end ((void *) hotplug_event);
break;
}
}
void
{
if (hotplug_event_queue == NULL)
if (front) {
} else {
}
}
void
hotplug_event_process_queue (void)
{
if (hotplug_events_in_progress == NULL &&
goto out;
}
/* do not process events if some other event is in progress */
goto out;
if (hotplug_event == NULL)
goto out;
out:
;
}