/osnet-11/usr/src/lib/libntfs/common/libntfs/ |
H A D | volume.c | 80 ntfs_volume *vol; local 83 vol = calloc(1, sizeof(ntfs_volume)); 84 if (vol) { 86 INIT_LIST_HEAD(&vol->inode_cache[i]); 88 return vol; 171 * @vol: ntfs volume whose $MFT to load 173 * Load $MFT from @vol and setup @vol with it. After calling this function the 174 * volume @vol is ready for use by all read access functions provided by the 179 static int ntfs_mft_load(ntfs_volume *vol) argument 383 ntfs_mftmirr_load(ntfs_volume *vol) argument 444 ntfs_volume *vol; local 633 ntfs_volume_check_logfile(ntfs_volume *vol) argument 671 ntfs_hiberfile_open(ntfs_volume *vol) argument 726 ntfs_volume_check_hiberfile(ntfs_volume *vol) argument 785 ntfs_volume_get_nr_free_mft_records(ntfs_volume *vol) argument 826 ntfs_volume_get_nr_free_clusters(ntfs_volume *vol) argument 893 ntfs_volume *vol; local 1322 ntfs_volume *vol; local 1372 ntfs_device_umount(ntfs_volume *vol, const BOOL force __attribute__((unused))) argument 1405 ntfs_umount(ntfs_volume *vol, const BOOL force __attribute__((unused))) argument 1544 ntfs_version_is_supported(ntfs_volume *vol) argument 1584 ntfs_logfile_reset(ntfs_volume *vol) argument 1631 ntfs_volume_write_flags(ntfs_volume *vol, const le16 flags) argument [all...] |
H A D | lcnalloc.c | 49 * @vol: mounted ntfs volume on which to allocate the clusters 57 * @vol. @zone is either DATA_ZONE for allocation of normal clusters and 103 runlist *ntfs_cluster_alloc(ntfs_volume *vol, VCN start_vcn, s64 count, argument 117 if (!vol || count < 0 || start_lcn < -1 || !vol->lcnbmp_na || 160 zone_start = vol->data1_zone_pos; 162 zone_start = vol->mft_zone_pos; 170 } else if (zone == DATA_ZONE && zone_start >= vol->mft_zone_start && 171 zone_start < vol->mft_zone_end) { 172 zone_start = vol 718 ntfs_cluster_free_from_rl(ntfs_volume *vol, runlist *rl) argument 754 ntfs_cluster_free(ntfs_volume *vol, ntfs_attr *na, VCN start_vcn, s64 count) argument [all...] |
H A D | bootsect.c | 169 * @vol: ntfs_volume to setup 172 * Parse the ntfs bootsector @bs and setup the ntfs volume @vol with the 177 int ntfs_boot_sector_parse(ntfs_volume *vol, const NTFS_BOOT_SECTOR *bs) argument 185 vol->sector_size = le16_to_cpu(bs->bpb.bytes_per_sector); 186 vol->sector_size_bits = ffs(vol->sector_size) - 1; 187 ntfs_log_debug("SectorSize = 0x%x\n", vol->sector_size); 188 ntfs_log_debug("SectorSizeBits = %u\n", vol->sector_size_bits); 201 vol->u.dev->d_name); 204 vol [all...] |
H A D | mft.c | 57 * @vol: volume to read from 62 * Read @count mft records starting at @mref from volume @vol into buffer 74 * NOTE: @b has to be at least of size @count * vol->mft_record_size. 76 int ntfs_mft_records_read(const ntfs_volume *vol, const MFT_REF mref, argument 83 if (!vol || !vol->mft_na || !b || count < 0) { 89 if (m + count > vol->mft_na->initialized_size >> 90 vol->mft_record_size_bits) { 94 br = ntfs_attr_mst_pread(vol->mft_na, m << vol 133 ntfs_mft_records_write(const ntfs_volume *vol, const MFT_REF mref, const s64 count, MFT_RECORD *b) argument 230 ntfs_file_record_read(const ntfs_volume *vol, const MFT_REF mref, MFT_RECORD **mrec, ATTR_RECORD **attr) argument 285 ntfs_mft_record_layout(const ntfs_volume *vol, const MFT_REF mref, MFT_RECORD *mrec) argument 361 ntfs_mft_record_format(const ntfs_volume *vol, const MFT_REF mref) argument 425 ntfs_mft_bitmap_find_free_rec(ntfs_volume *vol, ntfs_inode *base_ni) argument 555 ntfs_mft_bitmap_extend_allocation(ntfs_volume *vol) argument 797 ntfs_mft_bitmap_extend_initialized(ntfs_volume *vol) argument 888 ntfs_mft_data_extend_allocation(ntfs_volume *vol) argument 1187 ntfs_mft_record_alloc(ntfs_volume *vol, ntfs_inode *base_ni) argument 1498 ntfs_mft_record_free(ntfs_volume *vol, ntfs_inode *ni) argument [all...] |
H A D | collate.c | 39 * @vol: unused 49 static int ntfs_collate_binary(ntfs_volume *vol __attribute__((unused)), 69 * @vol: unused 79 static int ntfs_collate_ntofs_ulong(ntfs_volume *vol __attribute__((unused)), 107 * @vol: 117 static int ntfs_collate_file_name(ntfs_volume *vol, argument 125 IGNORE_CASE, vol->upcase, vol->upcase_len); 129 vol->upcase, vol 193 ntfs_collate(ntfs_volume *vol, COLLATION_RULES cr, const void *data1, size_t data1_len, const void *data2, size_t data2_len) argument [all...] |
H A D | bitmap.c | 62 ntfs_volume *vol = na->ni->vol; local 192 if (na == vol->mftbmp_na) { 194 vol->nr_free_mft_records -= count; 196 vol->nr_free_mft_records += count; 198 if (na == vol->lcnbmp_na) { 200 vol->nr_free_clusters -= count; 202 vol->nr_free_clusters += count;
|
H A D | dir.c | 109 ntfs_volume *vol = dir_ni->vol; local 178 CASE_SENSITIVE, vol->upcase, vol->upcase_len)) { 195 if (!mref && !NVolCaseSensitive(vol) && 199 IGNORE_CASE, vol->upcase, vol->upcase_len)) 208 IGNORE_CASE, vol->upcase, vol->upcase_len); 227 CASE_SENSITIVE, vol 488 ntfs_pathname_to_inode_num(ntfs_volume *vol, ntfs_inode *parent, const char *pathname) argument 581 ntfs_pathname_to_inode(ntfs_volume *vol, ntfs_inode *parent, const char *pathname) argument 610 ntfs_filldir(ntfs_volume *vol, s64 *pos, INDEX_ENTRY *ie, void *dirent, ntfs_filldir_t filldir) argument 720 ntfs_volume *vol; local [all...] |
H A D | attrib.c | 86 * @vol: 94 s64 ntfs_get_attribute_value(const ntfs_volume *vol, argument 102 if (!vol || !a || !b) { 144 rl = ntfs_mapping_pairs_decompress(vol, a, NULL); 162 if (total + (rl[i].length << vol->cluster_size_bits) >= 171 * rl[i].length << vol->cluster_size_bits, do the 180 vol->cluster_size_bits); 198 r = ntfs_pread(vol->u.dev, rl[i].lcn << 199 vol->cluster_size_bits, rl[i].length << 200 vol 323 ntfs_volume *vol = na->ni->vol; local 620 ntfs_volume *vol = na->ni->vol; local 869 ntfs_volume *vol; local 1041 ntfs_volume *vol; local 1675 ntfs_volume *vol; local 1880 ntfs_volume *vol; local 2290 ntfs_volume *vol; local 2417 ntfs_attr_find_in_attrdef(const ntfs_volume *vol, const ATTR_TYPES type) argument 2457 ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPES type, const s64 size) argument 2506 ntfs_attr_can_be_non_resident(const ntfs_volume *vol, const ATTR_TYPES type) argument 2545 ntfs_attr_can_be_resident(const ntfs_volume *vol, const ATTR_TYPES type) argument 3618 ntfs_volume *vol = na->ni->vol; local 3796 ntfs_volume *vol; local 4035 ntfs_volume *vol = na->ni->vol; local 4747 ntfs_volume *vol; local 4888 ntfs_volume *vol; local [all...] |
H A D | runlist.c | 708 * @vol: ntfs volume on which the attribute resides 733 runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol, argument 858 if (vol->major_ver < 3) { 897 vol->cluster_size - 1) >> 898 vol->cluster_size_bits) - 1; 1013 * @vol: ntfs volume to read from 1019 * This function will read @count bytes from the volume @vol to the data buffer 1035 s64 ntfs_rl_pread(const ntfs_volume *vol, const runlist_element *rl, argument 1041 if (!vol || !rl || pos < 0 || count < 0) { 1049 vol 1119 ntfs_rl_pwrite(const ntfs_volume *vol, const runlist_element *rl, const s64 pos, s64 count, void *b) argument 1220 ntfs_rl_fill_zero(const ntfs_volume *vol, const runlist *rl, s64 pos, const s64 count) argument 1304 ntfs_get_size_for_mapping_pairs(const ntfs_volume *vol, const runlist_element *rl, const VCN start_vcn) argument 1473 ntfs_mapping_pairs_build(const ntfs_volume *vol, u8 *dst, const int dst_len, const runlist_element *rl, const VCN start_vcn, VCN *const stop_vcn) argument 1713 ntfs_rl_get_compressed_size(ntfs_volume *vol, runlist *rl) argument 2062 test_rl_frag_combine(ntfs_volume *vol, ATTR_RECORD *attr1, ATTR_RECORD *attr2, ATTR_RECORD *attr3) argument 2097 ntfs_volume vol; local [all...] |
/osnet-11/usr/src/lib/libntfs/common/include/ntfs/ |
H A D | mft.h | 30 extern int ntfs_mft_records_read(const ntfs_volume *vol, const MFT_REF mref, 35 * @vol: volume to read from 39 * Read the mft record specified by @mref from volume @vol into buffer @b. 46 * NOTE: @b has to be at least of size vol->mft_record_size. 48 static __inline__ int ntfs_mft_record_read(const ntfs_volume *vol, argument 51 return ntfs_mft_records_read(vol, mref, 1, b); 54 extern int ntfs_file_record_read(const ntfs_volume *vol, const MFT_REF mref, 57 extern int ntfs_mft_records_write(const ntfs_volume *vol, const MFT_REF mref, 62 * @vol: volume to write to 66 * Write the mft record specified by @mref from buffer @b to volume @vol 75 ntfs_mft_record_write(const ntfs_volume *vol, const MFT_REF mref, MFT_RECORD *b) argument [all...] |
H A D | lcnalloc.h | 41 extern runlist *ntfs_cluster_alloc(ntfs_volume *vol, VCN start_vcn, s64 count, 44 extern int ntfs_cluster_free_from_rl(ntfs_volume *vol, runlist *rl); 46 extern int ntfs_cluster_free(ntfs_volume *vol, ntfs_attr *na, VCN start_vcn,
|
H A D | bootsect.h | 43 extern int ntfs_boot_sector_parse(ntfs_volume *vol,
|
H A D | runlist.h | 54 extern s64 ntfs_rl_pread(const ntfs_volume *vol, const runlist_element *rl, 56 extern s64 ntfs_rl_pwrite(const ntfs_volume *vol, const runlist_element *rl, 59 extern int ntfs_rl_fill_zero(const ntfs_volume *vol, const runlist *rl, 65 extern runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol, 70 extern int ntfs_get_size_for_mapping_pairs(const ntfs_volume *vol, 76 extern int ntfs_mapping_pairs_build(const ntfs_volume *vol, u8 *dst, 83 extern s64 ntfs_rl_get_compressed_size(ntfs_volume *vol, runlist *rl);
|
H A D | collate.h | 34 extern int ntfs_collate(ntfs_volume *vol, COLLATION_RULES cr,
|
/osnet-11/usr/src/cmd/ntfsprogs/ |
H A D | ntfsfix.c | 174 static int OLD_ntfs_volume_set_flags(ntfs_volume *vol, const le16 flags) argument 182 if (!vol) { 186 if (ntfs_file_record_read(vol, FILE_Volume, &m, NULL)) { 231 vol->flags = c->flags = flags; 232 if (ntfs_mft_record_write(vol, FILE_Volume, m)) { 247 static int set_dirty_flag(ntfs_volume *vol) argument 251 if (NVolWasDirty(vol)) 258 flags = vol->flags | VOLUME_IS_DIRTY; 259 if (OLD_ntfs_volume_set_flags(vol, flags)) { 264 vol 273 empty_journal(ntfs_volume *vol) argument 290 fix_mftmirr(ntfs_volume *vol) argument 440 ntfs_volume *vol; local 479 ntfs_volume *vol; local [all...] |
H A D | ntfsresize.c | 183 ntfs_volume *vol; member in struct:__anon68 563 static void print_advise(ntfs_volume *vol, s64 supp_lcn) argument 567 old_b = vol->nr_clusters * vol->cluster_size; 574 if (supp_lcn > vol->nr_clusters) { 581 new_b = supp_lcn * vol->cluster_size; 583 freed_b = (vol->nr_clusters - supp_lcn + 1) * vol->cluster_size; 749 print_advise(resize->vol, lcn + lcn_length - 1); 774 static void build_lcn_usage_bitmap(ntfs_volume *vol, ntfsck_ argument 858 walk_attributes(ntfs_volume *vol, ntfsck_t *fsck) argument 879 compare_bitmaps(ntfs_volume *vol, struct bitmap *a) argument 1001 build_allocation_bitmap(ntfs_volume *vol, ntfsck_t *fsck) argument 1143 replace_attribute_runlist(ntfs_volume *vol, ntfs_attr_search_ctx *ctx, runlist *rl) argument 1409 lseek_to_cluster(ntfs_volume *vol, s64 lcn) argument 1421 ntfs_volume *vol = resize->vol; local 1754 print_hint(ntfs_volume *vol, const char *s, struct llcn_t llcn) argument 1776 ntfs_volume *vol = resize->vol; local 1870 ntfs_volume *vol = resize->vol; local 1902 ntfs_volume *vol = resize->vol; local 1941 ntfs_volume *vol = resize->vol; local 1988 lookup_data_attr(ntfs_volume *vol, MFT_REF mref, const char *aname, ntfs_attr_search_ctx **ctx) argument 2014 check_bad_sectors(ntfs_volume *vol) argument 2144 ntfs_volume *vol = r->vol; local 2198 print_disk_usage(ntfs_volume *vol, s64 nr_used_clusters) argument 2230 ntfs_volume *vol = NULL; local 2296 prepare_volume_fixup(ntfs_volume *vol) argument 2352 check_cluster_allocation(ntfs_volume *vol, ntfsck_t *fsck) argument 2384 ntfs_volume *vol; local [all...] |
H A D | utils.h | 49 int utils_attr_get_name(ntfs_volume *vol, ATTR_RECORD *attr, char *buffer, int bufsize); 50 int utils_cluster_in_use(ntfs_volume *vol, long long lcn); 51 int utils_mftrec_in_use(ntfs_volume *vol, MFT_REF mref); 82 ntfs_volume *vol; member in struct:mft_search_ctx 86 struct mft_search_ctx * mft_get_search_ctx(ntfs_volume *vol);
|
H A D | ntfscluster.c | 279 static int info(ntfs_volume *vol) argument 292 m_ctx = mft_get_search_ctx(vol); 308 rl = ntfs_mapping_pairs_decompress(vol, rec, NULL); 328 cb = vol->cluster_size_bits; 329 sb = vol->sector_size_bits; 332 fc = vol->nr_clusters-mc-uc; 337 a = vol->sector_size; 338 b = vol->cluster_size; 340 d = vol->nr_clusters << cb; 341 e = vol 387 dump_file(ntfs_volume *vol, ntfs_inode *ino) argument 484 ntfs_volume *vol; local [all...] |
H A D | utils.c | 211 ntfs_volume *vol; local 221 vol = ntfs_mount(device, flags); 222 if (!vol) { 239 if (NVolWasDirty(vol)) { 242 ntfs_umount(vol, FALSE); 248 return vol; 458 ntfs_volume *vol; local 472 vol = inode->vol; 530 inode = ntfs_inode_open(vol, paren 571 utils_attr_get_name(ntfs_volume *vol, ATTR_RECORD *attr, char *buffer, int bufsize) argument 653 utils_cluster_in_use(ntfs_volume *vol, long long lcn) argument 715 utils_mftrec_in_use(ntfs_volume *vol, MFT_REF mref) argument 755 __metadata(ntfs_volume *vol, u64 num) argument 781 ntfs_volume *vol; local 892 mft_get_search_ctx(ntfs_volume *vol) argument [all...] |
H A D | cluster.h | 36 int cluster_find(ntfs_volume *vol, LCN c_begin, LCN c_end, cluster_cb *cb, void *data);
|
H A D | cluster.c | 44 int cluster_find(ntfs_volume *vol, LCN c_begin, LCN c_end, cluster_cb *cb, void *data) argument 53 if (!vol || !cb) 56 m_ctx = mft_get_search_ctx(vol); 76 runs = ntfs_mapping_pairs_decompress(vol, a_ctx->attr, NULL);
|
H A D | ntfsundelete.c | 829 static void get_parent_name(struct filename* name, ntfs_volume* vol) argument 836 if (!name || !vol) 839 rec = calloc(1, vol->mft_record_size); 846 mft_data = ntfs_attr_open(vol->mft_ni, AT_DATA, AT_UNNAMED, 0); 852 if (ntfs_attr_pread(mft_data, vol->mft_record_size * inode_num, 853 vol->mft_record_size, rec) < 1) { 898 static int get_filenames(struct ufile *file, ntfs_volume* vol) argument 949 get_parent_name(name, vol); 973 * @vol: An ntfs volume obtained from ntfs_mount 985 static int get_data(struct ufile *file, ntfs_volume *vol) argument 1063 read_record(ntfs_volume *vol, long long record) argument 1156 calc_percentage(struct ufile *file, ntfs_volume *vol) argument 1651 undelete_file(ntfs_volume *vol, long long inode) argument 1891 scan_disk(ntfs_volume *vol) argument 2015 copy_mft(ntfs_volume *vol, long long mft_begin, long long mft_end) argument 2099 handle_undelete(ntfs_volume *vol) argument 2146 ntfs_volume *vol; local [all...] |
H A D | ntfslabel.c | 217 static int print_label(ntfs_volume *vol, unsigned long mnt_flags) argument 228 ntfs_log_info("%s\n", vol->vol_name); 276 static int change_label(ntfs_volume *vol, unsigned long mnt_flags, char *label, BOOL force) argument 298 ctx = ntfs_attr_get_search_ctx(vol->vol_ni, NULL); 364 if (!opts.noaction && ntfs_inode_sync(vol->vol_ni)) { 386 ntfs_volume *vol; local 398 vol = utils_mount_volume(opts.device, 401 if (!vol) 405 result = change_label(vol, mnt_flags, opts.label, opts.force); 407 result = print_label(vol, mnt_flag [all...] |
/osnet-11/usr/src/lib/hal/libhal-storage/common/ |
H A D | libhal-storage.c | 823 * @param vol Object to free 826 libhal_volume_free (LibHalVolume *vol) argument 828 if (vol == NULL ) 831 free (vol->udi); 832 libhal_free_string (vol->device_file); 833 libhal_free_string (vol->volume_label); 834 libhal_free_string (vol->fstype); 835 libhal_free_string (vol->mount_point); 836 libhal_free_string (vol->fsversion); 837 libhal_free_string (vol 1093 LibHalVolume *vol; local [all...] |
/osnet-11/usr/src/lib/librdc/common/ |
H A D | rdcpersist.c | 79 char *vol, *bmp, *host1, *host2; local 95 vol = strtok(NULL, " "); 101 vol = strtok(NULL, " "); 109 /* primary vol may be used more than once */ 110 volcount = (volcount_t *)nsc_lookup(volhash, vol); 116 nsc_insert_node(volhash, volcount, vol); 133 sv_enable_one_nocfg(char *vol) argument 140 if (stat(vol, &sb) != 0) { 141 rdc_set_error(NULL, RDC_OS, 0, "unable to stat %s", vol); 146 " a character device", vol); 184 char vol[NSC_MAXPATH]; local 266 char vol[NSC_MAXPATH]; local 309 char vol[NSC_MAXPATH]; local [all...] |