From 51582cd889ab721d09c576008e6b93f2ca26e89c Mon Sep 17 00:00:00 2001 From: Joey Boggs Date: Mon, 9 Jul 2012 14:38:50 -0400 Subject: [PATCH] if mounting squashfs add ro mount option This just adds the ro mount option when using squashfs images otherwise we get output saying read/write mount failed switching to readonly. Signed-off-by: Joey Boggs --- imgcreate/fs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgcreate/fs.py b/imgcreate/fs.py index da444e4..d4558d3 100644 --- a/imgcreate/fs.py +++ b/imgcreate/fs.py @@ -433,7 +433,8 @@ class DiskMount(Mount): args = [ "/bin/mount", self.disk.device, self.mountdir ] if self.fstype: args.extend(["-t", self.fstype]) - + if self.fstype == "squashfs": + args.extend(["-o", "ro"]) rc = call(args) if rc != 0: raise MountError("Failed to mount '%s' to '%s'" % -- 2.11.4.GIT