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

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

 



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: pgpkjtdiOHRjv.pgp
Description: PGP signature

_______________________________________________
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