Loading build/mobile/sutagent/android/DoCommand.java +22 −6 Original line number Diff line number Diff line Loading @@ -441,6 +441,12 @@ public class DoCommand { strReturn += GetProcessInfo(); strReturn += "\n"; strReturn += GetSutUserInfo(); strReturn += "\n"; strReturn += GetDiskInfo("/data"); strReturn += "\n"; strReturn += GetDiskInfo("/system"); strReturn += "\n"; strReturn += GetDiskInfo("/mnt/sdcard"); } else { Loading Loading @@ -495,6 +501,15 @@ public class DoCommand { strReturn += GetTemperatureInfo(); break; case DISK: strReturn += "\n"; strReturn += GetDiskInfo("/data"); strReturn += "\n"; strReturn += GetDiskInfo("/system"); strReturn += "\n"; strReturn += GetDiskInfo("/mnt/sdcard"); break; default: break; } Loading Loading @@ -2670,18 +2685,19 @@ private void CancelNotification() return "Temperature: " + sTempVal; } // todo public String GetDiskInfo(String sPath) { String sRet = ""; StatFs statFS = new StatFs(sPath); int nBlockCount = statFS.getBlockCount(); int nBlockSize = statFS.getBlockSize(); int nBlocksAvail = statFS.getAvailableBlocks(); int nBlocksFree = statFS.getFreeBlocks(); long nBlockCount = statFS.getBlockCount(); long nBlockSize = statFS.getBlockSize(); long nBlocksAvail = statFS.getAvailableBlocks(); // Free is often the same as Available, but can include reserved // blocks that are not available to normal applications. // long nBlocksFree = statFS.getFreeBlocks(); sRet = "total: " + (nBlockCount * nBlockSize) + "\nfree: " + (nBlocksFree * nBlockSize) + "\navailable: " + (nBlocksAvail * nBlockSize); sRet = sPath + ": " + (nBlockCount * nBlockSize) + " total, " + (nBlocksAvail * nBlockSize) + " available"; return (sRet); } Loading Loading
build/mobile/sutagent/android/DoCommand.java +22 −6 Original line number Diff line number Diff line Loading @@ -441,6 +441,12 @@ public class DoCommand { strReturn += GetProcessInfo(); strReturn += "\n"; strReturn += GetSutUserInfo(); strReturn += "\n"; strReturn += GetDiskInfo("/data"); strReturn += "\n"; strReturn += GetDiskInfo("/system"); strReturn += "\n"; strReturn += GetDiskInfo("/mnt/sdcard"); } else { Loading Loading @@ -495,6 +501,15 @@ public class DoCommand { strReturn += GetTemperatureInfo(); break; case DISK: strReturn += "\n"; strReturn += GetDiskInfo("/data"); strReturn += "\n"; strReturn += GetDiskInfo("/system"); strReturn += "\n"; strReturn += GetDiskInfo("/mnt/sdcard"); break; default: break; } Loading Loading @@ -2670,18 +2685,19 @@ private void CancelNotification() return "Temperature: " + sTempVal; } // todo public String GetDiskInfo(String sPath) { String sRet = ""; StatFs statFS = new StatFs(sPath); int nBlockCount = statFS.getBlockCount(); int nBlockSize = statFS.getBlockSize(); int nBlocksAvail = statFS.getAvailableBlocks(); int nBlocksFree = statFS.getFreeBlocks(); long nBlockCount = statFS.getBlockCount(); long nBlockSize = statFS.getBlockSize(); long nBlocksAvail = statFS.getAvailableBlocks(); // Free is often the same as Available, but can include reserved // blocks that are not available to normal applications. // long nBlocksFree = statFS.getFreeBlocks(); sRet = "total: " + (nBlockCount * nBlockSize) + "\nfree: " + (nBlocksFree * nBlockSize) + "\navailable: " + (nBlocksAvail * nBlockSize); sRet = sPath + ": " + (nBlockCount * nBlockSize) + " total, " + (nBlocksAvail * nBlockSize) + " available"; return (sRet); } Loading