meminfo: make dmabuf_dump dependency on debugfs optional

dmabuf_dump had a hard dependency on debugfs to gather the initial list
of buffers for all proceses, make it optional.

Change-Id: I1d271297c0ad6124b321a1ee8aa01d3e88ca9fed
Signed-off-by: Erick Reyes <erickreyes@google.com>
This commit is contained in:
Erick Reyes 2019-02-04 19:02:18 -08:00
parent 2f6792e286
commit c4cac8f17f
1 changed files with 2 additions and 2 deletions

View File

@ -150,8 +150,8 @@ int main(int argc, char* argv[]) {
if (show_all) {
if (!ReadDmaBufInfo(&bufs)) {
std::cerr << "Unable to read DEBUGFS dmabuf info" << std::endl;
exit(EXIT_FAILURE);
std::cerr << "debugfs entry for dmabuf not available, skipping" << std::endl;
bufs.clear();
}
std::unique_ptr<DIR, int (*)(DIR*)> dir(opendir("/proc"), closedir);
if (!dir) {