Lines Matching refs:argv

53 void CommandListener::dumpArgs(int argc, char **argv, int argObscure) {
60 unsigned int len = strlen(argv[i]) + 1; // Account for space
71 strcpy(p, argv[i]);
72 p+= strlen(argv[i]);
86 int argc, char **argv) {
116 int argc, char **argv) {
117 dumpArgs(argc, argv, -1);
127 if (!strcmp(argv[1], "list")) {
129 } else if (!strcmp(argv[1], "debug")) {
130 if (argc != 3 || (argc == 3 && (strcmp(argv[2], "off") && strcmp(argv[2], "on")))) {
134 vm->setDebug(!strcmp(argv[2], "on") ? true : false);
135 } else if (!strcmp(argv[1], "mount")) {
140 rc = vm->mountVolume(argv[2]);
141 } else if (!strcmp(argv[1], "unmount")) {
143 ((argc == 4 && strcmp(argv[3], "force")) &&
144 (argc == 4 && strcmp(argv[3], "force_and_revert")))) {
151 if (argc >= 4 && !strcmp(argv[3], "force")) {
153 } else if (argc >= 4 && !strcmp(argv[3], "force_and_revert")) {
157 rc = vm->unmountVolume(argv[2], force, revert);
158 } else if (!strcmp(argv[1], "format")) {
163 rc = vm->formatVolume(argv[2]);
164 } else if (!strcmp(argv[1], "share")) {
170 rc = vm->shareVolume(argv[2], argv[3]);
171 } else if (!strcmp(argv[1], "unshare")) {
177 rc = vm->unshareVolume(argv[2], argv[3]);
178 } else if (!strcmp(argv[1], "shared")) {
186 if (vm->shareEnabled(argv[2], argv[3], &enabled)) {
214 int argc, char **argv) {
215 dumpArgs(argc, argv, -1);
222 if (!strcmp(argv[1], "users")) {
241 if (Process::checkFileDescriptorSymLinks(pid, argv[2]) ||
242 Process::checkFileMaps(pid, argv[2]) ||
243 Process::checkSymLink(pid, argv[2], "cwd") ||
244 Process::checkSymLink(pid, argv[2], "root") ||
245 Process::checkSymLink(pid, argv[2], "exe")) {
303 int argc, char **argv) {
312 if (!strcmp(argv[1], "list")) {
313 dumpArgs(argc, argv, -1);
317 } else if (!strcmp(argv[1], "create")) {
318 dumpArgs(argc, argv, 5);
326 unsigned int numSectors = (atoi(argv[3]) * (1024 * 1024)) / 512;
327 const bool isExternal = (atoi(argv[7]) == 1);
328 rc = vm->createAsec(argv[2], numSectors, argv[4], argv[5], atoi(argv[6]), isExternal);
329 } else if (!strcmp(argv[1], "finalize")) {
330 dumpArgs(argc, argv, -1);
335 rc = vm->finalizeAsec(argv[2]);
336 } else if (!strcmp(argv[1], "fixperms")) {
337 dumpArgs(argc, argv, -1);
344 gid_t gid = (gid_t) strtoul(argv[3], &endptr, 10);
350 rc = vm->fixupAsecPermissions(argv[2], gid, argv[4]);
351 } else if (!strcmp(argv[1], "destroy")) {
352 dumpArgs(argc, argv, -1);
358 if (argc > 3 && !strcmp(argv[3], "force")) {
361 rc = vm->destroyAsec(argv[2], force);
362 } else if (!strcmp(argv[1], "mount")) {
363 dumpArgs(argc, argv, 3);
369 rc = vm->mountAsec(argv[2], argv[3], atoi(argv[4]));
370 } else if (!strcmp(argv[1], "unmount")) {
371 dumpArgs(argc, argv, -1);
377 if (argc > 3 && !strcmp(argv[3], "force")) {
380 rc = vm->unmountAsec(argv[2], force);
381 } else if (!strcmp(argv[1], "rename")) {
382 dumpArgs(argc, argv, -1);
388 rc = vm->renameAsec(argv[2], argv[3]);
389 } else if (!strcmp(argv[1], "path")) {
390 dumpArgs(argc, argv, -1);
397 if (!(rc = vm->getAsecMountPath(argv[2], path, sizeof(path)))) {
401 } else if (!strcmp(argv[1], "fspath")) {
402 dumpArgs(argc, argv, -1);
409 if (!(rc = vm->getAsecFilesystemPath(argv[2], path, sizeof(path)))) {
414 dumpArgs(argc, argv, -1);
433 int argc, char **argv) {
442 if (!strcmp(argv[1], "list")) {
443 dumpArgs(argc, argv, -1);
446 } else if (!strcmp(argv[1], "mount")) {
447 dumpArgs(argc, argv, 3);
453 rc = vm->mountObb(argv[2], argv[3], atoi(argv[4]));
454 } else if (!strcmp(argv[1], "unmount")) {
455 dumpArgs(argc, argv, -1);
461 if (argc > 3 && !strcmp(argv[3], "force")) {
464 rc = vm->unmountObb(argv[2], force);
465 } else if (!strcmp(argv[1], "path")) {
466 dumpArgs(argc, argv, -1);
473 if (!(rc = vm->getObbMountPath(argv[2], path, sizeof(path)))) {
478 dumpArgs(argc, argv, -1);
497 int argc, char **argv) {
503 if (!strcmp(argv[1], "enable")) {
510 } else if (!strcmp(argv[1], "disable")) {
517 } else if (!strcmp(argv[1], "status")) {
540 int argc, char **argv) {
553 if (!strcmp(argv[1], "checkpw")) {
558 dumpArgs(argc, argv, 2);
559 rc = cryptfs_check_passwd(argv[2]);
560 } else if (!strcmp(argv[1], "restart")) {
565 dumpArgs(argc, argv, -1);
567 } else if (!strcmp(argv[1], "cryptocomplete")) {
572 dumpArgs(argc, argv, -1);
574 } else if (!strcmp(argv[1], "enablecrypto")) {
575 if ( (argc != 4) || (strcmp(argv[2], "wipe") && strcmp(argv[2], "inplace")) ) {
579 dumpArgs(argc, argv, 3);
580 rc = cryptfs_enable(argv[2], argv[3]);
581 } else if (!strcmp(argv[1], "changepw")) {
587 rc = cryptfs_changepw(argv[2]);
588 } else if (!strcmp(argv[1], "verifypw")) {
594 rc = cryptfs_verify_passwd(argv[2]);
596 dumpArgs(argc, argv, -1);