return -ENODEV;
dbg("sysfs_device->path='%s'", sysfs_device->path);
dbg("sysfs_device->bus_id='%s'", sysfs_device->bus_id);
- dbg("sysfs_device->bus='%s'", sysfs_device->bus);
}
}
dbg("found devices device: path='%s', bus_id='%s', bus='%s'",
sysfs_device->path, sysfs_device->bus_id, sysfs_device->bus);
strfieldcpy(udev->bus_id, sysfs_device->bus_id);
- strfieldcpy(udev->bus, sysfs_device->bus);
}
strfieldcpy(udev->kernel_name, class_dev->name);
/* trigger timeout to interrupt blocking syscalls */
alarm(ALARM_TIMEOUT);
- udev_set_values(&udev, devpath, subsystem, action);
+ udev_init_device(&udev, devpath, subsystem);
if (strstr(argv[0], "udevstart") || (argv[1] != NULL && strstr(argv[1], "udevstart"))) {
dbg("udevstart");
struct udevice {
char devpath[DEVPATH_SIZE];
char subsystem[SUBSYSTEM_SIZE];
- char action[ACTION_SIZE];
char name[NAME_SIZE];
char owner[OWNER_SIZE];
char group[GROUP_SIZE];
char config_file[NAME_SIZE];
long config_uptime;
char bus_id[SYSFS_NAME_LEN];
- char bus[SYSFS_NAME_LEN];
char program_result[NAME_SIZE];
char kernel_number[NAME_SIZE];
char kernel_name[NAME_SIZE];
return -ENODEV;
}
- udev_set_values(&udev, devpath, subsystem, "add");
+ udev_init_device(&udev, devpath, subsystem);
udev_add_device(&udev, class_dev);
/* run dev.d/ scripts if we created a node or changed a netif name */
#include "list.h"
-void udev_set_values(struct udevice *udev, const char* devpath,
- const char *subsystem, const char* action)
+void udev_init_device(struct udevice *udev, const char* devpath, const char *subsystem)
{
memset(udev, 0x00, sizeof(struct udevice));
strfieldcpy(udev->devpath, devpath);
if (subsystem)
strfieldcpy(udev->subsystem, subsystem);
- if (action)
- strfieldcpy(udev->action, action);
if (strcmp(udev->subsystem, "block") == 0)
udev->type = 'b';
# define asmlinkage /* nothing */
#endif
-extern void udev_set_values(struct udevice *udev, const char* devpath,
- const char *subsystem, const char* action);
+extern void udev_init_device(struct udevice *udev, const char* devpath, const char *subsystem);
extern int kernel_release_satisfactory(int version, int patchlevel, int sublevel);
extern int create_path(const char *path);
extern int file_map(const char *filename, char **buf, size_t *bufsize);
subsystem = argv[2];
/* fill in values and test_run flag*/
- udev_set_values(&udev, devpath, subsystem, "add");
+ udev_init_device(&udev, devpath, subsystem);
/* open the device */
snprintf(path, SYSFS_PATH_MAX, "%s%s", sysfs_path, udev.devpath);