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

Re: [PATCH 2/7] Use sysfs instead of losetup to find loop devs' backing files.



On Fri, Jan 07, 2011 at 12:41:43PM -0600, David Lehman wrote:
> +def get_backing_file(name):
> +    path = ""
> +    sys_path  = "/sys/class/block/%s/loop/backing_file" % name

Neat! But that may not always work. On the xfce livecd loop0 has this in
it's backing_file:
/osmin.img (deleted)

I'm not sure where to find the docs on what that file is supposed to
return, but it looks like it can have more than a path.

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

Attachment: pgp7qgWSszjzJ.pgp
Description: PGP signature


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