Re: [PATCH] Added the libudev python bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 11/11/2009 09:09 AM, Martin Gracik wrote:
Hi,

please check my answers below your suggestions.

+    # so we have to prepend it when creating the device
+    udev_device = udev.create_device("/sys" + sysfs_path)
+    udev.teardown()
+

Not sure if I like the teardown() name, this implies that after this
things can be setup again, which is not true.

Ok, I have no problem with changing the name, suggest one for me that would be appropriate.


delete or unref ?


+    dev = udev_device.properties
+
+    if dev:
+        # remove the /dev/ part from beginning of devnode and set as name
+        dev["name"] = udev_device.devnode[5:]
+

This is not correct, this will return mapper/Volgroup-Volname for LV's where it
should return just Volgroup-Volname, please find out which libudev function return
the actual internal libudev name and use that instead.

It is correct if we want to have the same stuff the old baseudev.py returns.
I was using just the SYSNAME, but that's dm-0, dm-1 etc. But the old baseudev.py returns mapper/vg-something,
so I checked all the properties, and libudev functions, and the only one getting this kind of output was
devnode(), but with the /dev/ at the start.


Actually we were both wrong, I just checked and for device mapper stuff the name in the dict should be just
dm-#, so you should just use SYSNAME, which makes sense.

Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux