#include "udev.h"
#include "udev_version.h"
#include "namedev.h"
+#include "udevdb.h"
#include "libsysfs/libsysfs.h"
return -EINVAL;
}
+ dbg("mknod(%s, %#o, %u, %u)", filename, mode, major, minor);
retval = mknod(filename,mode,makedev(major,minor));
if (retval)
dbg("mknod(%s, %#o, %u, %u) failed with error '%s'",
retval = get_major_minor(class_dev, &major, &minor);
if (retval) {
- dbg ("get_major_minor failed");
+ dbg("get_major_minor failed");
goto exit;
}
+ retval = udevdb_add_device(device, class_dev, attr.name, type, major, minor, attr.mode);
+
+ if (retval != 0)
+ dbg("udevdb_add_device failed, but we are going to try to create the node anyway. "
+ "But remove might not work properly for this device.");
+
sysfs_close_class_device(class_dev);
return create_node(attr.name, type, major, minor, attr.mode);