Lines Matching defs:opt

171 } opt;
429 memset(&opt, 0, sizeof(opt));
434 if (opt.volume)
436 opt.volume = argv[optind-1];
439 opt.debug++;
442 opt.quiet++;
445 opt.force++;
452 opt.new_serial |= 1;
455 opt.new_serial |= 2;
458 opt.full_logfile++;
461 opt.metadata++;
464 opt.no_action++;
467 opt.overwrite++;
470 if (opt.output)
472 opt.output = optarg;
475 opt.restore_image++;
478 opt.ignore_fs_check++;
481 opt.rescue++;
484 opt.save_image++;
487 opt.preserve_timestamps++;
498 if (!opt.no_action && (opt.output == NULL)) {
503 if (!opt.no_action && (strcmp(opt.output, "-") == 0))
504 opt.std_out++;
506 if (opt.volume == NULL) {
511 if (!opt.restore_image && !strcmp(opt.volume, "-")) {
516 if (opt.metadata && opt.save_image) {
517 opt.metadata_image++;
518 opt.save_image = 0;
521 if (opt.metadata && opt.restore_image)
525 if (opt.metadata && !opt.metadata_image && opt.std_out)
528 if (opt.ignore_fs_check && !opt.metadata && !opt.rescue)
532 if (opt.save_image && opt.restore_image)
536 if (opt.no_action && !opt.restore_image)
539 if (opt.no_action && opt.output)
542 if (!opt.no_action && !opt.std_out) {
545 BOOL blkdev = opt.output[0] && (opt.output[1] == ':')
546 && !opt.output[2];
548 if (!blkdev && (stat(opt.output, &st) == -1)) {
550 if (stat(opt.output, &st) == -1) {
553 perr_exit("Couldn't access '%s'", opt.output);
555 if (!opt.overwrite)
558 " replace its content.\n", opt.output);
565 opt.blkdev_out = 1;
566 if (opt.metadata && !opt.force)
585 if (opt.std_out) {
621 if (opt.quiet)
643 if ((inode != FILE_LogFile) || opt.full_logfile)
678 if (opt.no_action) {
681 if (opt.save_image || opt.metadata_image)
691 } else if (opt.restore_image)
698 } else if (i == 0 && !do_write && opt.restore_image) {
714 if (opt.restore_image) {
715 if (!opt.no_action
744 else if (opt.rescue){
761 /* vol is NULL if opt.restore_image is set */
770 if (!opt.restore_image) {
794 if (!errno && opt.restore_image)
811 if (opt.new_serial
812 && !opt.save_image
829 if (opt.new_serial & 2)
844 if (opt.save_image || (opt.metadata_image && wipe)) {
850 if ((!opt.metadata_image || wipe)
855 if (err == EIO && opt.stfs.f_type == 0x517b)
888 if (opt.std_out || opt.save_image || opt.metadata_image)
911 if (opt.save_image && count > 0) {
928 if (opt.save_image || opt.metadata_image) {
948 if (opt.save_image)
953 if (opt.new_serial)
962 if (opt.save_image) {
973 if (more_use && opt.ignore_fs_check) {
984 copy_cluster(opt.rescue, cl, cl);
989 if (opt.std_out && !opt.save_image) {
1029 progress_init(&progress, p_counter, opt.std_out ?
1034 if (opt.new_serial)
1067 if (opt.std_out) {
1082 if (!opt.no_action
1369 if (opt.metadata_image && wipe)
1372 copy_cluster(opt.rescue, lcn, lcn);
1375 if (opt.metadata_image && !wipe)
1420 if (!opt.preserve_timestamps)
1641 if (!opt.preserve_timestamps)
1664 if (opt.restore_image)
1667 if ((opt.std_out && !opt.metadata_image) || !opt.metadata)
1673 if (opt.metadata_image ? wipe : !wipe) {
1674 if (opt.metadata_image)
1678 copy_cluster(opt.rescue, rl->lcn + i, rl->lcn + i);
1679 if (opt.metadata_image)
1699 if (!opt.preserve_timestamps)
1706 && !opt.preserve_timestamps
1737 if (opt.metadata_image ? wipe && !mft_data && !index_i30 : !wipe)
1743 if (opt.ignore_fs_check)
1755 if (!opt.metadata_image)
1762 if (!wipe && opt.metadata_image) {
1776 if (wipe && opt.metadata_image) {
1816 if (opt.metadata
1817 && (opt.metadata_image || !wipe)
1896 if (opt.ignore_fs_check && !bit && copy) {
1898 if (opt.save_image
1899 || (opt.metadata
1900 && opt.metadata_image)) {
1904 copy_cluster(opt.rescue, cl, cl);
1920 if (opt.ignore_fs_check) {
1968 if (opt.restore_image || (!opt.metadata && wipe))
2001 if (deleted_inode && !opt.metadata_image) {
2035 if (wipe && !opt.metadata_image) {
2049 if (opt.metadata) {
2050 if (opt.metadata_image && wipe && opt.ignore_fs_check) {
2055 if (opt.metadata_image ? wipe : !wipe) {
2059 if (opt.metadata_image && wipe)
2062 copy_cluster(opt.rescue, nr_clusters, nr_clusters);
2066 if (!opt.metadata_image)
2176 check_if_mounted(opt.volume, new_mntflag);
2178 if (!(vol = ntfs_mount(opt.volume, new_mntflag))) {
2182 perr_printf("Opening '%s' as NTFS failed", opt.volume);
2187 "not /dev/hda1)?\n", opt.volume);
2198 if (opt.full_logfile) {
2201 vol = ntfs_mount(opt.volume,
2205 vol = ntfs_mount(opt.volume,
2215 if (opt.force-- <= 0)
2216 err_exit(dirty_volume_msg, opt.volume);
2300 if (opt.save_image && stream_out && fflush(stream_out))
2311 if (fstatfs(fd_out, &opt.stfs) == -1)
2315 fs_type = opt.stfs.f_type;
2328 if (!opt.no_action && (ftruncate(fd_out, filesize) == -1)) {
2330 perr_printf("ftruncate failed for file '%s'", opt.output);
2363 if (!opt.no_action) {
2381 if (strcmp(opt.volume, "-") == 0) {
2389 if ((fd_in = open(opt.volume, O_RDONLY | O_BINARY)) == -1)
2494 if (opt.blkdev_out) {
2506 check_if_mounted(opt.output, 0);
2557 if (opt.metadata || opt.blkdev_out || opt.std_out)
2610 if (opt.restore_image) {
2622 if (opt.std_out) {
2635 if (!opt.blkdev_out) {
2637 if (!opt.overwrite)
2641 if (opt.save_image || opt.metadata_image) {
2642 stream_out = fopen(opt.output,BINWMODE);
2645 opt.output);
2649 if (!opt.no_action) {
2650 dev_out = ntfs_device_alloc(opt.output, 0,
2655 opt.output);
2658 if (!opt.no_action
2659 && ((fd_out = open(opt.output, flags,
2662 opt.output);
2666 if (!opt.save_image && !opt.metadata_image && !opt.no_action)
2670 if (opt.restore_image) {
2673 if (!opt.no_action)
2684 opt.metadata && !opt.metadata_image);
2691 if (opt.save_image)
2694 if ((opt.std_out && !opt.metadata_image) || !opt.metadata) {
2696 if (opt.std_out && !opt.save_image)
2702 if (opt.save_image)
2710 if (opt.metadata_image) {
2719 opt.volume = opt.output;
2722 opt.force++;
2750 if (opt.metadata_image)