Merge branch 'master' into pico_sdk
This commit is contained in:
@@ -242,7 +242,16 @@ PRIVATE_DEFINITION_START(PIProcess)
|
||||
BOOL ok = WriteFile(pipes[StdIn][PipeWrite], data.data(), data.size(), &sz, NULL);
|
||||
if (!ok) sz = 0;
|
||||
# else
|
||||
sz = ::write(pipes[StdIn][PipeWrite], data.data(), data.size());
|
||||
size_t offset = 0;
|
||||
while (offset < data.size()) {
|
||||
ssize_t wr = ::write(pipes[StdIn][PipeWrite], data.data() + offset, data.size() - offset);
|
||||
if (wr < 0) {
|
||||
if (errno == EINTR) continue;
|
||||
return false;
|
||||
}
|
||||
offset += wr;
|
||||
}
|
||||
sz = offset;
|
||||
# endif
|
||||
return sz == (SizeType)data.size_s();
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ PIVector<PISystemInfo::MountInfo> PISystemInfo::mountInfo(bool ignore_cache) {
|
||||
l_df.pop_front();
|
||||
for (const auto & s: l_df) {
|
||||
PIStringList ml(s.replacedAll(" ", " ").split(" "));
|
||||
if (ml.size_s() < 2) continue;
|
||||
if (ml.size_s() < 3) continue;
|
||||
if (ml.front() == "none") continue;
|
||||
m.space_all = ml[1].toULLong();
|
||||
m.space_used = ml[2].toULLong();
|
||||
|
||||
Reference in New Issue
Block a user