Home
last modified time | relevance | path

Searched refs:argv (Results 1 – 19 of 19) sorted by relevance

/bootable/recovery/applypatch/
Dmain.c26 int CheckMode(int argc, char** argv) { in CheckMode() argument
30 return applypatch_check(argv[2], argc-3, argv+3); in CheckMode()
33 int SpaceMode(int argc, char** argv) { in SpaceMode() argument
38 size_t bytes = strtol(argv[2], &endptr, 10); in SpaceMode()
39 if (bytes == 0 && endptr == argv[2]) { in SpaceMode()
40 printf("can't parse \"%s\" as byte count\n\n", argv[2]); in SpaceMode()
50 static int ParsePatchArgs(int argc, char** argv, in ParsePatchArgs() argument
61 char* colon = strchr(argv[i], ':'); in ParsePatchArgs()
67 if (ParseSha1(argv[i], digest) != 0) { in ParsePatchArgs()
68 printf("failed to parse sha1 \"%s\"\n", argv[i]); in ParsePatchArgs()
[all …]
Dimgdiff.c791 int main(int argc, char** argv) { in main() argument
794 if (argc >= 2 && strcmp(argv[1], "-z") == 0) { in main()
797 ++argv; in main()
802 if (argc >= 3 && strcmp(argv[1], "-b") == 0) { in main()
804 if (stat(argv[2], &st) != 0) { in main()
805 printf("failed to stat bonus file %s: %s\n", argv[2], strerror(errno)); in main()
810 FILE* f = fopen(argv[2], "rb"); in main()
812 printf("failed to open bonus file %s: %s\n", argv[2], strerror(errno)); in main()
816 printf("failed to read bonus file %s: %s\n", argv[2], strerror(errno)); in main()
822 argv += 2; in main()
[all …]
/bootable/recovery/mtdutils/
Dflash_image.c54 int main(int argc, char **argv) { in main() argument
61 fprintf(stderr, "usage: %s partition file.img\n", argv[0]); in main()
66 const MtdPartition *partition = mtd_find_partition_by_name(argv[1]); in main()
67 if (partition == NULL) die("can't find %s partition", argv[1]); in main()
71 int fd = open(argv[2], O_RDONLY); in main()
72 if (fd < 0) die("error opening %s", argv[2]); in main()
76 if (headerlen <= 0) die("error reading %s header", argv[2]); in main()
80 ALOGW("error opening %s: %s\n", argv[1], strerror(errno)); in main()
86 ALOGW("error reading %s: %s\n", argv[1], strerror(errno)); in main()
89 ALOGI("header is the same, not flashing %s\n", argv[1]); in main()
[all …]
/bootable/recovery/edify/
Dexpr.h58 int argc, Expr* argv[]);
64 Expr** argv; member
81 Value* Literal(const char* name, State* state, int argc, Expr* argv[]);
86 Value* ConcatFn(const char* name, State* state, int argc, Expr* argv[]);
87 Value* LogicalAndFn(const char* name, State* state, int argc, Expr* argv[]);
88 Value* LogicalOrFn(const char* name, State* state, int argc, Expr* argv[]);
89 Value* LogicalNotFn(const char* name, State* state, int argc, Expr* argv[]);
90 Value* SubstringFn(const char* name, State* state, int argc, Expr* argv[]);
91 Value* EqualityFn(const char* name, State* state, int argc, Expr* argv[]);
92 Value* InequalityFn(const char* name, State* state, int argc, Expr* argv[]);
[all …]
Dexpr.c36 Value* v = expr->fn(expr->name, state, expr->argc, expr->argv); in Evaluate()
49 return expr->fn(expr->name, state, expr->argc, expr->argv); in EvaluateValue()
67 Value* ConcatFn(const char* name, State* state, int argc, Expr* argv[]) { in ConcatFn() argument
79 strings[i] = Evaluate(state, argv[i]); in ConcatFn()
102 Value* IfElseFn(const char* name, State* state, int argc, Expr* argv[]) { in IfElseFn() argument
108 char* cond = Evaluate(state, argv[0]); in IfElseFn()
115 return EvaluateValue(state, argv[1]); in IfElseFn()
119 return EvaluateValue(state, argv[2]); in IfElseFn()
126 Value* AbortFn(const char* name, State* state, int argc, Expr* argv[]) { in AbortFn() argument
129 msg = Evaluate(state, argv[0]); in AbortFn()
[all …]
Dparser.y45 Expr** argv; member
77 $$->argv = NULL;
104 $$->argv = $3.argv;
112 $$.argv = NULL;
116 $$.argv = malloc(sizeof(Expr*));
117 $$.argv[0] = $1;
121 $$.argv = realloc($$.argv, $$.argc * sizeof(Expr*));
122 $$.argv[$$.argc-1] = $3;
Dmain.c169 ExprDump(depth+1, n->argv[i], script); in ExprDump()
173 int main(int argc, char** argv) { in main() argument
181 FILE* f = fopen(argv[1], "r"); in main()
183 printf("%s: %s: No such file or directory\n", argv[0], argv[1]); in main()
/bootable/recovery/
Dverifier_test.cpp173 int main(int argc, char **argv) { in main() argument
175 fprintf(stderr, "Usage: %s [-sha256] [-ec | -f4 | -file <keys>] <package>\n", argv[0]); in main()
183 if (strcmp(argv[argn], "-sha256") == 0) { in main()
191 } else if (strcmp(argv[argn], "-ec") == 0) { in main()
195 } else if (strcmp(argv[argn], "-e3") == 0) { in main()
199 } else if (strcmp(argv[argn], "-f4") == 0) { in main()
203 } else if (strcmp(argv[argn], "-file") == 0) { in main()
209 certs = load_keys(argv[argn], &num_keys); in main()
211 } else if (argv[argn][0] == '-') { in main()
212 fprintf(stderr, "Unknown argument %s\n", argv[argn]); in main()
[all …]
Dinterlace-frames.py28 frames = [Image.open(fn).convert("RGB") for fn in sys.argv[1:-1]]
53 out.save(sys.argv[-1], pnginfo=meta)
Drecovery.cpp193 get_args(int *argc, char ***argv) { in get_args() argument
212 *argv = (char **) malloc(sizeof(char *) * MAX_ARGS); in get_args()
213 (*argv)[0] = strdup(arg); in get_args()
216 (*argv)[*argc] = strdup(arg); in get_args()
229 char *argv0 = (*argv)[0]; in get_args()
230 *argv = (char **) malloc(sizeof(char *) * MAX_ARGS); in get_args()
231 (*argv)[0] = argv0; // use the same program name in get_args()
238 (*argv)[*argc] = strdup(token); // Strip newline. in get_args()
255 strlcat(boot.recovery, (*argv)[i], sizeof(boot.recovery)); in get_args()
907 main(int argc, char **argv) { in main() argument
[all …]
Droots.cpp156 static int exec_cmd(const char* path, char* const argv[]) { in exec_cmd() argument
160 execv(path, argv); in exec_cmd()
/bootable/recovery/updater/
Dupdater.c40 int main(int argc, char** argv) { in main() argument
53 char* version = argv[1]; in main()
59 argv[1]); in main()
65 int fd = atoi(argv[2]); in main()
71 const char* package_filename = argv[3]; in main()
74 printf("failed to map package %s\n", argv[3]); in main()
82 argv[3], strerror(err)); in main()
Dinstall.c93 Value* MountFn(const char* name, State* state, int argc, Expr* argv[]) { in MountFn() argument
106 if (ReadArgs(state, argv, 5, &fs_type, &partition_type, in MountFn()
112 if (ReadArgs(state, argv, 4, &fs_type, &partition_type, in MountFn()
190 Value* IsMountedFn(const char* name, State* state, int argc, Expr* argv[]) { in IsMountedFn() argument
196 if (ReadArgs(state, argv, 1, &mount_point) < 0) { in IsMountedFn()
218 Value* UnmountFn(const char* name, State* state, int argc, Expr* argv[]) { in UnmountFn() argument
224 if (ReadArgs(state, argv, 1, &mount_point) < 0) { in UnmountFn()
251 static int exec_cmd(const char* path, char* const argv[]) { in exec_cmd() argument
255 execv(path, argv); in exec_cmd()
274 Value* FormatFn(const char* name, State* state, int argc, Expr* argv[]) { in FormatFn() argument
[all …]
Dblockimg.c1521 static Value* PerformBlockImageUpdate(const char* name, State* state, int argc, Expr* argv[], in PerformBlockImageUpdate() argument
1553 if (ReadValueArgs(state, argv, 4, &blockdev_filename, &transfer_list_value, in PerformBlockImageUpdate()
1855 Value* BlockImageVerifyFn(const char* name, State* state, int argc, Expr* argv[]) { in BlockImageVerifyFn() argument
1869 return PerformBlockImageUpdate(name, state, argc, argv, commands, in BlockImageVerifyFn()
1873 Value* BlockImageUpdateFn(const char* name, State* state, int argc, Expr* argv[]) { in BlockImageUpdateFn() argument
1885 return PerformBlockImageUpdate(name, state, argc, argv, commands, in BlockImageUpdateFn()
1889 Value* RangeSha1Fn(const char* name, State* state, int argc, Expr* argv[]) { in RangeSha1Fn() argument
1893 if (ReadValueArgs(state, argv, 2, &blockdev_filename, &ranges) < 0) { in RangeSha1Fn()
/bootable/recovery/tools/ota/
Dadd-property-tag.c66 int main(int argc, char **argv) { in main() argument
73 while ((opt = getopt(argc, argv, "f:p:rn")) != -1) { in main()
93 tag = argv[optind]; in main()
Dconvert-to-bmp.py10 infile = sys.argv[1]
11 outfile = sys.argv[2]
Dcheck-lost+found.c48 int main(int argc __attribute__((unused)), char **argv __attribute__((unused))) { in main() argument
/bootable/recovery/uncrypt/
Duncrypt.cpp412 int main(int argc, char** argv) { in main() argument
416 if (argc != 3 && argc != 1 && (argc == 2 && strcmp(argv[1], "--reboot") != 0)) { in main()
417 fprintf(stderr, "usage: %s [--reboot] [<transform_path> <map_file>]\n", argv[0]); in main()
440 input_path = argv[1]; in main()
441 map_file = argv[2]; in main()
/bootable/recovery/minui/
Dmkfont.c4 int main(int argc, char *argv) in main() argument