imgcreate/fs.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
New commits: commit 6fd3e938dd9c7f36eb643db42b60e259f0834190 Author: Jeremy Katz katzj@redhat.com Date: Wed Aug 6 11:11:30 2008 -0400
Fix up a few more problems from the refactor-mount patch
* Make sure that methods return the values they used to * When resizing to the minimal image, we need to go back to the full size otherwise, live images don't work
diff --git a/imgcreate/fs.py b/imgcreate/fs.py index 4d8f87a..4a698e8 100644 --- a/imgcreate/fs.py +++ b/imgcreate/fs.py @@ -156,7 +156,7 @@ class SparseExtLoopbackMount(SparseLoopbackMount): self.diskmount.disk.create()
def resize(self, size = None): - self.diskmount.__resize_filesystem(size) + return self.diskmount.__resize_filesystem(size)
def mount(self): self.diskmount.mount() @@ -165,10 +165,10 @@ class SparseExtLoopbackMount(SparseLoopbackMount): self.extdiskmount.__fsck()
def __get_size_from_filesystem(self): - self.diskmount.__get_size_from_filesystem() + return self.diskmount.__get_size_from_filesystem()
def __resize_to_minimal(self): - self.diskmount.__resize_to_minimal() + return self.diskmount.__resize_to_minimal()
def resparse(self, size = None): return self.diskmount.resparse(size) @@ -386,13 +386,13 @@ class ExtDiskMount(DiskMount): current_size = os.stat(self.disk.lofile)[stat.ST_SIZE]
if size is None: - size = self.size + size = self.disk.size
if size == current_size: return
if size > current_size: - self.expand(size) + self.disk.expand(size)
self.__fsck()
@@ -459,6 +459,7 @@ class ExtDiskMount(DiskMount): self.cleanup() minsize = self.__resize_to_minimal() self.disk.truncate(minsize) + self.__resize_filesystem(size) return minsize
class DeviceMapperSnapshot(object):
livecd@lists.fedoraproject.org