libdesklets/Disk.py - mounting point dedection

Jeremy Messenger mezz7 at cox.net
Thu Nov 13 12:21:53 PST 2003


On Thu, 13 Nov 2003 19:57:08 +0100, Franz Klammer <klammer at webonaut.com> 
wrote:

> 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:

Ummm... Well, doesn't it means, we should fix the libgtop instead fix the 
libdesklets/Disk.py? They removed the Linux'ish and use libgtop to allow 
the things work on the platforums. Make sense?

Cheers,
Mezz

>     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.


-- 
bsdforums.org 's moderator, mezz.


More information about the freebsd-gnome mailing list