fix broken consumption of /proc/mounts
this was checking that the lenghth of the mount line from /proc/mounts was 6, not the number of tokens.
This commit is contained in:
@@ -1325,9 +1325,9 @@ def mounts():
|
|||||||
# Linux: /dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
|
# Linux: /dev/sda1 on /boot type ext4 (rw,relatime,data=ordered)
|
||||||
# FreeBSD: /dev/vtbd0p2 on / (ufs, local, journaled soft-updates)
|
# FreeBSD: /dev/vtbd0p2 on / (ufs, local, journaled soft-updates)
|
||||||
try:
|
try:
|
||||||
if method == 'proc' and len(mpline) == 6:
|
if method == 'proc':
|
||||||
(dev, mp, fstype, opts, _freq, _passno) = mpline.split()
|
(dev, mp, fstype, opts, _freq, _passno) = mpline.split()
|
||||||
elif method == 'mount':
|
else:
|
||||||
m = re.search('^(/dev/[\S]+) on (/.*) \((.+), .+, (.+)\)$', mpline)
|
m = re.search('^(/dev/[\S]+) on (/.*) \((.+), .+, (.+)\)$', mpline)
|
||||||
dev = m.group(1)
|
dev = m.group(1)
|
||||||
mp = m.group(2)
|
mp = m.group(2)
|
||||||
|
|||||||
Reference in New Issue
Block a user