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

Re: [PATCH 3/7] Include file-backed loop devices in the device tree.



On Fri, Jan 07, 2011 at 12:41:44PM -0600, David Lehman wrote:
> +    def addUdevLoopDevice(self, info):
> +        name = udev_device_get_name(info)
> +        log_method_call(self, name=name)
> +        sysfs_path = udev_device_get_sysfs_path(info)
> +        sys_file = "/sys/%s/loop/backing_file" % sysfs_path

Shouldn't this be /sys/block/%s/loop/backing_file ?

> +        backing_file = open(sys_file).read().strip()

And same issue as other patch, might have more than just a path.


> +def udev_device_is_loop(info):
> +    """ Return True if the device is a configured loop device. """
> +    return (udev_device_get_name(info).startswith("loop") and
> +            os.path.isdir("/sys/%s/loop" % info['sysfs_path']))

Shouldn't this be /sys/block/%s/loop/?


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgpBj2zyvS6RA.pgp
Description: PGP signature


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