From a849440ca96e93f700d62c6e41d48905b4d405b6 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Fri, 18 Feb 2011 09:07:14 -0500 Subject: MTP: Add support for dynamically adding and removing storage units BUG: 3402847 Change-Id: I7da266061d949abcb6bb11c6faaa47b5e4a2a977 --- media/mtp/MtpStorage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'media/mtp/MtpStorage.cpp') diff --git a/media/mtp/MtpStorage.cpp b/media/mtp/MtpStorage.cpp index 2fbbc51..6cb88b3 100644 --- a/media/mtp/MtpStorage.cpp +++ b/media/mtp/MtpStorage.cpp @@ -59,7 +59,7 @@ int MtpStorage::getAccessCapability() const { uint64_t MtpStorage::getMaxCapacity() { if (mMaxCapacity == 0) { struct statfs stat; - if (statfs(mFilePath, &stat)) + if (statfs(getPath(), &stat)) return -1; mMaxCapacity = (uint64_t)stat.f_blocks * (uint64_t)stat.f_bsize; } @@ -68,7 +68,7 @@ uint64_t MtpStorage::getMaxCapacity() { uint64_t MtpStorage::getFreeSpace() { struct statfs stat; - if (statfs(mFilePath, &stat)) + if (statfs(getPath(), &stat)) return -1; uint64_t freeSpace = (uint64_t)stat.f_bavail * (uint64_t)stat.f_bsize; return (freeSpace > mReserveSpace ? freeSpace - mReserveSpace : 0); -- cgit v1.1