#include <sys/param.h>
#include <sys/sysmacros.h>
#include <sys/stat.h>
+#include <inttypes.h>
#include <malloc.h>
#include <getopt.h>
#include <endian.h>
if (be32_to_cpu(agf->agf_length) != agblocks) {
retval = XR_AG_AGF;
do_warn(
- _("bad length %d for agf %d, should be %llu\n"),
+ _("bad length %d for agf %d, should be %" PRIu64 "\n"),
be32_to_cpu(agf->agf_length),
i, agblocks);
if (!no_modify)
* space in the AGFL, we'll reclaim it later.
*/
if (be32_to_cpu(agf->agf_flfirst) >= XFS_AGFL_SIZE(mp)) {
- do_warn(_("flfirst %d in agf %d too large (max = %d)\n"),
- be32_to_cpu(agf->agf_flfirst), i, XFS_AGFL_SIZE(mp));
+ do_warn(_("flfirst %d in agf %d too large (max = %zu)\n"),
+ be32_to_cpu(agf->agf_flfirst),
+ i, XFS_AGFL_SIZE(mp));
if (!no_modify)
agf->agf_flfirst = cpu_to_be32(0);
}
if (be32_to_cpu(agf->agf_fllast) >= XFS_AGFL_SIZE(mp)) {
- do_warn(_("fllast %d in agf %d too large (max = %d)\n"),
- be32_to_cpu(agf->agf_fllast), i, XFS_AGFL_SIZE(mp));
+ do_warn(_("fllast %d in agf %d too large (max = %zu)\n"),
+ be32_to_cpu(agf->agf_fllast),
+ i, XFS_AGFL_SIZE(mp));
if (!no_modify)
agf->agf_fllast = cpu_to_be32(0);
}
if (be32_to_cpu(agi->agi_length) != agblocks) {
retval = XR_AG_AGI;
do_warn(
- _("bad length # %d for agi %d, should be %llu\n"),
+ _("bad length # %d for agi %d, should be %" PRIu64 "\n"),
be32_to_cpu(agi->agi_length),
agno, agblocks);
if (!no_modify)
/* whoops there's a discrepancy. Clear the hdr */
if (!no_modify) {
do_warn(
- _("there are no attributes in the fork for inode %llu\n"),
+ _("there are no attributes in the fork for inode %" PRIu64 "\n"),
ino);
asf->hdr.totsize =
cpu_to_be16(sizeof(xfs_attr_sf_hdr_t));
return(1);
} else {
do_warn(
- _("would junk the attribute fork since count is 0 for inode %llu\n"),
+ _("would junk the attribute fork since count is 0 for inode %" PRIu64 "\n"),
ino);
return(1);
}
do_warn(_("zero length name entry in attribute fork,"));
if (!no_modify) {
do_warn(
- _(" truncating attributes for inode %llu to %d\n"), ino, i);
+ _(" truncating attributes for inode %" PRIu64 " to %d\n"), ino, i);
*repair = 1;
break; /* and then update hdr fields */
} else {
do_warn(
- _(" would truncate attributes for inode %llu to %d\n"), ino, i);
+ _(" would truncate attributes for inode %" PRIu64 " to %d\n"), ino, i);
break;
}
} else {
((remainingspace - currententry->
namelen) < currententry->valuelen)) {
do_warn(
- _("name or value attribute lengths are too large,\n"));
+ _("name or value attribute lengths are too large,\n"));
if (!no_modify) {
do_warn(
- _(" truncating attributes for inode %llu to %d\n"),
+ _(" truncating attributes for inode %" PRIu64 " to %d\n"),
ino, i);
*repair = 1;
break; /* and then update hdr fields */
} else {
do_warn(
- _(" would truncate attributes for inode %llu to %d\n"),
+ _(" would truncate attributes for inode %" PRIu64 " to %d\n"),
ino, i);
break;
}
if (!no_modify) {
/* get rid of only this entry */
do_warn(
- _("removing attribute entry %d for inode %llu\n"),
+ _("removing attribute entry %d for inode %" PRIu64 "\n"),
i, ino);
tempentry = (xfs_attr_sf_entry_t *)
((__psint_t) currententry +
continue; /* go back up now */
} else {
do_warn(
- _("would remove attribute entry %d for inode %llu\n"),
+ _("would remove attribute entry %d for inode %" PRIu64 "\n"),
i, ino);
}
}
if (asf->hdr.count != i) {
if (no_modify) {
- do_warn(_("would have corrected attribute entry count "
- "in inode %llu from %d to %d\n"),
+ do_warn(
+ _("would have corrected attribute entry count in inode %" PRIu64 " from %d to %d\n"),
ino, asf->hdr.count, i);
} else {
- do_warn(_("corrected attribute entry count in inode "
- "%llu, was %d, now %d\n"),
+ do_warn(
+ _("corrected attribute entry count in inode %" PRIu64 ", was %d, now %d\n"),
ino, asf->hdr.count, i);
asf->hdr.count = i;
*repair = 1;
/* ASSUMPTION: currentsize <= totsize */
if (be16_to_cpu(asf->hdr.totsize) != currentsize) {
if (no_modify) {
- do_warn(_("would have corrected attribute totsize in "
- "inode %llu from %d to %d\n"),
+ do_warn(
+ _("would have corrected attribute totsize in inode %" PRIu64 " from %d to %d\n"),
ino, be16_to_cpu(asf->hdr.totsize),
currentsize);
} else {
- do_warn(_("corrected attribute entry totsize in "
- "inode %llu, was %d, now %d\n"),
+ do_warn(
+ _("corrected attribute entry totsize in inode %" PRIu64 ", was %d, now %d\n"),
ino, be16_to_cpu(asf->hdr.totsize),
currentsize);
asf->hdr.totsize = cpu_to_be16(currentsize);
while (amountdone < valuelen) {
bno = blkmap_get(blkmap, blocknum + i);
if (bno == NULLDFSBNO) {
- do_warn(_("remote block for attributes of inode %llu"
- " is missing\n"), ino);
+ do_warn(
+ _("remote block for attributes of inode %" PRIu64 " is missing\n"), ino);
clearit = 1;
break;
}
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, bno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_warn(_("can't read remote block for attributes"
- " of inode %llu\n"), ino);
+ do_warn(
+ _("can't read remote block for attributes of inode %" PRIu64 "\n"), ino);
clearit = 1;
break;
}
local = xfs_attr_leaf_name_local(leaf, i);
if (local->namelen == 0 || namecheck((char *)&local->nameval[0],
local->namelen)) {
- do_warn(_("attribute entry %d in attr block %u, inode %llu "
- "has bad name (namelen = %d)\n"),
+ do_warn(
+ _("attribute entry %d in attr block %u, inode %" PRIu64 " has bad name (namelen = %d)\n"),
i, da_bno, ino, local->namelen);
return -1;
}
if (be32_to_cpu(entry->hashval) != libxfs_da_hashname(
&local->nameval[0], local->namelen) ||
be32_to_cpu(entry->hashval) < last_hashval) {
- do_warn(_("bad hashvalue for attribute entry %d in "
- "attr block %u, inode %llu\n"), i, da_bno, ino);
+ do_warn(
+ _("bad hashvalue for attribute entry %d in attr block %u, inode %" PRIu64 "\n"),
+ i, da_bno, ino);
return -1;
}
if (entry->flags & XFS_ATTR_ROOT) {
if (valuecheck((char *)&local->nameval[0], NULL,
local->namelen, be16_to_cpu(local->valuelen))) {
- do_warn(_("bad security value for attribute entry %d "
- "in attr block %u, inode %llu\n"),
+ do_warn(
+ _("bad security value for attribute entry %d in attr block %u, inode %" PRIu64 "\n"),
i, da_bno, ino);
return -1;
}
remotep->namelen) ||
be32_to_cpu(entry->hashval) < last_hashval ||
be32_to_cpu(remotep->valueblk) == 0) {
- do_warn(_("inconsistent remote attribute entry %d in "
- "attr block %u, ino %llu\n"), i, da_bno, ino);
+ do_warn(
+ _("inconsistent remote attribute entry %d in attr block %u, ino %" PRIu64 "\n"), i, da_bno, ino);
return -1;
}
value = malloc(be32_to_cpu(remotep->valuelen));
if (value == NULL) {
- do_warn(_("cannot malloc enough for remotevalue attribute "
- "for inode %llu\n"), ino);
+ do_warn(
+ _("cannot malloc enough for remotevalue attribute for inode %" PRIu64 "\n"),
+ ino);
do_warn(_("SKIPPING this remote attribute\n"));
goto out;
}
if (rmtval_get(mp, ino, blkmap, be32_to_cpu(remotep->valueblk),
be32_to_cpu(remotep->valuelen), value)) {
- do_warn(_("remote attribute get failed for entry %d, "
- "inode %llu\n"), i, ino);
+ do_warn(
+ _("remote attribute get failed for entry %d, inode %" PRIu64 "\n"),
+ i, ino);
goto bad_free_out;
}
if (valuecheck((char *)&remotep->name[0], value, remotep->namelen,
be32_to_cpu(remotep->valuelen))) {
- do_warn(_("remote attribute value check failed for entry %d, "
- "inode %llu\n"), i, ino);
+ do_warn(
+ _("remote attribute value check failed for entry %d, inode %" PRIu64 "\n"),
+ i, ino);
goto bad_free_out;
}
free(value);
if (be16_to_cpu(leaf->hdr.count) * sizeof(xfs_attr_leaf_entry_t)
+ sizeof(xfs_attr_leaf_hdr_t) > XFS_LBSIZE(mp)) {
do_warn(
- _("bad attribute count %d in attr block %u, inode %llu\n"),
+ _("bad attribute count %d in attr block %u, inode %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.count), da_bno, ino);
return (1);
}
/* check if index is within some boundary. */
if (be16_to_cpu(entry->nameidx) > XFS_LBSIZE(mp)) {
do_warn(
- _("bad attribute nameidx %d in attr block %u, inode %llu\n"),
+ _("bad attribute nameidx %d in attr block %u, inode %" PRIu64 "\n"),
be16_to_cpu(entry->nameidx), da_bno, ino);
clearit = 1;
break;
if (entry->flags & XFS_ATTR_INCOMPLETE) {
/* we are inconsistent state. get rid of us */
do_warn(
- _("attribute entry #%d in attr block %u, inode %llu is INCOMPLETE\n"),
+ _("attribute entry #%d in attr block %u, inode %" PRIu64 " is INCOMPLETE\n"),
i, da_bno, ino);
clearit = 1;
break;
stop = start + sizeof(xfs_attr_leaf_entry_t);
if (set_da_freemap(mp, attr_freemap, start, stop)) {
do_warn(
- _("attribute entry %d in attr block %u, inode %llu claims "
- "already used space\n"),
+ _("attribute entry %d in attr block %u, inode %" PRIu64 " claims already used space\n"),
i, da_bno, ino);
clearit = 1;
break; /* got an overlap */
if (set_da_freemap(mp, attr_freemap, be16_to_cpu(entry->nameidx),
be16_to_cpu(entry->nameidx) + thissize)) {
- do_warn(_("attribute entry %d in attr block %u, "
- "inode %llu claims used space\n"),
+ do_warn(
+ _("attribute entry %d in attr block %u, inode %" PRIu64 " claims used space\n"),
i, da_bno, ino);
clearit = 1;
break; /* got an overlap */
if (!no_modify) {
do_warn(
_("- resetting first used heap value from %d to %d in "
- "block %u of attribute fork of inode %llu\n"),
+ "block %u of attribute fork of inode %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.firstused),
firstb, da_bno, ino);
leaf->hdr.firstused = cpu_to_be16(firstb);
} else {
do_warn(
_("- would reset first used value from %d to %d in "
- "block %u of attribute fork of inode %llu\n"),
+ "block %u of attribute fork of inode %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.firstused),
firstb, da_bno, ino);
}
if (!no_modify) {
do_warn(
_("- resetting usedbytes cnt from %d to %d in "
- "block %u of attribute fork of inode %llu\n"),
+ "block %u of attribute fork of inode %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.usedbytes),
usedbs, da_bno, ino);
leaf->hdr.usedbytes = cpu_to_be16(usedbs);
} else {
do_warn(
_("- would reset usedbytes cnt from %d to %d in "
- "block %u of attribute fork of %llu\n"),
+ "block %u of attribute fork of %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.usedbytes),
usedbs, da_bno, ino);
}
ASSERT(da_bno != 0);
if (dev_bno == NULLDFSBNO) {
- do_warn(_("can't map block %u for attribute fork "
- "for inode %llu\n"), da_bno, ino);
+ do_warn(
+ _("can't map block %u for attribute fork for inode %" PRIu64 "\n"),
+ da_bno, ino);
goto error_out;
}
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, dev_bno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_warn(_("can't read file block %u (fsbno %llu) for"
- " attribute fork of inode %llu\n"),
+ do_warn(
+ _("can't read file block %u (fsbno %" PRIu64 ") for attribute fork of inode %" PRIu64 "\n"),
da_bno, dev_bno, ino);
goto error_out;
}
/* check magic number for leaf directory btree block */
if (be16_to_cpu(leaf->hdr.info.magic) != XFS_ATTR_LEAF_MAGIC) {
- do_warn(_("bad attribute leaf magic %#x "
- "for inode %llu\n"),
+ do_warn(
+ _("bad attribute leaf magic %#x for inode %" PRIu64 "\n"),
leaf->hdr.info.magic, ino);
libxfs_putbuf(bp);
goto error_out;
da_cursor->level[0].dirty = repair;
if (be32_to_cpu(leaf->hdr.info.back) != prev_bno) {
- do_warn(_("bad sibling back pointer for block %u in "
- "attribute fork for inode %llu\n"),
+ do_warn(
+ _("bad sibling back pointer for block %u in attribute fork for inode %" PRIu64 "\n"),
da_bno, ino);
libxfs_putbuf(bp);
goto error_out;
/*
* verify the final path up (right-hand-side) if still ok
*/
- do_warn(_("bad hash path in attribute fork for inode %llu\n"),
+ do_warn(
+ _("bad hash path in attribute fork for inode %" PRIu64 "\n"),
da_cursor->ino);
goto error_out;
}
if (dip->di_aformat == XFS_DINODE_FMT_EXTENTS &&
be16_to_cpu(dip->di_anextents) == 0)
return(0); /* the kernel can handle this state */
- do_warn(_("block 0 of inode %llu attribute fork is missing\n"),
+ do_warn(
+ _("block 0 of inode %" PRIu64 " attribute fork is missing\n"),
ino);
return(1);
}
/* FIX FOR bug 653709 -- EKN */
if (mp->m_sb.sb_agcount < XFS_FSB_TO_AGNO(mp, bno)) {
- do_warn(_("agno of attribute fork of inode %llu out of "
- "regular partition\n"), ino);
+ do_warn(
+ _("agno of attribute fork of inode %" PRIu64 " out of regular partition\n"), ino);
return(1);
}
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, bno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_warn(_("can't read block 0 of inode %llu attribute fork\n"),
+ do_warn(
+ _("can't read block 0 of inode %" PRIu64 " attribute fork\n"),
ino);
return(1);
}
if (be32_to_cpu(leaf->hdr.info.forw) != 0 ||
be32_to_cpu(leaf->hdr.info.back) != 0) {
if (!no_modify) {
- do_warn(_("clearing forw/back pointers in block 0 "
- "for attributes in inode %llu\n"), ino);
+ do_warn(
+ _("clearing forw/back pointers in block 0 for attributes in inode %" PRIu64 "\n"),
+ ino);
repairlinks = 1;
leaf->hdr.info.forw = cpu_to_be32(0);
leaf->hdr.info.back = cpu_to_be32(0);
} else {
- do_warn(_("would clear forw/back pointers in block 0 "
- "for attributes in inode %llu\n"), ino);
+ do_warn(
+ _("would clear forw/back pointers in block 0 for attributes in inode %" PRIu64 "\n"), ino);
}
}
libxfs_putbuf(bp);
return (process_node_attr(mp, ino, dip, blkmap)); /* + repair */
default:
- do_warn(_("bad attribute leaf magic # %#x for dir ino %llu\n"),
+ do_warn(
+ _("bad attribute leaf magic # %#x for dir ino %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.info.magic), ino);
libxfs_putbuf(bp);
return(1);
/* if err, convert this to shortform and clear it */
/* if repair and no error, it's taken care of */
} else {
- do_warn(_("illegal attribute format %d, ino %llu\n"),
+ do_warn(_("illegal attribute format %d, ino %" PRIu64 "\n"),
aformat, ino);
err = 1;
}
if (!blkmap || blkmap->naexts < nex) {
blkmap = realloc(blkmap, BLKMAP_SIZE(nex));
if (!blkmap) {
- do_warn(_("malloc failed in blkmap_alloc (%u bytes)\n"),
+ do_warn(_("malloc failed in blkmap_alloc (%zu bytes)\n"),
BLKMAP_SIZE(nex));
return NULL;
}
*/
bmp = malloc(nb * sizeof(bmap_ext_t));
if (!bmp)
- do_error(_("blkmap_getn malloc failed (%u bytes)\n"),
+ do_error(_("blkmap_getn malloc failed (%" PRIu64 " bytes)\n"),
nb * sizeof(bmap_ext_t));
bmp[nex].startblock = ext->startblock + (o - ext->startoff);
bp = libxfs_readbuf(mp->m_dev, XFS_AGB_TO_DADDR(mp, agno, agbno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_warn(_("cannot read agbno (%u/%u), disk block %lld\n"), agno,
- agbno, (xfs_daddr_t)XFS_AGB_TO_DADDR(mp, agno, agbno));
+ do_warn(_("cannot read agbno (%u/%u), disk block %" PRId64 "\n"),
+ agno, agbno, XFS_AGB_TO_DADDR(mp, agno, agbno));
return(0);
}
case XR_E_INUSE_FS:
case XR_E_FS_MAP:
do_warn(
- _("inode block %d/%d multiply claimed, (state %d)\n"),
+ _("inode block %d/%d multiply claimed, (state %d)\n"),
agno, cur_agbno, state);
set_bmap_ext(agno, cur_agbno, blen, XR_E_MULT);
pthread_mutex_unlock(&ag_locks[agno]);
return 0;
case XR_E_INO:
do_error(
- _("uncertain inode block overlap, agbno = %d, ino = %llu\n"),
+ _("uncertain inode block overlap, agbno = %d, ino = %" PRIu64 "\n"),
agbno, ino);
break;
default:
switch (state) {
case XR_E_INO:
do_error(
- _("uncertain inode block %llu already known\n"),
+ _("uncertain inode block %" PRIu64 " already known\n"),
XFS_AGB_TO_FSB(mp, agno, cur_agbno));
break;
case XR_E_UNKNOWN:
int ibuf_offset;
xfs_agino_t agino;
xfs_agblock_t agbno;
+ xfs_ino_t ino;
int dirty = 0;
int isa_dir = 0;
int blks_per_cluster;
bplist = malloc(cluster_count * sizeof(xfs_buf_t *));
if (bplist == NULL)
- do_error(_("failed to allocate %d bytes of memory\n"),
- cluster_count * sizeof(xfs_buf_t*));
+ do_error(_("failed to allocate %zd bytes of memory\n"),
+ cluster_count * sizeof(xfs_buf_t *));
for (bp_index = 0; bp_index < cluster_count; bp_index++) {
pftrace("about to read off %llu in AG %d",
- (long long)XFS_AGB_TO_DADDR(mp, agno, agbno), agno);
+ XFS_AGB_TO_DADDR(mp, agno, agbno), agno);
bplist[bp_index] = libxfs_readbuf(mp->m_dev,
XFS_AGB_TO_DADDR(mp, agno, agbno),
XFS_FSB_TO_BB(mp, blks_per_cluster), 0);
if (!bplist[bp_index]) {
- do_warn(_("cannot read inode %llu, disk block %lld, cnt %d\n"),
+ do_warn(_("cannot read inode %" PRIu64 ", disk block %" PRId64 ", cnt %d\n"),
XFS_AGINO_TO_INO(mp, agno, first_irec->ino_startnum),
XFS_AGB_TO_DADDR(mp, agno, agbno),
- (int)XFS_FSB_TO_BB(mp, blks_per_cluster));
+ XFS_FSB_TO_BB(mp, blks_per_cluster));
while (bp_index > 0) {
bp_index--;
libxfs_putbuf(bplist[bp_index]);
break;
default:
set_bmap(agno, agbno, XR_E_MULT);
- do_warn(_("inode block %llu multiply claimed, state was %d\n"),
+ do_warn(_("inode block %" PRIu64 " multiply claimed, state was %d\n"),
XFS_AGB_TO_FSB(mp, agno, agbno), state);
break;
}
*/
dino = xfs_make_iptr(mp, bplist[bp_index], cluster_offset);
agino = irec_offset + ino_rec->ino_startnum;
+ ino = XFS_AGINO_TO_INO(mp, agno, agino);
is_used = 3;
ino_dirty = 0;
if (is_used) {
if (is_inode_free(ino_rec, irec_offset)) {
if (verbose || no_modify) {
- do_warn(_("imap claims in-use inode "
- "%llu is free, "),
- XFS_AGINO_TO_INO(mp, agno,
- agino));
+ do_warn(
+ _("imap claims in-use inode %" PRIu64 " is free, "),
+ ino);
}
if (verbose || !no_modify)
}
if (status) {
- if (mp->m_sb.sb_rootino ==
- XFS_AGINO_TO_INO(mp, agno, agino)) {
+ if (mp->m_sb.sb_rootino == ino) {
need_root_inode = 1;
if (!no_modify) {
- do_warn(_("cleared root inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno,
- agino));
+ do_warn(
+ _("cleared root inode %" PRIu64 "\n"),
+ ino);
} else {
- do_warn(_("would clear root inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno,
- agino));
+ do_warn(
+ _("would clear root inode %" PRIu64 "\n"),
+ ino);
}
- } else if (mp->m_sb.sb_rbmino ==
- XFS_AGINO_TO_INO(mp, agno, agino)) {
+ } else if (mp->m_sb.sb_rbmino == ino) {
need_rbmino = 1;
if (!no_modify) {
- do_warn(_("cleared realtime bitmap "
- "inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno,
- agino));
+ do_warn(
+ _("cleared realtime bitmap inode %" PRIu64 "\n"),
+ ino);
} else {
- do_warn(_("would clear realtime bitmap "
- "inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno,
- agino));
+ do_warn(
+ _("would clear realtime bitmap inode %" PRIu64 "\n"),
+ ino);
}
- } else if (mp->m_sb.sb_rsumino ==
- XFS_AGINO_TO_INO(mp, agno, agino)) {
+ } else if (mp->m_sb.sb_rsumino == ino) {
need_rsumino = 1;
if (!no_modify) {
- do_warn(_("cleared realtime summary "
- "inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno,
- agino));
+ do_warn(
+ _("cleared realtime summary inode %" PRIu64 "\n"),
+ ino);
} else {
- do_warn(_("would clear realtime summary"
- " inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno,
- agino));
+ do_warn(
+ _("would clear realtime summary inode %" PRIu64 "\n"),
+ ino);
}
} else if (!no_modify) {
- do_warn(_("cleared inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno, agino));
+ do_warn(_("cleared inode %" PRIu64 "\n"),
+ ino);
} else {
- do_warn(_("would have cleared inode %llu\n"),
- XFS_AGINO_TO_INO(mp, agno, agino));
+ do_warn(_("would have cleared inode %" PRIu64 "\n"),
+ ino);
}
}
break;
default:
set_bmap(agno, agbno, XR_E_MULT);
- do_warn(_("inode block %llu multiply claimed, "
- "state was %d\n"),
+ do_warn(
+ _("inode block %" PRIu64 " multiply claimed, state was %d\n"),
XFS_AGB_TO_FSB(mp, agno, agbno), state);
break;
}
ASSERT(dino->di_forkoff != 0);
if (!no_modify)
- fprintf(stderr, _("clearing inode %llu attributes\n"),
- (unsigned long long)ino_num);
+ fprintf(stderr,
+_("clearing inode %" PRIu64 " attributes\n"), ino_num);
else
- fprintf(stderr, _("would have cleared inode %llu attributes\n"),
- (unsigned long long)ino_num);
+ fprintf(stderr,
+_("would have cleared inode %" PRIu64 " attributes\n"), ino_num);
if (be16_to_cpu(dino->di_anextents) != 0) {
if (no_modify)
* check numeric validity of the extent
*/
if (irec->br_startblock >= mp->m_sb.sb_rblocks) {
- do_warn(_("inode %llu - bad rt extent start block number "
- "%llu, offset %llu\n"), ino,
- irec->br_startblock, irec->br_startoff);
+ do_warn(
+_("inode %" PRIu64 " - bad rt extent start block number %" PRIu64 ", offset %" PRIu64 "\n"),
+ ino,
+ irec->br_startblock,
+ irec->br_startoff);
return 1;
}
if (irec->br_startblock + irec->br_blockcount - 1 >= mp->m_sb.sb_rblocks) {
- do_warn(_("inode %llu - bad rt extent last block number %llu, "
- "offset %llu\n"), ino, irec->br_startblock +
- irec->br_blockcount - 1, irec->br_startoff);
+ do_warn(
+_("inode %" PRIu64 " - bad rt extent last block number %" PRIu64 ", offset %" PRIu64 "\n"),
+ ino,
+ irec->br_startblock + irec->br_blockcount - 1,
+ irec->br_startoff);
return 1;
}
if (irec->br_startblock + irec->br_blockcount - 1 < irec->br_startblock) {
- do_warn(_("inode %llu - bad rt extent overflows - start %llu, "
- "end %llu, offset %llu\n"), ino,
- irec->br_startblock, irec->br_startblock +
- irec->br_blockcount - 1, irec->br_startoff);
+ do_warn(
+_("inode %" PRIu64 " - bad rt extent overflows - start %" PRIu64 ", "
+ "end %" PRIu64 ", offset %" PRIu64 "\n"),
+ ino,
+ irec->br_startblock,
+ irec->br_startblock + irec->br_blockcount - 1,
+ irec->br_startoff);
return 1;
}
if (xfs_sb_version_hasextflgbit(&mp->m_sb) == 0 &&
(irec->br_startblock % mp->m_sb.sb_rextsize != 0 ||
irec->br_blockcount % mp->m_sb.sb_rextsize != 0)) {
- do_warn(_("malformed rt inode extent [%llu %llu] (fs rtext "
- "size = %u)\n"), irec->br_startblock,
- irec->br_blockcount, mp->m_sb.sb_rextsize);
+ do_warn(
+_("malformed rt inode extent [%" PRIu64 " %" PRIu64 "] (fs rtext size = %u)\n"),
+ irec->br_startblock,
+ irec->br_blockcount,
+ mp->m_sb.sb_rextsize);
return 1;
}
if (check_dups == 1) {
if (search_rt_dup_extent(mp, ext) && !pwe) {
- do_warn(_("data fork in rt ino %llu claims "
- "dup rt extent, off - %llu, "
- "start - %llu, count %llu\n"),
- ino, irec->br_startoff,
- irec->br_startblock,
- irec->br_blockcount);
+ do_warn(
+_("data fork in rt ino %" PRIu64 " claims dup rt extent,"
+ "off - %" PRIu64 ", start - %" PRIu64 ", count %" PRIu64 "\n"),
+ ino,
+ irec->br_startoff,
+ irec->br_startblock,
+ irec->br_blockcount);
return 1;
}
continue;
set_rtbmap(ext, XR_E_INUSE);
break;
case XR_E_BAD_STATE:
- do_error(_("bad state in rt block map %llu\n"), ext);
+ do_error(
+_("bad state in rt block map %" PRIu64 "\n"),
+ ext);
case XR_E_FS_MAP:
case XR_E_INO:
case XR_E_INUSE_FS:
- do_error(_("data fork in rt inode %llu found "
- "metadata block %llu in rt bmap\n"),
+ do_error(
+_("data fork in rt inode %" PRIu64 " found metadata block %" PRIu64 " in rt bmap\n"),
ino, ext);
case XR_E_INUSE:
if (pwe)
break;
case XR_E_MULT:
set_rtbmap(ext, XR_E_MULT);
- do_warn(_("data fork in rt inode %llu claims "
- "used rt block %llu\n"),
- ino, ext);
+ do_warn(
+_("data fork in rt inode %" PRIu64 " claims used rt block %" PRIu64 "\n"),
+ ino, ext);
return 1;
case XR_E_FREE1:
default:
- do_error(_("illegal state %d in rt block map "
- "%llu\n"), state, b);
+ do_error(
+_("illegal state %d in rt block map %" PRIu64 "\n"),
+ state, b);
}
}
else
*last_key = irec.br_startoff;
if (i > 0 && op + cp > irec.br_startoff) {
- do_warn(_("bmap rec out of order, inode %llu entry %d "
- "[o s c] [%llu %llu %llu], %d [%llu %llu %llu]\n"),
+ do_warn(
+_("bmap rec out of order, inode %" PRIu64" entry %d "
+ "[o s c] [%" PRIu64 " %" PRIu64 " %" PRIu64 "], "
+ "%d [%" PRIu64 " %" PRIu64 " %" PRIu64 "]\n"),
ino, i, irec.br_startoff, irec.br_startblock,
irec.br_blockcount, i - 1, op, sp, cp);
goto done;
* check numeric validity of the extent
*/
if (irec.br_blockcount == 0) {
- do_warn(_("zero length extent (off = %llu, fsbno = "
- "%llu) in ino %llu\n"), irec.br_startoff,
- irec.br_startblock, ino);
+ do_warn(
+_("zero length extent (off = %" PRIu64 ", fsbno = %" PRIu64 ") in ino %" PRIu64 "\n"),
+ irec.br_startoff,
+ irec.br_startblock,
+ ino);
goto done;
}
break;
case XR_DFSBNORANGE_BADSTART:
- do_warn(_("inode %llu - bad extent starting "
- "block number %llu, offset %llu\n"),
- ino, irec.br_startblock,
+ do_warn(
+_("inode %" PRIu64 " - bad extent starting block number %" PRIu64 ", offset %" PRIu64 "\n"),
+ ino,
+ irec.br_startblock,
irec.br_startoff);
goto done;
case XR_DFSBNORANGE_BADEND:
- do_warn(_("inode %llu - bad extent last block "
- "number %llu, offset %llu\n"), ino,
- irec.br_startblock + irec.br_blockcount
- - 1, irec.br_startoff);
+ do_warn(
+_("inode %" PRIu64 " - bad extent last block number %" PRIu64 ", offset %" PRIu64 "\n"),
+ ino,
+ irec.br_startblock + irec.br_blockcount - 1,
+ irec.br_startoff);
goto done;
case XR_DFSBNORANGE_OVERFLOW:
- do_warn(_("inode %llu - bad extent overflows - "
- "start %llu, end %llu, offset %llu\n"),
- ino, irec.br_startblock,
- irec.br_startblock + irec.br_blockcount
- - 1, irec.br_startoff);
+ do_warn(
+_("inode %" PRIu64 " - bad extent overflows - start %" PRIu64 ", "
+ "end %" PRIu64 ", offset %" PRIu64 "\n"),
+ ino,
+ irec.br_startblock,
+ irec.br_startblock + irec.br_blockcount - 1,
+ irec.br_startoff);
goto done;
}
if (irec.br_startoff >= fs_max_file_offset) {
- do_warn(_("inode %llu - extent offset too large - "
- "start %llu, count %llu, offset %llu\n"),
+ do_warn(
+_("inode %" PRIu64 " - extent offset too large - start %" PRIu64 ", "
+ "count %" PRIu64 ", offset %" PRIu64 "\n"),
ino, irec.br_startblock, irec.br_blockcount,
irec.br_startoff);
goto done;
* block bitmap
*/
if (search_dup_extent(agno, agbno, ebno)) {
- do_warn(_("%s fork in ino %llu claims "
- "dup extent, off - %llu, "
- "start - %llu, cnt %llu\n"),
+ do_warn(
+_("%s fork in ino %" PRIu64 " claims dup extent, "
+ "off - %" PRIu64 ", start - %" PRIu64 ", cnt %" PRIu64 "\n"),
forkname, ino, irec.br_startoff,
irec.br_startblock,
irec.br_blockcount);
switch (state) {
case XR_E_FREE:
case XR_E_FREE1:
- do_warn(_("%s fork in ino %llu claims free "
- "block %llu\n"),
+ do_warn(
+_("%s fork in ino %" PRIu64 " claims free block %" PRIu64 "\n"),
forkname, ino, (__uint64_t) b);
/* fall through ... */
case XR_E_UNKNOWN:
break;
case XR_E_BAD_STATE:
- do_error(_("bad state in block map %llu\n"), b);
+ do_error(_("bad state in block map %" PRIu64 "\n"), b);
case XR_E_FS_MAP:
case XR_E_INO:
case XR_E_INUSE_FS:
- do_warn(_("%s fork in inode %llu claims "
- "metadata block %llu\n"),
- forkname, ino, (__uint64_t) b);
+ do_warn(
+_("%s fork in inode %" PRIu64 " claims metadata block %" PRIu64 "\n"),
+ forkname, ino, b);
goto done;
case XR_E_INUSE:
case XR_E_MULT:
set_bmap_ext(agno, agbno, blen, XR_E_MULT);
- do_warn(_("%s fork in %s inode %llu claims "
- "used block %llu\n"),
- forkname, ftype, ino, (__uint64_t) b);
+ do_warn(
+_("%s fork in %s inode %" PRIu64 " claims used block %" PRIu64 "\n"),
+ forkname, ftype, ino, b);
goto done;
default:
- do_error(_("illegal state %d in block map %llu\n"),
+ do_error(
+_("illegal state %d in block map %" PRIu64 "\n"),
state, b);
}
}
bp = libxfs_readbuf(mp->m_dev, XFS_AGB_TO_DADDR(mp, agno,
XFS_AGINO_TO_AGBNO(mp, irec->ino_startnum)), size, 0);
if (!bp) {
- do_warn(_("cannot read inode (%u/%u), disk block %lld\n"),
+ do_warn(_("cannot read inode (%u/%u), disk block %" PRIu64 "\n"),
agno, irec->ino_startnum,
XFS_AGB_TO_DADDR(mp, agno,
XFS_AGINO_TO_AGBNO(mp, irec->ino_startnum)));
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, fsbno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_error(_("cannot read bmap block %llu\n"), fsbno);
+ do_error(_("cannot read bmap block %" PRIu64 "\n"), fsbno);
return(NULLDFSBNO);
}
block = XFS_BUF_TO_BLOCK(bp);
prev_level = be16_to_cpu(block->bb_level);
#endif
if (numrecs > mp->m_bmap_dmxr[1]) {
- do_warn(_("# of bmap records in inode %llu exceeds max "
- "(%u, max - %u)\n"),
+ do_warn(
+_("# of bmap records in inode %" PRIu64 " exceeds max (%u, max - %u)\n"),
ino, numrecs,
mp->m_bmap_dmxr[1]);
libxfs_putbuf(bp);
return(NULLDFSBNO);
}
if (verbose && numrecs < mp->m_bmap_dmnr[1]) {
- do_warn(_("- # of bmap records in inode %llu less than "
- "minimum (%u, min - %u), proceeding ...\n"),
+ do_warn(
+_("- # of bmap records in inode %" PRIu64 " less than minimum (%u, min - %u), proceeding ...\n"),
ino, numrecs, mp->m_bmap_dmnr[1]);
}
key = XFS_BMBT_KEY_ADDR(mp, block, 1);
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, fsbno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_error(_("cannot read bmap block %llu\n"), fsbno);
+ do_error(_("cannot read bmap block %" PRIu64 "\n"),
+ fsbno);
return(NULLDFSBNO);
}
block = XFS_BUF_TO_BLOCK(bp);
*/
ASSERT(be16_to_cpu(block->bb_level) == 0);
if (numrecs > mp->m_bmap_dmxr[0]) {
- do_warn(_("# of bmap records in inode %llu greater than "
- "maximum (%u, max - %u)\n"),
+ do_warn(
+_("# of bmap records in inode %" PRIu64 " greater than maximum (%u, max - %u)\n"),
ino, numrecs, mp->m_bmap_dmxr[0]);
libxfs_putbuf(bp);
return(NULLDFSBNO);
}
if (verbose && numrecs < mp->m_bmap_dmnr[0])
- do_warn(_("- # of bmap records in inode %llu less than minimum "
- "(%u, min - %u), continuing...\n"),
+ do_warn(
+_("- # of bmap records in inode %" PRIu64 " less than minimum (%u, min - %u), continuing...\n"),
ino, numrecs, mp->m_bmap_dmnr[0]);
rec = XFS_BMBT_REC_ADDR(mp, block, 1);
libxfs_putbuf(bp);
if (final_fsbno == NULLDFSBNO)
- do_warn(_("could not map block %llu\n"), bno);
+ do_warn(_("could not map block %" PRIu64 "\n"), bno);
return(final_fsbno);
}
fsbno = getfunc_btree(mp, ino_num, dino_p, bno, whichfork);
break;
case XFS_DINODE_FMT_LOCAL:
- do_error(_("get_bmapi() called for local inode %llu\n"),
+ do_error(_("get_bmapi() called for local inode %" PRIu64 "\n"),
ino_num);
fsbno = NULLDFSBNO;
break;
/*
* shouldn't happen
*/
- do_error(_("bad inode format for inode %llu\n"), ino_num);
+ do_error(_("bad inode format for inode %" PRIu64 "\n"), ino_num);
fsbno = NULLDFSBNO;
}
* to by the pointers in the fork. For now
* though, we just bail (and blow out the inode).
*/
- do_warn(_("bad level %d in inode %llu bmap btree root block\n"),
+ do_warn(
+_("bad level %d in inode %" PRIu64 " bmap btree root block\n"),
level, XFS_AGINO_TO_INO(mp, agno, ino));
return(1);
}
if (numrecs == 0) {
- do_warn(_("bad numrecs 0 in inode %llu bmap btree root block\n"),
+ do_warn(
+_("bad numrecs 0 in inode %" PRIu64 " bmap btree root block\n"),
XFS_AGINO_TO_INO(mp, agno, ino));
return(1);
}
if (XFS_BMDR_SPACE_CALC(numrecs) > XFS_DFORK_SIZE(dip, mp, whichfork)) {
do_warn(
_("indicated size of %s btree root (%d bytes) greater than space in "
- "inode %llu %s fork\n"),
+ "inode %" PRIu64 " %s fork\n"),
forkname, XFS_BMDR_SPACE_CALC(numrecs), lino, forkname);
return(1);
}
* problem, we'll bail out and presumably clear the inode.
*/
if (!verify_dfsbno(mp, be64_to_cpu(pp[i]))) {
- do_warn(_("bad bmap btree ptr 0x%llx in ino %llu\n"),
- be64_to_cpu(pp[i]), lino);
+ do_warn(_("bad bmap btree ptr 0x%llx in ino %" PRIu64 "\n"),
+ (unsigned long long) be64_to_cpu(pp[i]), lino);
return(1);
}
be64_to_cpu(pkey[i].br_startoff)) {
if (!no_modify) {
do_warn(
- _("correcting key in bmbt root (was %llu, now %llu) in inode "
- "%llu %s fork\n"),
- be64_to_cpu(pkey[i].br_startoff),
+ _("correcting key in bmbt root (was %llu, now %" PRIu64") in inode "
+ "%" PRIu64" %s fork\n"),
+ (unsigned long long)
+ be64_to_cpu(pkey[i].br_startoff),
cursor.level[level-1].first_key,
XFS_AGINO_TO_INO(mp, agno, ino),
forkname);
cursor.level[level-1].first_key);
} else {
do_warn(
- _("bad key in bmbt root (is %llu, would reset to %llu) in inode "
- "%llu %s fork\n"),
- be64_to_cpu(pkey[i].br_startoff),
+ _("bad key in bmbt root (is %llu, would reset to %" PRIu64 ") in inode "
+ "%" PRIu64 " %s fork\n"),
+ (unsigned long long)
+ be64_to_cpu(pkey[i].br_startoff),
cursor.level[level-1].first_key,
XFS_AGINO_TO_INO(mp, agno, ino),
forkname);
if (last_key != NULLDFILOFF && last_key >=
cursor.level[level-1].first_key) {
do_warn(
- _("out of order bmbt root key %llu in inode %llu %s fork\n"),
+ _("out of order bmbt root key %" PRIu64 " in inode %" PRIu64 " %s fork\n"),
first_key,
XFS_AGINO_TO_INO(mp, agno, ino),
forkname);
if (*nex <= XFS_DFORK_SIZE(dip, mp, whichfork) /
sizeof(xfs_bmbt_rec_t)) {
do_warn(
- _("extent count for ino %lld %s fork too low (%d) for file format\n"),
+ _("extent count for ino %" PRIu64 " %s fork too low (%" PRIu64 ") for file format\n"),
lino, forkname, *nex);
return(1);
}
if (check_dups == 0 &&
cursor.level[0].right_fsbno != NULLDFSBNO) {
do_warn(
- _("bad fwd (right) sibling pointer (saw %llu should be NULLDFSBNO)\n"),
+ _("bad fwd (right) sibling pointer (saw %" PRIu64 " should be NULLDFSBNO)\n"),
cursor.level[0].right_fsbno);
do_warn(
- _("\tin inode %u (%s fork) bmap btree block %llu\n"),
+ _("\tin inode %" PRIu64 " (%s fork) bmap btree block %" PRIu64 "\n"),
XFS_AGINO_TO_INO(mp, agno, ino), forkname,
cursor.level[0].fsbno);
return(1);
if (whichfork == XFS_DATA_FORK && be64_to_cpu(dip->di_size) >
XFS_DFORK_DSIZE(dip, mp)) {
do_warn(
- _("local inode %llu data fork is too large (size = %lld, max = %d)\n"),
- lino, be64_to_cpu(dip->di_size),
+ _("local inode %" PRIu64 " data fork is too large (size = %lld, max = %d)\n"),
+ lino, (unsigned long long) be64_to_cpu(dip->di_size),
XFS_DFORK_DSIZE(dip, mp));
return(1);
} else if (whichfork == XFS_ATTR_FORK) {
asf = (xfs_attr_shortform_t *)XFS_DFORK_APTR(dip);
if (be16_to_cpu(asf->hdr.totsize) > XFS_DFORK_ASIZE(dip, mp)) {
do_warn(
- _("local inode %llu attr fork too large (size %d, max = %d)\n"),
+ _("local inode %" PRIu64 " attr fork too large (size %d, max = %d)\n"),
lino, be16_to_cpu(asf->hdr.totsize),
XFS_DFORK_ASIZE(dip, mp));
return(1);
}
if (be16_to_cpu(asf->hdr.totsize) < sizeof(xfs_attr_sf_hdr_t)) {
do_warn(
- _("local inode %llu attr too small (size = %d, min size = %d)\n"),
+ _("local inode %" PRIu64 " attr too small (size = %d, min size = %zd)\n"),
lino, be16_to_cpu(asf->hdr.totsize),
sizeof(xfs_attr_sf_hdr_t));
return(1);
if (be64_to_cpu(dino->di_size) <= XFS_DFORK_DSIZE(dino, mp)) {
if (dino->di_format == XFS_DINODE_FMT_LOCAL)
return 0;
- do_warn(_("mismatch between format (%d) and size (%lld) in "
- "symlink ino %llu\n"), dino->di_format,
- be64_to_cpu(dino->di_size), lino);
+ do_warn(
+_("mismatch between format (%d) and size (%" PRId64 ") in symlink ino %" PRIu64 "\n"),
+ dino->di_format,
+ (__int64_t)be64_to_cpu(dino->di_size), lino);
return 1;
}
if (dino->di_format == XFS_DINODE_FMT_LOCAL) {
- do_warn(_("mismatch between format (%d) and size (%lld) in "
- "symlink inode %llu\n"), dino->di_format,
- be64_to_cpu(dino->di_size), lino);
+ do_warn(
+_("mismatch between format (%d) and size (%" PRId64 ") in symlink inode %" PRIu64 "n"),
+ dino->di_format,
+ (__int64_t)be64_to_cpu(dino->di_size), lino);
return 1;
}
*/
if (numrecs > max_symlink_blocks) {
do_warn(
- _("bad number of extents (%d) in symlink %llu data fork\n"),
+_("bad number of extents (%d) in symlink %" PRIu64 " data fork\n"),
numrecs, lino);
return(1);
}
if (irec.br_startoff != expected_offset) {
do_warn(
- _("bad extent #%d offset (%llu) in symlink %llu data fork\n"),
+_("bad extent #%d offset (%" PRIu64 ") in symlink %" PRIu64 " data fork\n"),
i, irec.br_startoff, lino);
return(1);
}
if (irec.br_blockcount == 0 || irec.br_blockcount > max_blocks) {
do_warn(
- _("bad extent #%d count (%llu) in symlink %llu data fork\n"),
+_("bad extent #%d count (%" PRIu64 ") in symlink %" PRIu64 " data fork\n"),
i, irec.br_blockcount, lino);
return(1);
}
* for that
*/
if (be64_to_cpu(dino->di_size) >= MAXPATHLEN) {
- do_warn(_("symlink in inode %llu too long (%lld chars)\n"),
- lino, be64_to_cpu(dino->di_size));
+ do_warn(_("symlink in inode %" PRIu64 " too long (%llu chars)\n"),
+ lino, (unsigned long long) be64_to_cpu(dino->di_size));
return(1);
}
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp || fsbno == NULLDFSBNO) {
do_warn(
- _("cannot read inode %llu, file block %d, disk block %llu\n"),
+_("cannot read inode %" PRIu64 ", file block %d, disk block %" PRIu64 "\n"),
lino, i, fsbno);
return(1);
}
*/
if (null_check(symlink, be64_to_cpu(dino->di_size))) {
do_warn(
- _("found illegal null character in symlink inode %llu\n"),
+_("found illegal null character in symlink inode %" PRIu64 "\n"),
lino);
return(1);
}
while (cptr != NULL) {
if (cptr - symlink >= MAXNAMELEN) {
do_warn(
- _("component of symlink in inode %llu too long\n"),
+_("component of symlink in inode %" PRIu64 " too long\n"),
lino);
return(1);
}
if (strlen(symlink) >= MAXNAMELEN) {
do_warn(
- _("component of symlink in inode %llu too long\n"),
+_("component of symlink in inode %" PRIu64 " too long\n"),
lino);
return(1);
}
* probably require a superblock version rev, sigh).
*/
if (type == XR_INO_MOUNTPOINT) {
- do_warn(_("inode %llu has bad inode type (IFMNT)\n"), lino);
+ do_warn(
+_("inode %" PRIu64 " has bad inode type (IFMNT)\n"), lino);
return(1);
}
if (be64_to_cpu(dino->di_size) != 0) {
switch (type) {
case XR_INO_CHRDEV:
- do_warn(_("size of character device inode %llu != 0 "
- "(%lld bytes)\n"), lino,
- be64_to_cpu(dino->di_size));
+ do_warn(
+_("size of character device inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+ (__int64_t)be64_to_cpu(dino->di_size));
break;
case XR_INO_BLKDEV:
- do_warn(_("size of block device inode %llu != 0 "
- "(%lld bytes)\n"), lino,
- be64_to_cpu(dino->di_size));
+ do_warn(
+_("size of block device inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+ (__int64_t)be64_to_cpu(dino->di_size));
break;
case XR_INO_SOCK:
- do_warn(_("size of socket inode %llu != 0 "
- "(%lld bytes)\n"), lino,
- be64_to_cpu(dino->di_size));
+ do_warn(
+_("size of socket inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+ (__int64_t)be64_to_cpu(dino->di_size));
break;
case XR_INO_FIFO:
- do_warn(_("size of fifo inode %llu != 0 "
- "(%lld bytes)\n"), lino,
- be64_to_cpu(dino->di_size));
+ do_warn(
+_("size of fifo inode %" PRIu64 " != 0 (%" PRId64 " bytes)\n"), lino,
+ (__int64_t)be64_to_cpu(dino->di_size));
break;
default:
do_warn(_("Internal error - process_misc_ino_types, "
switch (type) {
case XR_INO_CHRDEV:
do_warn(
- _("size of character device inode %llu != 0 (%llu blocks)\n"),
+_("size of character device inode %" PRIu64 " != 0 (%" PRIu64 " blocks)\n"),
lino, totblocks);
break;
case XR_INO_BLKDEV:
do_warn(
- _("size of block device inode %llu != 0 (%llu blocks)\n"),
+_("size of block device inode %" PRIu64 " != 0 (%" PRIu64 " blocks)\n"),
lino, totblocks);
break;
case XR_INO_SOCK:
do_warn(
- _("size of socket inode %llu != 0 (%llu blocks)\n"),
+_("size of socket inode %" PRIu64 " != 0 (%" PRIu64 " blocks)\n"),
lino, totblocks);
break;
case XR_INO_FIFO:
do_warn(
- _("size of fifo inode %llu != 0 (%llu blocks)\n"),
+_("size of fifo inode %" PRIu64 " != 0 (%" PRIu64 " blocks)\n"),
lino, totblocks);
break;
default:
{
if (lino == mp->m_sb.sb_rootino) {
if (*type != XR_INO_DIR) {
- do_warn(_("root inode %llu has bad type 0x%x\n"),
+ do_warn(_("root inode %" PRIu64 " has bad type 0x%x\n"),
lino, dinode_fmt(dinoc));
*type = XR_INO_DIR;
if (!no_modify) {
}
if (lino == mp->m_sb.sb_uquotino) {
if (*type != XR_INO_DATA) {
- do_warn(_("user quota inode %llu has bad type 0x%x\n"),
+ do_warn(_("user quota inode %" PRIu64 " has bad type 0x%x\n"),
lino, dinode_fmt(dinoc));
mp->m_sb.sb_uquotino = NULLFSINO;
return 1;
}
if (lino == mp->m_sb.sb_gquotino) {
if (*type != XR_INO_DATA) {
- do_warn(_("group quota inode %llu has bad type 0x%x\n"),
+ do_warn(_("group quota inode %" PRIu64 " has bad type 0x%x\n"),
lino, dinode_fmt(dinoc));
mp->m_sb.sb_gquotino = NULLFSINO;
return 1;
}
if (lino == mp->m_sb.sb_rsumino) {
if (*type != XR_INO_RTSUM) {
- do_warn(_("realtime summary inode %llu has bad type 0x%x, "),
+ do_warn(
+_("realtime summary inode %" PRIu64 " has bad type 0x%x, "),
lino, dinode_fmt(dinoc));
if (!no_modify) {
do_warn(_("resetting to regular file\n"));
}
}
if (mp->m_sb.sb_rblocks == 0 && dinoc->di_nextents != 0) {
- do_warn(_("bad # of extents (%u) for realtime summary inode %llu\n"),
+ do_warn(
+_("bad # of extents (%u) for realtime summary inode %" PRIu64 "\n"),
be32_to_cpu(dinoc->di_nextents), lino);
return 1;
}
}
if (lino == mp->m_sb.sb_rbmino) {
if (*type != XR_INO_RTBITMAP) {
- do_warn(_("realtime bitmap inode %llu has bad type 0x%x, "),
+ do_warn(
+_("realtime bitmap inode %" PRIu64 " has bad type 0x%x, "),
lino, dinode_fmt(dinoc));
if (!no_modify) {
do_warn(_("resetting to regular file\n"));
}
}
if (mp->m_sb.sb_rblocks == 0 && dinoc->di_nextents != 0) {
- do_warn(_("bad # of extents (%u) for realtime bitmap inode %llu\n"),
+ do_warn(
+_("bad # of extents (%u) for realtime bitmap inode %" PRIu64 "\n"),
be32_to_cpu(dinoc->di_nextents), lino);
return 1;
}
case XR_INO_DIR:
if (size <= XFS_DFORK_DSIZE(dino, mp) &&
dino->di_format != XFS_DINODE_FMT_LOCAL) {
- do_warn(_("mismatch between format (%d) and size "
- "(%lld) in directory ino %llu\n"),
+ do_warn(
+_("mismatch between format (%d) and size (%" PRId64 ") in directory ino %" PRIu64 "\n"),
dino->di_format, size, lino);
return 1;
}
if (size > XFS_DIR2_LEAF_OFFSET) {
- do_warn(_("directory inode %llu has bad size %lld\n"),
+ do_warn(
+_("directory inode %" PRIu64 " has bad size %" PRId64 "\n"),
lino, size);
return 1;
}
case XR_INO_SYMLINK:
if (process_symlink_extlist(mp, lino, dino)) {
- do_warn(_("bad data fork in symlink %llu\n"), lino);
+ do_warn(_("bad data fork in symlink %" PRIu64 "\n"), lino);
return 1;
}
break;
* to be a real-time file is bogus
*/
if (mp->m_sb.sb_rblocks == 0) {
- do_warn(_("found inode %llu claiming to be a "
- "real-time file\n"), lino);
+ do_warn(
+_("found inode %" PRIu64 " claiming to be a real-time file\n"), lino);
return 1;
}
break;
case XR_INO_RTBITMAP:
if (size != (__int64_t)mp->m_sb.sb_rbmblocks *
mp->m_sb.sb_blocksize) {
- do_warn(_("realtime bitmap inode %llu has bad size "
- "%lld (should be %lld)\n"),
- lino, size, (__int64_t) mp->m_sb.sb_rbmblocks *
+ do_warn(
+_("realtime bitmap inode %" PRIu64 " has bad size %" PRId64 " (should be %" PRIu64 ")\n"),
+ lino, size,
+ (__int64_t) mp->m_sb.sb_rbmblocks *
mp->m_sb.sb_blocksize);
return 1;
}
case XR_INO_RTSUM:
if (size != mp->m_rsumsize) {
- do_warn(_("realtime summary inode %llu has bad size "
- "%lld (should be %d)\n"),
+ do_warn(
+_("realtime summary inode %" PRIu64 " has bad size %" PRId64 " (should be %d)\n"),
lino, size, mp->m_rsumsize);
return 1;
}
switch (dino->di_format) {
case XFS_DINODE_FMT_DEV:
if (dino->di_forkoff != (roundup(sizeof(xfs_dev_t), 8) >> 3)) {
- do_warn(_("bad attr fork offset %d in dev inode %llu, "
- "should be %d\n"), dino->di_forkoff, lino,
+ do_warn(
+_("bad attr fork offset %d in dev inode %" PRIu64 ", should be %d\n"),
+ dino->di_forkoff, lino,
(int)(roundup(sizeof(xfs_dev_t), 8) >> 3));
return 1;
}
case XFS_DINODE_FMT_EXTENTS: /* fall through ... */
case XFS_DINODE_FMT_BTREE:
if (dino->di_forkoff >= (XFS_LITINO(mp) >> 3)) {
- do_warn(_("bad attr fork offset %d in inode %llu, "
- "max=%d\n"), dino->di_forkoff, lino,
+ do_warn(
+_("bad attr fork offset %d in inode %" PRIu64 ", max=%d\n"),
+ dino->di_forkoff, lino,
XFS_LITINO(mp) >> 3);
return 1;
}
{
if (nblocks != be64_to_cpu(dino->di_nblocks)) {
if (!no_modify) {
- do_warn(_("correcting nblocks for inode %llu, "
- "was %llu - counted %llu\n"), lino,
- be64_to_cpu(dino->di_nblocks), nblocks);
+ do_warn(
+_("correcting nblocks for inode %" PRIu64 ", was %llu - counted %" PRIu64 "\n"), lino,
+ (unsigned long long) be64_to_cpu(dino->di_nblocks),
+ nblocks);
dino->di_nblocks = cpu_to_be64(nblocks);
*dirty = 1;
} else {
- do_warn(_("bad nblocks %llu for inode %llu, "
- "would reset to %llu\n"),
- be64_to_cpu(dino->di_nblocks), lino, nblocks);
+ do_warn(
+_("bad nblocks %llu for inode %" PRIu64 ", would reset to %" PRIu64 "\n"),
+ (unsigned long long) be64_to_cpu(dino->di_nblocks),
+ lino, nblocks);
}
}
if (nextents > MAXEXTNUM) {
- do_warn(_("too many data fork extents (%llu) in inode %llu\n"),
+ do_warn(
+_("too many data fork extents (%" PRIu64 ") in inode %" PRIu64 "\n"),
nextents, lino);
return 1;
}
if (nextents != be32_to_cpu(dino->di_nextents)) {
if (!no_modify) {
- do_warn(_("correcting nextents for inode %llu, "
- "was %d - counted %llu\n"), lino,
- be32_to_cpu(dino->di_nextents), nextents);
+ do_warn(
+_("correcting nextents for inode %" PRIu64 ", was %d - counted %" PRIu64 "\n"),
+ lino,
+ be32_to_cpu(dino->di_nextents),
+ nextents);
dino->di_nextents = cpu_to_be32(nextents);
*dirty = 1;
} else {
- do_warn(_("bad nextents %d for inode %llu, would reset "
- "to %llu\n"), be32_to_cpu(dino->di_nextents),
+ do_warn(
+_("bad nextents %d for inode %" PRIu64 ", would reset to %" PRIu64 "\n"),
+ be32_to_cpu(dino->di_nextents),
lino, nextents);
}
}
if (anextents > MAXAEXTNUM) {
- do_warn(_("too many attr fork extents (%llu) in inode %llu\n"),
+ do_warn(
+_("too many attr fork extents (%" PRIu64 ") in inode %" PRIu64 "\n"),
anextents, lino);
return 1;
}
if (anextents != be16_to_cpu(dino->di_anextents)) {
if (!no_modify) {
- do_warn(_("correcting anextents for inode %llu, "
- "was %d - counted %llu\n"), lino,
+ do_warn(
+_("correcting anextents for inode %" PRIu64 ", was %d - counted %" PRIu64 "\n"),
+ lino,
be16_to_cpu(dino->di_anextents), anextents);
dino->di_anextents = cpu_to_be16(anextents);
*dirty = 1;
} else {
- do_warn(_("bad anextents %d for inode %llu, would reset"
- " to %llu\n"), be16_to_cpu(dino->di_anextents),
+ do_warn(
+_("bad anextents %d for inode %" PRIu64 ", would reset to %" PRIu64 "\n"),
+ be16_to_cpu(dino->di_anextents),
lino, anextents);
}
}
err = 0;
break;
default:
- do_error(_("unknown format %d, ino %llu (mode = %d)\n"),
+ do_error(_("unknown format %d, ino %" PRIu64 " (mode = %d)\n"),
dino->di_format, lino, be16_to_cpu(dino->di_mode));
}
if (err) {
- do_warn(_("bad data fork in inode %llu\n"), lino);
+ do_warn(_("bad data fork in inode %" PRIu64 "\n"), lino);
if (!no_modify) {
*dirty += clear_dinode(mp, dino, lino);
ASSERT(*dirty > 0);
err = 0;
break;
default:
- do_error(_("unknown format %d, ino %llu (mode = %d)\n"),
+ do_error(_("unknown format %d, ino %" PRIu64 " (mode = %d)\n"),
dino->di_format, lino,
be16_to_cpu(dino->di_mode));
}
if (!XFS_DFORK_Q(dino)) {
*anextents = 0;
if (dino->di_aformat != XFS_DINODE_FMT_EXTENTS) {
- do_warn(_("bad attribute format %d in inode %llu, "),
+ do_warn(_("bad attribute format %d in inode %" PRIu64 ", "),
dino->di_aformat, lino);
if (!no_modify) {
do_warn(_("resetting value\n"));
XFS_ATTR_FORK, check_dups);
break;
default:
- do_warn(_("illegal attribute format %d, ino %llu\n"),
+ do_warn(_("illegal attribute format %d, ino %" PRIu64 "\n"),
dino->di_aformat, lino);
err = 1;
break;
* XXX - put the inode onto the "move it" list and
* log the the attribute scrubbing
*/
- do_warn(_("bad attribute fork in inode %llu"), lino);
+ do_warn(_("bad attribute fork in inode %" PRIu64), lino);
if (!no_modify) {
if (delete_attr_ok) {
&ablkmap, XFS_ATTR_FORK, 0);
break;
default:
- do_error(_("illegal attribute fmt %d, ino %llu\n"),
+ do_error(_("illegal attribute fmt %d, ino %" PRIu64 "\n"),
dino->di_aformat, lino);
}
/* get this only in phase 3, not in both phase 3 and 4 */
if (extra_attr_check &&
process_attributes(mp, lino, dino, ablkmap, &repair)) {
- do_warn(_("problem with attribute contents in inode %llu\n"),
+ do_warn(
+ _("problem with attribute contents in inode %" PRIu64 "\n"),
lino);
if (!repair) {
/* clear attributes if not done already */
* cause sb to be updated later.
*/
fs_inode_nlink = 1;
- do_warn(_("version 2 inode %llu claims > %u links, "),
+ do_warn
+ (_("version 2 inode %" PRIu64 " claims > %u links, "),
lino, XFS_MAXLINK_1);
if (!no_modify) {
- do_warn(_("updating superblock "
- "version number\n"));
+ do_warn(
+ _("updating superblock version number\n"));
} else {
- do_warn(_("would update superblock "
- "version number\n"));
+ do_warn(
+ _("would update superblock version number\n"));
}
} else {
/*
* no, have to convert back to onlinks
* even if we lose some links
*/
- do_warn(_("WARNING: version 2 inode %llu "
- "claims > %u links, "),
+ do_warn(
+ _("WARNING: version 2 inode %" PRIu64 " claims > %u links, "),
lino, XFS_MAXLINK_1);
if (!no_modify) {
do_warn(_("converting back to version 1,\n"
*
* the case where we lost links was handled above.
*/
- do_warn(_("found version 2 inode %llu, "), lino);
+ do_warn(_("found version 2 inode %" PRIu64 ", "), lino);
if (!no_modify) {
do_warn(_("converting back to version 1\n"));
dino->di_version = 1;
if (dino->di_version > 1 &&
dino->di_onlink != 0 && fs_inode_nlink > 0) {
if (!no_modify) {
- do_warn(_("clearing obsolete nlink field in "
- "version 2 inode %llu, was %d, now 0\n"),
+ do_warn(
+_("clearing obsolete nlink field in version 2 inode %" PRIu64 ", was %d, now 0\n"),
lino, be16_to_cpu(dino->di_onlink));
dino->di_onlink = 0;
dirty = 1;
} else {
- do_warn(_("would clear obsolete nlink field in "
- "version 2 inode %llu, currently %d\n"),
+ do_warn(
+_("would clear obsolete nlink field in version 2 inode %" PRIu64 ", currently %d\n"),
lino, be16_to_cpu(dino->di_onlink));
}
}
if (be16_to_cpu(dino->di_magic) != XFS_DINODE_MAGIC) {
retval = 1;
if (!uncertain)
- do_warn(_("bad magic number 0x%x on inode %llu%c"),
+ do_warn(_("bad magic number 0x%x on inode %" PRIu64 "%c"),
be16_to_cpu(dino->di_magic), lino,
verify_mode ? '\n' : ',');
if (!verify_mode) {
(!fs_inode_nlink && dino->di_version > 1)) {
retval = 1;
if (!uncertain)
- do_warn(_("bad version number 0x%x on inode %llu%c"),
+ do_warn(_("bad version number 0x%x on inode %" PRIu64 "%c"),
(__s8)dino->di_version, lino,
verify_mode ? '\n' : ',');
if (!verify_mode) {
*/
if ((xfs_fsize_t)be64_to_cpu(dino->di_size) < 0) {
if (!uncertain)
- do_warn(_("bad (negative) size %lld on inode %llu\n"),
- be64_to_cpu(dino->di_size), lino);
+ do_warn(
+_("bad (negative) size %" PRId64 " on inode %" PRIu64 "\n"),
+ (__int64_t)be64_to_cpu(dino->di_size),
+ lino);
if (verify_mode)
return 1;
goto clear_bad_out;
* clear the inode just to be safe and mark the inode
* free.
*/
- do_warn(_("imap claims a free inode %llu is in use, "), lino);
+ do_warn(
+ _("imap claims a free inode %" PRIu64 " is in use, "), lino);
if (!no_modify) {
do_warn(_("correcting imap and clearing inode\n"));
*dirty += clear_dinode(mp, dino, lino);
*/
if (di_mode != 0 && check_dinode_mode_format(dino) != 0) {
if (!uncertain)
- do_warn(_("bad inode format in inode %llu\n"), lino);
+ do_warn(
+ _("bad inode format in inode %" PRIu64 "\n"), lino);
if (verify_mode)
return 1;
goto clear_bad_out;
uint16_t flags = be16_to_cpu(dino->di_flags);
if (flags & ~XFS_DIFLAG_ANY) {
- do_warn(_("Bad flags set in inode %llu"), lino);
+ do_warn(_("Bad flags set in inode %" PRIu64), lino);
flags &= ~XFS_DIFLAG_ANY;
}
if (flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_RTINHERIT)) {
/* need an rt-dev! */
if (!rt_name) {
- do_warn(_(
- "inode %llu has RT flag set but there is no RT device"), lino);
+ do_warn(
+ _("inode %" PRIu64 " has RT flag set but there is no RT device"),
+ lino);
flags &= ~(XFS_DIFLAG_REALTIME |
XFS_DIFLAG_RTINHERIT);
}
if (flags & XFS_DIFLAG_NEWRTBM) {
/* must be a rt bitmap inode */
if (lino != mp->m_sb.sb_rbmino) {
- do_warn(_("inode %llu not rt bitmap"), lino);
+ do_warn(_("inode %" PRIu64 " not rt bitmap"),
+ lino);
flags &= ~XFS_DIFLAG_NEWRTBM;
}
}
XFS_DIFLAG_NOSYMLINKS)) {
/* must be a directory */
if (di_mode && !S_ISDIR(di_mode)) {
- do_warn(_(
- "directory flags set on non-directory inode %llu"),
+ do_warn(
+ _("directory flags set on non-directory inode %" PRIu64 ),
lino);
flags &= ~(XFS_DIFLAG_RTINHERIT |
XFS_DIFLAG_EXTSZINHERIT |
if (flags & (XFS_DIFLAG_REALTIME | XFS_XFLAG_EXTSIZE)) {
/* must be a file */
if (di_mode && !S_ISREG(di_mode)) {
- do_warn(_(
- "file flags set on non-file inode %llu"), lino);
+ do_warn(
+ _("file flags set on non-file inode %" PRIu64),
+ lino);
flags &= ~(XFS_DIFLAG_REALTIME |
XFS_XFLAG_EXTSIZE);
}
type = XR_INO_FIFO;
break;
default:
- do_warn(_("bad inode type %#o inode %llu\n"),
+ do_warn(_("bad inode type %#o inode %" PRIu64 "\n"),
di_mode & S_IFMT, lino);
goto clear_bad_out;
}
XFS_DIFLAG_EXTSIZE))) {
/* s'okay */ ;
} else {
- do_warn(_("bad non-zero extent size %u for "
- "non-realtime/extsize inode %llu, "),
+ do_warn(
+_("bad non-zero extent size %u for non-realtime/extsize inode %" PRIu64 ", "),
be32_to_cpu(dino->di_extsize), lino);
if (!no_modify) {
do_warn(_("resetting to zero\n"));
dirty, "", parent, dblkmap) :
process_dir(mp, lino, dino, ino_discovery,
dirty, "", parent, dblkmap)) {
- do_warn(_("problem with directory contents in "
- "inode %llu\n"), lino);
+ do_warn(
+ _("problem with directory contents in inode %" PRIu64 "\n"),
+ lino);
goto clear_bad_out;
}
break;
case XR_INO_SYMLINK:
if (process_symlink(mp, lino, dino, dblkmap) != 0) {
- do_warn(_("problem with symbolic link in inode %llu\n"),
+ do_warn(
+ _("problem with symbolic link in inode %" PRIu64 "\n"),
lino);
goto clear_bad_out;
}
* junk the entry, mark lino as NULL since it's bad
*/
do_warn(
- _("invalid inode number %llu in directory %llu\n"), lino, ino);
+ _("invalid inode number %" PRIu64 " in directory %" PRIu64 "\n"), lino, ino);
lino = NULLFSINO;
junkit = 1;
} else if (lino == mp->m_sb.sb_rbmino) {
do_warn(
- _("entry in shortform dir %llu references rt bitmap inode %llu\n"),
+ _("entry in shortform dir %" PRIu64 " references rt bitmap inode %" PRIu64 "\n"),
ino, lino);
junkit = 1;
} else if (lino == mp->m_sb.sb_rsumino) {
do_warn(
- _("entry in shortform dir %llu references rt summary inode %llu\n"),
+ _("entry in shortform dir %" PRIu64 " references rt summary inode %" PRIu64 "\n"),
ino, lino);
junkit = 1;
} else if (lino == mp->m_sb.sb_uquotino) {
do_warn(
- _("entry in shortform dir %llu references user quota inode %llu\n"),
+ _("entry in shortform dir %" PRIu64 " references user quota inode %" PRIu64 "\n"),
ino, lino);
junkit = 1;
} else if (lino == mp->m_sb.sb_gquotino) {
do_warn(
- _("entry in shortform dir %llu references group quota inode %llu\n"),
+ _("entry in shortform dir %" PRIu64 " references group quota inode %" PRIu64 "\n"),
ino, lino);
junkit = 1;
} else if ((irec_p = find_inode_rec(mp,
if (!ino_discovery && is_inode_free(irec_p, ino_off)) {
do_warn(
- _("entry references free inode %llu in shortform directory %llu\n"),
+ _("entry references free inode %" PRIu64 " in shortform directory %" PRIu64 "\n"),
lino, ino);
junkit = 1;
}
* phase) so this is clearly a bogus entry.
*/
do_warn(
- _("entry references non-existent inode %llu in shortform dir %llu\n"),
+ _("entry references non-existent inode %" PRIu64 " in shortform dir %" PRIu64 "\n"),
lino, ino);
junkit = 1;
}
(__psint_t) sf);
if (!no_modify) {
do_warn(
- _("zero length entry in shortform dir %llu, resetting to %d\n"),
+ _("zero length entry in shortform dir %" PRIu64 ", resetting to %d\n"),
ino, namelen);
sf_entry->namelen = namelen;
} else {
do_warn(
- _("zero length entry in shortform dir %llu, would set to %d\n"),
+ _("zero length entry in shortform dir %" PRIu64 ", would set to %d\n"),
ino, namelen);
}
} else {
do_warn(
- _("zero length entry in shortform dir %llu, "),
+ _("zero length entry in shortform dir %" PRIu64 ", "),
ino);
if (!no_modify)
do_warn(_("junking %d entries\n"),
((__psint_t) &sf_entry->name[0] -
(__psint_t) sf);
do_warn(
- _("size of last entry overflows space left in in shortform dir %llu, "),
+ _("size of last entry overflows space left in in shortform dir %" PRIu64 ", "),
ino);
if (!no_modify) {
do_warn(_("resetting to %d\n"),
}
} else {
do_warn(
- _("size of entry #%d overflows space left in in shortform dir %llu\n"),
+ _("size of entry #%d overflows space left in in shortform dir %" PRIu64 "\n"),
i, ino);
if (!no_modify) {
if (i == num_entries - 1)
* junk entry
*/
do_warn(
- _("entry contains illegal character in shortform dir %llu\n"),
+ _("entry contains illegal character in shortform dir %" PRIu64 "\n"),
ino);
junkit = 1;
}
*repair = 1;
do_warn(
- _("junking entry \"%s\" in directory inode %llu\n"),
+ _("junking entry \"%s\" in directory inode %" PRIu64 "\n"),
name, ino);
} else {
do_warn(
- _("would have junked entry \"%s\" in directory inode %llu\n"),
+ _("would have junked entry \"%s\" in directory inode %" PRIu64 "\n"),
name, ino);
}
}
if (sf->hdr.count != i) {
if (no_modify) {
do_warn(
- _("would have corrected entry count in directory %llu from %d to %d\n"),
+ _("would have corrected entry count in directory %" PRIu64 " from %d to %d\n"),
ino, sf->hdr.count, i);
} else {
do_warn(
- _("corrected entry count in directory %llu, was %d, now %d\n"),
+ _("corrected entry count in directory %" PRIu64 ", was %d, now %d\n"),
ino, sf->hdr.count, i);
sf->hdr.count = i;
*dino_dirty = 1;
if ((__psint_t) next_sfe - (__psint_t) sf != ino_dir_size) {
if (no_modify) {
do_warn(
- _("would have corrected directory %llu size from %lld to %lld\n"),
- ino, (__int64_t) ino_dir_size,
- (__int64_t)((__psint_t) next_sfe - (__psint_t) sf));
+ _("would have corrected directory %" PRIu64 " size from %" PRId64 "to %" PRIdPTR "\n"),
+ ino, ino_dir_size,
+ (intptr_t)next_sfe - (intptr_t )sf);
} else {
do_warn(
- _("corrected directory %llu size, was %lld, now %lld\n"),
- ino, (__int64_t) ino_dir_size,
- (__int64_t)((__psint_t) next_sfe - (__psint_t) sf));
+ _("corrected directory %" PRIu64 " size, was %" PRId64 ", now %" PRIdPTR "\n"),
+ ino, ino_dir_size,
+ (intptr_t)next_sfe - (intptr_t)sf);
dip->di_size = cpu_to_be64((__psint_t)next_sfe
- (__psint_t)sf);
*parent = NULLFSINO;
do_warn(
- _("bogus .. inode number (%llu) in directory inode %llu, "),
+ _("bogus .. inode number (%" PRIu64 ") in directory inode %" PRIu64 ", "),
*parent, ino);
if (!no_modify) {
do_warn(_("clearing inode number\n"));
*/
if (!no_modify) {
do_warn(
- _("corrected root directory %llu .. entry, was %llu, now %llu\n"),
+ _("corrected root directory %" PRIu64 " .. entry, was %" PRIu64 ", now %" PRIu64 "\n"),
ino, *parent, ino);
*parent = ino;
xfs_dir_sf_put_dirino(parent, &sf->hdr.parent);
*repair = 1;
} else {
do_warn(
- _("would have corrected root directory %llu .. entry from %llu to %llu\n"),
+ _("would have corrected root directory %" PRIu64 " .. entry from %" PRIu64 " to %" PRIu64 "\n"),
ino, *parent, ino);
}
} else if (ino == *parent && ino != mp->m_sb.sb_rootino) {
* to .
*/
*parent = NULLFSINO;
- do_warn(_("bad .. entry in dir ino %llu, points to self, "),
+ do_warn(_("bad .. entry in dir ino %" PRIu64 ", points to self, "),
ino);
if (!no_modify) {
do_warn(_("clearing inode number\n"));
if (start >= mp->m_sb.sb_blocksize ||
start + len > mp->m_sb.sb_blocksize) {
do_warn(
- _("hole (start %d, len %d) out of range, block %d, dir ino %llu\n"),
+ _("hole (start %d, len %d) out of range, block %d, dir ino %" PRIu64 "\n"),
start, len, da_bno, ino);
return(1);
}
* bad news -- hole claims a used byte is free
*/
do_warn(
- _("hole claims used byte %d, block %d, dir ino %llu\n"),
+ _("hole claims used byte %d, block %d, dir ino %" PRIu64 "\n"),
j, da_bno, ino);
return(1);
}
if ((holemap->lost_holes > 0 ? 1 : 0) != block_hmap->lost_holes) {
if (verbose) {
do_warn(
- _("- derived hole value %d, saw %d, block %d, dir ino %llu\n"),
+ _("- derived hole value %d, saw %d, block %d, dir ino %" PRIu64 "\n"),
holemap->lost_holes, block_hmap->lost_holes,
da_bno, ino);
res = 1;
if (!found) {
if (verbose) {
do_warn(
-_("- derived hole (base %d, size %d) in block %d, dir inode %llu not found\n"),
+_("- derived hole (base %d, size %d) in block %d, dir inode %" PRIu64 " not found\n"),
holemap->hentries[i].base,
holemap->hentries[i].size,
da_bno, ino);
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
if (whichfork == XFS_DATA_FORK)
- do_warn(_("can't read block %u (fsbno %llu) "
- "for directory inode %llu\n"),
+ do_warn(
+ _("can't read block %u (fsbno %" PRIu64 ") for directory inode %" PRIu64 "\n"),
bno, fsbno, da_cursor->ino);
else
- do_warn(_("can't read block %u (fsbno %llu) "
- "for attrbute fork of inode %llu\n"),
+ do_warn(
+ _("can't read block %u (fsbno %" PRIu64 ") for attrbute fork of inode %" PRIu64 "\n"),
bno, fsbno, da_cursor->ino);
goto error_out;
}
node = (xfs_da_intnode_t *)XFS_BUF_PTR(bp);
if (be16_to_cpu(node->hdr.info.magic) != XFS_DA_NODE_MAGIC) {
- do_warn(_("bad dir/attr magic number in inode %llu, "
- "file bno = %u, fsbno = %llu\n"),
+ do_warn(_("bad dir/attr magic number in inode %" PRIu64 ", "
+ "file bno = %u, fsbno = %" PRIu64 "\n"),
da_cursor->ino, bno, fsbno);
libxfs_putbuf(bp);
goto error_out;
}
if (be16_to_cpu(node->hdr.count) >
mp->m_dir_node_ents) {
- do_warn(_("bad record count in inode %llu, "
+ do_warn(_("bad record count in inode %" PRIu64 ", "
"count = %d, max = %d\n"),
da_cursor->ino,
be16_to_cpu(node->hdr.count),
} else {
if (whichfork == XFS_DATA_FORK)
do_warn(_("bad directory btree for "
- "directory inode %llu\n"),
+ "directory inode %" PRIu64 "\n"),
da_cursor->ino);
else
do_warn(_("bad attribute fork btree "
- "for inode %llu\n"),
+ "for inode %" PRIu64 "\n"),
da_cursor->ino);
libxfs_putbuf(bp);
goto error_out;
fsbno = get_bmapi(mp, dino, ino, bno, XFS_DATA_FORK);
if (fsbno == NULLDFSBNO) {
- do_warn(_("bmap of block #%u of inode %llu failed\n"),
+ do_warn(_("bmap of block #%u of inode %" PRIu64 " failed\n"),
bno, ino);
return(fsbno);
}
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, fsbno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_warn(_("can't read block %u (fsbno %llu) "
- "for directory inode %llu\n"),
+ do_warn(
+ _("can't read block %u (fsbno %" PRIu64 ") for directory inode %" PRIu64 "\n"),
bno, fsbno, ino);
return(NULLDFSBNO);
}
if (XFS_DA_NODE_MAGIC !=
be16_to_cpu(node->hdr.info.magic)) {
- do_warn(_("bad dir/attr magic number in inode %llu, "
- "file bno = %u, fsbno = %llu\n"),
+ do_warn(
+ _("bad dir/attr magic number in inode %" PRIu64 ", file bno = %u, fsbno = %" PRIu64 "\n"),
ino, bno, fsbno);
libxfs_putbuf(bp);
return(NULLDFSBNO);
fsbno = get_bmapi(mp, dino, ino, bno, XFS_DATA_FORK);
if (fsbno == NULLDFSBNO) {
- do_warn(_("bmap of block #%u of inode %llu failed\n"),
+ do_warn(_("bmap of block #%u of inode %" PRIu64 " failed\n"),
bno, ino);
return(NULLDFSBNO);
}
bad++;
}
if (bad) {
- do_warn(_("bad directory block in dir ino %llu\n"),
+ do_warn(_("bad directory block in dir ino %" PRIu64 "\n"),
cursor->ino);
return(1);
}
if (!no_modify) {
do_warn(_("correcting bad hashval in non-leaf "
"dir/attr block\n\tin (level %d) in "
- "inode %llu.\n"),
+ "inode %" PRIu64 ".\n"),
this_level, cursor->ino);
node->btree[entry].hashval = cpu_to_be32(
cursor->level[p_level].hashval);
} else {
do_warn(_("would correct bad hashval in non-leaf "
"dir/attr block\n\tin (level %d) in "
- "inode %llu.\n"),
+ "inode %" PRIu64 ".\n"),
this_level, cursor->ino);
}
}
if (fsbno == NULLDFSBNO) {
do_warn(_("can't get map info for block %u "
- "of directory inode %llu\n"),
+ "of directory inode %" PRIu64 "\n"),
dabno, cursor->ino);
return(1);
}
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, fsbno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_warn(_("can't read block %u (%llu) "
- "for directory inode %llu\n"),
+ do_warn(
+ _("can't read block %u (%" PRIu64 ") for directory inode %" PRIu64 "\n"),
dabno, fsbno, cursor->ino);
return(1);
}
*/
bad = 0;
if (XFS_DA_NODE_MAGIC != be16_to_cpu(newnode->hdr.info.magic)) {
- do_warn(_("bad magic number %x in block %u (%llu) "
- "for directory inode %llu\n"),
+ do_warn(
+ _("bad magic number %x in block %u (%" PRIu64 ") for directory inode %" PRIu64 "\n"),
be16_to_cpu(newnode->hdr.info.magic),
dabno, fsbno, cursor->ino);
bad++;
}
if (be32_to_cpu(newnode->hdr.info.back) !=
cursor->level[this_level].bno) {
- do_warn(_("bad back pointer in block %u (%llu) "
- "for directory inode %llu\n"),
+ do_warn(
+ _("bad back pointer in block %u (%"PRIu64 ") for directory inode %" PRIu64 "\n"),
dabno, fsbno, cursor->ino);
bad++;
}
if (be16_to_cpu(newnode->hdr.count) > mp->m_dir_node_ents) {
- do_warn(_("entry count %d too large in block %u (%llu) "
- "for directory inode %llu\n"),
+ do_warn(
+ _("entry count %d too large in block %u (%" PRIu64 ") for directory inode %" PRIu64 "\n"),
be16_to_cpu(newnode->hdr.count),
dabno, fsbno, cursor->ino);
bad++;
}
if (be16_to_cpu(newnode->hdr.level) != this_level) {
- do_warn(_("bad level %d in block %u (%llu) "
- "for directory inode %llu\n"),
+ do_warn(
+ _("bad level %d in block %u (%" PRIu64 ") for directory inode %" PRIu64 "\n"),
be16_to_cpu(newnode->hdr.level),
dabno, fsbno, cursor->ino);
bad++;
if (!no_modify) {
do_warn(_("correcting bad hashval in interior "
"dir/attr block\n\tin (level %d) in "
- "inode %llu.\n"),
+ "inode %" PRIu64 ".\n"),
this_level, cursor->ino);
node->btree[entry].hashval = cpu_to_be32(
cursor->level[p_level].hashval);
} else {
do_warn(_("would correct bad hashval in interior "
"dir/attr block\n\tin (level %d) in "
- "inode %llu.\n"),
+ "inode %" PRIu64 ".\n"),
this_level, cursor->ino);
}
}
unsigned char *dir_freemap = ts_dir_freemap();
#ifdef XR_DIR_TRACE
- fprintf(stderr, "\tprocess_leaf_dir_block - ino %llu\n", ino);
+ fprintf(stderr, "\tprocess_leaf_dir_block - ino %" PRIu64 "\n", ino);
#endif
/*
i = stop = sizeof(xfs_dir_leaf_hdr_t);
if (set_da_freemap(mp, dir_freemap, 0, stop)) {
do_warn(
-_("directory block header conflicts with used space in directory inode %llu\n"),
+_("directory block header conflicts with used space in directory inode %" PRIu64 "\n"),
ino);
return(1);
}
if (be16_to_cpu(leaf->hdr.count) > 1) {
do_warn(
-_("nameidx %d for entry #%d, bno %d, ino %llu > fs blocksize, deleting entry\n"),
+_("nameidx %d for entry #%d, bno %d, ino %" PRIu64 " > fs blocksize, deleting entry\n"),
be16_to_cpu(entry->nameidx),
i, da_bno, ino);
ASSERT(be16_to_cpu(leaf->hdr.count) > i);
entry--;
} else {
do_warn(
-_("nameidx %d, entry #%d, bno %d, ino %llu > fs blocksize, marking entry bad\n"),
+_("nameidx %d, entry #%d, bno %d, ino %" PRIu64 " > fs blocksize, marking entry bad\n"),
be16_to_cpu(entry->nameidx),
i, da_bno, ino);
entry->nameidx = cpu_to_be16(
}
} else {
do_warn(
-_("nameidx %d, entry #%d, bno %d, ino %llu > fs blocksize, would delete entry\n"),
+_("nameidx %d, entry #%d, bno %d, ino %" PRIu64 " > fs blocksize, would delete entry\n"),
be16_to_cpu(entry->nameidx),
i, da_bno, ino);
}
* since it's still structurally intact.
*/
do_warn(
- _("invalid ino number %llu in dir ino %llu, entry #%d, bno %d\n"),
+_("invalid ino number %" PRIu64 " in dir ino %" PRIu64 ", entry #%d, bno %d\n"),
lino, ino, i, da_bno);
if (!no_modify) {
do_warn(
}
} else if (lino == mp->m_sb.sb_rbmino) {
do_warn(
-_("entry #%d, bno %d in directory %llu references realtime bitmap inode %llu\n"),
+_("entry #%d, bno %d in directory %" PRIu64 " references realtime bitmap inode %" PRIu64 "\n"),
i, da_bno, ino, lino);
if (!no_modify) {
do_warn(
}
} else if (lino == mp->m_sb.sb_rsumino) {
do_warn(
-_("entry #%d, bno %d in directory %llu references realtime summary inode %llu\n"),
+_("entry #%d, bno %d in directory %" PRIu64 " references realtime summary inode %" PRIu64 "\n"),
i, da_bno, ino, lino);
if (!no_modify) {
do_warn(
}
} else if (lino == mp->m_sb.sb_uquotino) {
do_warn(
-_("entry #%d, bno %d in directory %llu references user quota inode %llu\n"),
+_("entry #%d, bno %d in directory %" PRIu64 " references user quota inode %" PRIu64 "\n"),
i, da_bno, ino, lino);
if (!no_modify) {
do_warn(
}
} else if (lino == mp->m_sb.sb_gquotino) {
do_warn(
-_("entry #%d, bno %d in directory %llu references group quota inode %llu\n"),
+_("entry #%d, bno %d in directory %" PRIu64 " references group quota inode %" PRIu64 "\n"),
i, da_bno, ino, lino);
if (!no_modify) {
do_warn(
if (!ino_discovery && is_inode_free(irec_p, ino_off)) {
if (!no_modify) {
do_warn(
-_("entry references free inode %llu in directory %llu, will clear entry\n"),
+_("entry references free inode %" PRIu64 " in directory %" PRIu64 ", will clear entry\n"),
lino, ino);
lino = NULLFSINO;
xfs_dir_sf_put_dirino(&lino,
*buf_dirty = 1;
} else {
do_warn(
-_("entry references free inode %llu in directory %llu, would clear entry\n"),
+_("entry references free inode %" PRIu64 " in directory %" PRIu64 ", would clear entry\n"),
lino, ino);
}
}
add_inode_uncertain(mp, lino, 0);
} else {
do_warn(
- _("bad ino number %llu in dir ino %llu, entry #%d, bno %d\n"),
+ _("bad ino number %" PRIu64 " in dir ino %" PRIu64 ", entry #%d, bno %d\n"),
lino, ino, i, da_bno);
if (!no_modify) {
do_warn(_("clearing inode number...\n"));
if (be16_to_cpu(leaf->hdr.count) > 1) {
do_warn(
- _("entry #%d, dir inode %llu, has zero-len name, deleting entry\n"),
+ _("entry #%d, dir inode %" PRIu64 ", has zero-len name, deleting entry\n"),
i, ino);
ASSERT(be16_to_cpu(leaf->hdr.count) > i);
* inode number for now
*/
do_warn(
- _("entry #%d, dir inode %llu, has zero-len name, marking entry bad\n"),
+ _("entry #%d, dir inode %" PRIu64 ", has zero-len name, marking entry bad\n"),
i, ino);
entry->nameidx = cpu_to_be16(
mp->m_sb.sb_blocksize -
} else if (be16_to_cpu(entry->nameidx) + entry->namelen >
XFS_LBSIZE(mp)) {
do_warn(
-_("bad size, entry #%d in dir inode %llu, block %u -- entry overflows block\n"),
+_("bad size, entry #%d in dir inode %" PRIu64 ", block %u -- entry overflows block\n"),
i, ino, da_bno);
return(1);
if (set_da_freemap(mp, dir_freemap, start, stop)) {
do_warn(
-_("dir entry slot %d in block %u conflicts with used space in dir inode %llu\n"),
+_("dir entry slot %d in block %u conflicts with used space in dir inode %" PRIu64 "\n"),
i, da_bno, ino);
return(1);
}
*/
if (!no_modify) {
do_warn(
-_("illegal name \"%s\" in directory inode %llu, entry will be cleared\n"),
+_("illegal name \"%s\" in directory inode %" PRIu64 ", entry will be cleared\n"),
fname, ino);
namest->name[0] = '/';
*buf_dirty = 1;
} else {
do_warn(
-_("illegal name \"%s\" in directory inode %llu, entry would be cleared\n"),
+_("illegal name \"%s\" in directory inode %" PRIu64 ", entry would be cleared\n"),
fname, ino);
}
} else if (!nm_illegal &&
fname);
if (!no_modify) {
do_warn(
- _("\t\tin directory inode %llu. resetting hash value.\n"),
+ _("\t\tin directory inode %" PRIu64 ". resetting hash value.\n"),
ino);
entry->hashval = cpu_to_be32(hashval);
*buf_dirty = 1;
} else {
do_warn(
- _("\t\tin directory inode %llu. would reset hash value.\n"),
+ _("\t\tin directory inode %" PRIu64 ". would reset hash value.\n"),
ino);
}
}
fname);
if (!no_modify) {
do_warn(
- _("\t\tin directory inode %llu. will clear entry\n"),
+ _("\t\tin directory inode %" PRIu64 ". will clear entry\n"),
ino);
entry->hashval = cpu_to_be32(last_hashval);
namest->name[0] = '/';
*buf_dirty = 1;
} else {
do_warn(
- _("\t\tin directory inode %llu. would clear entry\n"),
+ _("\t\tin directory inode %" PRIu64 ". would clear entry\n"),
ino);
}
}
+ sizeof(xfs_dir_leaf_name_t)
+ entry->namelen - 1)) {
do_warn(
-_("name \"%s\" (block %u, slot %d) conflicts with used space in dir inode %llu\n"),
+_("name \"%s\" (block %u, slot %d) conflicts with used space in dir inode %" PRIu64 "\n"),
fname, da_bno, i, ino);
if (!no_modify) {
entry->namelen = 0;
*buf_dirty = 1;
do_warn(
- _("will clear entry \"%s\" (#%d) in directory inode %llu\n"),
+ _("will clear entry \"%s\" (#%d) in directory inode %" PRIu64 "\n"),
fname, i, ino);
} else {
do_warn(
- _("would clear entry \"%s\" (#%d)in directory inode %llu\n"),
+ _("would clear entry \"%s\" (#%d)in directory inode %" PRIu64 "\n"),
fname, i, ino);
}
continue;
(*dotdot)++;
*parent = lino;
#ifdef XR_DIR_TRACE
- fprintf(stderr, "process_leaf_dir_block found .. entry (parent) = %llu\n", lino);
+ fprintf(stderr, "process_leaf_dir_block found .. entry (parent) = %" PRIu64 "\n", lino);
#endif
/*
* what if .. == .? legal only in
ino != mp->m_sb.sb_rootino) {
*parent = NULLFSINO;
do_warn(
- _("bad .. entry in dir ino %llu, points to self"),
+ _("bad .. entry in dir ino %" PRIu64 ", points to self"),
ino);
if (!no_modify) {
do_warn(
*/
if (!no_modify) {
do_warn(
- _("correcting .. entry in root inode %llu, was %llu\n"),
+ _("correcting .. entry in root inode %" PRIu64 ", was %" PRIu64 "\n"),
ino, *parent);
xfs_dir_sf_put_dirino(
&ino, &namest->inumber);
*buf_dirty = 1;
} else {
do_warn(
- _("bad .. entry (%llu) in root inode %llu should be %llu\n"),
+ _("bad .. entry (%" PRIu64 ") in root inode %" PRIu64 " should be %" PRIu64 "\n"),
*parent,
ino, ino);
}
*/
if (!no_modify) {
do_warn(
-_("multiple .. entries in directory inode %llu, will clear second entry\n"),
+_("multiple .. entries in directory inode %" PRIu64 ", will clear second entry\n"),
ino);
namest->name[0] = '/';
*buf_dirty = 1;
} else {
do_warn(
-_("multiple .. entries in directory inode %llu, would clear second entry\n"),
+_("multiple .. entries in directory inode %" PRIu64 ", would clear second entry\n"),
ino);
}
}
if (lino != ino) {
if (!no_modify) {
do_warn(
-_(". in directory inode %llu has wrong value (%llu), fixing entry...\n"),
+_(". in directory inode %" PRIu64 " has wrong value (%" PRIu64 "), fixing entry...\n"),
ino, lino);
xfs_dir_sf_put_dirino(&ino,
&namest->inumber);
*buf_dirty = 1;
} else {
do_warn(
- _(". in directory inode %llu has wrong value (%llu)\n"),
+_(". in directory inode %" PRIu64 " has wrong value (%" PRIu64 ")\n"),
ino, lino);
}
}
} else {
do_warn(
- _("multiple . entries in directory inode %llu\n"),
+_("multiple . entries in directory inode %" PRIu64 "\n"),
ino);
/*
* mark entry as to be junked.
*/
if (!no_modify) {
do_warn(
- _("will clear one . entry in directory inode %llu\n"),
+_("will clear one . entry in directory inode %" PRIu64 "\n"),
ino);
namest->name[0] = '/';
*buf_dirty = 1;
} else {
do_warn(
- _("would clear one . entry in directory inode %llu\n"),
+_("would clear one . entry in directory inode %" PRIu64 "\n"),
ino);
}
}
*/
if (lino == ino) {
do_warn(
- _("entry \"%s\" in directory inode %llu points to self, "),
+ _("entry \"%s\" in directory inode %" PRIu64 " points to self, "),
fname, ino);
if (!no_modify) {
do_warn(_("will clear entry\n"));
if (!no_modify) {
if (verbose)
do_warn(
-_("- resetting first used heap value from %d to %d in block %u of dir ino %llu\n"),
+_("- resetting first used heap value from %d to %d in block %u of dir ino %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.firstused),
first_used, da_bno, ino);
leaf->hdr.firstused = cpu_to_be16(first_used);
} else {
if (verbose)
do_warn(
-_("- would reset first used value from %d to %d in block %u of dir ino %llu\n"),
+_("- would reset first used value from %d to %d in block %u of dir ino %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.firstused),
first_used, da_bno, ino);
}
if (!no_modify) {
if (verbose)
do_warn(
-_("- resetting namebytes cnt from %d to %d in block %u of dir inode %llu\n"),
+_("- resetting namebytes cnt from %d to %d in block %u of dir inode %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.namebytes),
bytes_used, da_bno, ino);
leaf->hdr.namebytes = cpu_to_be16(bytes_used);
} else {
if (verbose)
do_warn(
-_("- would reset namebytes cnt from %d to %d in block %u of dir inode %llu\n"),
+_("- would reset namebytes cnt from %d to %d in block %u of dir inode %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.namebytes),
bytes_used, da_bno, ino);
}
if (holemap.lost_holes > 0) {
if (verbose)
do_warn(
- _("- found unexpected lost holes in block %u, dir inode %llu\n"),
+ _("- found unexpected lost holes in block %u, dir inode %" PRIu64 "\n"),
da_bno, ino);
reset_holes = 1;
XFS_DIR_LEAF_MAPSIZE, ino, da_bno)) {
if (verbose)
do_warn(
- _("- hole info non-optimal in block %u, dir inode %llu\n"),
+ _("- hole info non-optimal in block %u, dir inode %" PRIu64 "\n"),
da_bno, ino);
reset_holes = 1;
}
} else if (verify_da_freemap(mp, dir_freemap, &holemap, ino, da_bno)) {
if (verbose)
do_warn(
- _("- hole info incorrect in block %u, dir inode %llu\n"),
+ _("- hole info incorrect in block %u, dir inode %" PRIu64 "\n"),
da_bno, ino);
reset_holes = 1;
}
*/
if (verbose) {
do_warn(
-_("- existing hole info for block %d, dir inode %llu (base, size) - \n"),
+_("- existing hole info for block %d, dir inode %" PRIu64 " (base, size) - \n"),
da_bno, ino);
do_warn("- \t");
for (i = 0; i < XFS_DIR_LEAF_MAPSIZE; i++) {
if (!no_modify) {
if (verbose)
do_warn(
- _("- compacting block %u in dir inode %llu\n"),
+ _("- compacting block %u in dir inode %" PRIu64 "\n"),
da_bno, ino);
new_leaf = (xfs_dir_leafblock_t *) ts_dirbuf();
sizeof(xfs_dir_leaf_entry_t)
+ (__psint_t) d_entry) {
do_warn(
- _("not enough space in block %u of dir inode %llu for all entries\n"),
+ _("not enough space in block %u of dir inode %" PRIu64 " for all entries\n"),
da_bno, ino);
break;
}
} else {
if (verbose)
do_warn(
- _("- would compact block %u in dir inode %llu\n"),
+ _("- would compact block %u in dir inode %" PRIu64 "\n"),
da_bno, ino);
}
}
xfs_dahash_t greatest_hashval;
#ifdef XR_DIR_TRACE
- fprintf(stderr, "process_leaf_dir_level - ino %llu\n", da_cursor->ino);
+ fprintf(stderr, "process_leaf_dir_level - ino %" PRIu64 "\n", da_cursor->ino);
#endif
*repair = 0;
da_bno = da_cursor->level[0].bno;
if (dev_bno == NULLDFSBNO) {
do_warn(
- _("can't map block %u for directory inode %llu\n"),
+ _("can't map block %u for directory inode %" PRIu64 "\n"),
da_bno, ino);
goto error_out;
}
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
do_warn(
- _("can't read file block %u (fsbno %llu, daddr %lld) "
- "for directory inode %llu\n"),
- da_bno, dev_bno, (__int64_t) bd_addr, ino);
+ _("can't read file block %u (fsbno %" PRIu64 ", daddr %" PRId64 ") "
+ "for directory inode %" PRIu64 "\n"),
+ da_bno, dev_bno, bd_addr, ino);
goto error_out;
}
if (XFS_DIR_LEAF_MAGIC !=
be16_to_cpu(leaf->hdr.info.magic)) {
do_warn(
- _("bad directory leaf magic # %#x for dir ino %llu\n"),
+ _("bad directory leaf magic # %#x for dir ino %" PRIu64"\n"),
be16_to_cpu(leaf->hdr.info.magic),
ino);
libxfs_putbuf(bp);
da_cursor->level[0].dirty = buf_dirty;
if (be32_to_cpu(leaf->hdr.info.back) != prev_bno) {
- do_warn(_("bad sibling back pointer for directory "
- "block %u in directory inode %llu\n"),
+ do_warn(
+ _("bad sibling back pointer for directory block %u in directory inode %" PRIu64 "\n"),
da_bno, ino);
libxfs_putbuf(bp);
goto error_out;
/*
* verify the final path up (right-hand-side) if still ok
*/
- do_warn(_("bad hash path in directory %llu\n"), da_cursor->ino);
+ do_warn(_("bad hash path in directory %" PRIu64 "\n"), da_cursor->ino);
goto error_out;
}
da_bt_cursor_t da_cursor;
#ifdef XR_DIR_TRACE
- fprintf(stderr, "process_node_dir - ino %llu\n", ino);
+ fprintf(stderr, "process_node_dir - ino %" PRIu64 "\n", ino);
#endif
*repair = *dot = *dotdot = 0;
*parent = NULLFSINO;
if ((xfs_fsize_t) da_cursor.greatest_bno
* mp->m_sb.sb_blocksize > UINT_MAX) {
do_warn(
- _("out of range internal directory block numbers (inode %llu)\n"),
+_("out of range internal directory block numbers (inode %" PRIu64 ")\n"),
ino);
return(1);
}
do_warn(
-_("setting directory inode (%llu) size to %llu bytes, was %lld bytes\n"),
+_("setting directory inode (%" PRIu64 ") size to %" PRIu64 " bytes, was %" PRId64 " bytes\n"),
ino, (xfs_dfiloff_t) (da_cursor.greatest_bno + 1)
* mp->m_sb.sb_blocksize,
- be64_to_cpu(dip->di_size));
+ (__int64_t)be64_to_cpu(dip->di_size));
dip->di_size = cpu_to_be64((da_cursor.greatest_bno + 1)
* mp->m_sb.sb_blocksize);
int buf_dirty = 0;
#ifdef XR_DIR_TRACE
- fprintf(stderr, "process_leaf_dir - ino %llu\n", ino);
+ fprintf(stderr, "process_leaf_dir - ino %" PRIu64 "\n", ino);
#endif
*repair = *dot = *dotdot = 0;
*parent = NULLFSINO;
bno = blkmap_get(blkmap, 0);
if (bno == NULLDFSBNO) {
- do_warn(_("block 0 for directory inode %llu is missing\n"),
+ do_warn(_("block 0 for directory inode %" PRIu64 " is missing\n"),
ino);
return(1);
}
bp = libxfs_readbuf(mp->m_dev, XFS_FSB_TO_DADDR(mp, bno),
XFS_FSB_TO_BB(mp, 1), 0);
if (!bp) {
- do_warn(_("can't read block 0 for directory inode %llu\n"),
+ do_warn(_("can't read block 0 for directory inode %" PRIu64 "\n"),
ino);
return(1);
}
* check magic number for leaf directory btree block
*/
if (be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC) {
- do_warn(_("bad directory leaf magic # %#x for dir ino %llu\n"),
+ do_warn(_("bad directory leaf magic # %#x for dir ino %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.info.magic), ino);
libxfs_putbuf(bp);
return(1);
if (leaf->hdr.info.forw || leaf->hdr.info.back) {
if (!no_modify) {
do_warn(_("clearing forw/back pointers for "
- "directory inode %llu\n"), ino);
+ "directory inode %" PRIu64 "\n"), ino);
buf_dirty = 1;
leaf->hdr.info.forw = 0;
leaf->hdr.info.back = 0;
} else {
do_warn(_("would clear forw/back pointers for "
- "directory inode %llu\n"), ino);
+ "directory inode %" PRIu64 "\n"), ino);
}
}
* bad . entries in all directories will be fixed up in phase 6
*/
if (dot == 0)
- do_warn(_("no . entry for directory %llu\n"), ino);
+ do_warn(_("no . entry for directory %" PRIu64 "\n"), ino);
/*
* shortform dirs always have a .. entry. .. for all longform
* fixed in place since we know what it should be
*/
if (dotdot == 0 && ino != mp->m_sb.sb_rootino) {
- do_warn(_("no .. entry for directory %llu\n"), ino);
+ do_warn(_("no .. entry for directory %" PRIu64 "\n"), ino);
} else if (dotdot == 0 && ino == mp->m_sb.sb_rootino) {
- do_warn(_("no .. entry for root directory %llu\n"), ino);
+ do_warn(_("no .. entry for root directory %" PRIu64 "\n"), ino);
need_root_dotdot = 1;
}
#ifdef XR_DIR_TRACE
- fprintf(stderr, "(process_dir), parent of %llu is %llu\n", ino, parent);
+ fprintf(stderr, "(process_dir), parent of %" PRIu64 " is %" PRIu64 "\n", ino, parent);
#endif
return(res);
}
if ((l = malloc(sizeof(dir2_bad_t))) == NULL) {
do_error(
- _("malloc failed (%u bytes) dir2_add_badlist:ino %llu\n"),
+_("malloc failed (%zu bytes) dir2_add_badlist:ino %" PRIu64 "\n"),
sizeof(dir2_bad_t), ino);
exit(1);
}
if (bmp != &lbmp)
free(bmp);
if (bp == NULL) {
- do_warn(_("can't read block %u for directory inode "
- "%llu\n"),
+ do_warn(
+_("can't read block %u for directory inode %" PRIu64 "\n"),
bno, da_cursor->ino);
goto error_out;
}
if (be16_to_cpu(info->magic) == XFS_DIR2_LEAFN_MAGIC) {
if ( i != -1 ) {
- do_warn(_("found non-root LEAFN node in inode "
- "%llu bno = %u\n"),
+ do_warn(
+_("found non-root LEAFN node in inode %" PRIu64 " bno = %u\n"),
da_cursor->ino, bno);
}
*rbno = 0;
return(1);
} else if (be16_to_cpu(info->magic) != XFS_DA_NODE_MAGIC) {
da_brelse(bp);
- do_warn(_("bad dir magic number 0x%x in inode %llu "
- "bno = %u\n"),
+ do_warn(
+_("bad dir magic number 0x%x in inode %" PRIu64 " bno = %u\n"),
be16_to_cpu(info->magic),
da_cursor->ino, bno);
goto error_out;
node = (xfs_da_intnode_t*)info;
if (be16_to_cpu(node->hdr.count) > mp->m_dir_node_ents) {
da_brelse(bp);
- do_warn(_("bad record count in inode %llu, count = %d, "
- "max = %d\n"), da_cursor->ino,
+ do_warn(
+_("bad record count in inode %" PRIu64 ", count = %d, max = %d\n"), da_cursor->ino,
be16_to_cpu(node->hdr.count),
mp->m_dir_node_ents);
goto error_out;
if (i == -1) {
i = da_cursor->active = be16_to_cpu(node->hdr.level);
if (i >= XFS_DA_NODE_MAXDEPTH) {
- do_warn(_("bad header depth for directory "
- "inode %llu\n"),
+ do_warn(
+_("bad header depth for directory inode %" PRIu64 "\n"),
da_cursor->ino);
da_brelse(bp);
i = -1;
if (be16_to_cpu(node->hdr.level) == i - 1) {
i--;
} else {
- do_warn(_("bad directory btree for directory "
- "inode %llu\n"),
+ do_warn(
+_("bad directory btree for directory inode %" PRIu64 "\n"),
da_cursor->ino);
da_brelse(bp);
goto error_out;
bad++;
}
if (bad) {
- do_warn(_("bad directory block in inode %llu\n"), cursor->ino);
+ do_warn(_("bad directory block in inode %" PRIu64 "\n"), cursor->ino);
return(1);
}
/*
if (cursor->level[p_level].hashval !=
be32_to_cpu(node->btree[entry].hashval)) {
if (!no_modify) {
- do_warn(_("correcting bad hashval in non-leaf dir "
- "block\n\tin (level %d) in inode %llu.\n"),
+ do_warn(
+_("correcting bad hashval in non-leaf dir block\n"
+ "\tin (level %d) in inode %" PRIu64 ".\n"),
this_level, cursor->ino);
node->btree[entry].hashval = cpu_to_be32(
cursor->level[p_level].hashval);
cursor->level[this_level].dirty++;
} else {
- do_warn(_("would correct bad hashval in non-leaf dir "
- "block\n\tin (level %d) in inode %llu.\n"),
+ do_warn(
+_("would correct bad hashval in non-leaf dir block\n"
+ "\tin (level %d) in inode %" PRIu64 ".\n"),
this_level, cursor->ino);
}
}
nex = blkmap_getn(cursor->blkmap, dabno, mp->m_dirblkfsbs,
&bmp, &lbmp);
if (nex == 0) {
- do_warn(_("can't get map info for block %u of "
- "directory inode %llu\n"),
+ do_warn(
+_("can't get map info for block %u of directory inode %" PRIu64 "\n"),
dabno, cursor->ino);
return(1);
}
free(bmp);
if (bp == NULL) {
- do_warn(_("can't read block %u for directory inode "
- "%llu\n"),
+ do_warn(
+_("can't read block %u for directory inode %" PRIu64 "\n"),
dabno, cursor->ino);
return(1);
}
*/
bad = 0;
if (XFS_DA_NODE_MAGIC != be16_to_cpu(newnode->hdr.info.magic)) {
- do_warn(_("bad magic number %x in block %u for "
- "directory inode %llu\n"),
+ do_warn(
+_("bad magic number %x in block %u for directory inode %" PRIu64 "\n"),
be16_to_cpu(newnode->hdr.info.magic),
dabno, cursor->ino);
bad++;
}
if (be32_to_cpu(newnode->hdr.info.back) !=
cursor->level[this_level].bno) {
- do_warn(_("bad back pointer in block %u for directory "
- "inode %llu\n"),
+ do_warn(
+_("bad back pointer in block %u for directory inode %" PRIu64 "\n"),
dabno, cursor->ino);
bad++;
}
if (be16_to_cpu(newnode->hdr.count) > mp->m_dir_node_ents) {
- do_warn(_("entry count %d too large in block %u for "
- "directory inode %llu\n"),
+ do_warn(
+_("entry count %d too large in block %u for directory inode %" PRIu64 "\n"),
be16_to_cpu(newnode->hdr.count),
dabno, cursor->ino);
bad++;
}
if (be16_to_cpu(newnode->hdr.level) != this_level) {
- do_warn(_("bad level %d in block %u for directory "
- "inode %llu\n"),
+ do_warn(
+_("bad level %d in block %u for directory inode %" PRIu64 "\n"),
be16_to_cpu(newnode->hdr.level),
dabno, cursor->ino);
bad++;
if (cursor->level[p_level].hashval !=
be32_to_cpu(node->btree[entry].hashval)) {
if (!no_modify) {
- do_warn(_("correcting bad hashval in interior dir "
- "block\n\tin (level %d) in inode %llu.\n"),
+ do_warn(
+_("correcting bad hashval in interior dir block\n"
+ "\tin (level %d) in inode %" PRIu64 ".\n"),
this_level, cursor->ino);
node->btree[entry].hashval = cpu_to_be32(
cursor->level[p_level].hashval);
cursor->level[this_level].dirty++;
} else {
- do_warn(_("would correct bad hashval in interior dir "
- "block\n\tin (level %d) in inode %llu.\n"),
+ do_warn(
+_("would correct bad hashval in interior dir block\n"
+ "\tin (level %d) in inode %" PRIu64 ".\n"),
this_level, cursor->ino);
}
}
}
namelen = sfep->namelen;
if (junkit)
- do_warn(_("entry \"%*.*s\" in shortform directory %llu "
- "references %s inode %llu\n"),
+ do_warn(
+_("entry \"%*.*s\" in shortform directory %" PRIu64 " references %s inode %" PRIu64 "\n"),
namelen, namelen, sfep->name, ino, junkreason,
lino);
if (namelen == 0) {
((__psint_t) &sfep->name[0] -
(__psint_t) sfp);
if (!no_modify) {
- do_warn(_("zero length entry in "
- "shortform dir %llu, "
- "resetting to %d\n"),
+ do_warn(
+_("zero length entry in shortform dir %" PRIu64 ", resetting to %d\n"),
ino, namelen);
sfep->namelen = namelen;
} else {
- do_warn(_("zero length entry in "
- "shortform dir %llu, "
- "would set to %d\n"),
+ do_warn(
+_("zero length entry in shortform dir %" PRIu64 ", would set to %d\n"),
ino, namelen);
}
} else {
- do_warn(_("zero length entry in shortform dir "
- "%llu"),
+ do_warn(
+_("zero length entry in shortform dir %" PRIu64 ""),
ino);
if (!no_modify)
do_warn(_(", junking %d entries\n"),
namelen = ino_dir_size -
((__psint_t) &sfep->name[0] -
(__psint_t) sfp);
- do_warn(_("size of last entry overflows space "
- "left in in shortform dir %llu, "),
+ do_warn(
+_("size of last entry overflows space left in in shortform dir %" PRIu64 ", "),
ino);
if (!no_modify) {
do_warn(_("resetting to %d\n"),
namelen);
}
} else {
- do_warn(_("size of entry #%d overflows space "
- "left in in shortform dir %llu\n"),
+ do_warn(
+_("size of entry #%d overflows space left in in shortform dir %" PRIu64 "\n"),
i, ino);
if (!no_modify) {
if (i == num_entries - 1)
/*
* junk entry
*/
- do_warn(_("entry contains illegal character "
- "in shortform dir %llu\n"),
+ do_warn(
+_("entry contains illegal character in shortform dir %" PRIu64 "\n"),
ino);
junkit = 1;
}
if (xfs_dir2_sf_get_offset(sfep) < offset) {
- do_warn(_("entry contains offset out of order in "
- "shortform dir %llu\n"),
+ do_warn(
+_("entry contains offset out of order in shortform dir %" PRIu64 "\n"),
ino);
bad_offset = 1;
}
*dino_dirty = 1;
*repair = 1;
- do_warn(_("junking entry \"%s\" in directory "
- "inode %llu\n"),
+ do_warn(
+_("junking entry \"%s\" in directory inode %" PRIu64 "\n"),
name, ino);
} else {
- do_warn(_("would have junked entry \"%s\" in "
- "directory inode %llu\n"),
+ do_warn(
+_("would have junked entry \"%s\" in directory inode %" PRIu64 "\n"),
name, ino);
}
} else if (lino > XFS_DIR2_MAX_SHORT_INUM)
if (sfp->hdr.count != i) {
if (no_modify) {
- do_warn(_("would have corrected entry count "
- "in directory %llu from %d to %d\n"),
+ do_warn(
+_("would have corrected entry count in directory %" PRIu64 " from %d to %d\n"),
ino, sfp->hdr.count, i);
} else {
- do_warn(_("corrected entry count in directory %llu, "
- "was %d, now %d\n"),
+ do_warn(
+_("corrected entry count in directory %" PRIu64 "u, was %d, now %d\n"),
ino, sfp->hdr.count, i);
sfp->hdr.count = i;
*dino_dirty = 1;
if (sfp->hdr.i8count != i8) {
if (no_modify) {
- do_warn(_("would have corrected i8 count in directory "
- "%llu from %d to %d\n"),
+ do_warn(
+_("would have corrected i8 count in directory %" PRIu64 " from %d to %d\n"),
ino, sfp->hdr.i8count, i8);
} else {
- do_warn(_("corrected i8 count in directory %llu, "
- "was %d, now %d\n"),
+ do_warn(
+_("corrected i8 count in directory %" PRIu64 ", was %d, now %d\n"),
ino, sfp->hdr.i8count, i8);
if (i8 == 0)
process_sf_dir2_fixi8(sfp, &next_sfep);
}
}
- if ((__psint_t) next_sfep - (__psint_t) sfp != ino_dir_size) {
+ if ((intptr_t)next_sfep - (intptr_t)sfp != ino_dir_size) {
if (no_modify) {
- do_warn(_("would have corrected directory %llu size "
- "from %lld to %lld\n"),
- ino, (__int64_t) ino_dir_size,
- (__int64_t)((__psint_t)next_sfep -
- (__psint_t)sfp));
+ do_warn(
+_("would have corrected directory %" PRIu64 " size from %" PRId64 " to %" PRIdPTR "\n"),
+ ino, ino_dir_size,
+ (intptr_t)next_sfep - (intptr_t)sfp);
} else {
- do_warn(_("corrected directory %llu size, was %lld, "
- "now %lld\n"),
- ino, (__int64_t) ino_dir_size,
- (__int64_t)((__psint_t)next_sfep -
- (__psint_t)sfp));
+ do_warn(
+_("corrected directory %" PRIu64 " size, was %" PRId64 ", now %" PRIdPTR "\n"),
+ ino, ino_dir_size,
+ (intptr_t)next_sfep - (intptr_t)sfp);
dip->di_size = cpu_to_be64(
(__psint_t)next_sfep - (__psint_t)sfp);
}
if (offset + (sfp->hdr.count + 2) * sizeof(xfs_dir2_leaf_entry_t) +
sizeof(xfs_dir2_block_tail_t) > mp->m_dirblksize) {
- do_warn(_("directory %llu offsets too high\n"), ino);
+ do_warn(_("directory %" PRIu64 " offsets too high\n"), ino);
bad_offset = 1;
}
if (bad_offset) {
if (no_modify) {
- do_warn(_("would have corrected entry offsets in "
- "directory %llu\n"),
+ do_warn(
+_("would have corrected entry offsets in directory %" PRIu64 "\n"),
ino);
} else {
- do_warn(_("corrected entry offsets in "
- "directory %llu\n"),
+ do_warn(
+_("corrected entry offsets in directory %" PRIu64 "\n"),
ino);
process_sf_dir2_fixoff(dip);
*dino_dirty = 1;
*/
if (verify_inum(mp, *parent)) {
- do_warn(_("bogus .. inode number (%llu) in directory inode "
- "%llu, "),
+ do_warn(
+_("bogus .. inode number (%" PRIu64 ") in directory inode %" PRIu64 ", "),
*parent, ino);
*parent = NULLFSINO;
if (!no_modify) {
* root directories must have .. == .
*/
if (!no_modify) {
- do_warn(_("corrected root directory %llu .. entry, "
- "was %llu, now %llu\n"),
+ do_warn(
+_("corrected root directory %" PRIu64 " .. entry, was %" PRIu64 ", now %" PRIu64 "\n"),
ino, *parent, ino);
*parent = ino;
xfs_dir2_sf_put_inumber(sfp, parent, &sfp->hdr.parent);
*dino_dirty = 1;
*repair = 1;
} else {
- do_warn(_("would have corrected root directory %llu .. "
- "entry from %llu to %llu\n"),
+ do_warn(
+_("would have corrected root directory %" PRIu64 " .. entry from %" PRIu64" to %" PRIu64 "\n"),
ino, *parent, ino);
}
} else if (ino == *parent && ino != mp->m_sb.sb_rootino) {
* to .
*/
*parent = NULLFSINO;
- do_warn(_("bad .. entry in directory inode %llu, points to "
- "self, "),
+ do_warn(
+_("bad .. entry in directory inode %" PRIu64 ", points to self, "),
ino);
if (!no_modify) {
do_warn(_("clearing inode number\n"));
* Phase 6 will kill this block if we don't kill the inode.
*/
if (ptr != endptr) {
- do_warn(_("corrupt block %u in directory inode %llu\n"),
+ do_warn(_("corrupt block %u in directory inode %" PRIu64 "\n"),
da_bno, ino);
if (!no_modify)
do_warn(_("\twill junk block\n"));
ASSERT((clearino == 0 && clearreason == NULL) ||
(clearino != 0 && clearreason != NULL));
if (clearino)
- do_warn(_("entry \"%*.*s\" at block %u offset %d in "
- "directory inode %llu references %s inode "
- "%llu\n"),
+ do_warn(
+_("entry \"%*.*s\" at block %d offset %" PRIdPTR " in directory inode %" PRIu64
+ " references %s inode %" PRIu64 "\n"),
dep->namelen, dep->namelen, dep->name,
- da_bno, (char *)ptr - (char *)d, ino,
+ da_bno, (intptr_t)ptr - (intptr_t)d, ino,
clearreason, ent_ino);
/*
* If the name length is 0 (illegal) make it 1 and blast
* the entry.
*/
if (dep->namelen == 0) {
- do_warn(_("entry at block %u offset %d in directory "
- "inode %llu has 0 namelength\n"),
- da_bno, (char *)ptr - (char *)d, ino);
+ do_warn(
+_("entry at block %u offset %" PRIdPTR " in directory inode %" PRIu64
+ "has 0 namelength\n"),
+ da_bno, (intptr_t)ptr - (intptr_t)d, ino);
if (!no_modify)
dep->namelen = 1;
clearino = 1;
*/
if (clearino) {
if (!no_modify) {
- do_warn(_("\tclearing inode number in entry at "
- "offset %d...\n"),
- (char *)ptr - (char *)d);
+ do_warn(
+_("\tclearing inode number in entry at offset %" PRIdPTR "...\n"),
+ (intptr_t)ptr - (intptr_t)d);
dep->inumber = cpu_to_be64(BADFSINO);
ent_ino = BADFSINO;
bp->dirty = 1;
} else {
- do_warn(_("\twould clear inode number in entry "
- "at offset %d...\n"),
- (char *)ptr - (char *)d);
+ do_warn(
+_("\twould clear inode number in entry at offset %" PRIdPTR "...\n"),
+ (intptr_t)ptr - (intptr_t)d);
}
}
/*
junkit = ent_ino == BADFSINO;
nm_illegal = namecheck((char *)dep->name, dep->namelen);
if (ino_discovery && nm_illegal) {
- do_warn(_("entry at block %u offset %d in directory "
- "inode %llu has illegal name \"%*.*s\": "),
- da_bno, (char *)ptr - (char *)d, ino,
+ do_warn(
+_("entry at block %u offset %" PRIdPTR " in directory inode %" PRIu64 " has illegal name \"%*.*s\": "),
+ da_bno, (intptr_t)ptr - (intptr_t)d, ino,
dep->namelen, dep->namelen, dep->name);
junkit = 1;
}
if (ino == ent_ino &&
ino != mp->m_sb.sb_rootino) {
*parent = NULLFSINO;
- do_warn(_("bad .. entry in directory "
- "inode %llu, points to self: "),
+ do_warn(
+_("bad .. entry in directory inode %" PRIu64 ", points to self: "),
ino);
junkit = 1;
}
*/
else if (ino != ent_ino &&
ino == mp->m_sb.sb_rootino) {
- do_warn(_("bad .. entry in root "
- "directory inode %llu, was "
- "%llu: "),
+ do_warn(
+_("bad .. entry in root directory inode %" PRIu64 ", was %" PRIu64 ": "),
ino, ent_ino);
if (!no_modify) {
do_warn(_("correcting\n"));
* seem equally valid, trash this one.
*/
else {
- do_warn(_("multiple .. entries in directory "
- "inode %llu: "),
+ do_warn(
+_("multiple .. entries in directory inode %" PRIu64 ": "),
ino);
junkit = 1;
}
if (!*dot) {
(*dot)++;
if (ent_ino != ino) {
- do_warn(_("bad . entry in directory "
- "inode %llu, was %llu: "),
+ do_warn(
+_("bad . entry in directory inode %" PRIu64 ", was %" PRIu64 ": "),
ino, ent_ino);
if (!no_modify) {
do_warn(_("correcting\n"));
}
}
} else {
- do_warn(_("multiple . entries in directory "
- "inode %llu: "),
+ do_warn(
+_("multiple . entries in directory inode %" PRIu64 ": "),
ino);
junkit = 1;
}
* All other entries -- make sure only . references self.
*/
else if (ent_ino == ino) {
- do_warn(_("entry \"%*.*s\" in directory inode %llu "
- "points to self: "),
+ do_warn(
+_("entry \"%*.*s\" in directory inode %" PRIu64 " points to self: "),
dep->namelen, dep->namelen, dep->name, ino);
junkit = 1;
}
* Check the bestfree table.
*/
if (freeseen != 7 || badbest) {
- do_warn(_("bad bestfree table in block %u in directory inode "
- "%llu: "), da_bno, ino);
+ do_warn(
+_("bad bestfree table in block %u in directory inode %" PRIu64 ": "),
+ da_bno, ino);
if (!no_modify) {
do_warn(_("repairing table\n"));
libxfs_dir2_data_freescan(mp, d, &i);
*parent = NULLFSINO;
nex = blkmap_getn(blkmap, mp->m_dirdatablk, mp->m_dirblkfsbs, &bmp, &lbmp);
if (nex == 0) {
- do_warn(_("block %u for directory inode %llu is missing\n"),
+ do_warn(
+_("block %u for directory inode %" PRIu64 " is missing\n"),
mp->m_dirdatablk, ino);
return 1;
}
if (bmp != &lbmp)
free(bmp);
if (bp == NULL) {
- do_warn(_("can't read block %u for directory inode %llu\n"),
+ do_warn(
+_("can't read block %u for directory inode %" PRIu64 "\n"),
mp->m_dirdatablk, ino);
return 1;
}
*/
block = bp->data;
if (be32_to_cpu(block->hdr.magic) != XFS_DIR2_BLOCK_MAGIC)
- do_warn(_("bad directory block magic # %#x in block %u for "
- "directory inode %llu\n"),
+ do_warn(
+_("bad directory block magic # %#x in block %u for directory inode %" PRIu64 "\n"),
be32_to_cpu(block->hdr.magic), mp->m_dirdatablk, ino);
/*
* process the data area
for (i = stale = 0; i < be16_to_cpu(leaf->hdr.count); i++) {
if ((char *)&leaf->ents[i] >= (char *)leaf + mp->m_dirblksize) {
- do_warn(_("bad entry count in block %u of directory "
- "inode %llu\n"),
+ do_warn(
+_("bad entry count in block %u of directory inode %" PRIu64 "\n"),
da_bno, ino);
return 1;
}
if (be32_to_cpu(leaf->ents[i].address) == XFS_DIR2_NULL_DATAPTR)
stale++;
else if (be32_to_cpu(leaf->ents[i].hashval) < last_hashval) {
- do_warn(_("bad hash ordering in block %u of directory "
- "inode %llu\n"),
+ do_warn(
+_("bad hash ordering in block %u of directory inode %" PRIu64 "\n"),
da_bno, ino);
return 1;
}
be32_to_cpu(leaf->ents[i].hashval);
}
if (stale != be16_to_cpu(leaf->hdr.stale)) {
- do_warn(_("bad stale count in block %u of directory "
- "inode %llu\n"),
+ do_warn(
+_("bad stale count in block %u of directory inode %" PRIu64 "\n"),
da_bno, ino);
return 1;
}
ASSERT(da_bno != 0);
if (nex == 0) {
- do_warn(_("can't map block %u for directory "
- "inode %llu\n"),
+ do_warn(
+_("can't map block %u for directory inode %" PRIu64 "\n"),
da_bno, ino);
goto error_out;
}
free(bmp);
bmp = NULL;
if (bp == NULL) {
- do_warn(_("can't read file block %u for directory "
- "inode %llu\n"),
+ do_warn(
+_("can't read file block %u for directory inode %" PRIu64 "\n"),
da_bno, ino);
goto error_out;
}
*/
if (be16_to_cpu(leaf->hdr.info.magic) !=
XFS_DIR2_LEAFN_MAGIC) {
- do_warn(_("bad directory leaf magic # %#x for "
- "directory inode %llu block %u\n"),
+ do_warn(
+_("bad directory leaf magic # %#x for directory inode %" PRIu64 " block %u\n"),
be16_to_cpu(leaf->hdr.info.magic),
ino, da_bno);
da_brelse(bp);
da_cursor->level[0].dirty = buf_dirty;
if (be32_to_cpu(leaf->hdr.info.back) != prev_bno) {
- do_warn(_("bad sibling back pointer for block %u in "
- "directory inode %llu\n"),
+ do_warn(
+_("bad sibling back pointer for block %u in directory inode %" PRIu64 "\n"),
da_bno, ino);
da_brelse(bp);
goto error_out;
/*
* Verify the final path up (right-hand-side) if still ok.
*/
- do_warn(_("bad hash path in directory %llu\n"), ino);
+ do_warn(_("bad hash path in directory %" PRIu64 "\n"), ino);
goto error_out;
}
/*
nex = blkmap_getn(blkmap, dbno, mp->m_dirblkfsbs, &bmp, &lbmp);
ndbno = dbno + mp->m_dirblkfsbs - 1;
if (nex == 0) {
- do_warn(_("block %llu for directory inode %llu is "
- "missing\n"),
+ do_warn(
+_("block %" PRIu64 " for directory inode %" PRIu64 " is missing\n"),
dbno, ino);
continue;
}
if (bmp != &lbmp)
free(bmp);
if (bp == NULL) {
- do_warn(_("can't read block %llu for directory inode "
- "%llu\n"),
+ do_warn(
+_("can't read block %" PRIu64 " for directory inode %" PRIu64 "\n"),
dbno, ino);
continue;
}
data = bp->data;
if (be32_to_cpu(data->hdr.magic) != XFS_DIR2_DATA_MAGIC)
- do_warn(_("bad directory block magic # %#x in block "
- "%llu for directory inode %llu\n"),
+ do_warn(
+_("bad directory block magic # %#x in block %" PRIu64 " for directory inode %" PRIu64 "\n"),
be32_to_cpu(data->hdr.magic), dbno, ino);
i = process_dir2_data(mp, ino, dip, ino_discovery, dirname,
parent, bp, dot, dotdot, (xfs_dablk_t)dbno,
dirname, parent, blkmap, &dot, &dotdot, &repair,
last > mp->m_dirleafblk + mp->m_dirblkfsbs);
} else {
- do_warn(_("bad size/format for directory %llu\n"), ino);
+ do_warn(_("bad size/format for directory %" PRIu64 "\n"), ino);
return 1;
}
/*
* bad . entries in all directories will be fixed up in phase 6
*/
if (dot == 0) {
- do_warn(_("no . entry for directory %llu\n"), ino);
+ do_warn(_("no . entry for directory %" PRIu64 "\n"), ino);
}
/*
* fixed in place since we know what it should be
*/
if (dotdot == 0 && ino != mp->m_sb.sb_rootino) {
- do_warn(_("no .. entry for directory %llu\n"), ino);
+ do_warn(_("no .. entry for directory %" PRIu64 "\n"), ino);
} else if (dotdot == 0 && ino == mp->m_sb.sb_rootino) {
- do_warn(_("no .. entry for root directory %llu\n"), ino);
+ do_warn(_("no .. entry for root directory %" PRIu64 "\n"), ino);
need_root_dotdot = 1;
}
*/
/* abort, internal error */
-void __attribute__((noreturn)) do_abort(char const *, ...);
+void __attribute__((noreturn)) do_abort(char const *, ...)
+ __attribute__((format(printf,1,2)));
/* abort, system error */
-void __attribute__((noreturn)) do_error(char const *, ...);
+void __attribute__((noreturn)) do_error(char const *, ...)
+ __attribute__((format(printf,1,2)));
/* issue warning */
-void do_warn(char const *, ...);
+void do_warn(char const *, ...)
+ __attribute__((format(printf,1,2)));
/* issue log message */
-void do_log(char const *, ...);
+void do_log(char const *, ...)
+ __attribute__((format(printf,1,2)));
rt_bmap = memalign(sizeof(__uint64_t), rt_bmap_size);
if (!rt_bmap) {
do_error(
- _("couldn't allocate realtime block map, size = %llu\n"),
+ _("couldn't allocate realtime block map, size = %" PRIu64 "\n"),
mp->m_sb.sb_rextents);
return;
}
error);
} else {
if (verbose) {
- do_warn(_("zero_log: head block %lld tail block %lld\n"),
+ do_warn(
+ _("zero_log: head block %" PRId64 " tail block %" PRId64 "\n"),
head_blk, tail_blk);
}
if (head_blk != tail_blk) {
XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)),
mp->m_sb.sb_sectsize/BBSIZE, 0);
if (!bp)
- do_error(_("cannot read agi block %lld for ag %u\n"),
+ do_error(_("cannot read agi block %" PRId64 " for ag %u\n"),
XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)), agno);
agip = XFS_BUF_TO_AGI(bp);
switch (bstate) {
case XR_E_BAD_STATE:
default:
- do_warn(_("unknown rt extent state, extent %llu\n"),
+ do_warn(
+ _("unknown rt extent state, extent %" PRIu64 "\n"),
bno);
/* fall through .. */
case XR_E_UNKNOWN:
dotdot_update_t *dir = malloc(sizeof(dotdot_update_t));
if (!dir)
- do_error(_("malloc failed add_dotdot_update (%u bytes)\n"),
+ do_error(_("malloc failed add_dotdot_update (%zu bytes)\n"),
sizeof(dotdot_update_t));
dir->next = dotdot_update_list;
}
if ((p = malloc(sizeof(*p))) == NULL)
- do_error(_("malloc failed in dir_hash_add (%u bytes)\n"),
+ do_error(_("malloc failed in dir_hash_add (%zu bytes)\n"),
sizeof(*p));
p->nextbyaddr = hashtab->byaddr[byaddr];
seeval = DIR_HASH_CK_NOLEAF;
if (seeval == DIR_HASH_CK_OK)
return 0;
- do_warn(_("bad hash table for directory inode %llu (%s): "),
+ do_warn(_("bad hash table for directory inode %" PRIu64 " (%s): "),
ip->i_ino, seevalstr[seeval]);
if (!no_modify)
do_warn(_("rebuilding\n"));
&first, 1, &map, &nmap, NULL);
if (error || nmap != 1) {
do_error(
- _("couldn't map realtime bitmap block %llu, error = %d\n"),
+ _("couldn't map realtime bitmap block %" PRIu64 ", error = %d\n"),
bno, error);
}
if (error) {
do_warn(
-_("can't access block %llu (fsbno %llu) of realtime bitmap inode %llu\n"),
+_("can't access block %" PRIu64 " (fsbno %" PRIu64 ") of realtime bitmap inode %" PRIu64 "\n"),
bno, map.br_startblock, mp->m_sb.sb_rbmino);
return(1);
}
&first, 1, &map, &nmap, NULL);
if (error || nmap != 1) {
do_error(
- _("couldn't map realtime summary inode block %llu, error = %d\n"),
+ _("couldn't map realtime summary inode block %" PRIu64 ", error = %d\n"),
bno, error);
}
if (error) {
do_warn(
-_("can't access block %llu (fsbno %llu) of realtime summary inode %llu\n"),
+_("can't access block %" PRIu64 " (fsbno %" PRIu64 ") of realtime summary inode %" PRIu64 "\n"),
bno, map.br_startblock, mp->m_sb.sb_rsumino);
return(1);
}
if (error || nmap != 1) {
if (!no_modify)
do_error(
-_("can't map block %d in %s inode %llu, xfs_bmapi returns %d, nmap = %d\n"),
+_("can't map block %d in %s inode %" PRIu64 ", xfs_bmapi returns %d, nmap = %d\n"),
da_bno, ftype, ino, error, nmap);
else {
do_warn(
-_("can't map block %d in %s inode %llu, xfs_bmapi returns %d, nmap = %d\n"),
+_("can't map block %d in %s inode %" PRIu64 ", xfs_bmapi returns %d, nmap = %d\n"),
da_bno, ftype, ino, error, nmap);
return(NULLDFSBNO);
}
if ((fsbno = map.br_startblock) == HOLESTARTBLOCK) {
if (!no_modify)
- do_error(_("block %d in %s ino %llu doesn't exist\n"),
+ do_error(
+ _("block %d in %s ino %" PRIu64 " doesn't exist\n"),
da_bno, ftype, ino);
else {
- do_warn(_("block %d in %s ino %llu doesn't exist\n"),
+ do_warn(
+ _("block %d in %s ino %" PRIu64 " doesn't exist\n"),
da_bno, ftype, ino);
return(NULLDFSBNO);
}
if (!bp) {
do_warn(
- _("can't read block %u (fsbno %llu) for directory inode %llu\n"),
+ _("can't read block %u (fsbno %" PRIu64 ") for directory inode %" PRIu64 "\n"),
da_bno, fsbno, ino);
return(NULLDFSBNO);
}
if (be16_to_cpu(node->hdr.info.magic) != XFS_DA_NODE_MAGIC) {
libxfs_putbuf(bp);
do_warn(
-_("bad dir/attr magic number in inode %llu, file bno = %u, fsbno = %llu\n"),
+_("bad dir/attr magic number in inode %" PRIu64 ", file bno = %u, fsbno = %" PRIu64 "\n"),
ino, da_bno, fsbno);
return(NULLDFSBNO);
}
if (error || nmap != 1) {
if (!no_modify)
do_error(
-_("can't map block %d in %s ino %llu, xfs_bmapi returns %d, nmap = %d\n"),
+_("can't map block %d in %s ino %" PRIu64 ", xfs_bmapi returns %d, nmap = %d\n"),
da_bno, ftype, ino, error, nmap);
else {
do_warn(
-_("can't map block %d in %s ino %llu, xfs_bmapi returns %d, nmap = %d\n"),
+_("can't map block %d in %s ino %" PRIu64 ", xfs_bmapi returns %d, nmap = %d\n"),
da_bno, ftype, ino, error, nmap);
return(NULLDFSBNO);
}
if ((fsbno = map.br_startblock) == HOLESTARTBLOCK) {
if (!no_modify)
do_error(
- _("block %d in %s inode %llu doesn't exist\n"),
+ _("block %d in %s inode %" PRIu64 " doesn't exist\n"),
da_bno, ftype, ino);
else {
do_warn(
- _("block %d in %s inode %llu doesn't exist\n"),
+ _("block %d in %s inode %" PRIu64 " doesn't exist\n"),
da_bno, ftype, ino);
return(NULLDFSBNO);
}
if (irec == NULL) {
nbad++;
- if (entry_junked(_("entry \"%s\" in dir inode %llu "
- "points to non-existent inode %llu"),
+ if (entry_junked(
+ _("entry \"%s\" in dir inode %" PRIu64 " points to non-existent inode %" PRIu64),
fname, ino, lino)) {
namest->name[0] = '/';
*dirty = 1;
*/
if (is_inode_free(irec, ino_offset)) {
nbad++;
- if (entry_junked(_("entry \"%s\" in dir inode %llu "
- "points to free inode %llu"),
+ if (entry_junked(
+ _("entry \"%s\" in dir inode %" PRIu64 " points to free inode %" PRIu64),
fname, ino, lino)) {
namest->name[0] = '/';
*dirty = 1;
* trash it, otherwise, assign it */
if (!inode_isadir(irec, ino_offset)) {
nbad++;
- if (entry_junked(_("%s (ino %llu) in root "
- "(%llu) is not a directory"),
+ if (entry_junked(
+ _("%s (ino %" PRIu64 ") in root (%" PRIu64 ") is not a directory"),
ORPHANAGE, lino, ino)) {
namest->name[0] = '/';
*dirty = 1;
+ be16_to_cpu(entry->nameidx), lino,
entry->namelen, namest->name)) {
nbad++;
- if (entry_junked(_("entry \"%s\" (ino %llu) in dir "
- "%llu is a duplicate name"),
+ if (entry_junked(
+ _("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is a duplicate name"),
fname, lino, ino)) {
namest->name[0] = '/';
*dirty = 1;
*/
if (is_inode_reached(irec, ino_offset)) {
junkit = 1;
- do_warn(_("entry \"%s\" in dir %llu points to an "
- "already connected dir inode %llu,\n"),
+ do_warn(
+ _("entry \"%s\" in dir ino %" PRIu64 " points to an already connected dir inode %" PRIu64 ",\n"),
fname, ino, lino);
} else if (parent == ino) {
add_inode_reached(irec, ino_offset);
} else if (parent == NULLFSINO) {
/* ".." was missing, but this entry refers to it,
so, set it as the parent and mark for rebuild */
- do_warn(_("entry \"%s\" in dir ino %llu doesn't have a"
- " .. entry, will set it in ino %llu.\n"),
+ do_warn(
+ _("entry \"%s\" in dir ino %" PRIu64 " doesn't have a .. entry, will set it in ino %" PRIu64 ".\n"),
fname, ino, lino);
set_inode_parent(irec, ino_offset, ino);
add_inode_reached(irec, ino_offset);
add_inode_ref(current_irec, current_ino_offset);
} else {
junkit = 1;
- do_warn(_("entry \"%s\" in dir ino %llu not consistent"
- " with .. value (%llu) in ino %llu,\n"),
+ do_warn(
+ _("entry \"%s\" in dir ino %" PRIu64 " not consistent with .. value (%" PRIu64 ") in ino %" PRIu64 ",\n"),
fname, ino, parent, lino);
}
fsbno = map_first_dblock_fsbno(mp, ino, ip, &da_bno);
if (fsbno == NULLDFSBNO && no_modify) {
- do_warn(_("cannot map block 0 of directory inode %llu\n"), ino);
+ do_warn(
+ _("cannot map block 0 of directory inode %" PRIu64 "\n"), ino);
return;
}
if (!bp) {
do_error(
- _("can't read block %u (fsbno %llu) for directory inode %llu\n"),
+ _("can't read block %u (fsbno %" PRIu64 ") for directory inode %" PRIu64 "\n"),
da_bno, fsbno, ino);
/* NOTREACHED */
}
if (be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC) {
if (!no_modify) {
do_error(
-_("bad magic # (0x%x) for dir ino %llu leaf block (bno %u fsbno %llu)\n"),
+_("bad magic # (0x%x) for dir ino %" PRIu64 " leaf block (bno %u fsbno %" PRIu64 ")\n"),
be16_to_cpu(leaf->hdr.info.magic),
ino, da_bno, fsbno);
/* NOTREACHED */
if (error || nmap != 1) {
if (!no_modify)
do_error(
-_("can't map leaf block %d in dir %llu, xfs_bmapi returns %d, nmap = %d\n"),
+_("can't map leaf block %d in dir %" PRIu64 ", xfs_bmapi returns %d, nmap = %d\n"),
da_bno, ino, error, nmap);
else {
do_warn(
-_("can't map leaf block %d in dir %llu, xfs_bmapi returns %d, nmap = %d\n"),
+_("can't map leaf block %d in dir %" PRIu64 ", xfs_bmapi returns %d, nmap = %d\n"),
da_bno, ino, error, nmap);
return;
}
if (fsbno == HOLESTARTBLOCK) {
if (!no_modify)
do_error(
- _("block %d in %s ino %llu doesn't exist\n"),
+ _("block %d in %s ino %" PRIu64 " doesn't exist\n"),
da_bno, ftype, ino);
else {
do_warn(
- _("block %d in %s ino %llu doesn't exist\n"),
+ _("block %d in %s ino %" PRIu64 " doesn't exist\n"),
da_bno, ftype, ino);
return;
}
* name/inode pairs in the hash table
*/
- do_warn(_("rebuilding directory inode %llu\n"), ino);
+ do_warn(_("rebuilding directory inode %" PRIu64 "\n"), ino);
/*
* first attempt to locate the parent inode, if it can't be
&firstblock, &flist, nres);
if (error) {
do_warn(
-_("name create failed in ino %llu (%d), filesystem may be out of space\n"),
+_("name create failed in ino %" PRIu64 " (%d), filesystem may be out of space\n"),
ino, error);
libxfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES |
XFS_TRANS_ABORT);
error = libxfs_dir2_shrink_inode(&args,
xfs_dir2_da_to_db(mp, da_bno), bp);
if (error)
- do_error(_("shrink_inode failed inode %llu block %u\n"),
+ do_error(_("shrink_inode failed inode %" PRIu64 " block %u\n"),
ip->i_ino, da_bno);
libxfs_bmap_finish(&tp, &flist, &committed);
libxfs_trans_commit(tp, 0);
*freetabp = freetab = realloc(freetab, FREETAB_SIZE(db + 1));
if (!freetab) {
do_error(
- _("realloc failed in longform_dir2_entry_check_data (%u bytes)\n"),
+ _("realloc failed in longform_dir2_entry_check_data (%zu bytes)\n"),
FREETAB_SIZE(db + 1));
}
e.v = NULLDATAOFF;
if (ptr != endptr) {
if (junkit) {
do_warn(
- _("empty data block %u in directory inode %llu: "),
+ _("empty data block %u in directory inode %" PRIu64 ": "),
da_bno, ip->i_ino);
} else {
- do_warn(_("corrupt block %u in directory inode %llu: "),
+ do_warn(_
+ ("corrupt block %u in directory inode %" PRIu64 ": "),
da_bno, ip->i_ino);
}
if (!no_modify) {
libxfs_da_bhold(tp, bp);
xfs_bmap_init(&flist, &firstblock);
if (be32_to_cpu(d->hdr.magic) != wantmagic) {
- do_warn(_("bad directory block magic # %#x for directory inode "
- "%llu block %d: "),
+ do_warn(
+ _("bad directory block magic # %#x for directory inode %" PRIu64 " block %d: "),
be32_to_cpu(d->hdr.magic), ip->i_ino, da_bno);
if (!no_modify) {
do_warn(_("fixing magic # to %#x\n"), wantmagic);
dup = (xfs_dir2_data_unused_t *)ptr;
if (be16_to_cpu(dup->freetag) == XFS_DIR2_DATA_FREE_TAG) {
if (lastfree) {
- do_warn(_("directory inode %llu block %u has "
- "consecutive free entries: "),
+ do_warn(
+ _("directory inode %" PRIu64 " block %u has consecutive free entries: "),
ip->i_ino, da_bno);
if (!no_modify) {
do_warn(_("joining together\n"));
XFS_INO_TO_AGINO(mp, inum));
if (irec == NULL) {
nbad++;
- if (entry_junked(_("entry \"%s\" in directory inode "
- "%llu points to non-existent inode %llu"),
+ if (entry_junked(
+ _("entry \"%s\" in directory inode %" PRIu64 " points to non-existent inode %" PRIu64 ""),
fname, ip->i_ino, inum)) {
dep->name[0] = '/';
libxfs_dir2_data_log_entry(tp, bp, dep);
*/
if (is_inode_free(irec, ino_offset)) {
nbad++;
- if (entry_junked(_("entry \"%s\" in directory inode "
- "%llu points to free inode %llu"),
+ if (entry_junked(
+ _("entry \"%s\" in directory inode %" PRIu64 " points to free inode " PRIu64),
fname, ip->i_ino, inum)) {
dep->name[0] = '/';
libxfs_dir2_data_log_entry(tp, bp, dep);
*/
if (!inode_isadir(irec, ino_offset)) {
nbad++;
- if (entry_junked(_("%s (ino %llu) in root "
- "(%llu) is not a directory"),
+ if (entry_junked(
+ _("%s (ino %" PRIu64 ") in root (%" PRIu64 ") is not a directory"),
ORPHANAGE, inum, ip->i_ino)) {
dep->name[0] = '/';
libxfs_dir2_data_log_entry(tp, bp, dep);
if (!dir_hash_add(mp, hashtab, addr, inum, dep->namelen,
dep->name)) {
nbad++;
- if (entry_junked(_("entry \"%s\" (ino %llu) in dir "
- "%llu is a duplicate name"),
+ if (entry_junked(
+ _("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is a duplicate name"),
fname, inum, ip->i_ino)) {
dep->name[0] = '/';
libxfs_dir2_data_log_entry(tp, bp, dep);
if (da_bno != 0) {
/* ".." should be in the first block */
nbad++;
- if (entry_junked(_("entry \"%s\" (ino %llu) "
- "in dir %llu is not in the "
- "the first block"), fname,
+ if (entry_junked(
+ _("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is not in the the first block"), fname,
inum, ip->i_ino)) {
dep->name[0] = '/';
libxfs_dir2_data_log_entry(tp, bp, dep);
if (da_bno != 0 || dep != (xfs_dir2_data_entry_t *)d->u) {
/* "." should be the first entry */
nbad++;
- if (entry_junked(_("entry \"%s\" in dir %llu is "
- "not the first entry"),
+ if (entry_junked(
+ _("entry \"%s\" in dir %" PRIu64 " is not the first entry"),
fname, inum, ip->i_ino)) {
dep->name[0] = '/';
libxfs_dir2_data_log_entry(tp, bp, dep);
if (is_inode_reached(irec, ino_offset)) {
junkit = 1;
do_warn(
-_("entry \"%s\" in dir %llu points to an already connected directory inode %llu\n"),
+_("entry \"%s\" in dir %" PRIu64" points to an already connected directory inode %" PRIu64 "\n"),
fname, ip->i_ino, inum);
} else if (parent == ip->i_ino) {
add_inode_reached(irec, ino_offset);
} else if (parent == NULLFSINO) {
/* ".." was missing, but this entry refers to it,
so, set it as the parent and mark for rebuild */
- do_warn(_("entry \"%s\" in dir ino %llu doesn't have a"
- " .. entry, will set it in ino %llu.\n"),
+ do_warn(
+ _("entry \"%s\" in dir ino %" PRIu64 " doesn't have a .. entry, will set it in ino %" PRIu64 ".\n"),
fname, ip->i_ino, inum);
set_inode_parent(irec, ino_offset, ip->i_ino);
add_inode_reached(irec, ino_offset);
} else {
junkit = 1;
do_warn(
-_("entry \"%s\" in dir inode %llu inconsistent with .. value (%llu) in ino %llu\n"),
+_("entry \"%s\" in dir inode %" PRIu64 " inconsistent with .. value (%" PRIu64 ") in ino %" PRIu64 "\n"),
fname, ip->i_ino, parent, inum);
}
if (junkit) {
da_bno = mp->m_dirleafblk;
if (libxfs_da_read_bufr(NULL, ip, da_bno, -1, &bp, XFS_DATA_FORK)) {
- do_error(_("can't read block %u for directory inode %llu\n"),
+ do_error(
+ _("can't read block %u for directory inode %" PRIu64 "\n"),
da_bno, ip->i_ino);
/* NOTREACHED */
}
(char *)&leaf->ents[be16_to_cpu(
leaf->hdr.count)] > (char *)bestsp) {
do_warn(
- _("leaf block %u for directory inode %llu bad header\n"),
+ _("leaf block %u for directory inode %" PRIu64 " bad header\n"),
da_bno, ip->i_ino);
libxfs_da_brelse(NULL, bp);
return 1;
badtail = freetab->ents[i].v != be16_to_cpu(bestsp[i]);
}
if (badtail) {
- do_warn(_("leaf block %u for directory inode %llu bad tail\n"),
+ do_warn(
+ _("leaf block %u for directory inode %" PRIu64 " bad tail\n"),
da_bno, ip->i_ino);
libxfs_da_brelse(NULL, bp);
return 1;
if (libxfs_da_read_bufr(NULL, ip, da_bno, -1, &bp,
XFS_DATA_FORK)) {
do_warn(
- _("can't read leaf block %u for directory inode %llu\n"),
+ _("can't read leaf block %u for directory inode %" PRIu64 "\n"),
da_bno, ip->i_ino);
return 1;
}
libxfs_da_brelse(NULL, bp);
continue;
}
- do_warn(_("unknown magic number %#x for block %u in "
- "directory inode %llu\n"),
+ do_warn(
+ _("unknown magic number %#x for block %u in directory inode %" PRIu64 "\n"),
be16_to_cpu(leaf->hdr.info.magic),
da_bno, ip->i_ino);
libxfs_da_brelse(NULL, bp);
if (be16_to_cpu(leaf->hdr.count) > xfs_dir2_max_leaf_ents(mp) ||
be16_to_cpu(leaf->hdr.count) <
be16_to_cpu(leaf->hdr.stale)) {
- do_warn(_("leaf block %u for directory inode %llu bad "
- "header\n"),
+ do_warn(
+ _("leaf block %u for directory inode %" PRIu64 " bad header\n"),
da_bno, ip->i_ino);
libxfs_da_brelse(NULL, bp);
return 1;
if (libxfs_da_read_bufr(NULL, ip, da_bno, -1, &bp,
XFS_DATA_FORK)) {
do_warn(
- _("can't read freespace block %u for directory inode %llu\n"),
+ _("can't read freespace block %u for directory inode %" PRIu64 "\n"),
da_bno, ip->i_ino);
return 1;
}
XFS_DIR2_MAX_FREE_BESTS(mp) ||
be32_to_cpu(free->hdr.nvalid) <
be32_to_cpu(free->hdr.nused)) {
- do_warn(_("free block %u for directory inode %llu bad "
- "header\n"),
+ do_warn(
+ _("free block %u for directory inode %" PRIu64 " bad header\n"),
da_bno, ip->i_ino);
libxfs_da_brelse(NULL, bp);
return 1;
free->hdr.firstdb)].v !=
be16_to_cpu(free->bests[i])) {
do_warn(
- _("free block %u entry %i for directory ino %llu bad\n"),
+ _("free block %u entry %i for directory ino %" PRIu64 " bad\n"),
da_bno, i, ip->i_ino);
libxfs_da_brelse(NULL, bp);
return 1;
freetab->ents[i + be32_to_cpu(free->hdr.firstdb)].s = 1;
}
if (used != be32_to_cpu(free->hdr.nused)) {
- do_warn(_("free block %u for directory inode %llu bad "
- "nused\n"),
+ do_warn(
+ _("free block %u for directory inode %" PRIu64 " bad nused\n"),
da_bno, ip->i_ino);
libxfs_da_brelse(NULL, bp);
return 1;
for (i = 0; i < freetab->nents; i++) {
if ((freetab->ents[i].s == 0) &&
(freetab->ents[i].v != NULLDATAOFF)) {
- do_warn(_("missing freetab entry %u for "
- "directory inode %llu\n"),
+ do_warn(
+ _("missing freetab entry %u for directory inode %" PRIu64 "\n"),
i, ip->i_ino);
return 1;
}
freetab = malloc(FREETAB_SIZE(ip->i_d.di_size / mp->m_dirblksize));
if (!freetab) {
do_error(
- _("malloc failed in longform_dir2_entry_check (%u bytes)\n"),
+ _("malloc failed in longform_dir2_entry_check (%" PRId64 " bytes)\n"),
FREETAB_SIZE(ip->i_d.di_size / mp->m_dirblksize));
exit(1);
}
bplist = realloc(bplist, num_bps * sizeof(xfs_dabuf_t*));
if (!bplist)
do_error(
- _("realloc failed in longform_dir2_entry_check (%u bytes)\n"),
+ _("realloc failed in longform_dir2_entry_check (%zu bytes)\n"),
num_bps * sizeof(xfs_dabuf_t*));
}
if (libxfs_da_read_bufr(NULL, ip, da_bno, -1, &bplist[db],
XFS_DATA_FORK)) {
- do_warn(_(
- "can't read data block %u for directory inode %llu\n"),
+ do_warn(
+ _("can't read data block %u for directory inode %" PRIu64 "\n"),
da_bno, ino);
*num_illegal += 1;
continue; /* try and read all "data" blocks */
sf_entry = next_sfe = &sf->list[0];
if (sf == NULL) {
junkit = 1;
- do_warn(_("shortform dir inode %llu has null data entries \n"),
+ do_warn(
+ _("shortform dir inode %" PRIu64 " has null data entries \n"),
ino);
}
irec = find_inode_rec(mp, XFS_INO_TO_AGNO(mp, lino),
XFS_INO_TO_AGINO(mp, lino));
if (irec == NULL) {
- do_warn(_("entry \"%s\" in shortform dir %llu "
- "references non-existent ino %llu"),
+ do_warn(
+ _("entry \"%s\" in shortform dir %" PRIu64 " references non-existent ino %" PRIu64 "\n"),
fname, ino, lino);
goto do_junkit;
}
* really is free.
*/
if (!is_inode_free(irec, ino_offset)) {
- do_warn(_("entry \"%s\" in shortform dir inode %llu "
- "points to free inode %llu"), fname, ino, lino);
+ do_warn(
+ _("entry \"%s\" in shortform dir inode %" PRIu64 " points to free inode %" PRIu64"\n"),
+ fname, ino, lino);
goto do_junkit;
}
/*
* if it's not a directory, trash it
*/
if (!inode_isadir(irec, ino_offset)) {
- do_warn(_("%s (ino %llu) in root (%llu) is not "
- "a directory"), ORPHANAGE, lino, ino);
+ do_warn(
+ _("%s (ino %" PRIu64 ") in root (%" PRIu64 ") is not a directory"),
+ ORPHANAGE, lino, ino);
goto do_junkit;
}
/*
if (!dir_hash_add(mp, hashtab, (xfs_dir2_dataptr_t)
(sf_entry - &sf->list[0]), lino,
sf_entry->namelen, sf_entry->name)) {
- do_warn(_("entry \"%s\" (ino %llu) in dir %llu is a "
- "duplicate name"), fname, lino, ino);
+ do_warn(
+_("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is a duplicate name"),
+ fname, lino, ino);
goto do_junkit;
}
if (!inode_isadir(irec, ino_offset)) {
*/
if (is_inode_reached(irec, ino_offset)) {
junkit = 1;
- do_warn(_("entry \"%s\" in dir %llu references "
- "already connected dir ino %llu,\n"),
+ do_warn(
+ _("entry \"%s\" in dir %" PRIu64 " references already connected dir ino %" PRIu64 ".\n"),
fname, ino, lino);
} else if (parent == ino) {
add_inode_reached(irec, ino_offset);
} else if (parent == NULLFSINO) {
/* ".." was missing, but this entry refers to it,
so, set it as the parent and mark for rebuild */
- do_warn(_("entry \"%s\" in dir ino %llu doesn't have a"
- " .. entry, will set it in ino %llu.\n"),
+ do_warn(
+ _("entry \"%s\" in dir ino %" PRIu64 " doesn't have a .. entry, will set it in ino %" PRIu64 ".\n"),
fname, ino, lino);
set_inode_parent(irec, ino_offset, ino);
add_inode_reached(irec, ino_offset);
add_inode_ref(current_irec, current_ino_offset);
} else {
junkit = 1;
- do_warn(_("entry \"%s\" in dir %llu not "
- "consistent with .. value (%llu) in "
- "dir ino %llu"),
+ do_warn(
+ _("entry \"%s\" in dir %" PRIu64 " not consistent with .. value (%" PRIu64 ") in dir ino %" PRIu64".\n"),
fname, ino, parent, lino);
}
}
else
do_warn("\n");
} else {
- do_warn(_("would junk entry\n"), fname);
+ do_warn(_("would junk entry\n"));
}
}
ip->i_d.di_size = (xfs_fsize_t)
((__psint_t) next_sfe - (__psint_t) sf);
do_warn(
- _("setting size to %lld bytes to reflect junked entries\n"),
+ _("setting size to %" PRId64 " bytes to reflect junked entries\n"),
ip->i_d.di_size);
*ino_dirty = 1;
}
if (dotdot_update) {
parent = get_inode_parent(current_irec, current_ino_offset);
if (no_modify) {
- do_warn(_("would set .. in sf dir inode %llu to %llu\n"),
+ do_warn(
+ _("would set .. in sf dir inode %" PRIu64 " to %" PRIu64 "\n"),
ino, parent);
} else {
- do_warn(_("setting .. in sf dir inode %llu to %llu\n"),
+ do_warn(
+ _("setting .. in sf dir inode %" PRIu64 " to %" PRIu64 "\n"),
ino, parent);
xfs_dir2_sf_put_inumber(sfp, &parent, &sfp->hdr.parent);
*ino_dirty = 1;
XFS_INO_TO_AGINO(mp, lino));
if (irec == NULL) {
- do_warn(_("entry \"%s\" in shortform directory %llu "
- "references non-existent inode %llu"),
+ do_warn(
+ _("entry \"%s\" in shortform directory %" PRIu64 " references non-existent inode %" PRIu64 "\n"),
fname, ino, lino);
goto do_junkit;
}
* really is free.
*/
if (is_inode_free(irec, ino_offset)) {
- do_warn(_("entry \"%s\" in shortform directory "
- "inode %llu points to free inode %llu"),
+ do_warn(
+ _("entry \"%s\" in shortform directory inode %" PRIu64 " points to free inode %" PRIu64 "\n"),
fname, ino, lino);
goto do_junkit;
}
* if it's not a directory, trash it
*/
if (!inode_isadir(irec, ino_offset)) {
- do_warn(_("%s (ino %llu) in root (%llu) is not "
- "a directory"), ORPHANAGE, lino, ino);
+ do_warn(
+ _("%s (ino %" PRIu64 ") in root (%" PRIu64 ") is not a directory"),
+ ORPHANAGE, lino, ino);
goto do_junkit;
}
/*
if (!dir_hash_add(mp, hashtab, (xfs_dir2_dataptr_t)
(sfep - xfs_dir2_sf_firstentry(sfp)),
lino, sfep->namelen, sfep->name)) {
- do_warn(_("entry \"%s\" (ino %llu) in dir %llu is a "
- "duplicate name"), fname, lino, ino);
+ do_warn(
+_("entry \"%s\" (ino %" PRIu64 ") in dir %" PRIu64 " is a duplicate name"),
+ fname, lino, ino);
goto do_junkit;
}
*/
if (is_inode_reached(irec, ino_offset)) {
junkit = 1;
- do_warn(_("entry \"%s\" in directory inode %llu"
- " references already connected inode "
- "%llu,\n"),
+ do_warn(
+ _("entry \"%s\" in directory inode %" PRIu64
+ " references already connected inode %" PRIu64 ".\n"),
fname, ino, lino);
} else if (parent == ino) {
add_inode_reached(irec, ino_offset);
} else if (parent == NULLFSINO) {
/* ".." was missing, but this entry refers to it,
so, set it as the parent and mark for rebuild */
- do_warn(_("entry \"%s\" in dir ino %llu doesn't have a"
- " .. entry, will set it in ino %llu.\n"),
+ do_warn(
+ _("entry \"%s\" in dir ino %" PRIu64 " doesn't have a .. entry, will set it in ino %" PRIu64 ".\n"),
fname, ino, lino);
set_inode_parent(irec, ino_offset, ino);
add_inode_reached(irec, ino_offset);
irec, ino_offset);
} else {
junkit = 1;
- do_warn(_("entry \"%s\" in directory inode %llu"
- " not consistent with .. value (%llu)"
- " in inode %llu,\n"),
+ do_warn(
+ _("entry \"%s\" in directory inode %" PRIu64
+ " not consistent with .. value (%" PRIu64
+ ") in inode %" PRIu64 ",\n"),
fname, ino, parent, lino);
}
}
if (sfp->hdr.i8count != i8) {
if (no_modify) {
- do_warn(_("would fix i8count in inode %llu\n"), ino);
+ do_warn(_("would fix i8count in inode %" PRIu64 "\n"),
+ ino);
} else {
if (i8 == 0) {
tmp_sfep = next_sfep;
} else
sfp->hdr.i8count = i8;
*ino_dirty = 1;
- do_warn(_("fixing i8count in inode %llu\n"), ino);
+ do_warn(_("fixing i8count in inode %" PRIu64 "\n"),
+ ino);
}
}
((__psint_t) next_sfep - (__psint_t) sfp));
ip->i_d.di_size = (xfs_fsize_t)
((__psint_t) next_sfep - (__psint_t) sfp);
- do_warn(_("setting size to %lld bytes to reflect junked "
- "entries\n"),
+ do_warn(
+ _("setting size to %" PRId64 " bytes to reflect junked entries\n"),
ip->i_d.di_size);
*ino_dirty = 1;
}
error = libxfs_iget(mp, NULL, ino, 0, &ip, 0);
if (error) {
if (!no_modify)
- do_error(_("couldn't map inode %llu, err = %d\n"),
+ do_error(
+ _("couldn't map inode %" PRIu64 ", err = %d\n"),
ino, error);
else {
- do_warn(_("couldn't map inode %llu, err = %d\n"),
+ do_warn(
+ _("couldn't map inode %" PRIu64 ", err = %d\n"),
ino, error);
/*
* see below for what we're doing if this
if (num_illegal > 0) {
ASSERT(ip->i_d.di_format != XFS_DINODE_FMT_LOCAL);
- do_warn(_("%d bad entries found in dir inode %llu, "
- "cannot fix in V1 dir filesystem\n"),
+ do_warn(
+ _("%d bad entries found in dir inode %" PRIu64 ", cannot fix in V1 dir filesystem\n"),
num_illegal, ino);
}
if (need_dot) {
add_inode_ref(irec, ino_offset);
- do_warn(_("missing \".\" entry in dir ino %llu, "
- "cannot in fix V1 dir filesystem\n"), ino);
+ do_warn(
+ _("missing \".\" entry in dir ino %" PRIu64 ", cannot in fix V1 dir filesystem\n"), ino);
}
goto out;
}
error = libxfs_dir_createname(tp, ip, &xfs_name_dotdot,
ip->i_ino, &first, &flist, nres);
if (error)
- do_error(_("can't make \"..\" entry in root inode "
- "%llu, createname error %d\n"), ino, error);
+ do_error(
+ _("can't make \"..\" entry in root inode %" PRIu64 ", createname error %d\n"), ino, error);
libxfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
add_inode_ref(irec, ino_offset);
if (no_modify) {
- do_warn(_("would create missing \".\" entry in dir ino %llu\n"),
+ do_warn(
+ _("would create missing \".\" entry in dir ino %" PRIu64 "\n"),
ino);
} else if (ip->i_d.di_format != XFS_DINODE_FMT_LOCAL) {
/*
* need to create . entry in longform dir.
*/
- do_warn(_("creating missing \".\" entry in dir ino %llu\n"),
- ino);
+ do_warn(
+ _("creating missing \".\" entry in dir ino %" PRIu64 "\n"), ino);
tp = libxfs_trans_alloc(mp, 0);
ASSERT(tp != NULL);
error = libxfs_dir_createname(tp, ip, &xfs_name_dot,
ip->i_ino, &first, &flist, nres);
if (error)
- do_error(_("can't make \".\" entry in dir ino "
- "%llu, createname error %d\n"),
+ do_error(
+ _("can't make \".\" entry in dir ino %" PRIu64 ", createname error %d\n"),
ino, error);
libxfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
ino = XFS_AGINO_TO_INO(mp, agno, i + irec->ino_startnum);
if (inode_isadir(irec, i))
- do_warn(_("disconnected dir inode %llu, "), ino);
+ do_warn(_("disconnected dir inode %" PRIu64 ", "), ino);
else
- do_warn(_("disconnected inode %llu, "), ino);
+ do_warn(_("disconnected inode %" PRIu64 ", "), ino);
if (!xfs_sb_version_hasdirv2(&mp->m_sb))
do_warn(_("cannot fix in V1 dir filesystem\n"));
else if (!no_modify) {
if (!no_modify) {
*dirty = 1;
- do_warn(_("resetting inode %llu nlinks from %d to %d\n"),
+ do_warn(_("resetting inode %" PRIu64 " nlinks from %d to %d\n"),
ino, dinoc->di_nlink, nrefs);
if (nrefs > XFS_MAXLINK_1) {
ASSERT(fs_inode_nlink);
do_warn(
-_("nlinks %d will overflow v1 ino, ino %llu will be converted to version 2\n"),
+_("nlinks %d will overflow v1 ino, ino %" PRIu64 " will be converted to version 2\n"),
nrefs, ino);
}
dinoc->di_nlink = nrefs;
} else {
- do_warn(_("would have reset inode %llu nlinks from %d to %d\n"),
+ do_warn(_("would have reset inode %" PRIu64 " nlinks from %d to %d\n"),
ino, dinoc->di_nlink, nrefs);
}
}
if (error) {
if (!no_modify)
- do_error(_("couldn't map inode %llu, err = %d\n"),
+ do_error(
+ _("couldn't map inode %" PRIu64 ", err = %d\n"),
ino, error);
else {
do_warn(
- _("couldn't map inode %llu, err = %d, can't compare link counts\n"),
+ _("couldn't map inode %" PRIu64 ", err = %d, can't compare link counts\n"),
ino, error);
return;
}
current_phase, duration(elapsed, msgbuf),
(int) (60*sum/(elapsed)), *msgp->format->type);
do_log(
- _("\t- %02d:%02d:%02d: Phase %d: %llu%% done - estimated remaining time %s\n"),
+ _("\t- %02d:%02d:%02d: Phase %d: %" PRIu64 "%% done - estimated remaining time %s\n"),
tmp->tm_hour, tmp->tm_min, tmp->tm_sec,
current_phase, percent,
duration((int) ((*msgp->total - sum) * (elapsed)/sum), msgbuf));
if (buf == NULL) {
do_error(
_("error reading superblock %u -- failed to memalign buffer\n"),
- agno, off);
+ agno);
exit(1);
}
memset(buf, 0, size);
if (lseek64(x.dfd, off, SEEK_SET) != off) {
do_warn(
- _("error reading superblock %u -- seek to offset %lld failed\n"),
+ _("error reading superblock %u -- seek to offset %" PRId64 " failed\n"),
agno, off);
return(XR_EOF);
}
if ((rval = read(x.dfd, buf, size)) != size) {
error = errno;
do_warn(
- _("superblock read failed, offset %lld, size %d, ag %u, rval %d\n"),
+ _("superblock read failed, offset %" PRId64 ", size %d, ag %u, rval %d\n"),
off, size, agno, rval);
do_error("%s\n", strerror(error));
}
* highly unlikely.
*/
if (be32_to_cpu(block->bb_magic) != XFS_BMAP_MAGIC) {
- do_warn(_("bad magic # %#x in inode %llu (%s fork) bmbt "
- "block %llu\n"), be32_to_cpu(block->bb_magic),
- ino, forkname, bno);
+ do_warn(
+_("bad magic # %#x in inode %" PRIu64 " (%s fork) bmbt block %" PRIu64 "\n"),
+ be32_to_cpu(block->bb_magic), ino, forkname, bno);
return(1);
}
if (be16_to_cpu(block->bb_level) != level) {
- do_warn(_("expected level %d got %d in inode %llu, (%s fork) "
- "bmbt block %llu\n"), level,
- be16_to_cpu(block->bb_level), ino, forkname, bno);
+ do_warn(
+_("expected level %d got %d in inode %" PRIu64 ", (%s fork) bmbt block %" PRIu64 "\n"),
+ level, be16_to_cpu(block->bb_level),
+ ino, forkname, bno);
return(1);
}
*/
if (bno != bm_cursor->level[level].right_fsbno) {
do_warn(
-_("bad fwd (right) sibling pointer (saw %llu parent block says %llu)\n"
- "\tin inode %llu (%s fork) bmap btree block %llu\n"),
+_("bad fwd (right) sibling pointer (saw %" PRIu64 " parent block says %" PRIu64 ")\n"
+ "\tin inode %" PRIu64 " (%s fork) bmap btree block %" PRIu64 "\n"),
bm_cursor->level[level].right_fsbno,
bno, ino, forkname,
bm_cursor->level[level].fsbno);
if (be64_to_cpu(block->bb_u.l.bb_leftsib) !=
bm_cursor->level[level].fsbno) {
do_warn(
-_("bad back (left) sibling pointer (saw %llu parent block says %llu)\n"
- "\tin inode %llu (%s fork) bmap btree block %llu\n"),
- be64_to_cpu(block->bb_u.l.bb_leftsib),
+_("bad back (left) sibling pointer (saw %llu parent block says %" PRIu64 ")\n"
+ "\tin inode %" PRIu64 " (%s fork) bmap btree block %" PRIu64 "\n"),
+ (unsigned long long)
+ be64_to_cpu(block->bb_u.l.bb_leftsib),
bm_cursor->level[level].fsbno,
ino, forkname, bno);
return(1);
if (be64_to_cpu(block->bb_u.l.bb_leftsib) != NULLDFSBNO) {
do_warn(
_("bad back (left) sibling pointer (saw %llu should be NULL (0))\n"
- "\tin inode %llu (%s fork) bmap btree block %llu\n"),
- be64_to_cpu(block->bb_u.l.bb_leftsib),
+ "\tin inode %" PRIu64 " (%s fork) bmap btree block %" PRIu64 "\n"),
+ (unsigned long long)
+ be64_to_cpu(block->bb_u.l.bb_leftsib),
ino, forkname, bno);
return(1);
}
*/
set_bmap(agno, agbno, XR_E_MULT);
do_warn(
- _("inode 0x%llx bmap block 0x%llx claimed, state is %d\n"),
- ino, (__uint64_t) bno, state);
+_("inode 0x%" PRIu64 "bmap block 0x%" PRIu64 " claimed, state is %d\n"),
+ ino, bno, state);
break;
case XR_E_MULT:
case XR_E_INUSE_FS:
set_bmap(agno, agbno, XR_E_MULT);
do_warn(
- _("inode 0x%llx bmap block 0x%llx claimed, state is %d\n"),
- ino, (__uint64_t) bno, state);
+_("inode 0x%" PRIu64 " bmap block 0x%" PRIu64 " claimed, state is %d\n"),
+ ino, bno, state);
/*
* if we made it to here, this is probably a bmap block
* that is being used by *another* file as a bmap block
case XR_E_BAD_STATE:
default:
do_warn(
- _("bad state %d, inode 0x%llx bmap block 0x%llx\n"),
- state, ino, (__uint64_t) bno);
+_("bad state %d, inode 0x%" PRIu64 " bmap block 0x%" PRIu64 "\n"),
+ state, ino, bno);
break;
}
pthread_mutex_unlock(&ag_locks[agno]);
if (numrecs > mp->m_bmap_dmxr[0] || (isroot == 0 && numrecs <
mp->m_bmap_dmnr[0])) {
do_warn(
- _("inode 0x%llx bad # of bmap records (%u, min - %u, max - %u)\n"),
+_("inode 0x%" PRIu64 " bad # of bmap records (%u, min - %u, max - %u)\n"),
ino, numrecs, mp->m_bmap_dmnr[0],
mp->m_bmap_dmxr[0]);
return(1);
bm_cursor->level[level].last_key !=
NULLDFILOFF) {
do_warn(
-_("out-of-order bmap key (file offset) in inode %llu, %s fork, fsbno %llu\n"),
+_("out-of-order bmap key (file offset) in inode %" PRIu64 ", %s fork, fsbno %" PRIu64 "\n"),
ino, forkname, bno);
return(1);
}
if (numrecs > mp->m_bmap_dmxr[1] || (isroot == 0 && numrecs <
mp->m_bmap_dmnr[1])) {
do_warn(
- _("inode 0x%llx bad # of bmap records (%u, min - %u, max - %u)\n"),
+_("inode 0x%" PRIu64 " bad # of bmap records (%u, min - %u, max - %u)\n"),
ino, numrecs, mp->m_bmap_dmnr[1], mp->m_bmap_dmxr[1]);
return(1);
}
* we'll bail out and presumably clear the inode.
*/
if (!verify_dfsbno(mp, be64_to_cpu(pp[i]))) {
- do_warn(_("bad bmap btree ptr 0x%llx in ino %llu\n"),
- be64_to_cpu(pp[i]), ino);
+ do_warn(
+_("bad bmap btree ptr 0x%llx in ino %" PRIu64 "\n"),
+ (unsigned long long) be64_to_cpu(pp[i]), ino);
return(1);
}
bm_cursor->level[level-1].first_key) {
if (!no_modify) {
do_warn(
- _("correcting bt key (was %llu, now %llu) in inode %llu\n"
- "\t\t%s fork, btree block %llu\n"),
- be64_to_cpu(pkey[i].br_startoff),
+_("correcting bt key (was %llu, now %" PRIu64 ") in inode %" PRIu64 "\n"
+ "\t\t%s fork, btree block %" PRIu64 "\n"),
+ (unsigned long long)
+ be64_to_cpu(pkey[i].br_startoff),
bm_cursor->level[level-1].first_key,
ino,
forkname, bno);
bm_cursor->level[level-1].first_key);
} else {
do_warn(
- _("bad btree key (is %llu, should be %llu) in inode %llu\n"
- "\t\t%s fork, btree block %llu\n"),
- be64_to_cpu(pkey[i].br_startoff),
+_("bad btree key (is %llu, should be %" PRIu64 ") in inode %" PRIu64 "\n"
+ "\t\t%s fork, btree block %" PRIu64 "\n"),
+ (unsigned long long)
+ be64_to_cpu(pkey[i].br_startoff),
bm_cursor->level[level-1].first_key,
ino, forkname, bno);
}
bm_cursor->level[level].right_fsbno == NULLDFSBNO &&
bm_cursor->level[level - 1].right_fsbno != NULLDFSBNO) {
do_warn(
- _("bad fwd (right) sibling pointer (saw %llu should be NULLDFSBNO)\n"
- "\tin inode %llu (%s fork) bmap btree block %llu\n"),
+_("bad fwd (right) sibling pointer (saw %" PRIu64 " should be NULLDFSBNO)\n"
+ "\tin inode %" PRIu64 " (%s fork) bmap btree block %" PRIu64 "\n"),
bm_cursor->level[level - 1].right_fsbno,
ino, forkname, bm_cursor->level[level - 1].fsbno);
return(1);
if (b == 0 || !verify_agbno(mp, agno, b)) {
do_warn(
- _("invalid start block %u in record %u of %d btree block %u/%u\n"),
+ _("invalid start block %u in record %u of %s btree block %u/%u\n"),
b, i, name, agno, bno);
continue;
}
if (len == 0 || !verify_agbno(mp, agno, end - 1)) {
do_warn(
- _("invalid length %u in record %u of %d btree block %u/%u\n"),
+ _("invalid length %u in record %u of %s btree block %u/%u\n"),
len, i, name, agno, bno);
continue;
}
off % XFS_INODES_PER_CHUNK != 0) ||
(fs_aligned_inodes && agbno % fs_ino_alignment != 0)) {
do_warn(
- _("badly aligned inode rec (starting inode = %llu)\n"),
+ _("badly aligned inode rec (starting inode = %" PRIu64 ")\n"),
lino);
suspect++;
}
*/
if (verify_aginum(mp, agno, ino)) {
do_warn(
-_("bad starting inode # (%llu (0x%x 0x%x)) in ino rec, skipping rec\n"),
+_("bad starting inode # (%" PRIu64 " (0x%x 0x%x)) in ino rec, skipping rec\n"),
lino, agno, ino);
return ++suspect;
}
if (verify_aginum(mp, agno,
ino + XFS_INODES_PER_CHUNK - 1)) {
do_warn(
-_("bad ending inode # (%llu (0x%x 0x%x)) in ino rec, skipping rec\n"),
+_("bad ending inode # (%" PRIu64 " (0x%x 0x%zx)) in ino rec, skipping rec\n"),
lino + XFS_INODES_PER_CHUNK - 1,
- agno, ino + XFS_INODES_PER_CHUNK - 1);
+ agno,
+ ino + XFS_INODES_PER_CHUNK - 1);
return ++suspect;
}
* already in the tree
*/
do_warn(
-_("inode rec for ino %llu (%d/%d) overlaps existing rec (start %d/%d)\n"),
+_("inode rec for ino %" PRIu64 " (%d/%d) overlaps existing rec (start %d/%d)\n"),
lino, agno, ino, agno, first_rec->ino_startnum);
suspect++;
if (nfree != be32_to_cpu(rp->ir_freecount)) {
do_warn(_("ir_freecount/free mismatch, inode "
- "chunk %d/%d, freecount %d nfree %d\n"),
+ "chunk %d/%u, freecount %d nfree %d\n"),
agno, ino, be32_to_cpu(rp->ir_freecount), nfree);
}
if (xfs_sb_version_haslazysbcount(&mp->m_sb) &&
be32_to_cpu(agf->agf_btreeblks) != agcnts->agfbtreeblks) {
- do_warn(_("agf_btreeblks %u, counted %u in ag %u\n"),
+ do_warn(_("agf_btreeblks %u, counted %" PRIu64 " in ag %u\n"),
be32_to_cpu(agf->agf_btreeblks), agcnts->agfbtreeblks, agno);
}
}
if (agino != NULLAGINO) {
do_warn(
- _("agi unlinked bucket %d is %u in ag %u (inode=%lld)\n"),
+ _("agi unlinked bucket %d is %u in ag %u (inode=%" PRIu64 ")\n"),
i, agino, agno,
XFS_AGINO_TO_INO(mp, agno, agino));
}
* Validate that our manual counts match the superblock.
*/
if (mp->m_sb.sb_icount != icount) {
- do_warn(_("sb_icount %lld, counted %lld\n"),
+ do_warn(_("sb_icount %" PRIu64 ", counted %" PRIu64 "\n"),
mp->m_sb.sb_icount, icount);
}
if (mp->m_sb.sb_ifree != ifreecount) {
- do_warn(_("sb_ifree %lld, counted %lld\n"),
+ do_warn(_("sb_ifree %" PRIu64 ", counted %" PRIu64 "\n"),
mp->m_sb.sb_ifree, ifreecount);
}
if (mp->m_sb.sb_fdblocks != fdblocks) {
- do_warn(_("sb_fdblocks %lld, counted %lld\n"),
+ do_warn(_("sb_fdblocks %" PRIu64 ", counted %" PRIu64 "\n"),
mp->m_sb.sb_fdblocks, fdblocks);
}
}
*/
if (mp->m_sb.sb_rootino != first_prealloc_ino) {
do_warn(
-_("sb root inode value %llu %sinconsistent with calculated value %lu\n"),
+_("sb root inode value %" PRIu64 " %sinconsistent with calculated value %u\n"),
mp->m_sb.sb_rootino,
(mp->m_sb.sb_rootino == NULLFSINO ? "(NULLFSINO) ":""),
first_prealloc_ino);
if (!no_modify)
do_warn(
- _("resetting superblock root inode pointer to %lu\n"),
+ _("resetting superblock root inode pointer to %u\n"),
first_prealloc_ino);
else
do_warn(
- _("would reset superblock root inode pointer to %lu\n"),
+ _("would reset superblock root inode pointer to %u\n"),
first_prealloc_ino);
/*
if (mp->m_sb.sb_rbmino != first_prealloc_ino + 1) {
do_warn(
-_("sb realtime bitmap inode %llu %sinconsistent with calculated value %lu\n"),
+_("sb realtime bitmap inode %" PRIu64 " %sinconsistent with calculated value %u\n"),
mp->m_sb.sb_rbmino,
(mp->m_sb.sb_rbmino == NULLFSINO ? "(NULLFSINO) ":""),
first_prealloc_ino + 1);
if (!no_modify)
do_warn(
- _("resetting superblock realtime bitmap ino pointer to %lu\n"),
+ _("resetting superblock realtime bitmap ino pointer to %u\n"),
first_prealloc_ino + 1);
else
do_warn(
- _("would reset superblock realtime bitmap ino pointer to %lu\n"),
+ _("would reset superblock realtime bitmap ino pointer to %u\n"),
first_prealloc_ino + 1);
/*
if (mp->m_sb.sb_rsumino != first_prealloc_ino + 2) {
do_warn(
-_("sb realtime summary inode %llu %sinconsistent with calculated value %lu\n"),
- mp->m_sb.sb_rsumino,
- (mp->m_sb.sb_rsumino == NULLFSINO ? "(NULLFSINO) ":""),
- first_prealloc_ino + 2);
+_("sb realtime summary inode %" PRIu64 " %sinconsistent with calculated value %u\n"),
+ mp->m_sb.sb_rsumino,
+ (mp->m_sb.sb_rsumino == NULLFSINO ? "(NULLFSINO) ":""),
+ first_prealloc_ino + 2);
if (!no_modify)
do_warn(
- _("resetting superblock realtime summary ino pointer to %lu\n"),
+ _("resetting superblock realtime summary ino pointer to %u\n"),
first_prealloc_ino + 2);
else
do_warn(
- _("would reset superblock realtime summary ino pointer to %lu\n"),
+ _("would reset superblock realtime summary ino pointer to %u\n"),
first_prealloc_ino + 2);
/*
max_mem = MIN(max_mem, (LONG_MAX >> 10) + 1);
if (verbose > 1)
- do_log(_(" - max_mem = %lu, icount = %llu, "
- "imem = %llu, dblock = %llu, dmem = %llu\n"),
+ do_log(
+ _(" - max_mem = %lu, icount = %" PRIu64 ", imem = %" PRIu64 ", dblock = %" PRIu64 ", dmem = %" PRIu64 "\n"),
max_mem, mp->m_sb.sb_icount,
mp->m_sb.sb_icount >> (10 - 2),
mp->m_sb.sb_dblocks,