Lines Matching refs:err

1136 	int asize, mpa_size, err, i;
1155 err = -ENOMEM;
1160 err = -EOPNOTSUPP;
1164 err = -EEXIST;
1169 err = -errno;
1177 err = -EOPNOTSUPP;
1182 err = -EOPNOTSUPP;
1198 err = -errno;
1215 err = -EINVAL;
1218 err = make_room_for_attribute(m, (char*)a, asize);
1219 if (err == -ENOSPC) {
1236 err = -EOPNOTSUPP;
1239 } else if (err == -EINVAL) {
1276 /* FIXME: err = build_mapping_pairs_compressed(); */
1277 err = -EOPNOTSUPP;
1293 err = ntfs_mapping_pairs_build(g_vol, (u8*)a + hdr_size +
1297 if (err < 0 || bw != val_len) {
1301 if (err >= 0)
1302 err = -EIO;
1304 "with error %i.\n", err < 0 ? err : (int)bw);
1310 return err;
1327 int asize, mpa_size, err, i;
1346 err = -ENOMEM;
1351 err = -EOPNOTSUPP;
1355 err = -EEXIST;
1360 err = -errno;
1368 err = -EOPNOTSUPP;
1373 err = -EOPNOTSUPP;
1380 err = -errno;
1400 err = -errno;
1411 err = make_room_for_attribute(m, (char*)a, asize);
1412 if (err == -ENOSPC) {
1429 err = -EOPNOTSUPP;
1432 } else if (err == -EINVAL) {
1472 /* FIXME: err = build_mapping_pairs_compressed(); */
1473 err = -EOPNOTSUPP;
1483 err = ntfs_mapping_pairs_build(g_vol, (u8*)a + hdr_size +
1486 if (err < 0 || bw != val_len) {
1490 if (err >= 0)
1491 err = -EIO;
1493 "error %lld.\n", (long long) (err < 0 ? err : bw));
1500 return err;
1516 int asize, err;
1533 err = -ENOMEM;
1538 err = -EOPNOTSUPP;
1543 err = -EEXIST;
1548 err = -errno;
1554 err = make_room_for_attribute(m, (char*)a, asize);
1555 if (err == -ENOSPC) {
1572 err = -EOPNOTSUPP;
1576 if (err == -EINVAL) {
1607 return err;
1620 int err, sd_size;
1641 err = insert_resident_attr_in_mft_record(m, AT_STANDARD_INFORMATION,
1644 if (err < 0)
1646 return err;
1797 int err;
1802 err = insert_resident_attr_in_mft_record(m, AT_OBJECT_ID, NULL,
1805 if (err < 0)
1806 ntfs_log_error("add_attr_vol_info failed: %s\n", strerror(-err));
1807 return err;
1820 int err;
1825 err = insert_non_resident_attr_in_mft_record(m,
1830 err = insert_resident_attr_in_mft_record(m,
1834 if (err < 0)
1835 ntfs_log_error("add_attr_sd failed: %s\n", strerror(-err));
1836 return err;
1848 int err;
1864 err = insert_non_resident_attr_in_mft_record(m, AT_DATA, name,
1868 err = insert_resident_attr_in_mft_record(m, AT_DATA, name,
1871 if (err < 0)
1872 ntfs_log_error("add_attr_data failed: %s\n", strerror(-err));
1873 return err;
1890 int err;
1892 err = insert_positioned_attr_in_mft_record(m, AT_DATA, name, name_len,
1894 if (err < 0)
1896 strerror(-err));
1897 return err;
1946 int err;
1952 err = insert_resident_attr_in_mft_record(m, AT_VOLUME_INFORMATION, NULL,
1955 if (err < 0)
1956 ntfs_log_error("add_attr_vol_info failed: %s\n", strerror(-err));
1957 return err;
1973 int err, val_len;
2034 err = insert_resident_attr_in_mft_record(m, AT_INDEX_ROOT, name,
2038 if (err < 0)
2039 ntfs_log_error("add_attr_index_root failed: %s\n", strerror(-err));
2040 return err;
2052 int err;
2054 err = insert_non_resident_attr_in_mft_record(m, AT_INDEX_ALLOCATION,
2057 if (err < 0)
2058 ntfs_log_error("add_attr_index_alloc failed: %s\n", strerror(-err));
2059 return err;
2071 int err;
2076 err = insert_non_resident_attr_in_mft_record(m, AT_BITMAP, name,
2080 err = insert_resident_attr_in_mft_record(m, AT_BITMAP, name,
2084 if (err < 0)
2085 ntfs_log_error("add_attr_bitmap failed: %s\n", strerror(-err));
2086 return err;
2102 int err;
2104 err = insert_positioned_attr_in_mft_record(m, AT_BITMAP, name, name_len,
2106 if (err < 0)
2108 strerror(-err));
2109 return err;
2135 int i, err, index_block_size;
2150 err = -EOPNOTSUPP;
2154 err = mkntfs_attr_lookup(AT_INDEX_ROOT, uname, uname_len, ic, 0, NULL, 0,
2157 if (err) {
2158 err = -ENOTDIR;
2163 err = -EINVAL;
2174 err = add_attr_bitmap(m, name, name_len, ic, bmp, sizeof(bmp));
2175 if (err)
2179 err = -errno;
2239 err = -errno;
2245 err = ntfs_mst_pre_write_fixup((NTFS_RECORD*)ia_val, index_block_size);
2246 if (err) {
2247 err = -errno;
2252 err = add_attr_index_alloc(m, name, name_len, ic, (u8*)ia_val,
2255 if (err) {
2266 return err;
2410 int err, i;
2412 err = 0;
2421 err = -ENOMEM;
2426 err = -EEXIST;
2520 return err;
2530 int err, sdh_size, sii_size;
2549 err = 0;
2587 if ((err = insert_index_entry_in_res_dir_index(idx_entry_sdh,
2590 if ((err = insert_index_entry_in_res_dir_index(idx_entry_sii,
2598 return err;
2608 int o_size, q1_size, q2_size, err, i;
2613 err = 0;
2636 err = insert_index_entry_in_res_dir_index(idx_entry_q1, q1_size, m,
2639 if (err)
2640 return err;
2672 err = insert_index_entry_in_res_dir_index(idx_entry_q2, q2_size, m,
2675 if (err)
2676 return err;
2702 err = insert_index_entry_in_res_dir_index(idx_entry_o, o_size, m,
2706 return err;
2721 int err, i;
2826 err = make_room_for_index_entry_in_index_block(idx, ie, i);
2827 if (err) {
2829 "failed: %s\n", strerror(-err));
2830 return err;
3075 int data_ofs, idx_size, err;
3097 err = insert_index_entry_in_res_dir_index(idx_entry_new, idx_size, m,
3100 if (err < 0) {
3102 "entry: %s\n", strerror(-err));
3103 return err;
3912 int i, err;
3948 err = ntfs_mst_pre_write_fixup((NTFS_RECORD*)idx, i);
3949 if (err) {
3973 int i, err;
3978 err = create_hardlink(g_index_block, root_ref, m,
3982 if (!err) {
3984 err = add_attr_sd(m, sd, i);
3986 if (!err)
3987 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE,
3989 if (!err)
3990 err = add_attr_vol_name(m, g_vol->vol_name, g_vol->vol_name ?
3992 if (!err) {
3997 err = add_attr_vol_info(m, fl, g_vol->major_ver,
4000 if (!err && opts.with_uuid)
4001 err = add_attr_object_id(m, volume_guid);
4002 if (err < 0) {
4004 strerror(-err));
4070 int err;
4170 err = add_attr_file_name(m, root_ref, 0LL, 0LL,
4174 if (!err) {
4176 err = add_attr_sd(m, sd, i);
4179 if (!err)
4180 err = add_attr_index_root(m, "$I30", 4, CASE_SENSITIVE,
4184 if (!err)
4185 err = upgrade_to_large_index(m, "$I30", 4, CASE_SENSITIVE,
4187 if (!err) {
4205 err = insert_file_link_in_dir_index(g_index_block, root_ref,
4211 if (err) {
4213 strerror(-err));
4219 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4221 if (!err)
4222 err = create_hardlink(g_index_block, root_ref, m,
4230 if (!err)
4231 err = add_attr_bitmap_positioned(m, NULL, 0, CASE_SENSITIVE,
4234 if (err < 0) {
4235 ntfs_log_error("Couldn't create $MFT: %s\n", strerror(-err));
4240 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4243 if (!err)
4244 err = create_hardlink(g_index_block, root_ref, m,
4250 if (err < 0) {
4252 strerror(-err));
4257 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4260 if (!err)
4261 err = create_hardlink(g_index_block, root_ref, m,
4266 if (err < 0) {
4268 strerror(-err));
4273 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE, const_cpu_to_le16(0),
4279 if (!err)
4280 err = add_attr_data(m, "$Info", 5, CASE_SENSITIVE,
4283 if (!err)
4284 err = create_hardlink(g_index_block, root_ref, m,
4290 if (!err) {
4292 err = add_attr_sd(m, sd, i);
4294 if (err < 0) {
4296 strerror(-err));
4303 if (!err)
4304 err = insert_non_resident_attr_in_mft_record(m,
4310 if (!err)
4311 err = create_hardlink(g_index_block, root_ref, m,
4318 if (err < 0) {
4319 ntfs_log_error("Couldn't create $Bitmap: %s\n", strerror(-err));
4400 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4402 if (!err)
4403 err = create_hardlink(g_index_block, root_ref, m,
4409 if (!err) {
4411 err = add_attr_sd(m, sd, i);
4413 if (err < 0) {
4415 ntfs_log_error("Couldn't create $Boot: %s\n", strerror(-err));
4447 err = add_attr_data_positioned(m, "$Bad", 4, CASE_SENSITIVE,
4450 if (!err) {
4451 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE,
4454 if (!err) {
4455 err = create_hardlink(g_index_block, root_ref, m,
4460 if (err < 0) {
4462 strerror(-err));
4469 if (!err)
4470 err = create_hardlink(g_index_block, root_ref, m,
4477 if (!err) {
4487 err = add_attr_data(m, "$SDS", 4, CASE_SENSITIVE,
4492 if (!err)
4493 err = add_attr_index_root(m, "$SDH", 4, CASE_SENSITIVE,
4497 if (!err)
4498 err = add_attr_index_root(m, "$SII", 4, CASE_SENSITIVE,
4501 if (!err)
4502 err = initialize_secure(buf_sds, buf_sds_first_size, m);
4504 if (err < 0) {
4506 strerror(-err));
4511 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE, const_cpu_to_le16(0),
4513 if (!err)
4514 err = create_hardlink(g_index_block, root_ref, m,
4522 if (err < 0) {
4523 ntfs_log_error("Couldn't create $UpCase: %s\n", strerror(-err));
4533 if (!err)
4534 err = create_hardlink(g_index_block, root_ref, m,
4540 if (!err)
4541 err = add_attr_index_root(m, "$I30", 4, CASE_SENSITIVE,
4544 if (err < 0) {
4546 strerror(-err));
4553 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE,
4555 if (!err) {
4557 err = add_attr_sd(m, sd, j);
4559 if (err < 0) {
4561 "%s\n", i, i, strerror(-err));
4573 if (!err)
4574 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4579 if (!err)
4580 err = add_attr_index_root(m, "$Q", 2, CASE_SENSITIVE, AT_UNUSED,
4583 if (!err)
4584 err = add_attr_index_root(m, "$O", 2, CASE_SENSITIVE, AT_UNUSED,
4586 if (!err)
4587 err = initialize_quota(m);
4588 if (err < 0) {
4589 ntfs_log_error("Couldn't create $Quota: %s\n", strerror(-err));
4596 if (!err)
4597 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4604 if (!err)
4605 err = add_attr_index_root(m, "$O", 2, CASE_SENSITIVE, AT_UNUSED,
4608 if (!err && opts.with_uuid)
4609 err = index_obj_id_insert(m, &vol_guid,
4611 if (err < 0) {
4613 strerror(-err));
4620 if (!err)
4621 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4627 if (!err)
4628 err = add_attr_index_root(m, "$R", 2, CASE_SENSITIVE, AT_UNUSED,
4630 if (err < 0) {
4632 strerror(-err));
4649 int i, err;
4777 err = errno;
4781 strerror(err) : "unknown error");