Lines Matching refs:std

31std::cerr << "Usage: " << argv[0] << " <options> <<inode_syntax>> [inode_syntax1 inode_syntax2 ...…  in Usage()
32 std::cerr << "" << std::endl; in Usage()
33std::cerr << " Block until all inodes have been read in, then begin searching for filenames for t… in Usage()
34std::cerr << " Results are written immediately as they are available, and once all inodes are fou… in Usage()
35 std::cerr << " the program will terminate." << std::endl; in Usage()
36 std::cerr << "" << std::endl; in Usage()
37 std::cerr << " Inode syntax: ('dev_t@inode' | 'major:minor:inode')" << std::endl; in Usage()
38 std::cerr << "" << std::endl; // CLI-only flags. in Usage()
39 std::cerr << " --help,-h Print this Usage." << std::endl; in Usage()
40 std::cerr << " --verbose,-v Set verbosity (default off)." << std::endl; in Usage()
41std::cerr << " --wait,-w Wait for key stroke before continuing (default off)." << std::… in Usage()
42 std::cerr << "" << std::endl; // General flags. in Usage()
43std::cerr << " --all,-a Enumerate all inode->filename mappings in the dataset (default… in Usage()
44 std::cerr << " All <<inode_syntaxN>> arguments are ignored." << std::endl; in Usage()
45 std::cerr << " --data-source=, Choose a data source (default 'diskscan')." << std::endl; in Usage()
46 std::cerr << " -ds " << std::endl; in Usage()
47 std::cerr << " diskscan Scan disk recursively using readdir." << std::endl; in Usage()
48 std::cerr << " textcache Use the file from the '--output-format=text'." << std::endl; in Usage()
49 std::cerr << " bpf Query kernel BPF maps (experimental)." << std::endl; in Usage()
50 std::cerr << " --output=,-o Choose an output file (default 'stdout')." << std::endl; in Usage()
51 std::cerr << " --output-format=, Choose an output format (default 'log')." << std::endl; in Usage()
52 std::cerr << " -of " << std::endl; in Usage()
53std::cerr << " log Log human-readable, non-parsable format to stdout+logcat." << in Usage()
54std::cerr << " textcache Results are in the same format as system/extras/pagecache." <<… in Usage()
55std::cerr << " ipc Results are in a binary inter-process communications format" <… in Usage()
56std::cerr << " --process-mode=, Choose a process mode (default 'in'). Test-oriented." << std::… in Usage()
57 std::cerr << " -pm " << std::endl; in Usage()
58 std::cerr << " in Use a single process to do the work in." << std::endl; in Usage()
59 std::cerr << " out Out-of-process work (forks into a -pm=in)." << std::endl; in Usage()
60std::cerr << " --verify=,-vy Verification modes for the data source (default 'stat')." << s… in Usage()
61std::cerr << " stat Use stat(2) call to validate data inodes are up-to-date. " << in Usage()
62std::cerr << " none Trust that the data-source is up-to-date without checking." <<… in Usage()
63 std::cerr << "" << std::endl; // --data-source=<?> specific flags. in Usage()
64 std::cerr << " Data-source-specific commands:" << std::endl; in Usage()
65 std::cerr << " --data-source=diskscan" << std::endl; in Usage()
66std::cerr << " --root=,-r Add root directory (default '.'). Repeatable." << std::e… in Usage()
67 std::cerr << " --data-source=textcache" << std::endl; in Usage()
68 std::cerr << " --textcache=,-tc Name of file that contains the textcache." << std::endl; in Usage()
69 std::cerr << "" << std::endl; // Programmatic flags. in Usage()
70std::cerr << " --in-fd=# Input file descriptor. Default input is from argv." << std::en… in Usage()
71 std::cerr << " --out-fd=# Output file descriptor. Default stdout." << std::endl; in Usage()
79 std::optional<DataSourceKind> ParseDataSourceKind(std::string_view str) { in ParseDataSourceKind()
87 return std::nullopt; in ParseDataSourceKind()
96 std::optional<OutputFormatKind> ParseOutputFormatKind(std::string_view str) { in ParseOutputFormatKind()
104 return std::nullopt; in ParseOutputFormatKind()
107 std::optional<VerifyKind> ParseVerifyKind(std::string_view str) { in ParseVerifyKind()
113 return std::nullopt; in ParseVerifyKind()
116 std::optional<ProcessMode> ParseProcessMode(std::string_view str) { in ParseProcessMode()
122 return std::nullopt; in ParseProcessMode()
125 bool StartsWith(std::string_view haystack, std::string_view needle) { in StartsWith()
130 bool EndsWith(std::string_view haystack, std::string_view needle) { in EndsWith()
135 bool StartsWithOneOf(std::string_view haystack, in StartsWithOneOf()
136 std::string_view needle, in StartsWithOneOf()
137 std::string_view needle2) { in StartsWithOneOf()
146 std::optional<std::string> ParseNamedArgument(std::initializer_list<std::string> names, in ParseNamedArgument()
147 std::string argstr, in ParseNamedArgument()
148 std::optional<std::string> arg_next, in ParseNamedArgument()
151 for (const std::string& name : names) { in ParseNamedArgument()
154 std::vector<std::string> split_str = ::android::base::Split(argstr, "="); in ParseNamedArgument()
177 std::cerr << "Missing " << name << " flag value." << std::endl; in ParseNamedArgument()
184 return std::nullopt; in ParseNamedArgument()
194 std::vector<std::string> root_directories; in main()
195 std::vector<Inode> inode_list; in main()
203 std::optional<std::string> output_filename; in main()
204 std::optional<int /*fd*/> in_fd, out_fd; // input-output file descriptors [for fork+exec]. in main()
205 std::optional<std::string> text_cache_filename; in main()
212 std::string argstr = argv[arg]; in main()
213 std::optional<std::string> arg_next; in main()
237 std::cerr << "Invalid --data-source=<value>" << std::endl; in main()
254 std::cerr << "Invalid --process-mode=<value>" << std::endl; in main()
266 std::cerr << "Missing --output-format=<value>" << std::endl; in main()
277 std::cerr << "Invalid --verify=<value>" << std::endl; in main()
290 std::string error_msg; in main()
296 std::cerr << "Unrecognized flag: " << argstr << std::endl; in main()
301 std::cerr << "Failed to parse inode (" << argstr << ") because: " << error_msg << std::endl; in main()
312 std::cerr << "Provide at least one inode. Or use --all to dump everything." << std::endl; in main()
315 std::cerr << "[WARNING]: --all flag ignores all inodes passed on command line." << std::endl; in main()
318 std::ofstream fout; in main()
322 std::cerr << "Failed to open output file for writing: \"" << *output_filename << "\""; in main()
327 fout.basic_ios<char>::rdbuf(std::cout.rdbuf()); in main()
352 std::cin >> wait_for_keystroke; in main()
367 std::shared_ptr<InodeResolver> inode_resolver = in main()
376 : inode_resolver->FindFilenamesFromInodes(std::move(inode_list)); in main()
386 << " \"" << result.data.value() << "\"" << std::endl; in main()
388 std::stringstream stream; in main()
390 std::string line = stream.str(); in main()
416 << " '" << *result.ErrorMessage() << "'" << std::endl; in main()
418 std::stringstream stream; in main()
419 stream << "E " << result.inode << " " << result.data.error() << std::endl; in main()
420 std::string line = stream.str(); in main()