Merge "Fix vold dump" am: bba0592dce
am: 22b0c0fca0
am: d9f2335ab7
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1856933 Change-Id: I1807a992b19e8f8fffd7425a5cc390e358b7c0d8
This commit is contained in:
commit
64ce88543b
1 changed files with 3 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <private/android_filesystem_config.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <fstream>
|
||||
#include <thread>
|
||||
|
@ -133,15 +134,14 @@ status_t VoldNativeService::start() {
|
|||
}
|
||||
|
||||
status_t VoldNativeService::dump(int fd, const Vector<String16>& /* args */) {
|
||||
auto out = std::fstream(StringPrintf("/proc/self/fd/%d", fd));
|
||||
const binder::Status dump_permission = CheckPermission(kDump);
|
||||
if (!dump_permission.isOk()) {
|
||||
out << dump_permission.toString8() << endl;
|
||||
dprintf(fd, "%s\n", dump_permission.toString8().c_str());
|
||||
return PERMISSION_DENIED;
|
||||
}
|
||||
|
||||
ACQUIRE_LOCK;
|
||||
out << "vold is happy!" << endl;
|
||||
dprintf(fd, "vold is happy!\n");
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue