parent
717484f223
commit
0acde67dde
|
@ -77,12 +77,14 @@ int cluster_find (ntfs_volume *vol, LCN c_begin, LCN c_end, cluster_cb *cb, void
|
|||
m_ctx->flags_search = FEMR_IN_USE | FEMR_BASE_RECORD;
|
||||
|
||||
while (mft_next_record (m_ctx) == 0) {
|
||||
printf (RED "Inode: %lld\n" NORM, m_ctx->inode->mft_no);
|
||||
printf (RED "Inode: %llu\n" NORM, (unsigned long long)
|
||||
m_ctx->inode->mft_no);
|
||||
|
||||
if (!(m_ctx->flags_match & FEMR_BASE_RECORD))
|
||||
continue;
|
||||
|
||||
Vprintf ("Inode: %lld\n", m_ctx->inode->mft_no);
|
||||
Vprintf ("Inode: %llu\n", (unsigned long long)
|
||||
m_ctx->inode->mft_no);
|
||||
|
||||
a_ctx = ntfs_attr_get_search_ctx (NULL, m_ctx->inode->mrec);
|
||||
|
||||
|
@ -109,7 +111,12 @@ int cluster_find (ntfs_volume *vol, LCN c_begin, LCN c_end, cluster_cb *cb, void
|
|||
if (a_begin < 0)
|
||||
continue; // sparse, discontiguous, etc
|
||||
|
||||
Vprintf ("\t\t%lld\t%lld-%lld (%lld)\n", runs[j].vcn, runs[j].lcn, runs[j].lcn + runs[j].length - 1, runs[j].length);
|
||||
Vprintf ("\t\t%lld\t%lld-%lld (%lld)\n",
|
||||
(long long)runs[j].vcn,
|
||||
(long long)runs[j].lcn,
|
||||
(long long)(runs[j].lcn +
|
||||
runs[j].length - 1),
|
||||
(long long)runs[j].length);
|
||||
//dprint list
|
||||
|
||||
if ((a_begin > c_end) || (a_end < c_begin))
|
||||
|
|
|
@ -377,7 +377,11 @@ int dump_file (ntfs_volume *vol, ntfs_inode *ino)
|
|||
if (runs) {
|
||||
printf (" VCN LCN Length\n");
|
||||
for (i = 0; runs[i].length > 0; i++) {
|
||||
printf (" %8lld %8lld %8lld\n", runs[i].vcn, runs[i].lcn, runs[i].length);
|
||||
printf (" %8lld %8lld %8lld\n",
|
||||
(long long)runs[i].vcn,
|
||||
(long long)runs[i].lcn,
|
||||
(long long)
|
||||
runs[i].length);
|
||||
}
|
||||
free (runs);
|
||||
}
|
||||
|
@ -407,7 +411,7 @@ int print_match (ntfs_inode *ino, ATTR_RECORD *attr, runlist_element *run, void
|
|||
}
|
||||
|
||||
utils_inode_get_name (ino, buffer, MAX_PATH);
|
||||
printf ("Inode %lld %s", ino->mft_no, buffer);
|
||||
printf ("Inode %llu %s", (unsigned long long)ino->mft_no, buffer);
|
||||
|
||||
utils_attr_get_name (ino->vol, attr, buffer, MAX_PATH);
|
||||
printf ("/%s\n", buffer);
|
||||
|
@ -491,7 +495,8 @@ int main (int argc, char *argv[])
|
|||
result = dump_file (vol, ino);
|
||||
ntfs_inode_close (ino);
|
||||
} else {
|
||||
Eprintf ("Cannot open inode %lld\n", opts.inode);
|
||||
Eprintf ("Cannot open inode %llu\n",
|
||||
(unsigned long long)opts.inode);
|
||||
}
|
||||
break;
|
||||
case act_last:
|
||||
|
@ -504,7 +509,9 @@ int main (int argc, char *argv[])
|
|||
result = dump_file (vol, ino);
|
||||
ntfs_inode_close (ino);
|
||||
} else {
|
||||
Eprintf ("Cannot open inode %lld\n", opts.inode);
|
||||
Eprintf ("Cannot open inode %llu\n",
|
||||
(unsigned long long)
|
||||
opts.inode);
|
||||
}
|
||||
result = 0;
|
||||
} else {
|
||||
|
|
|
@ -485,15 +485,16 @@ static void print_advise(s64 supp_lcn, int flags)
|
|||
freed_b = (vol->nr_clusters - supp_lcn + 1) * vol->cluster_size;
|
||||
freed_mb = freed_b / NTFS_MBYTE;
|
||||
|
||||
printf("You %s resize at %lld bytes ", beta ? "might" : "could", new_b);
|
||||
printf("You %s resize at %lld bytes ", beta ? "might" : "could",
|
||||
(long long)new_b);
|
||||
if ((new_mb * NTFS_MBYTE) < old_b)
|
||||
printf("or %lld MB ", new_mb);
|
||||
printf("or %lld MB ", (long long)new_mb);
|
||||
|
||||
printf("(freeing ");
|
||||
if (freed_mb && (old_mb - new_mb))
|
||||
printf("%lld MB", old_mb - new_mb);
|
||||
printf("%lld MB", (long long)(old_mb - new_mb));
|
||||
else
|
||||
printf("%lld bytes", freed_b);
|
||||
printf("%lld bytes", (long long)freed_b);
|
||||
printf("). %s\n", beta ? "BETA." : "STABLE.");
|
||||
|
||||
if (final)
|
||||
|
@ -520,8 +521,9 @@ static int rl_items(runlist *rl)
|
|||
|
||||
static void dump_run(runlist_element *r)
|
||||
{
|
||||
Vprintf(" %8lld %8lld (0x%08llx) %lld\n",
|
||||
r->vcn, r->lcn, r->lcn, r->length);
|
||||
Vprintf(" %8lld %8lld (0x%08llx) %lld\n", (long long)r->vcn,
|
||||
(long long)r->lcn, (long long)r->lcn,
|
||||
(long long)r->length);
|
||||
}
|
||||
|
||||
static void dump_runlist(runlist *rl)
|
||||
|
@ -1004,7 +1006,7 @@ static void replace_attribute_runlist(ntfs_attr_search_ctx *ctx, runlist *rl)
|
|||
remains_size -= (next_attr - (char *)ctx->mrec);
|
||||
|
||||
Vprintf("increase : %d\n", l);
|
||||
Vprintf("shift : %lld\n", remains_size);
|
||||
Vprintf("shift : %lld\n", (long long)remains_size);
|
||||
|
||||
if (ctx->mrec->bytes_in_use + l > ctx->mrec->bytes_allocated)
|
||||
err_exit("Extended record needed (%d > %d), not yet "
|
||||
|
@ -1097,7 +1099,8 @@ static int find_free_cluster(runlist_element *rle, s64 nr_vol_clusters, int hint
|
|||
}
|
||||
if (rle->length < items && rle->length < max_free_cluster_range) {
|
||||
max_free_cluster_range = rle->length;
|
||||
Vprintf("Max free range: %7lld \n", max_free_cluster_range);
|
||||
Vprintf("Max free range: %7lld \n",
|
||||
(long long)max_free_cluster_range);
|
||||
}
|
||||
pos = rle->lcn + items;
|
||||
if (pos == nr_vol_clusters)
|
||||
|
@ -1281,7 +1284,7 @@ static void rl_split_run(runlist **rl, int run, s64 pos)
|
|||
rl_set(rle_new, rle->vcn, rle->lcn, len_head);
|
||||
rl_set(rle_new + 1, rle->vcn + len_head, rle->lcn + len_head, len_tail);
|
||||
|
||||
Vprintf("Splitting run at cluster %lld:\n", pos);
|
||||
Vprintf("Splitting run at cluster %lld:\n", (long long)pos);
|
||||
dump_run(rle); dump_run(rle_new); dump_run(rle_new + 1);
|
||||
|
||||
free(*rl);
|
||||
|
@ -1344,8 +1347,10 @@ static void relocate_run(ntfs_resize_t *resize, runlist **rl, int run)
|
|||
|
||||
/* FIXME: check $MFTMirr DATA isn't multi-run (or support it) */
|
||||
Vprintf("Relocate inode %7llu:0x%x:%08lld:0x%08llx --> 0x%08llx\n",
|
||||
resize->mref, resize->ctx->attr->type, lcn_length, lcn,
|
||||
relocate_rl->lcn);
|
||||
(unsigned long long)resize->mref,
|
||||
resize->ctx->attr->type, (long long)lcn_length,
|
||||
(unsigned long long)lcn,
|
||||
(unsigned long long)relocate_rl->lcn);
|
||||
|
||||
relocate_clusters(resize, relocate_rl, lcn);
|
||||
rl_insert_at_run(rl, run, relocate_rl);
|
||||
|
|
Loading…
Reference in New Issue