Searched refs:argv (Results 26 - 50 of 223) sorted by relevance

123456789

/system/core/fs_mgr/
H A Dfs_mgr_main.c33 * Return the number of argv[] entries consumed.
35 static void parse_options(int argc, char *argv[], int *a_flag, int *u_flag, int *n_flag, argument
38 me = basename(strdup(argv[0]));
44 if (!strcmp(argv[1], "-a")) {
50 if (!strcmp(argv[1], "-n")) {
55 *n_name = argv[2];
56 *n_blk_dev = argv[3];
58 if (!strcmp(argv[1], "-u")) {
78 int main(int argc, char *argv[]) argument
90 parse_options(argc, argv,
[all...]
/system/core/toolbox/
H A Dmkdir.c16 int mkdir_main(int argc, char *argv[]) argument
20 if(argc < 2 || strcmp(argv[1], "--help") == 0) {
24 int recursive = (strcmp(argv[1], "-p") == 0 ||
25 strcmp(argv[1], "--parents") == 0) ? 1 : 0;
34 argv++;
42 argv++;
47 pathpiece = strtok(argv[0], "/");
48 if(argv[0][0] == '/') {
69 ret = mkdir(argv[0], 0777);
71 fprintf(stderr, "mkdir failed for %s, %s\n", argv[
[all...]
H A Dcmp.c10 int cmp_main(int argc, char *argv[]) argument
25 c = getopt(argc, argv, "bln:");
40 argv[0], optopt);
46 fprintf(stderr, "Usage: %s [-b] [-l] [-n count] file1 file2\n", argv[0]);
50 fd1 = open(argv[optind], O_RDONLY);
52 fprintf(stderr, "could not open %s, %s\n", argv[optind], strerror(errno));
56 fd2 = open(argv[optind+1], O_RDONLY);
58 fprintf(stderr, "could not open %s, %s\n", argv[optind+1], strerror(errno));
71 printf("%s %s differ byte %d", argv[optind], argv[optin
[all...]
H A Drmmod.c11 int rmmod_main(int argc, char **argv) argument
25 modname = strrchr(argv[1], '/');
27 modname = argv[1];
30 dot = strchr(argv[1], '.');
H A Dgetsebool.c15 int getsebool_main(int argc, char **argv) argument
20 while ((opt = getopt(argc, argv, "a")) > 0) {
24 usage(argv[0]);
27 argv[0]);
35 argv[0], strerror(errno));
45 usage(argv[0]);
50 fprintf(stderr, "%s: SELinux is disabled\n", argv[0]);
55 usage(argv[0]);
59 fprintf(stderr, "%s: out of memory\n", argv[0]);
63 names[i] = strdup(argv[
[all...]
H A Dcat.c125 cook_args(char **argv) argument
132 if (*argv) {
133 if (!strcmp(*argv, "-"))
135 else if ((fp = fopen(*argv,
139 ++argv;
142 filename = *argv++;
147 } while (*argv);
187 raw_args(char **argv) argument
194 if (*argv) {
195 if (!strcmp(*argv, "
230 cat_main(int argc, char *argv[]) argument
[all...]
H A Dprintenv.c6 int printenv_main (int argc, char **argv) argument
20 v = getenv(argv[i]);
H A Dr.c13 int r_main(int argc, char *argv[]) argument
23 if(!strcmp(argv[1], "-b")) {
26 argv++;
27 } else if(!strcmp(argv[1], "-s")) {
30 argv++;
34 addr = strtoul(argv[1], 0, 16);
36 end = strchr(argv[1], '-');
50 value = strtoul(argv[2], 0, 16);
H A Dreboot.c7 int reboot_main(int argc, char *argv[]) argument
18 c = getopt(argc, argv, "np");
32 fprintf(stderr, "usage: %s [-n] [-p] [rebootcommand]\n", argv[0]);
38 fprintf(stderr, "%s: too many arguments\n", argv[0]);
49 ret = android_reboot(ANDROID_RB_RESTART2, flags, argv[optind]);
H A Difconfig.c60 int ifconfig_main(int argc, char *argv[]) argument
70 argv++;
75 strncpy(ifr.ifr_name, argv[0], IFNAMSIZ);
77 argc--, argv++;
128 if (!strcmp(argv[0], "up")) {
130 } else if (!strcmp(argv[0], "mtu")) {
131 argc--, argv++;
136 setmtu(s, &ifr, argv[0]);
137 } else if (!strcmp(argv[0], "-pointopoint")) {
139 } else if (!strcmp(argv[
[all...]
H A Dlog.c90 int log_main(int argc, char *argv[]) argument
102 ret = getopt(argc, argv, "t:p:h");
116 usage(argv[0]);
121 usage(argv[0]);
127 usage(argv[0]);
133 strncat(buffer, argv[i], sizeof(buffer)-1);
138 usage(argv[0]);
H A Dsetkey.c9 static void setkey_usage(char *argv[]) argument
16 " -h Print help\n", argv[0]);
21 int setkey_main(int argc, char *argv[]) argument
40 c = getopt(argc, argv, "t:k:v:hr");
74 setkey_usage(argv);
78 argv[0], optopt);
84 setkey_usage(argv);
H A Dchmod.c57 int chmod_main(int argc, char **argv) argument
61 if (argc < 3 || strcmp(argv[1], "--help") == 0) {
65 int recursive = (strcmp(argv[1], "-R") == 0 ||
66 strcmp(argv[1], "--recursive") == 0) ? 1 : 0;
74 argv++;
78 const char* s = argv[1];
91 if (chmod(argv[i], mode) < 0) {
92 fprintf(stderr, "Unable to chmod %s: %s\n", argv[i], strerror(errno));
96 recurse_chmod(argv[i], mode);
H A Ddate.c43 int date_main(int argc, char *argv[]) argument
59 c = getopt(argc, argv, "us:");
71 argv[0], optopt);
76 fprintf(stderr,"%s [-u] [date]\n", argv[0]);
80 int hasfmt = argc == optind + 1 && argv[optind][0] == '+';
87 (hasfmt ? argv[optind] + 1 : "%a %b %e %H:%M:%S GMT %Y"),
92 (hasfmt ? argv[optind] + 1 : "%a %b %e %H:%M:%S %Z %Y"),
100 tmptr = getdate(argv[optind]);
107 if(getdate_r(argv[optind], &tm) < 0) {
113 //strptime(argv[optin
[all...]
/system/core/adb/
H A Dcommandline.c45 int install_app(transport_type transport, char* serial, int argc, char** argv);
46 int uninstall_app(transport_type transport, char* serial, int argc, char** argv);
540 int ppp(int argc, char **argv) argument
543 fprintf(stderr, "error: adb %s not implemented on Win32\n", argv[0]);
552 argv[0]);
557 adb_service_name = argv[1];
581 //argv[2] and beyond become ppp_args[1] and beyond
582 ppp_args[i - 1] = argv[i];
629 static int logcat(transport_type transport, char* serial, int argc, char **argv) argument
645 if (!strcmp(argv[
684 backup(int argc, char** argv) argument
740 restore(int argc, char** argv) argument
909 adb_commandline(int argc, char **argv) argument
1383 char *argv[16]; local
1452 pm_command(transport_type transport, char* serial, int argc, char** argv) argument
1473 uninstall_app(transport_type transport, char* serial, int argc, char** argv) argument
1537 install_app(transport_type transport, char* serial, int argc, char** argv) argument
[all...]
H A Dconsole.c27 int adb_send_emulator_command(int argc, char** argv) argument
38 adb_write( fd, argv[nn], strlen(argv[nn]) );
/system/netd/
H A DNetdConstants.cpp33 static void logExecError(const char* argv[], int res) { argument
34 const char** argp = argv;
55 const char* argv[argsList.size()]; local
58 argv[i] = *it;
63 argv[0] = IPTABLES_PATH;
64 int localRes = fork_and_execve(argv[0], argv);
67 logExecError(argv, localRes);
73 argv[0] = IP6TABLES_PATH;
74 int localRes = fork_and_execve(argv[
[all...]
H A DInterfaceController.h35 int interfaceCommand(int argc, char *argv[], char **rbuf);
39 int (*sendCommand_)(int argc, char *argv[], char **rbuf);
/system/extras/su/
H A Dsu.c42 int main(int argc, char **argv) argument
57 pw = getpwnam(argv[1]);
60 uid = gid = atoi(argv[1]);
74 if (execlp(argv[2], argv[2], NULL) < 0) {
75 fprintf(stderr, "su: exec failed for %s Error:%s\n", argv[2],
83 memcpy(exec_args, &argv[2], sizeof(exec_args));
84 if (execvp(argv[2], exec_args) < 0) {
85 fprintf(stderr, "su: exec failed for %s Error:%s\n", argv[2],
/system/extras/tests/bionic/libc/other/
H A Dtest_arc4random.c30 int main(int argc, char *argv[]) argument
H A Dtest_system.c7 main(int argc, char *argv[]) argument
14 rv = system(argv[1]);
/system/extras/tests/bionic/libstdc++/
H A Dtest_cassert.cpp46 int main(int argc, char **argv) argument
/system/vold/
H A DCommandListener.h29 static void dumpArgs(int argc, char **argv, int argObscure);
35 int runCommand(SocketClient *c, int argc, char ** argv);
42 int runCommand(SocketClient *c, int argc, char ** argv);
49 int runCommand(SocketClient *c, int argc, char ** argv);
58 int runCommand(SocketClient *c, int argc, char ** argv);
65 int runCommand(SocketClient *c, int argc, char ** argv);
72 int runCommand(SocketClient *c, int argc, char ** argv);
79 int runCommand(SocketClient *c, int argc, char ** argv);
/system/extras/ext4_utils/
H A Dext4fixup_main.c28 int main(int argc, char **argv) argument
37 me = basename(argv[0]);
39 while ((opt = getopt(argc, argv, "vnd:")) != -1) {
59 fsdev = argv[optind++];
62 fprintf(stderr, "Unexpected argument: %s\n", argv[optind]);
/system/core/libzipfile/
H A Dtest_zipfile.c9 main(int argc, char** argv) argument
20 if (strcmp(argv[2], "-l") == 0 && argc == 3) {
23 else if (strcmp(argv[2], "-u") == 0 && argc == 5) {
34 f = fopen(argv[1], "r");
36 fprintf(stderr, "couldn't open %s\n", argv[1]);
64 entry = lookup_zipentry(zip, argv[3]);
67 argv[1], argv[1]);
70 f = fopen(argv[4], "w");
72 fprintf(stderr, "can't open file for writing '%s'\n", argv[
[all...]

Completed in 110 milliseconds

123456789