libdesklets/Disk.py - mounting point dedection
Franz Klammer
klammer at webonaut.com
Thu Nov 13 10:57:12 PST 2003
the mountingpoint dedectin (at least on -current) didn't work
correctly. i geot this output if with "print data":
((4294967295L, '/dev/ad0s1a', '/', '?'), (4294967295L, 'devfs', '/dev',
'?'), (4 294967295L, '/dev/ad0s1e', '/usr', '?'), (4294967295L,
'/dev/ad0s1d', '/var', '? '), (4294967295L, 'linprocfs',
'/usr/compat/linux/proc', '?'), (4294967295L, 'pr ocfs', '/proc', '?'),
(4294967295L, '/dev/acd0', '/cdrom', '?'))
as you can see the filesystem will not be dedected: '?'.
i've changed the code that it works like in the network-interface
dedection. Sysinfo now shows up the devices. here my code:
def __poll_partitions(self):
fd = os.popen("mount -p")
data = fd.readlines()
fd.close()
partitions = []
for lines in data:
fields = lines.strip().replace("\t", " ").split()
if (fields[2] in ("ext2", "ext3", "msdos", "vfat", "ntfs",
"hpfs"
"jfs", "reiserfs", "xfs", "qnx4", "adfs", "ffs",
"hfs", "befs", "bfs", "efs", "iso9660", "minix",
"sysv", "coda", "nfs", "udf", "ufs", "xiafs")):
partitions.append((fields[0], fields[1]))
#end for
return partitions
the only thing that doesn't work in SysInfo now is to switch
from RAM to SWAP ... let's see ... :-)
franz.
More information about the freebsd-gnome
mailing list