
disks.zip 46.23K
7 downloadsThe program needs to be run as a super user ( sudo ) if you wish to see the 'used' statistic of unmounted file systems. It temporarily mounts them if they aren't already mounted and registered in /etc/mtab.
Some outstanding problems:
1. The gtk widget I created for visualising the disk layout isn't perfect. Specifically, I need to fix the way it allocates space for each volume. Currently it runs out of space quickly. Perhaps I need to loop through the volumes and adjust the spacing before I do the actual rendering, but I'll try and fix that later.
2. I had a real hassle trying to programmatically mount the block device file systems so I could get statistics via statvfs (). Specifically, the mount () function requires file system specific esoteric arguments that I just couldn't get to work ( as of yet ), so for now I'm just calling out to the shell's mount command. It's not ideal, but it works.
Again, there are bugs, and the code is messy in parts. To compile you'll need your distro's gtk3 dev package. On arch, it's just extra/gtk3. On Ubuntu/Mint/others it's probably libgtk-3-dev or something like similar. Obviously, you'll need gcc/pkg-config installed as normal.
When I have more time, I'll fix the outstanding bugs.








