Code: Select all
--- freememapplet_tray.c.orig 2012-05-19 20:02:51.000000000 +1000
+++ freememapplet_tray.c 2014-10-08 01:56:41.045027125 +1000
@@ -68,7 +68,9 @@
/*100517 always read free space in save file, not RAM space...*/
/*if (pupmode!=6 && pupmode!=12) {fp = (FILE *)popen("df -m | grep ' /$' | tr -s ' ' | cut -f 2,4 -d ' '","r");}
else {fp = (FILE *)popen("df -m | grep ' /initrd/pup_rw$' | tr -s ' ' | cut -f 2,4 -d ' '","r");}*/
- if (pupmode==3) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
+ if ((readlink("/initrd/pup_rw", meminfo, sizeof meminfo) != -1) || (readlink("/initrd/pup_ro1", meminfo, sizeof meminfo) != -1))
+ fp = (FILE *)popen("df -m | grep ' /initrd/mnt/dev_save$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
+ else if (pupmode==3) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else if (pupmode==7) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
else if (pupmode==13) fp = (FILE *)popen("df -m | grep ' /initrd/pup_ro1$' | tr -s ' ' | cut -f 2,4 -d ' '","r");
// BK 110805 testing with PUPMODE=2, needs fix, there is no /dev/root...
I have added a working version of 'freememapplet_tray' to http://www.fishprogs.software/puppy/whe ... 5.2.11.sfs. This is the version I happened to be able to find source for.
So the list of required patches increases. But this symbolic link method has 1 advantage, they're all very specific to puppy.
gyro