Date: Thu, 13 Nov 2003 19:57:08 +0100 From: Franz Klammer <klammer@webonaut.com> To: gnome@freebsd.org Subject: libdesklets/Disk.py - mounting point dedection Message-ID: <3FB3D404.2060303@webonaut.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FB3D404.2060303>