devinfo_usb.c revision c74d5d46b91a456f2ccf1a2416478fad8d1b3b11
/***************************************************************************
*
* devinfo_usb.h : USB devices
*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Licensed under the Academic Free License version 2.1
*
**************************************************************************/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <string.h>
#include <libdevinfo.h>
#include "../osspec.h"
#include "../logger.h"
#include "../hald.h"
#include "../hald_dbus.h"
#include "../device_info.h"
#include "../util.h"
#include "../ids.h"
#include "hotplug.h"
#include "devinfo.h"
#include "devinfo_usb.h"
NULL,
NULL,
NULL,
NULL,
};
NULL,
NULL,
NULL,
NULL,
};
static gboolean
{
int rc;
char *s;
/*
* USB device nodes will have "compatible" propety values that
* begins with "usb".
*/
while (rc-- > 0) {
return (TRUE);
}
s += (strlen(s) + 1);
}
return (FALSE);
}
{
char *s;
int *i;
char *driver_name, *binding_name;
char if_devfs_path[HAL_PATH_MAX];
return (NULL);
}
d = hal_device_new ();
/* class, subclass */
/* hal_device_property_set_int (d, "usb_device.device_class", 8); */
/* binding name tells us if driver is bound to interface or device */
d = nd;
}
}
/* driver specific */
} else if ((driver_name != NULL) &&
} else {
}
out:
return (nd);
} else {
return (d);
}
}
static HalDevice *
{
char udi[HAL_PATH_MAX];
d = hal_device_new ();
/* copy parent's usb_device.* properties */
return (d);
}
static void
{
int major;
*minor_path = NULL;
printf("di_devlink_init() failed\n");
return;
}
continue;
}
continue;
}
continue;
}
break;
}
*minor_path = NULL;
}
}
static HalDevice *
{
int major;
char *minor_path = NULL;
char udi[HAL_PATH_MAX];
goto out;
}
d = hal_device_new ();
hal_device_property_set_int (d, "scsi_host.host", 0);
hal_device_property_get_int (d, "scsi_host.host"));
hal_device_set_udi (d, udi);
out:
if (devlink) {
}
if (minor_path) {
}
return (d);
}
static HalDevice *
{
char udi[HAL_PATH_MAX];
char *s;
goto out;
}
d = hal_device_new ();
hal_device_add_capability (d, "printer");
/* copy parent's usb_device.* properties */
/* add printer properties */
out:
if (devlink) {
}
if (minor_path) {
}
return (d);
}
const gchar *
{
return ("hald-probe-printer");
}