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

Commit 0963a43d authored by Martijn Coenen's avatar Martijn Coenen Committed by android-build-merger
Browse files

Merge "Add option to list vndservicemanager services." into oc-dev

am: 6463f888

Change-Id: Iead3573a7bb2537ffbcaded7fabf29732d0d0bf0
parents 4bb732bf 6463f888
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -68,18 +68,12 @@ static String8 good_old_string(const String16& src)

int main(int argc, char* const argv[])
{
    sp<IServiceManager> sm = defaultServiceManager();
    fflush(stdout);
    if (sm == NULL) {
        aerr << "service: Unable to get default service manager!" << endl;
        return 20;
    }
    
    bool wantsUsage = false;
    bool wantsVendorServices = false;
    int result = 0;
    
    while (1) {
        int ic = getopt(argc, argv, "h?");
        int ic = getopt(argc, argv, "vh?");
        if (ic < 0)
            break;

@@ -88,6 +82,9 @@ int main(int argc, char* const argv[])
        case '?':
            wantsUsage = true;
            break;
        case 'v':
            wantsVendorServices = true;
            break;
        default:
            aerr << "service: Unknown option -" << ic << endl;
            wantsUsage = true;
@@ -96,6 +93,16 @@ int main(int argc, char* const argv[])
        }
    }

    if (wantsVendorServices) {
        ProcessState::initWithDriver("/dev/vndbinder");
    }
    sp<IServiceManager> sm = defaultServiceManager();
    fflush(stdout);
    if (sm == NULL) {
        aerr << "service: Unable to get default service manager!" << endl;
        return 20;
    }
    
    if (optind >= argc) {
        wantsUsage = true;
    } else if (!wantsUsage) {