Lines Matching defs:args
133 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 4-5 args, got %zu", name,
137 std::vector<std::string> args;
138 if (!ReadArgs(state, argv, &args)) {
141 const std::string& fs_type = args[0];
142 const std::string& partition_type = args[1];
143 const std::string& location = args[2];
144 const std::string& mount_point = args[3];
148 mount_options = args[4];
198 std::vector<std::string> args;
199 if (!ReadArgs(state, argv, &args)) {
202 const std::string& mount_point = args[0];
221 std::vector<std::string> args;
222 if (!ReadArgs(state, argv, &args)) {
225 const std::string& mount_point = args[0];
270 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 5 args, got %zu", name,
274 std::vector<std::string> args;
275 if (!ReadArgs(state, argv, &args)) {
278 const std::string& fs_type = args[0];
279 const std::string& partition_type = args[1];
280 const std::string& location = args[2];
281 const std::string& fs_size = args[3];
282 const std::string& mount_point = args[4];
339 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
343 std::vector<std::string> args;
344 if (!ReadArgs(state, argv, &args)) {
347 const std::string& frac_str = args[0];
348 const std::string& sec_str = args[1];
372 std::vector<std::string> args;
373 if (!ReadArgs(state, argv, &args)) {
376 const std::string& frac_str = args[0];
399 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
403 std::vector<std::string> args;
404 if (!ReadArgs(state, argv, &args)) {
407 const std::string& zip_path = args[0];
408 const std::string& dest_path = args[1];
427 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 1 or 2 args, got %zu", name,
434 std::vector<std::string> args;
435 if (!ReadArgs(state, argv, &args)) {
436 return ErrorAbort(state, kArgsParsingFailure, "%s() Failed to parse %zu args", name,
439 const std::string& zip_path = args[0];
440 const std::string& dest_path = args[1];
478 std::vector<std::string> args;
479 if (!ReadArgs(state, argv, &args)) {
480 return ErrorAbort(state, kArgsParsingFailure, "%s() Failed to parse %zu args", name,
483 const std::string& zip_path = args[0];
527 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
531 std::vector<std::string> args;
532 if (!ReadArgs(state, argv, &args)) {
535 const std::string& filename = args[0];
536 const std::string& key = args[1];
593 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 1 args, got %zu", name,
596 std::vector<std::string> args;
597 if (!ReadArgs(state, argv, &args)) {
600 const std::string& bytes_str = args[0];
625 return ErrorAbort(state, kArgsParsingFailure, "%s(): expected at least 6 args and an "
629 std::vector<std::string> args;
630 if (!ReadArgs(state, argv, &args, 0, 4)) {
633 const std::string& source_filename = args[0];
634 const std::string& target_filename = args[1];
635 const std::string& target_sha1 = args[2];
636 const std::string& target_size_str = args[3];
687 std::vector<std::string> args;
688 if (!ReadArgs(state, argv, &args, 0, 1)) {
691 const std::string& filename = args[0];
705 std::vector<std::string> args;
706 if (!ReadArgs(state, argv, &args)) {
710 std::string buffer = android::base::Join(args, "") + "\n";
717 return ErrorAbort(state, kArgsParsingFailure, "%s() expects no args, got %zu", name,
729 std::vector<std::string> args;
730 if (!ReadArgs(state, argv, &args)) {
736 args2[i] = &args[i][0];
740 LOG(INFO) << "about to run program [" << args2[0] << "] with " << argv.size() << " args";
775 std::vector<std::unique_ptr<Value>> args;
776 if (!ReadValueArgs(state, argv, &args)) {
780 if (args[0]->type == VAL_INVALID) {
784 SHA1(reinterpret_cast<const uint8_t*>(args[0]->data.c_str()), args[0]->data.size(), digest);
792 if (args[i]->type != VAL_STRING) {
794 } else if (ParseSha1(args[i]->data.c_str(), arg_digest) != 0) {
795 // Warn about bad args and skip them.
796 LOG(ERROR) << name << "(): error parsing \"" << args[i]->data << "\" as sha-1; skipping";
799 return args[i].release();
814 std::vector<std::string> args;
815 if (!ReadArgs(state, argv, &args)) {
818 const std::string& filename = args[0];
835 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
839 std::vector<std::string> args;
840 if (!ReadArgs(state, argv, &args)) {
844 const std::string& filename = args[1];
849 const std::string& value = args[0];
869 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
873 std::vector<std::string> args;
874 if (!ReadArgs(state, argv, &args)) {
877 const std::string& filename = args[0];
878 const std::string& property = args[1];
915 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
919 std::vector<std::string> args;
920 if (!ReadArgs(state, argv, &args)) {
923 const std::string& filename = args[0];
924 const std::string& stagestr = args[1];
952 std::vector<std::string> args;
953 if (!ReadArgs(state, argv, &args)) {
956 const std::string& filename = args[0];
970 return ErrorAbort(state, kArgsParsingFailure, "%s() expects 2 args, got %zu", name,
974 std::vector<std::string> args;
975 if (!ReadArgs(state, argv, &args)) {
978 const std::string& filename = args[0];
979 const std::string& len_str = args[1];
994 return ErrorAbort(state, kArgsParsingFailure, "%s() expects no args, got %zu", name,
1004 return ErrorAbort(state, kArgsParsingFailure, "%s() expects args, got %zu", name, argv.size());
1007 std::vector<std::string> args;
1008 if (!ReadArgs(state, argv, &args)) {
1009 return ErrorAbort(state, kArgsParsingFailure, "%s() could not read args", name);
1013 // Tune2fs expects the program name as its args[0]
1019 args2[i + 1] = &args[i][0];