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, 2011-01-07 at 17:29 -0800, Brian C. Lane wrote:
> 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 ?

No. The sysfs paths are of the form '/class/block/loop0'.

> 
> > +        backing_file = open(sys_file).read().strip()
> 
> And same issue as other patch, might have more than just a path.

Yeah, but it's still configured. The path doesn't exist anyway, so it
doesn't matter if there's a ' (deleted)' at the end of it.

> 
> 
> > +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/?

No -- see above.

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


_______________________________________________
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