Add separate 'vndservice' binary.
This is installed on the vendor partition,
and can be used to call into vndservicemanager
and the services it hosts.
Bug: 36987120
Test: vndservice list works
Change-Id: I2d72312276cd4402ee1b399713cd5322b125b00f
diff --git a/cmds/service/service.cpp b/cmds/service/service.cpp
index 09921e4..bc11256 100644
--- a/cmds/service/service.cpp
+++ b/cmds/service/service.cpp
@@ -69,11 +69,10 @@
int main(int argc, char* const argv[])
{
bool wantsUsage = false;
- bool wantsVendorServices = false;
int result = 0;
while (1) {
- int ic = getopt(argc, argv, "vh?");
+ int ic = getopt(argc, argv, "h?");
if (ic < 0)
break;
@@ -82,9 +81,6 @@
case '?':
wantsUsage = true;
break;
- case 'v':
- wantsVendorServices = true;
- break;
default:
aerr << "service: Unknown option -" << ic << endl;
wantsUsage = true;
@@ -92,10 +88,9 @@
break;
}
}
-
- if (wantsVendorServices) {
- ProcessState::initWithDriver("/dev/vndbinder");
- }
+#ifdef VENDORSERVICES
+ ProcessState::initWithDriver("/dev/vndbinder");
+#endif
sp<IServiceManager> sm = defaultServiceManager();
fflush(stdout);
if (sm == NULL) {