Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a6828d5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add lshal --neat option"

parents 28765c61 6da06916
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -344,10 +344,14 @@ void ListCommand::dumpTable() {
    mImplementationsTable.description =
            "All available passthrough implementations (all -impl.so files)";
    forEachTable([this] (const Table &table) {
        if (!mNeat) {
            mOut << table.description << std::endl;
        }
        mOut << std::left;
        if (!mNeat) {
            printLine("Interface", "Transport", "Arch", "Server", "Server CMD",
                      "PTR", "Clients", "Clients CMD");
        }

        for (const auto &entry : table) {
            printLine(entry.interfaceName,
@@ -369,7 +373,9 @@ void ListCommand::dumpTable() {
                        NullableOStream<std::ostream>(nullptr));
            }
        }
        if (!mNeat) {
            mOut << std::endl;
        }
    });

}
@@ -593,6 +599,7 @@ Status ListCommand::parseArgs(const std::string &command, const Arg &arg) {
        // long options without short alternatives
        {"sort",      required_argument, 0, 's' },
        {"init-vintf",optional_argument, 0, 'v' },
        {"neat",      no_argument,       0, 'n' },
        { 0,          0,                 0,  0  }
    };

@@ -672,6 +679,10 @@ Status ListCommand::parseArgs(const std::string &command, const Arg &arg) {
            }
            break;
        }
        case 'n': {
            mNeat = true;
            break;
        }
        case 'h': // falls through
        default: // see unrecognized options
            mLshal.usage(command);
+5 −0
Original line number Diff line number Diff line
@@ -85,7 +85,12 @@ private:
    // If true, calls IBase::debug(...) on each service.
    bool mEmitDebugInfo = false;

    // If true, output in VINTF format.
    bool mVintf = false;

    // If true, explanatory text are not emitted.
    bool mNeat = false;

    // If an entry does not exist, need to ask /proc/{pid}/cmdline to get it.
    // If an entry exist but is an empty string, process might have died.
    // If an entry exist and not empty, it contains the cached content of /proc/{pid}/cmdline.