Lines Matching refs:err
370 int err = 0;
389 err++;
397 err++;
408 err++;
411 err++; /* display help */
422 err++;
434 err++;
444 err++;
449 err++;
471 err++;
487 err++;
492 if (!err && !ver && !lic) {
496 err++;
504 if (err)
507 return (!err && !ver && !lic);
1121 int asize, mpa_size, err, i;
1140 err = -ENOMEM;
1145 err = -EOPNOTSUPP;
1149 err = -EEXIST;
1154 err = -errno;
1162 err = -EOPNOTSUPP;
1167 err = -EOPNOTSUPP;
1183 err = -errno;
1200 err = -EINVAL;
1203 err = make_room_for_attribute(m, (char*)a, asize);
1204 if (err == -ENOSPC) {
1221 err = -EOPNOTSUPP;
1224 } else if (err == -EINVAL) {
1261 /* FIXME: err = build_mapping_pairs_compressed(); */
1262 err = -EOPNOTSUPP;
1271 err = ntfs_mapping_pairs_build(g_vol, (u8*)a + hdr_size +
1275 if (err < 0 || bw != val_len) {
1279 if (err >= 0)
1280 err = -EIO;
1282 "with error %i.\n", err < 0 ? err : (int)bw);
1288 return err;
1304 int asize, mpa_size, err, i;
1323 err = -ENOMEM;
1328 err = -EOPNOTSUPP;
1332 err = -EEXIST;
1337 err = -errno;
1345 err = -EOPNOTSUPP;
1350 err = -EOPNOTSUPP;
1357 err = -errno;
1377 err = -errno;
1388 err = make_room_for_attribute(m, (char*)a, asize);
1389 if (err == -ENOSPC) {
1406 err = -EOPNOTSUPP;
1409 } else if (err == -EINVAL) {
1449 /* FIXME: err = build_mapping_pairs_compressed(); */
1450 err = -EOPNOTSUPP;
1459 err = ntfs_mapping_pairs_build(g_vol, (u8*)a + hdr_size +
1462 if (err < 0 || bw != val_len) {
1466 if (err >= 0)
1467 err = -EIO;
1469 "error %lld.\n", (long long) (err < 0 ? err : bw));
1476 return err;
1492 int asize, err;
1509 err = -ENOMEM;
1514 err = -EOPNOTSUPP;
1519 err = -EEXIST;
1524 err = -errno;
1530 err = make_room_for_attribute(m, (char*)a, asize);
1531 if (err == -ENOSPC) {
1548 err = -EOPNOTSUPP;
1552 if (err == -EINVAL) {
1583 return err;
1596 int err, sd_size;
1617 err = insert_resident_attr_in_mft_record(m, AT_STANDARD_INFORMATION,
1619 if (err < 0)
1621 return err;
1722 int err;
1727 err = insert_resident_attr_in_mft_record(m, AT_OBJECT_ID, NULL,
1729 if (err < 0)
1730 ntfs_log_error("add_attr_vol_info failed: %s\n", strerror(-err));
1731 return err;
1746 int err;
1751 err = insert_non_resident_attr_in_mft_record(m,
1755 err = insert_resident_attr_in_mft_record(m,
1758 if (err < 0)
1759 ntfs_log_error("add_attr_sd failed: %s\n", strerror(-err));
1760 return err;
1772 int err;
1788 err = insert_non_resident_attr_in_mft_record(m, AT_DATA, name,
1791 err = insert_resident_attr_in_mft_record(m, AT_DATA, name,
1794 if (err < 0)
1795 ntfs_log_error("add_attr_data failed: %s\n", strerror(-err));
1796 return err;
1813 int err;
1815 err = insert_positioned_attr_in_mft_record(m, AT_DATA, name, name_len,
1817 if (err < 0)
1819 strerror(-err));
1820 return err;
1867 int err;
1873 err = insert_resident_attr_in_mft_record(m, AT_VOLUME_INFORMATION, NULL,
1875 if (err < 0)
1876 ntfs_log_error("add_attr_vol_info failed: %s\n", strerror(-err));
1877 return err;
1893 int err, val_len;
1953 err = insert_resident_attr_in_mft_record(m, AT_INDEX_ROOT, name,
1956 if (err < 0)
1957 ntfs_log_error("add_attr_index_root failed: %s\n", strerror(-err));
1958 return err;
1970 int err;
1972 err = insert_non_resident_attr_in_mft_record(m, AT_INDEX_ALLOCATION,
1975 if (err < 0)
1976 ntfs_log_error("add_attr_index_alloc failed: %s\n", strerror(-err));
1977 return err;
1989 int err;
1994 err = insert_non_resident_attr_in_mft_record(m, AT_BITMAP, name,
1997 err = insert_resident_attr_in_mft_record(m, AT_BITMAP, name,
2000 if (err < 0)
2001 ntfs_log_error("add_attr_bitmap failed: %s\n", strerror(-err));
2002 return err;
2018 int err;
2020 err = insert_positioned_attr_in_mft_record(m, AT_BITMAP, name, name_len,
2022 if (err < 0)
2024 strerror(-err));
2025 return err;
2051 int i, err, index_block_size;
2066 err = -EOPNOTSUPP;
2070 err = mkntfs_attr_lookup(AT_INDEX_ROOT, uname, uname_len, ic, 0, NULL, 0,
2073 if (err) {
2074 err = -ENOTDIR;
2079 err = -EINVAL;
2090 err = add_attr_bitmap(m, name, name_len, ic, bmp, sizeof(bmp));
2091 if (err)
2095 err = -errno;
2155 err = -errno;
2160 err = ntfs_mst_pre_write_fixup((NTFS_RECORD*)ia_val, index_block_size);
2161 if (err) {
2162 err = -errno;
2167 err = add_attr_index_alloc(m, name, name_len, ic, (u8*)ia_val,
2170 if (err) {
2181 return err;
2325 int err, i;
2327 err = 0;
2336 err = -ENOMEM;
2341 err = -EEXIST;
2423 return err;
2433 int err, sdh_size, sii_size;
2452 err = 0;
2490 if ((err = insert_index_entry_in_res_dir_index(idx_entry_sdh,
2493 if ((err = insert_index_entry_in_res_dir_index(idx_entry_sii,
2501 return err;
2511 int o_size, q1_size, q2_size, err, i;
2516 err = 0;
2539 err = insert_index_entry_in_res_dir_index(idx_entry_q1, q1_size, m,
2542 if (err)
2543 return err;
2575 err = insert_index_entry_in_res_dir_index(idx_entry_q2, q2_size, m,
2578 if (err)
2579 return err;
2605 err = insert_index_entry_in_res_dir_index(idx_entry_o, o_size, m,
2609 return err;
2624 int err, i;
2719 err = make_room_for_index_entry_in_index_block(idx, ie, i);
2720 if (err) {
2722 "failed: %s\n", strerror(-err));
2723 return err;
2967 int data_ofs, idx_size, err;
2989 err = insert_index_entry_in_res_dir_index(idx_entry_new, idx_size, m,
2992 if (err < 0) {
2994 "entry: %s\n", strerror(-err));
2995 return err;
3815 int i, err;
3851 err = ntfs_mst_pre_write_fixup((NTFS_RECORD*)idx, i);
3852 if (err) {
3879 int i, err;
3884 err = create_hardlink(g_index_block, root_ref, m,
3888 if (!err) {
3890 err = add_attr_sd(m, sd, i);
3892 if (!err)
3893 err = add_attr_data(m, NULL, 0, 0, 0, NULL, 0);
3894 if (!err)
3895 err = add_attr_vol_name(m, g_vol->vol_name, g_vol->vol_name ?
3897 if (!err) {
3902 err = add_attr_vol_info(m, fl, g_vol->major_ver,
3906 if (!err)
3907 err = add_attr_object_id(m, volume_guid);
3909 if (err < 0) {
3911 strerror(-err));
3979 int err;
4079 err = add_attr_file_name(m, root_ref, 0LL, 0LL,
4083 if (!err) {
4085 err = add_attr_sd(m, sd, i);
4088 if (!err)
4089 err = add_attr_index_root(m, "$I30", 4, 0, AT_FILE_NAME,
4092 if (!err)
4093 err = upgrade_to_large_index(m, "$I30", 4, 0, &g_index_block);
4094 if (!err) {
4112 err = insert_file_link_in_dir_index(g_index_block, root_ref,
4118 if (err) {
4120 strerror(-err));
4126 err = add_attr_data_positioned(m, NULL, 0, 0, 0, g_rl_mft, g_buf,
4128 if (!err)
4129 err = create_hardlink(g_index_block, root_ref, m,
4135 if (!err)
4136 err = add_attr_bitmap_positioned(m, NULL, 0, 0, g_rl_mft_bmp,
4138 if (err < 0) {
4139 ntfs_log_error("Couldn't create $MFT: %s\n", strerror(-err));
4144 err = add_attr_data_positioned(m, NULL, 0, 0, 0, g_rl_mftmirr, g_buf,
4146 if (!err)
4147 err = create_hardlink(g_index_block, root_ref, m,
4153 if (err < 0) {
4155 strerror(-err));
4164 err = add_attr_data_positioned(m, NULL, 0, 0, 0, g_rl_logfile, buf_log,
4168 if (!err)
4169 err = create_hardlink(g_index_block, root_ref, m,
4174 if (err < 0) {
4176 strerror(-err));
4181 err = add_attr_data(m, NULL, 0, 0, 0, (u8*)g_vol->attrdef,
4183 if (!err)
4184 err = create_hardlink(g_index_block, root_ref, m,
4190 if (!err) {
4192 err = add_attr_sd(m, sd, i);
4194 if (err < 0) {
4196 strerror(-err));
4203 if (!err)
4204 err = insert_non_resident_attr_in_mft_record(m,
4209 if (!err)
4210 err = create_hardlink(g_index_block, root_ref, m,
4217 if (err < 0) {
4218 ntfs_log_error("Couldn't create $Bitmap: %s\n", strerror(-err));
4299 err = add_attr_data_positioned(m, NULL, 0, 0, 0, g_rl_boot, (u8*)bs,
4301 if (!err)
4302 err = create_hardlink(g_index_block, root_ref, m,
4308 if (!err) {
4310 err = add_attr_sd(m, sd, i);
4312 if (err < 0) {
4314 ntfs_log_error("Couldn't create $Boot: %s\n", strerror(-err));
4344 err = add_attr_data_positioned(m, "$Bad", 4, 0, 0, g_rl_bad, NULL,
4346 if (!err) {
4347 err = add_attr_data(m, NULL, 0, 0, 0, NULL, 0);
4349 if (!err) {
4350 err = create_hardlink(g_index_block, root_ref, m,
4355 if (err < 0) {
4357 strerror(-err));
4364 if (!err)
4365 err = create_hardlink(g_index_block, root_ref, m,
4372 if (!err) {
4382 err = add_attr_data(m, "$SDS", 4, 0, 0, (u8*)buf_sds,
4386 if (!err)
4387 err = add_attr_index_root(m, "$SDH", 4, 0, AT_UNUSED,
4391 if (!err)
4392 err = add_attr_index_root(m, "$SII", 4, 0, AT_UNUSED,
4394 if (!err)
4395 err = initialize_secure(buf_sds, buf_sds_first_size, m);
4397 if (err < 0) {
4399 strerror(-err));
4404 err = add_attr_data(m, NULL, 0, 0, 0, (u8*)g_vol->upcase,
4406 if (!err)
4407 err = create_hardlink(g_index_block, root_ref, m,
4415 if (err < 0) {
4416 ntfs_log_error("Couldn't create $UpCase: %s\n", strerror(-err));
4426 if (!err)
4427 err = create_hardlink(g_index_block, root_ref, m,
4433 if (!err)
4434 err = add_attr_index_root(m, "$I30", 4, 0, AT_FILE_NAME,
4436 if (err < 0) {
4438 strerror(-err));
4445 err = add_attr_data(m, NULL, 0, 0, 0, NULL, 0);
4446 if (!err) {
4448 err = add_attr_sd(m, sd, j);
4450 if (err < 0) {
4452 "%s\n", i, i, strerror(-err));
4464 if (!err)
4465 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4470 if (!err)
4471 err = add_attr_index_root(m, "$Q", 2, 0, AT_UNUSED,
4474 if (!err)
4475 err = add_attr_index_root(m, "$O", 2, 0, AT_UNUSED,
4477 if (!err)
4478 err = initialize_quota(m);
4479 if (err < 0) {
4480 ntfs_log_error("Couldn't create $Quota: %s\n", strerror(-err));
4487 if (!err)
4488 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4495 if (!err)
4496 err = add_attr_index_root(m, "$O", 2, 0, AT_UNUSED,
4500 if (!err)
4501 err = index_obj_id_insert(m, &g_vol->guid,
4504 if (err < 0) {
4506 strerror(-err));
4513 if (!err)
4514 err = create_hardlink_res((MFT_RECORD*)(g_buf +
4520 if (!err)
4521 err = add_attr_index_root(m, "$R", 2, 0, AT_UNUSED,
4523 if (err < 0) {
4525 strerror(-err));
4541 int i, err;
4659 err = errno;
4663 strerror(err) : "unknown error");