Lines Matching defs:err
625 int err = 0;
644 err++;
652 err++;
663 err++;
677 err++;
689 err++;
699 err++;
704 err++;
729 err++;
745 err++;
750 if (!err && !help && !ver && !lic) {
754 err++;
762 if (err || help)
766 return (err ? 1 : (help || ver || lic ? 0 : -1));
1437 int asize, mpa_size, err, i;
1456 err = -ENOMEM;
1461 err = -EOPNOTSUPP;
1465 err = -EEXIST;
1470 err = -errno;
1478 err = -EOPNOTSUPP;
1483 err = -EOPNOTSUPP;
1499 err = -errno;
1516 err = -EINVAL;
1519 err = make_room_for_attribute(m, (char*)a, asize);
1520 if (err == -ENOSPC) {
1537 err = -EOPNOTSUPP;
1540 } else if (err == -EINVAL) {
1577 /* FIXME: err = build_mapping_pairs_compressed(); */
1578 err = -EOPNOTSUPP;
1594 err = ntfs_mapping_pairs_build(g_vol, (u8*)a + hdr_size +
1598 if (err < 0 || bw != val_len) {
1602 if (err >= 0)
1603 err = -EIO;
1605 "with error %i.\n", err < 0 ? err : (int)bw);
1611 return err;
1628 int asize, mpa_size, err, i;
1647 err = -ENOMEM;
1652 err = -EOPNOTSUPP;
1656 err = -EEXIST;
1661 err = -errno;
1669 err = -EOPNOTSUPP;
1674 err = -EOPNOTSUPP;
1681 err = -errno;
1701 err = -errno;
1712 err = make_room_for_attribute(m, (char*)a, asize);
1713 if (err == -ENOSPC) {
1730 err = -EOPNOTSUPP;
1733 } else if (err == -EINVAL) {
1773 /* FIXME: err = build_mapping_pairs_compressed(); */
1774 err = -EOPNOTSUPP;
1784 err = ntfs_mapping_pairs_build(g_vol, (u8*)a + hdr_size +
1787 if (err < 0 || bw != val_len) {
1791 if (err >= 0)
1792 err = -EIO;
1794 "error %lld.\n", (long long) (err < 0 ? err : bw));
1801 return err;
1817 int asize, err;
1834 err = -ENOMEM;
1839 err = -EOPNOTSUPP;
1844 err = -EEXIST;
1849 err = -errno;
1855 err = make_room_for_attribute(m, (char*)a, asize);
1856 if (err == -ENOSPC) {
1873 err = -EOPNOTSUPP;
1877 if (err == -EINVAL) {
1908 return err;
1921 int err, sd_size;
1942 err = insert_resident_attr_in_mft_record(m, AT_STANDARD_INFORMATION,
1945 if (err < 0)
1947 return err;
2098 int err;
2103 err = insert_resident_attr_in_mft_record(m, AT_OBJECT_ID, NULL,
2106 if (err < 0)
2107 ntfs_log_error("add_attr_vol_info failed: %s\n", strerror(-err));
2108 return err;
2121 int err;
2126 err = insert_non_resident_attr_in_mft_record(m,
2131 err = insert_resident_attr_in_mft_record(m,
2135 if (err < 0)
2136 ntfs_log_error("add_attr_sd failed: %s\n", strerror(-err));
2137 return err;
2149 int err;
2165 err = insert_non_resident_attr_in_mft_record(m, AT_DATA, name,
2169 err = insert_resident_attr_in_mft_record(m, AT_DATA, name,
2172 if (err < 0)
2173 ntfs_log_error("add_attr_data failed: %s\n", strerror(-err));
2174 return err;
2191 int err;
2193 err = insert_positioned_attr_in_mft_record(m, AT_DATA, name, name_len,
2195 if (err < 0)
2197 strerror(-err));
2198 return err;
2247 int err;
2253 err = insert_resident_attr_in_mft_record(m, AT_VOLUME_INFORMATION, NULL,
2256 if (err < 0)
2257 ntfs_log_error("add_attr_vol_info failed: %s\n", strerror(-err));
2258 return err;
2274 int err, val_len;
2335 err = insert_resident_attr_in_mft_record(m, AT_INDEX_ROOT, name,
2339 if (err < 0)
2340 ntfs_log_error("add_attr_index_root failed: %s\n", strerror(-err));
2341 return err;
2353 int err;
2355 err = insert_non_resident_attr_in_mft_record(m, AT_INDEX_ALLOCATION,
2358 if (err < 0)
2359 ntfs_log_error("add_attr_index_alloc failed: %s\n", strerror(-err));
2360 return err;
2372 int err;
2377 err = insert_non_resident_attr_in_mft_record(m, AT_BITMAP, name,
2381 err = insert_resident_attr_in_mft_record(m, AT_BITMAP, name,
2385 if (err < 0)
2386 ntfs_log_error("add_attr_bitmap failed: %s\n", strerror(-err));
2387 return err;
2403 int err;
2405 err = insert_positioned_attr_in_mft_record(m, AT_BITMAP, name, name_len,
2407 if (err < 0)
2409 strerror(-err));
2410 return err;
2436 int i, err, index_block_size;
2451 err = -EOPNOTSUPP;
2455 err = mkntfs_attr_lookup(AT_INDEX_ROOT, uname, uname_len, ic, 0, NULL, 0,
2458 if (err) {
2459 err = -ENOTDIR;
2464 err = -EINVAL;
2475 err = add_attr_bitmap(m, name, name_len, ic, bmp, sizeof(bmp));
2476 if (err)
2480 err = -errno;
2540 err = -errno;
2546 err = ntfs_mst_pre_write_fixup((NTFS_RECORD*)ia_val, index_block_size);
2547 if (err) {
2548 err = -errno;
2553 err = add_attr_index_alloc(m, name, name_len, ic, (u8*)ia_val,
2556 if (err) {
2567 return err;
2711 int err, i;
2713 err = 0;
2722 err = -ENOMEM;
2727 err = -EEXIST;
2821 return err;
2831 int err, sdh_size, sii_size;
2850 err = 0;
2888 if ((err = insert_index_entry_in_res_dir_index(idx_entry_sdh,
2891 if ((err = insert_index_entry_in_res_dir_index(idx_entry_sii,
2899 return err;
2909 int o_size, q1_size, q2_size, err, i;
2914 err = 0;
2937 err = insert_index_entry_in_res_dir_index(idx_entry_q1, q1_size, m,
2940 if (err)
2941 return err;
2973 err = insert_index_entry_in_res_dir_index(idx_entry_q2, q2_size, m,
2976 if (err)
2977 return err;
3003 err = insert_index_entry_in_res_dir_index(idx_entry_o, o_size, m,
3007 return err;
3022 int err, i;
3127 err = make_room_for_index_entry_in_index_block(idx, ie, i);
3128 if (err) {
3130 "failed: %s\n", strerror(-err));
3131 return err;
3376 int data_ofs, idx_size, err;
3399 err = insert_index_entry_in_res_dir_index(idx_entry_new, idx_size, m,
3402 if (err < 0) {
3404 "entry: %s\n", strerror(-err));
3405 return err;
4232 int i, err;
4268 err = ntfs_mst_pre_write_fixup((NTFS_RECORD*)idx, i);
4269 if (err) {
4293 int i, err;
4298 err = create_hardlink(g_index_block, root_ref, m,
4302 if (!err) {
4304 err = add_attr_sd(m, sd, i);
4306 if (!err)
4307 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE,
4309 if (!err)
4310 err = add_attr_vol_name(m, g_vol->vol_name, g_vol->vol_name ?
4312 if (!err) {
4317 err = add_attr_vol_info(m, fl, g_vol->major_ver,
4320 if (!err && opts.with_uuid)
4321 err = add_attr_object_id(m, volume_guid);
4322 if (err < 0) {
4324 strerror(-err));
4390 int err;
4491 err = add_attr_file_name(m, root_ref, 0LL, 0LL,
4495 if (!err) {
4497 err = add_attr_sd(m, sd, i);
4500 if (!err)
4501 err = add_attr_index_root(m, "$I30", 4, CASE_SENSITIVE,
4505 if (!err)
4506 err = upgrade_to_large_index(m, "$I30", 4, CASE_SENSITIVE,
4508 if (!err) {
4526 err = insert_file_link_in_dir_index(g_index_block, root_ref,
4532 if (err) {
4534 strerror(-err));
4540 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4542 if (!err)
4543 err = create_hardlink(g_index_block, root_ref, m,
4551 if (!err)
4552 err = add_attr_bitmap_positioned(m, NULL, 0, CASE_SENSITIVE,
4555 if (err < 0) {
4556 ntfs_log_error("Couldn't create $MFT: %s\n", strerror(-err));
4561 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4564 if (!err)
4565 err = create_hardlink(g_index_block, root_ref, m,
4571 if (err < 0) {
4573 strerror(-err));
4578 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4581 if (!err)
4582 err = create_hardlink(g_index_block, root_ref, m,
4587 if (err < 0) {
4589 strerror(-err));
4594 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE, const_cpu_to_le16(0),
4596 if (!err)
4597 err = create_hardlink(g_index_block, root_ref, m,
4603 if (!err) {
4605 err = add_attr_sd(m, sd, i);
4607 if (err < 0) {
4609 strerror(-err));
4616 if (!err)
4617 err = insert_non_resident_attr_in_mft_record(m,
4623 if (!err)
4624 err = create_hardlink(g_index_block, root_ref, m,
4631 if (err < 0) {
4632 ntfs_log_error("Couldn't create $Bitmap: %s\n", strerror(-err));
4716 err = add_attr_data_positioned(m, NULL, 0, CASE_SENSITIVE,
4718 if (!err)
4719 err = create_hardlink(g_index_block, root_ref, m,
4725 if (!err) {
4727 err = add_attr_sd(m, sd, i);
4729 if (err < 0) {
4731 ntfs_log_error("Couldn't create $Boot: %s\n", strerror(-err));
4763 err = add_attr_data_positioned(m, "$Bad", 4, CASE_SENSITIVE,
4766 if (!err) {
4767 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE,
4770 if (!err) {
4771 err = create_hardlink(g_index_block, root_ref, m,
4776 if (err < 0) {
4778 strerror(-err));
4785 if (!err)
4786 err = create_hardlink(g_index_block, root_ref, m,
4793 if (!err) {
4803 err = add_attr_data(m, "$SDS", 4, CASE_SENSITIVE,
4808 if (!err)
4809 err = add_attr_index_root(m, "$SDH", 4, CASE_SENSITIVE,
4813 if (!err)
4814 err = add_attr_index_root(m, "$SII", 4, CASE_SENSITIVE,
4817 if (!err)
4818 err = initialize_secure(buf_sds, buf_sds_first_size, m);
4820 if (err < 0) {
4822 strerror(-err));
4827 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE, const_cpu_to_le16(0),
4833 if (!err)
4834 err = add_attr_data(m, "$Info", 5, CASE_SENSITIVE,
4837 if (!err)
4838 err = create_hardlink(g_index_block, root_ref, m,
4846 if (err < 0) {
4847 ntfs_log_error("Couldn't create $UpCase: %s\n", strerror(-err));
4857 if (!err)
4858 err = create_hardlink(g_index_block, root_ref, m,
4864 if (!err)
4865 err = add_attr_index_root(m, "$I30", 4, CASE_SENSITIVE,
4868 if (err < 0) {
4870 strerror(-err));
4877 err = add_attr_data(m, NULL, 0, CASE_SENSITIVE,
4879 if (!err) {
4881 err = add_attr_sd(m, sd, j);
4883 if (err < 0) {
4885 "%s\n", i, i, strerror(-err));
4897 if (!err)
4898 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4903 if (!err)
4904 err = add_attr_index_root(m, "$Q", 2, CASE_SENSITIVE, AT_UNUSED,
4907 if (!err)
4908 err = add_attr_index_root(m, "$O", 2, CASE_SENSITIVE, AT_UNUSED,
4910 if (!err)
4911 err = initialize_quota(m);
4912 if (err < 0) {
4913 ntfs_log_error("Couldn't create $Quota: %s\n", strerror(-err));
4920 if (!err)
4921 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4928 if (!err)
4929 err = add_attr_index_root(m, "$O", 2, CASE_SENSITIVE, AT_UNUSED,
4932 if (!err && opts.with_uuid)
4933 err = index_obj_id_insert(m, &vol_guid,
4935 if (err < 0) {
4937 strerror(-err));
4944 if (!err)
4945 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4951 if (!err)
4952 err = add_attr_index_root(m, "$R", 2, CASE_SENSITIVE, AT_UNUSED,
4954 if (err < 0) {
4956 strerror(-err));
4973 int i, err;
5101 err = errno;
5105 strerror(err) : "unknown error");