Lines Matching refs:opts
56 static struct options opts; variable
138 opts.action = act_none; in parse_options()
139 opts.range_begin = -1; in parse_options()
140 opts.range_end = -1; in parse_options()
145 if (!opts.device) { in parse_options()
146 opts.device = argv[optind-1]; in parse_options()
148 opts.device = NULL; in parse_options()
154 if ((opts.action == act_none) && in parse_options()
155 (utils_parse_range(optarg, &opts.range_begin, &opts.range_end, FALSE))) in parse_options()
156 opts.action = act_cluster; in parse_options()
158 opts.action = act_error; in parse_options()
161 if (opts.action == act_none) { in parse_options()
162 opts.action = act_file; in parse_options()
163 opts.filename = optarg; in parse_options()
165 opts.action = act_error; in parse_options()
169 opts.force++; in parse_options()
175 if (opts.action == act_none) { in parse_options()
176 opts.action = act_inode; in parse_options()
177 opts.inode = strtol(optarg, &end, 0); in parse_options()
181 opts.action = act_error; in parse_options()
185 if (opts.action == act_none) in parse_options()
186 opts.action = act_info; in parse_options()
188 opts.action = act_error; in parse_options()
191 if (opts.action == act_none) in parse_options()
192 opts.action = act_last; in parse_options()
194 opts.action = act_error; in parse_options()
197 opts.quiet++; in parse_options()
201 if ((opts.action == act_none) && in parse_options()
202 (utils_parse_range(optarg, &opts.range_begin, &opts.range_end, FALSE))) in parse_options()
203 opts.action = act_sector; in parse_options()
205 opts.action = act_error; in parse_options()
208 opts.verbose++; in parse_options()
234 opts.verbose++; in parse_options()
236 opts.quiet++; in parse_options()
239 opts.quiet = 0; in parse_options()
241 if (opts.action == act_none) in parse_options()
242 opts.action = act_info; in parse_options()
243 if (opts.action == act_info) in parse_options()
244 opts.quiet = 0; in parse_options()
246 if (opts.device == NULL) { in parse_options()
252 if (opts.quiet && opts.verbose) { in parse_options()
257 if (opts.action == act_error) { in parse_options()
260 } else if (opts.range_begin > opts.range_end) { in parse_options()
501 vol = utils_mount_volume(opts.device, NTFS_MNT_RDONLY | in main()
502 (opts.force ? NTFS_MNT_RECOVER : 0)); in main()
506 switch (opts.action) { in main()
508 if (opts.range_begin == opts.range_end) in main()
510 (unsigned long long)opts.range_begin); in main()
512 …ing for sector range %llu-%llu\n", (unsigned long long)opts.range_begin, (unsigned long long)opts.… in main()
514 opts.range_begin >>= (vol->cluster_size_bits - vol->sector_size_bits); in main()
515 opts.range_end >>= (vol->cluster_size_bits - vol->sector_size_bits); in main()
516 result = cluster_find(vol, opts.range_begin, opts.range_end, (cluster_cb*)&print_match, NULL); in main()
519 if (opts.range_begin == opts.range_end) in main()
521 (unsigned long long)opts.range_begin); in main()
523 …ng for cluster range %llu-%llu\n", (unsigned long long)opts.range_begin, (unsigned long long)opts.… in main()
524 result = cluster_find(vol, opts.range_begin, opts.range_end, (cluster_cb*)&print_match, NULL); in main()
528 unix_name = ntfs_utils_unix_path(opts.filename); in main()
536 ino = ntfs_pathname_to_inode(vol, NULL, opts.filename); in main()
542 ino = ntfs_inode_open(vol, opts.inode); in main()
548 (unsigned long long)opts.inode); in main()
563 opts.inode); in main()