Lines Matching defs:opts

95 static struct options opts;
176 opts.device = NULL;
177 opts.src_file = NULL;
178 opts.dest_file = NULL;
179 opts.attr_name = NULL;
180 opts.inode = 0;
181 opts.attribute = AT_DATA;
182 opts.timestamp = 0;
189 if (!opts.device) {
190 opts.device = argv[optind - 1];
191 } else if (!opts.src_file) {
192 opts.src_file = argv[optind - 1];
193 } else if (!opts.dest_file) {
194 opts.dest_file = argv[optind - 1];
202 if (opts.attribute != AT_DATA) {
214 opts.attribute = (ATTR_TYPES)cpu_to_le32(attr);
217 opts.inode++;
220 opts.force++;
226 opts.minfragments++;
229 if (opts.attr_name) {
234 opts.attr_name = argv[optind - 1];
237 opts.noaction++;
240 opts.quiet++;
244 opts.timestamp++;
250 opts.verbose++;
271 opts.verbose++;
273 opts.quiet++;
276 opts.quiet = 0;
278 if (!opts.device) {
281 } else if (!opts.src_file) {
284 } else if (!opts.dest_file) {
290 if (opts.quiet && opts.verbose) {
295 if (opts.timestamp
296 && (opts.attr_name || (opts.attribute != AT_DATA))) {
632 if ((opts.attribute == AT_DATA) && !na->name_len) {
679 if (ntfs_attr_lookup(opts.attribute, na->name,
786 if (!err && !opts.noaction) {
875 if (opts.noaction)
877 if (opts.force)
880 vol = utils_mount_volume(opts.device, flags);
886 if ((vol->flags & VOLUME_IS_DIRTY) && !opts.force)
897 if (stat(opts.src_file, &fst) == -1) {
905 in = fopen(opts.src_file, "r");
911 if (opts.inode) {
915 inode_num = strtoll(opts.dest_file, &s, 0);
923 unix_name = ntfs_utils_unix_path(opts.dest_file);
929 out = ntfs_pathname_to_inode(vol, NULL, opts.dest_file);
944 filename = basename(opts.dest_file);
945 parent_dirname = strdup(opts.dest_file);
996 if ((out->mrec->flags & MFT_RECORD_IS_DIRECTORY) && !opts.inode) {
1005 filename = basename(opts.src_file);
1008 dest_dirname_len = strlen(opts.dest_file);
1021 strcpy(overwrite_filename, opts.dest_file);
1037 "'%s'\n", filename, opts.dest_file);
1043 opts.dest_file);
1052 attr_name = ntfs_str2ucs(opts.attr_name, &attr_name_len);
1055 opts.attr_name);
1059 na = ntfs_attr_open(out, opts.attribute, attr_name, attr_name_len);
1066 if (ntfs_attr_add(out, opts.attribute, attr_name,
1071 na = ntfs_attr_open(out, opts.attribute, attr_name,
1081 if (opts.minfragments && NAttrCompressed(na)) {
1084 opts.minfragments = 0;
1086 if (na->data_size && opts.minfragments) {
1094 if (opts.minfragments) {
1154 if (opts.timestamp) {
1165 while (ntfs_inode_close(out) && !opts.noaction) {