[elbe-devel] [PATCH v2 1/2] Add tune2fs for fstabentry
dion at linutronix.de
dion at linutronix.de
Tue Jun 25 16:21:38 CEST 2019
From: Olivier Dion <dion at linutronix.de>
Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/fstab.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/elbepack/fstab.py b/elbepack/fstab.py
index 5605670b..0cd569c6 100644
--- a/elbepack/fstab.py
+++ b/elbepack/fstab.py
@@ -7,6 +7,7 @@
import os
+from elbepack.shellhelper import system
def get_mtdnum(xml, label):
tgt = xml.node("target")
@@ -88,6 +89,7 @@ class fstabentry(object):
self.fstype = entry.text("fs/type")
self.mkfsopt = entry.text("fs/mkfs", default="")
self.passno = entry.text("fs/passno", default="0")
+ self.tune = entry.text("fs/tune2fs", default=None)
# These attributes are filled later
# using set_geometry()
@@ -140,3 +142,7 @@ class fstabentry(object):
def losetup(self, outf, loopdev):
outf.do('losetup -o%d --sizelimit %d /dev/%s "%s"' %
(self.offset, self.size, loopdev, self.filename))
+
+ def tuning(self, loopdev):
+ if self.tune:
+ system('tune2fs "%s" %s' % (self.tune, loopdev))
--
2.11.0
More information about the elbe-devel
mailing list