diff options
Diffstat (limited to 'isys')
-rw-r--r-- | isys/isys.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/isys/isys.py b/isys/isys.py index f7e89b321..09cdc541c 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -445,10 +445,13 @@ def pumpNetDevice(device): # otherwise return _isys.pumpnetdevice(device) -def readExt2Label(device): - makeDevInode(device, "/tmp/disk") - label = _isys.e2fslabel("/tmp/disk"); - os.unlink("/tmp/disk") +def readExt2Label(device, makeDevNode = 1): + if makeDevNode: + makeDevInode(device, "/tmp/disk") + label = _isys.e2fslabel("/tmp/disk"); + os.unlink("/tmp/disk") + else: + label = _isys.e2fslabel(device) return label def ext2IsDirty(device): |