recommend to replace a distro's udev installation with the upstream version.
Requirements:
- - Version 2.6.18 of the Linux kernel for reliable operation of this release of
+ - Version 2.6.19 of the Linux kernel for reliable operation of this release of
udev. The kernel may have a requirement on udev too, see Documentation/Changes
in the kernel source tree for the actual dependency.
char *physdevpath;
int timeout;
dev_t devnum;
+ long long int seqnum;
};
struct udev_device *device_init(struct udev *udev)
return udev_device->action;
}
+unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device)
+{
+ if (udev_device == NULL)
+ return 0;
+ return udev_device->seqnum;
+}
+
int device_set_devpath(struct udev_device *udev_device, const char *devpath)
{
if (asprintf(&udev_device->syspath, "%s%s", udev_get_sys_path(udev_device->udev), devpath) < 0)
return 0;
}
+int device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum)
+{
+ udev_device->seqnum = seqnum;
+ return 0;
+}
+
int device_set_devnum(struct udev_device *udev_device, dev_t devnum)
{
udev_device->devnum = devnum;
char cred_msg[CMSG_SPACE(sizeof(struct ucred))];
char buf[4096];
size_t bufpos;
+ int maj = 0;
+ int min = 0;
if (udev_monitor == NULL)
return NULL;
}
if (slink[0] != '\0')
device_add_devlink(udev_device, slink);
+ } else if (strncmp(key, "DRIVER=", 7) == 0) {
+ device_set_driver(udev_device, &key[7]);
+ } else if (strncmp(key, "ACTION=", 7) == 0) {
+ device_set_action(udev_device, &key[7]);
+ } else if (strncmp(key, "MAJOR=", 6) == 0) {
+ maj = strtoull(&key[6], NULL, 10);
+ } else if (strncmp(key, "MINOR=", 6) == 0) {
+ min = strtoull(&key[6], NULL, 10);
+ } else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) {
+ device_set_devpath_old(udev_device, &key[12]);
+ } else if (strncmp(key, "PHYSDEVPATH=", 12) == 0) {
+ device_set_physdevpath(udev_device, &key[12]);
+ } else if (strncmp(key, "SEQNUM=", 7) == 0) {
+ device_set_seqnum(udev_device, strtoull(&key[7], NULL, 10));
+ } else if (strncmp(key, "TIMEOUT=", 8) == 0) {
+ device_set_timeout(udev_device, strtoull(&key[8], NULL, 10));
}
device_add_property(udev_device, key);
}
+ device_set_devnum(udev_device, makedev(maj, min));
return udev_device;
}
extern int device_get_timeout(struct udev_device *udev_device);
extern int device_set_timeout(struct udev_device *udev_device, int timeout);
extern int device_set_devnum(struct udev_device *udev_device, dev_t devnum);
+extern int device_set_seqnum(struct udev_device *udev_device, unsigned long long int seqnum);
/* udev_ctrl - daemon runtime setup */
struct udev_ctrl;
extern const char *udev_device_get_driver(struct udev_device *udev_device);
extern dev_t udev_device_get_devnum(struct udev_device *udev_device);
extern const char *udev_device_get_action(struct udev_device *udev_device);
+extern unsigned long long int udev_device_get_seqnum(struct udev_device *udev_device);
extern int udev_devices_enumerate(struct udev *udev, const char *subsystem,
int (*cb)(struct udev *udev,