fix 64-bitness printf format string compiler warnings (Jean-Pierre Andre)

master
szaka 2007-10-10 20:12:38 +00:00
parent 358b9a8d90
commit 4e85b2465d
2 changed files with 16 additions and 10 deletions

View File

@ -131,7 +131,8 @@ static int bitmap_writeback(ntfs_volume *vol, s64 pos, s64 size, void *b,
if (written != size) {
if (!written)
errno = EIO;
ntfs_log_perror("Bitmap write error (%lld, %lld)", pos, size);
ntfs_log_perror("Bitmap write error (%lld, %lld)",
(long long)pos, (long long)size);
return -1;
}
@ -312,7 +313,8 @@ runlist *ntfs_cluster_alloc(ntfs_volume *vol, VCN start_vcn, s64 count,
writeback = 1;
if (vol->free_clusters <= 0)
ntfs_log_error("Non-positive free clusters "
"(%lld)!\n", vol->free_clusters);
"(%lld)!\n",
(long long)vol->free_clusters);
else
vol->free_clusters--;
@ -514,8 +516,9 @@ int ntfs_cluster_free_from_rl(ntfs_volume *vol, runlist *rl)
if (ntfs_bitmap_clear_run(vol->lcnbmp_na, rl->lcn,
rl->length)) {
ntfs_log_perror("Cluster deallocation failed "
"(%lld, %lld)", rl->lcn,
rl->length);
"(%lld, %lld)",
(long long)rl->lcn,
(long long)rl->length);
goto out;
}
nr_freed += rl->length ;

View File

@ -81,12 +81,12 @@ int ntfs_mft_records_read(const ntfs_volume *vol, const MFT_REF mref,
s64 br;
VCN m;
ntfs_log_trace("Entering for inode %lld\n", MREF(mref));
ntfs_log_trace("inode %llu\n", (unsigned long long)MREF(mref));
if (!vol || !vol->mft_na || !b || count < 0) {
errno = EINVAL;
ntfs_log_perror("%s: b=%p count=%lld mft=%lld", __FUNCTION__,
b, count, MREF(mref));
ntfs_log_perror("%s: b=%p count=%lld mft=%llu", __FUNCTION__,
b, (long long)count, (unsigned long long)MREF(mref));
return -1;
}
m = MREF(mref);
@ -265,16 +265,19 @@ int ntfs_file_record_read(const ntfs_volume *vol, const MFT_REF mref,
}
err = EIO;
if (!ntfs_is_file_record(m->magic)) {
ntfs_log_perror("Record %llu has no FILE magic", MREF(mref));
ntfs_log_perror("Record %llu has no FILE magic",
(unsigned long long)MREF(mref));
goto err_out;
}
if (MSEQNO(mref) && MSEQNO(mref) != le16_to_cpu(m->sequence_number)) {
ntfs_log_perror("Record %llu has wrong SeqNo", MREF(mref));
ntfs_log_perror("Record %llu has wrong SeqNo",
(unsigned long long)MREF(mref));
goto err_out;
}
a = (ATTR_RECORD*)((char*)m + le16_to_cpu(m->attrs_offset));
if (p2n(a) < p2n(m) || (char*)a > (char*)m + vol->mft_record_size) {
ntfs_log_perror("Record %llu is corrupt", MREF(mref));
ntfs_log_perror("Record %llu is corrupt",
(unsigned long long)MREF(mref));
goto err_out;
}
*mrec = m;