| Index: base/sys_info_posix.cc
|
| diff --git a/base/sys_info_posix.cc b/base/sys_info_posix.cc
|
| index f2119cd7fdb538ebc34699088387aa2381e8cc4e..d33a63c07438408f81f439f84a94502d4ebce1ef 100644
|
| --- a/base/sys_info_posix.cc
|
| +++ b/base/sys_info_posix.cc
|
| @@ -50,6 +50,19 @@ int64 SysInfo::AmountOfFreeDiskSpace(const FilePath& path) {
|
| return static_cast<int64>(stats.f_bavail) * stats.f_frsize;
|
| }
|
|
|
| +// static
|
| +int SysInfo::GetMaximumPathComponentLength(const FilePath& path) {
|
| + base::ThreadRestrictions::AssertIOAllowed();
|
| + if (!path.IsAbsolute())
|
| + return -1;
|
| +
|
| + struct statvfs stats;
|
| + if (statvfs(path.value().c_str(), &stats) != 0) {
|
| + return -1;
|
| + }
|
| + return static_cast<int>(stats.f_namemax);
|
| +}
|
| +
|
| #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
|
| // static
|
| std::string SysInfo::OperatingSystemName() {
|
|
|