[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-xfs
Subject: [PATCH] Apply gettext translation to more strings.
From: Arkadiusz Miśkiewicz <arekm () maven ! pl>
Date: 2009-01-31 21:34:42
Message-ID: 1233437682-11325-1-git-send-email-arekm () maven ! pl
[Download RAW message or body]
Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
---
db/addr.c | 18 +-
db/agf.c | 10 +-
db/agfl.c | 10 +-
db/agi.c | 10 +-
db/attrset.c | 32 ++--
db/block.c | 54 ++--
db/bmap.c | 18 +-
db/check.c | 644 ++++++++++++++++++++++----------------------
db/command.c | 10 +-
db/convert.c | 14 +-
db/debug.c | 6 +-
db/dquot.c | 16 +-
db/echo.c | 4 +-
db/faddr.c | 46 ++--
db/flist.c | 36 ++--
db/fprint.c | 2 +-
db/frag.c | 16 +-
db/freesp.c | 14 +-
db/hash.c | 8 +-
db/help.c | 10 +-
db/init.c | 6 +-
db/inode.c | 8 +-
db/input.c | 6 +-
db/io.c | 88 +++---
db/malloc.c | 2 +-
db/metadump.c | 8 +-
db/output.c | 16 +-
db/print.c | 14 +-
db/quit.c | 2 +-
db/sb.c | 130 +++++-----
db/type.c | 14 +-
db/write.c | 44 ++--
logprint/log_copy.c | 10 +-
logprint/log_dump.c | 12 +-
logprint/log_misc.c | 222 ++++++++--------
logprint/log_print_all.c | 104 ++++----
logprint/log_print_trans.c | 10 +-
logprint/logprint.c | 28 ++-
repair/avl.c | 14 +-
repair/avl64.c | 14 +-
repair/dinode.c | 2 +-
repair/init.c | 4 +-
42 files changed, 872 insertions(+), 864 deletions(-)
diff --git a/db/addr.c b/db/addr.c
index 35b066c..f74dd62 100644
--- a/db/addr.c
+++ b/db/addr.c
@@ -32,13 +32,13 @@ static int addr_f(int argc, char **argv);
static void addr_help(void);
static const cmdinfo_t addr_cmd =
- { "addr", "a", addr_f, 0, 1, 1, "[field-expression]",
- "set current address", addr_help };
+ { "addr", "a", addr_f, 0, 1, 1, N_("[field-expression]"),
+ N_("set current address"), addr_help };
static void
addr_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" 'addr' uses the given field to set the filesystem address and type\n"
"\n"
@@ -48,7 +48,7 @@ addr_help(void)
" a rootino - set the type to inode and set position to the root inode\n"
" a u.bmx[0].startblock (for inode with blockmap)\n"
"\n"
-);
+));
}
@@ -69,7 +69,7 @@ addr_f(
return 0;
}
if (cur_typ == NULL) {
- dbprintf("no current type\n");
+ dbprintf(_("no current type\n"));
return 0;
}
fld = cur_typ->fields;
@@ -79,7 +79,7 @@ addr_f(
fld = fa->subfld;
}
if (fld == NULL) {
- dbprintf("no fields for type %s\n", cur_typ->name);
+ dbprintf(_("no fields for type %s\n"), cur_typ->name);
return 0;
}
fl = flist_scan(argv[1]);
@@ -92,7 +92,7 @@ addr_f(
flist_print(fl);
for (tfl = fl; tfl->child != NULL; tfl = tfl->child) {
if ((tfl->flags & FL_OKLOW) && tfl->low < tfl->high) {
- dbprintf("array not allowed for addr command\n");
+ dbprintf(_("array not allowed for addr command\n"));
flist_free(fl);
return 0;
}
@@ -102,14 +102,14 @@ addr_f(
if (next == TYP_INODATA)
next = inode_next_type();
if (next == TYP_NONE) {
- dbprintf("no next type for field %s\n", fld->name);
+ dbprintf(_("no next type for field %s\n"), fld->name);
return 0;
}
fa = &ftattrtab[fld->ftyp];
ASSERT(fa->ftyp == fld->ftyp);
adf = fa->adfunc;
if (adf == NULL) {
- dbprintf("no addr function for field %s (type %s)\n",
+ dbprintf(_("no addr function for field %s (type %s)\n"),
fld->name, fa->name);
return 0;
}
diff --git a/db/agf.c b/db/agf.c
index 3e4989d..668637a 100644
--- a/db/agf.c
+++ b/db/agf.c
@@ -32,8 +32,8 @@ static int agf_f(int argc, char **argv);
static void agf_help(void);
static const cmdinfo_t agf_cmd =
- { "agf", NULL, agf_f, 0, 1, 1, "[agno]",
- "set address to agf header", agf_help };
+ { "agf", NULL, agf_f, 0, 1, 1, N_("[agno]"),
+ N_("set address to agf header"), agf_help };
const field_t agf_hfld[] = {
{ "", FLDT_AGF, OI(0), C1, 0, TYP_NONE },
@@ -75,7 +75,7 @@ const field_t agf_flds[] = {
static void
agf_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" set allocation group free block list\n"
"\n"
@@ -87,7 +87,7 @@ agf_help(void)
" contains the root of two different freespace btrees:\n"
" The 'cnt' btree keeps track freespace indexed on section size.\n"
" The 'bno' btree tracks sections of freespace indexed on block number.\n"
-);
+));
}
static int
@@ -101,7 +101,7 @@ agf_f(
if (argc > 1) {
agno = (xfs_agnumber_t)strtoul(argv[1], &p, 0);
if (*p != '\0' || agno >= mp->m_sb.sb_agcount) {
- dbprintf("bad allocation group number %s\n", argv[1]);
+ dbprintf(_("bad allocation group number %s\n"), argv[1]);
return 0;
}
cur_agno = agno;
diff --git a/db/agfl.c b/db/agfl.c
index 1e793be..72dca23 100644
--- a/db/agfl.c
+++ b/db/agfl.c
@@ -33,8 +33,8 @@ static int agfl_f(int argc, char **argv);
static void agfl_help(void);
static const cmdinfo_t agfl_cmd =
- { "agfl", NULL, agfl_f, 0, 1, 1, "[agno]",
- "set address to agfl block", agfl_help };
+ { "agfl", NULL, agfl_f, 0, 1, 1, N_("[agno]"),
+ N_("set address to agfl block"), agfl_help };
const field_t agfl_hfld[] = { {
"", FLDT_AGFL, OI(0), C1, 0, TYP_NONE, },
@@ -59,7 +59,7 @@ agfl_bno_size(
static void
agfl_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" set allocation group freelist\n"
"\n"
@@ -72,7 +72,7 @@ agfl_help(void)
" for each allocation group. This acts as a reserved pool of space\n"
" separate from the general filesystem freespace (not used for user data).\n"
"\n"
-);
+));
}
@@ -87,7 +87,7 @@ agfl_f(
if (argc > 1) {
agno = (xfs_agnumber_t)strtoul(argv[1], &p, 0);
if (*p != '\0' || agno >= mp->m_sb.sb_agcount) {
- dbprintf("bad allocation group number %s\n", argv[1]);
+ dbprintf(_("bad allocation group number %s\n"), argv[1]);
return 0;
}
cur_agno = agno;
diff --git a/db/agi.c b/db/agi.c
index 5486ffa..02d5d30 100644
--- a/db/agi.c
+++ b/db/agi.c
@@ -32,8 +32,8 @@ static int agi_f(int argc, char **argv);
static void agi_help(void);
static const cmdinfo_t agi_cmd =
- { "agi", NULL, agi_f, 0, 1, 1, "[agno]",
- "set address to agi header", agi_help };
+ { "agi", NULL, agi_f, 0, 1, 1, N_("[agno]"),
+ N_("set address to agi header"), agi_help };
const field_t agi_hfld[] = {
{ "", FLDT_AGI, OI(0), C1, 0, TYP_NONE },
@@ -60,7 +60,7 @@ const field_t agi_flds[] = {
static void
agi_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" set allocation group inode btree\n"
"\n"
@@ -72,7 +72,7 @@ agi_help(void)
" the agi inode btree tracks all used/free inodes in the allocation group.\n"
" Inodes are allocated in 16k 'chunks', each btree entry tracks a 'chunk'.\n"
"\n"
-);
+));
}
static int
@@ -86,7 +86,7 @@ agi_f(
if (argc > 1) {
agno = (xfs_agnumber_t)strtoul(argv[1], &p, 0);
if (*p != '\0' || agno >= mp->m_sb.sb_agcount) {
- dbprintf("bad allocation group number %s\n", argv[1]);
+ dbprintf(_("bad allocation group number %s\n"), argv[1]);
return 0;
}
cur_agno = agno;
diff --git a/db/attrset.c b/db/attrset.c
index 1936a5c..35fea11 100644
--- a/db/attrset.c
+++ b/db/attrset.c
@@ -35,17 +35,17 @@ static void attrset_help(void);
static const cmdinfo_t attr_set_cmd =
{ "attr_set", "aset", attr_set_f, 1, -1, 0,
- "[-r|-s|-p|-u] [-n] [-R|-C] [-v n] name",
- "set the named attribute on the current inode", attrset_help };
+ N_("[-r|-s|-p|-u] [-n] [-R|-C] [-v n] name"),
+ N_("set the named attribute on the current inode"), attrset_help };
static const cmdinfo_t attr_remove_cmd =
{ "attr_remove", "aremove", attr_remove_f, 1, -1, 0,
- "[-r|-s|-p|-u] [-n] name",
- "remove the named attribute from the current inode", attrset_help };
+ N_("[-r|-s|-p|-u] [-n] name"),
+ N_("remove the named attribute from the current inode"), attrset_help };
static void
attrset_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" The 'attr_set' and 'attr_remove' commands provide interfaces for debugging\n"
" the extended attribute allocation and removal code.\n"
@@ -60,7 +60,7 @@ attrset_help(void)
" -C -- 'create' - create attribute, fail if it already exists\n"
" -R -- 'replace' - replace attribute, fail if it does not exist\n"
" The backward compatibility mode 'noattr2' can be emulated (-n) also.\n"
-"\n");
+"\n"));
}
void
@@ -83,11 +83,11 @@ attr_set_f(
int c, namelen, valuelen = 0, flags = 0;
if (cur_typ == NULL) {
- dbprintf("no current type\n");
+ dbprintf(_("no current type\n"));
return 0;
}
if (cur_typ->typnm != TYP_INODE) {
- dbprintf("current type is not inode\n");
+ dbprintf(_("current type is not inode\n"));
return 0;
}
@@ -122,19 +122,19 @@ attr_set_f(
case 'v':
valuelen = (int)strtol(optarg, &sp, 0);
if (*sp != '\0' || valuelen < 0 || valuelen > 64*1024) {
- dbprintf("bad attr_set valuelen %s\n", optarg);
+ dbprintf(_("bad attr_set valuelen %s\n"), optarg);
return 0;
}
break;
default:
- dbprintf("bad option for attr_set command\n");
+ dbprintf(_("bad option for attr_set command\n"));
return 0;
}
}
if (optind != argc - 1) {
- dbprintf("too few options for attr_set (no name given)\n");
+ dbprintf(_("too few options for attr_set (no name given)\n"));
return 0;
}
@@ -144,7 +144,7 @@ attr_set_f(
if (valuelen) {
value = (char *)memalign(getpagesize(), valuelen);
if (!value) {
- dbprintf("cannot allocate buffer (%d)\n", valuelen);
+ dbprintf(_("cannot allocate buffer (%d)\n"), valuelen);
goto out;
}
memset(value, 0xfeedface, valuelen);
@@ -186,11 +186,11 @@ attr_remove_f(
int c, namelen, flags = 0;
if (cur_typ == NULL) {
- dbprintf("no current type\n");
+ dbprintf(_("no current type\n"));
return 0;
}
if (cur_typ->typnm != TYP_INODE) {
- dbprintf("current type is not inode\n");
+ dbprintf(_("current type is not inode\n"));
return 0;
}
@@ -214,13 +214,13 @@ attr_remove_f(
break;
default:
- dbprintf("bad option for attr_remove command\n");
+ dbprintf(_("bad option for attr_remove command\n"));
return 0;
}
}
if (optind != argc - 1) {
- dbprintf("too few options for attr_remove (no name given)\n");
+ dbprintf(_("too few options for attr_remove (no name given)\n"));
return 0;
}
diff --git a/db/block.c b/db/block.c
index 6681111..b279aac 100644
--- a/db/block.c
+++ b/db/block.c
@@ -40,28 +40,28 @@ static void fsblock_help(void);
static void print_rawdata(void *data, int len);
static const cmdinfo_t ablock_cmd =
- { "ablock", NULL, ablock_f, 1, 1, 1, "filoff",
- "set address to file offset (attr fork)", ablock_help };
+ { "ablock", NULL, ablock_f, 1, 1, 1, N_("filoff"),
+ N_("set address to file offset (attr fork)"), ablock_help };
static const cmdinfo_t daddr_cmd =
- { "daddr", NULL, daddr_f, 0, 1, 1, "[d]",
- "set address to daddr value", daddr_help };
+ { "daddr", NULL, daddr_f, 0, 1, 1, N_("[d]"),
+ N_("set address to daddr value"), daddr_help };
static const cmdinfo_t dblock_cmd =
- { "dblock", NULL, dblock_f, 1, 1, 1, "filoff",
- "set address to file offset (data fork)", dblock_help };
+ { "dblock", NULL, dblock_f, 1, 1, 1, N_("filoff"),
+ N_("set address to file offset (data fork)"), dblock_help };
static const cmdinfo_t fsblock_cmd =
- { "fsblock", "fsb", fsblock_f, 0, 1, 1, "[fsb]",
- "set address to fsblock value", fsblock_help };
+ { "fsblock", "fsb", fsblock_f, 0, 1, 1, N_("[fsb]"),
+ N_("set address to fsblock value"), fsblock_help };
static void
ablock_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n Example:\n"
"\n"
" 'ablock 23' - sets the file position to the 23rd filesystem block in\n"
" the inode's attribute fork. The filesystem block size is specified in\n"
" the superblock.\n\n"
-);
+));
}
/*ARGSUSED*/
@@ -79,7 +79,7 @@ ablock_f(
bno = (xfs_dfiloff_t)strtoull(argv[1], &p, 0);
if (*p != '\0') {
- dbprintf("bad block number %s\n", argv[1]);
+ dbprintf(_("bad block number %s\n"), argv[1]);
return 0;
}
push_cur();
@@ -87,13 +87,13 @@ ablock_f(
haveattr = XFS_DFORK_Q((xfs_dinode_t *)iocur_top->data);
pop_cur();
if (!haveattr) {
- dbprintf("no attribute data for file\n");
+ dbprintf(_("no attribute data for file\n"));
return 0;
}
nex = 1;
bmap(bno, 1, XFS_ATTR_FORK, &nex, &bm);
if (nex == 0) {
- dbprintf("file attr block is unmapped\n");
+ dbprintf(_("file attr block is unmapped\n"));
return 0;
}
dfsbno = bm.startblock + (bno - bm.startoff);
@@ -115,12 +115,12 @@ block_init(void)
static void
daddr_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n Example:\n"
"\n"
" 'daddr 102' - sets position to the 102nd absolute disk block\n"
" (512 byte block).\n"
-);
+));
}
static int
@@ -132,13 +132,13 @@ daddr_f(
char *p;
if (argc == 1) {
- dbprintf("current daddr is %lld\n", iocur_top->off >> BBSHIFT);
+ dbprintf(_("current daddr is %lld\n"), iocur_top->off >> BBSHIFT);
return 0;
}
d = (__int64_t)strtoull(argv[1], &p, 0);
if (*p != '\0' ||
d >= mp->m_sb.sb_dblocks << (mp->m_sb.sb_blocklog - BBSHIFT)) {
- dbprintf("bad daddr %s\n", argv[1]);
+ dbprintf(_("bad daddr %s\n"), argv[1]);
return 0;
}
ASSERT(typtab[TYP_DATA].typnm == TYP_DATA);
@@ -149,13 +149,13 @@ daddr_f(
static void
dblock_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n Example:\n"
"\n"
" 'dblock 23' - sets the file position to the 23rd filesystem block in\n"
" the inode's data fork. The filesystem block size is specified in the\n"
" superblock.\n\n"
-);
+));
}
static int
@@ -174,7 +174,7 @@ dblock_f(
bno = (xfs_dfiloff_t)strtoull(argv[1], &p, 0);
if (*p != '\0') {
- dbprintf("bad block number %s\n", argv[1]);
+ dbprintf(_("bad block number %s\n"), argv[1]);
return 0;
}
push_cur();
@@ -182,14 +182,14 @@ dblock_f(
type = inode_next_type();
pop_cur();
if (type == TYP_NONE) {
- dbprintf("no type for file data\n");
+ dbprintf(_("no type for file data\n"));
return 0;
}
nex = nb = type == TYP_DIR2 ? mp->m_dirblkfsbs : 1;
bmp = malloc(nb * sizeof(*bmp));
bmap(bno, nb, XFS_DATA_FORK, &nex, bmp);
if (nex == 0) {
- dbprintf("file data block is unmapped\n");
+ dbprintf(_("file data block is unmapped\n"));
free(bmp);
return 0;
}
@@ -206,13 +206,13 @@ dblock_f(
static void
fsblock_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n Example:\n"
"\n"
" 'fsblock 1023' - sets the file position to the 1023rd filesystem block.\n"
" The filesystem block size is specified in the superblock and set during\n"
" mkfs time. Offset is absolute (not AG relative).\n\n"
-);
+));
}
static int
@@ -226,19 +226,19 @@ fsblock_f(
char *p;
if (argc == 1) {
- dbprintf("current fsblock is %lld\n",
+ dbprintf(_("current fsblock is %lld\n"),
XFS_DADDR_TO_FSB(mp, iocur_top->off >> BBSHIFT));
return 0;
}
d = strtoull(argv[1], &p, 0);
if (*p != '\0') {
- dbprintf("bad fsblock %s\n", argv[1]);
+ dbprintf(_("bad fsblock %s\n"), argv[1]);
return 0;
}
agno = XFS_FSB_TO_AGNO(mp, d);
agbno = XFS_FSB_TO_AGBNO(mp, d);
if (agno >= mp->m_sb.sb_agcount || agbno >= mp->m_sb.sb_agblocks) {
- dbprintf("bad fsblock %s\n", argv[1]);
+ dbprintf(_("bad fsblock %s\n"), argv[1]);
return 0;
}
ASSERT(typtab[TYP_DATA].typnm == TYP_DATA);
diff --git a/db/bmap.c b/db/bmap.c
index ef06b30..5abad68 100644
--- a/db/bmap.c
+++ b/db/bmap.c
@@ -36,8 +36,8 @@ static xfs_fsblock_t select_child(xfs_dfiloff_t off, xfs_bmbt_key_t *kp,
xfs_bmbt_ptr_t *pp, int nrecs);
static const cmdinfo_t bmap_cmd =
- { "bmap", NULL, bmap_f, 0, 3, 0, "[-ad] [block [len]]",
- "show block map for current file", NULL };
+ { "bmap", NULL, bmap_f, 0, 3, 0, N_("[-ad] [block [len]]"),
+ N_("show block map for current file"), NULL };
void
bmap(
@@ -150,7 +150,7 @@ bmap_f(
int whichfork;
if (iocur_top->ino == NULLFSINO) {
- dbprintf("no current inode\n");
+ dbprintf(_("no current inode\n"));
return 0;
}
optind = 0;
@@ -163,7 +163,7 @@ bmap_f(
dfork = 1;
break;
default:
- dbprintf("bad option for bmap command\n");
+ dbprintf(_("bad option for bmap command\n"));
return 0;
}
}
@@ -180,7 +180,7 @@ bmap_f(
if (optind < argc) {
co = (xfs_dfiloff_t)strtoull(argv[optind], &p, 0);
if (*p != '\0') {
- dbprintf("bad block number for bmap %s\n",
+ dbprintf(_("bad block number for bmap %s\n"),
argv[optind]);
return 0;
}
@@ -188,7 +188,7 @@ bmap_f(
if (optind < argc) {
len = (xfs_dfilblks_t)strtoull(argv[optind], &p, 0);
if (*p != '\0') {
- dbprintf("bad len for bmap %s\n", argv[optind]);
+ dbprintf(_("bad len for bmap %s\n"), argv[optind]);
return 0;
}
eo = co + len - 1;
@@ -211,9 +211,9 @@ bmap_f(
bmap(co, eo - co + 1, whichfork, &nex, &be);
if (nex == 0)
break;
- dbprintf("%s offset %lld startblock %llu (%u/%u) count "
- "%llu flag %u\n",
- whichfork == XFS_DATA_FORK ? "data" : "attr",
+ dbprintf(_("%s offset %lld startblock %llu (%u/%u) count "
+ "%llu flag %u\n"),
+ whichfork == XFS_DATA_FORK ? _("data") : _("attr"),
be.startoff, be.startblock,
XFS_FSB_TO_AGNO(mp, be.startblock),
XFS_FSB_TO_AGBNO(mp, be.startblock),
diff --git a/db/check.c b/db/check.c
index 10e39b1..3e4d022 100644
--- a/db/check.c
+++ b/db/check.c
@@ -369,23 +369,23 @@ static void setlink_inode(inodata_t *id, nlink_t nlink, int isdir,
static const cmdinfo_t blockfree_cmd =
{ "blockfree", NULL, blockfree_f, 0, 0, 0,
- NULL, "free block usage information", NULL };
+ NULL, N_("free block usage information"), NULL };
static const cmdinfo_t blockget_cmd =
{ "blockget", "check", blockget_f, 0, -1, 0,
- "[-s|-v] [-n] [-t] [-b bno]... [-i ino] ...",
- "get block usage and check consistency", NULL };
+ N_("[-s|-v] [-n] [-t] [-b bno]... [-i ino] ..."),
+ N_("get block usage and check consistency"), NULL };
static const cmdinfo_t blocktrash_cmd =
{ "blocktrash", NULL, blocktrash_f, 0, -1, 0,
- "[-n count] [-x minlen] [-y maxlen] [-s seed] [-0123] [-t type] ...",
- "trash randomly selected block(s)", NULL };
+ N_("[-n count] [-x minlen] [-y maxlen] [-s seed] [-0123] [-t type] ..."),
+ N_("trash randomly selected block(s)"), NULL };
static const cmdinfo_t blockuse_cmd =
{ "blockuse", NULL, blockuse_f, 0, 3, 0,
- "[-n] [-c blockcount]",
- "print usage for current block(s)", NULL };
+ N_("[-n] [-c blockcount]"),
+ N_("print usage for current block(s)"), NULL };
static const cmdinfo_t ncheck_cmd =
{ "ncheck", NULL, ncheck_f, 0, -1, 0,
- "[-s] [-i ino] ...",
- "print inode-name pairs", NULL };
+ N_("[-s] [-i ino] ..."),
+ N_("print inode-name pairs"), NULL };
static void
@@ -405,7 +405,7 @@ add_ilist(
id = find_inode(ino, 1);
if (id == NULL) {
- dbprintf("-i %lld bad inode number\n", ino);
+ dbprintf(_("-i %lld bad inode number\n"), ino);
return;
}
id->ilist = 1;
@@ -417,7 +417,7 @@ addlink_inode(
{
id->link_add++;
if (verbose || id->ilist)
- dbprintf("inode %lld add link, now %u\n", id->ino,
+ dbprintf(_("inode %lld add link, now %u\n"), id->ino,
id->link_add);
}
@@ -444,7 +444,7 @@ addparent_inode(
pid = find_inode(parent, 1);
id->parent = pid;
if (verbose || id->ilist || (pid && pid->ilist))
- dbprintf("inode %lld parent %lld\n", id->ino, parent);
+ dbprintf(_("inode %lld parent %lld\n"), id->ino, parent);
}
static void
@@ -757,7 +757,7 @@ blockfree_f(
int rt;
if (!dbmap) {
- dbprintf("block usage information not allocated\n");
+ dbprintf(_("block usage information not allocated\n"));
return 0;
}
rt = mp->m_sb.sb_rextents != 0;
@@ -795,7 +795,7 @@ blockget_f(
int sbyell;
if (dbmap) {
- dbprintf("already have block usage information\n");
+ dbprintf(_("already have block usage information\n"));
return 0;
}
if (!init(argc, argv)) {
@@ -811,8 +811,8 @@ blockget_f(
scan_ag(agno);
if (sbver_err > 4 && !sbyell && sbver_err >= agno) {
sbyell = 1;
- dbprintf("WARNING: this may be a newer XFS "
- "filesystem.\n");
+ dbprintf(_("WARNING: this may be a newer XFS "
+ "filesystem.\n"));
}
}
if (blist_size) {
@@ -847,39 +847,39 @@ blockget_f(
}
if (mp->m_sb.sb_icount != icount) {
if (!sflag)
- dbprintf("sb_icount %lld, counted %lld\n",
+ dbprintf(_("sb_icount %lld, counted %lld\n"),
mp->m_sb.sb_icount, icount);
error++;
}
if (mp->m_sb.sb_ifree != ifree) {
if (!sflag)
- dbprintf("sb_ifree %lld, counted %lld\n",
+ dbprintf(_("sb_ifree %lld, counted %lld\n"),
mp->m_sb.sb_ifree, ifree);
error++;
}
if (mp->m_sb.sb_fdblocks != fdblocks) {
if (!sflag)
- dbprintf("sb_fdblocks %lld, counted %lld\n",
+ dbprintf(_("sb_fdblocks %lld, counted %lld\n"),
mp->m_sb.sb_fdblocks, fdblocks);
error++;
}
if (lazycount && mp->m_sb.sb_fdblocks != agf_aggr_freeblks) {
if (!sflag)
- dbprintf("sb_fdblocks %lld, aggregate AGF count %lld\n",
+ dbprintf(_("sb_fdblocks %lld, aggregate AGF count %lld\n"),
mp->m_sb.sb_fdblocks, agf_aggr_freeblks);
error++;
}
if (mp->m_sb.sb_frextents != frextents) {
if (!sflag)
- dbprintf("sb_frextents %lld, counted %lld\n",
+ dbprintf(_("sb_frextents %lld, counted %lld\n"),
mp->m_sb.sb_frextents, frextents);
error++;
}
if (mp->m_sb.sb_bad_features2 != 0 &&
mp->m_sb.sb_bad_features2 != mp->m_sb.sb_features2) {
if (!sflag)
- dbprintf("sb_features2 (0x%x) not same as "
- "sb_bad_features2 (0x%x)\n",
+ dbprintf(_("sb_features2 (0x%x) not same as "
+ "sb_bad_features2 (0x%x)\n"),
mp->m_sb.sb_features2,
mp->m_sb.sb_bad_features2);
error++;
@@ -887,28 +887,28 @@ blockget_f(
if ((sbversion & XFS_SB_VERSION_ATTRBIT) &&
!xfs_sb_version_hasattr(&mp->m_sb)) {
if (!sflag)
- dbprintf("sb versionnum missing attr bit %x\n",
+ dbprintf(_("sb versionnum missing attr bit %x\n"),
XFS_SB_VERSION_ATTRBIT);
error++;
}
if ((sbversion & XFS_SB_VERSION_NLINKBIT) &&
!xfs_sb_version_hasnlink(&mp->m_sb)) {
if (!sflag)
- dbprintf("sb versionnum missing nlink bit %x\n",
+ dbprintf(_("sb versionnum missing nlink bit %x\n"),
XFS_SB_VERSION_NLINKBIT);
error++;
}
if ((sbversion & XFS_SB_VERSION_QUOTABIT) &&
!xfs_sb_version_hasquota(&mp->m_sb)) {
if (!sflag)
- dbprintf("sb versionnum missing quota bit %x\n",
+ dbprintf(_("sb versionnum missing quota bit %x\n"),
XFS_SB_VERSION_QUOTABIT);
error++;
}
if (!(sbversion & XFS_SB_VERSION_ALIGNBIT) &&
xfs_sb_version_hasalign(&mp->m_sb)) {
if (!sflag)
- dbprintf("sb versionnum extra align bit %x\n",
+ dbprintf(_("sb versionnum extra align bit %x\n"),
XFS_SB_VERSION_ALIGNBIT);
error++;
}
@@ -919,7 +919,7 @@ blockget_f(
if (qgdo)
quota_check("group", qgdata);
if (sbver_err > mp->m_sb.sb_agcount / 2)
- dbprintf("WARNING: this may be a newer XFS filesystem.\n");
+ dbprintf(_("WARNING: this may be a newer XFS filesystem.\n"));
if (error)
exitcode = 3;
dbprefix = oldprefix;
@@ -948,7 +948,7 @@ blocktrash_b(
int newbit;
int offset;
static char *modestr[] = {
- "zeroed", "set", "flipped", "randomized"
+ N_("zeroed"), N_("set"), N_("flipped"), N_("randomized")
};
len = (int)((random() % (ltabp->max - ltabp->min + 1)) + ltabp->min);
@@ -958,7 +958,7 @@ blocktrash_b(
set_cur(&typtab[DBM_UNKNOWN],
XFS_AGB_TO_DADDR(mp, agno, agbno), blkbb, DB_RING_IGN, NULL);
if ((buf = iocur_top->data) == NULL) {
- dbprintf("can't read block %u/%u for trashing\n", agno, agbno);
+ dbprintf(_("can't read block %u/%u for trashing\n"), agno, agbno);
pop_cur();
return;
}
@@ -988,7 +988,7 @@ blocktrash_b(
}
write_cur();
pop_cur();
- printf("blocktrash: %u/%u %s block %d bit%s starting %d:%d %s\n",
+ printf(_("blocktrash: %u/%u %s block %d bit%s starting %d:%d %s\n"),
agno, agbno, typename[type], len, len == 1 ? "" : "s",
offset / NBBY, offset % NBBY, modestr[mode]);
}
@@ -1020,7 +1020,7 @@ blocktrash_f(
int tmask;
if (!dbmap) {
- dbprintf("must run blockget first\n");
+ dbprintf(_("must run blockget first\n"));
return 0;
}
optind = 0;
@@ -1064,7 +1064,7 @@ blocktrash_f(
case 'n':
count = (int)strtol(optarg, &p, 0);
if (*p != '\0' || count <= 0) {
- dbprintf("bad blocktrash count %s\n", optarg);
+ dbprintf(_("bad blocktrash count %s\n"), optarg);
return 0;
}
break;
@@ -1078,7 +1078,7 @@ blocktrash_f(
break;
}
if (!typename[i] || (((1 << i) & goodmask) == 0)) {
- dbprintf("bad blocktrash type %s\n", optarg);
+ dbprintf(_("bad blocktrash type %s\n"), optarg);
return 0;
}
tmask |= 1 << i;
@@ -1087,7 +1087,7 @@ blocktrash_f(
min = (int)strtol(optarg, &p, 0);
if (*p != '\0' || min <= 0 ||
min > mp->m_sb.sb_blocksize * NBBY) {
- dbprintf("bad blocktrash min %s\n", optarg);
+ dbprintf(_("bad blocktrash min %s\n"), optarg);
return 0;
}
break;
@@ -1095,17 +1095,17 @@ blocktrash_f(
max = (int)strtol(optarg, &p, 0);
if (*p != '\0' || max <= 0 ||
max > mp->m_sb.sb_blocksize * NBBY) {
- dbprintf("bad blocktrash max %s\n", optarg);
+ dbprintf(_("bad blocktrash max %s\n"), optarg);
return 0;
}
break;
default:
- dbprintf("bad option for blocktrash command\n");
+ dbprintf(_("bad option for blocktrash command\n"));
return 0;
}
}
if (min > max) {
- dbprintf("bad min/max for blocktrash command\n");
+ dbprintf(_("bad min/max for blocktrash command\n"));
return 0;
}
if (tmask == 0)
@@ -1131,11 +1131,11 @@ blocktrash_f(
}
}
if (blocks == 0) {
- dbprintf("blocktrash: no matching blocks\n");
+ dbprintf(_("blocktrash: no matching blocks\n"));
return 0;
}
if (!sopt)
- dbprintf("blocktrash: seed %u\n", seed);
+ dbprintf(_("blocktrash: seed %u\n"), seed);
srandom(seed);
for (i = 0; i < count; i++) {
randb = (xfs_drfsbno_t)((((__int64_t)random() << 32) |
@@ -1177,7 +1177,7 @@ blockuse_f(
int shownames;
if (!dbmap) {
- dbprintf("must run blockget first\n");
+ dbprintf(_("must run blockget first\n"));
return 0;
}
optind = 0;
@@ -1193,30 +1193,30 @@ blockuse_f(
end = agbno + count - 1;
if (*p != '\0' || count <= 0 ||
end >= mp->m_sb.sb_agblocks) {
- dbprintf("bad blockuse count %s\n", optarg);
+ dbprintf(_("bad blockuse count %s\n"), optarg);
return 0;
}
break;
case 'n':
if (!nflag) {
- dbprintf("must run blockget -n first\n");
+ dbprintf(_("must run blockget -n first\n"));
return 0;
}
shownames = 1;
break;
default:
- dbprintf("bad option for blockuse command\n");
+ dbprintf(_("bad option for blockuse command\n"));
return 0;
}
}
while (agbno <= end) {
p = &dbmap[agno][agbno];
i = inomap[agno][agbno];
- dbprintf("block %llu (%u/%u) type %s",
+ dbprintf(_("block %llu (%u/%u) type %s"),
(xfs_dfsbno_t)XFS_AGB_TO_FSB(mp, agno, agbno),
agno, agbno, typename[(dbm_t)*p]);
if (i) {
- dbprintf(" inode %lld", i->ino);
+ dbprintf(_(" inode %lld"), i->ino);
if (shownames && (p = inode_name(i->ino, NULL))) {
dbprintf(" %s", p);
xfree(p);
@@ -1254,8 +1254,8 @@ check_dbmap(
for (i = 0, p = &dbmap[agno][agbno]; i < len; i++, p++) {
if ((dbm_t)*p != type) {
if (!sflag || CHECK_BLISTA(agno, agbno + i))
- dbprintf("block %u/%u expected type %s got "
- "%s\n",
+ dbprintf(_("block %u/%u expected type %s got "
+ "%s\n"),
agno, agbno + i, typename[type],
typename[(dbm_t)*p]);
error++;
@@ -1286,7 +1286,7 @@ check_inomap(
int rval;
if (!check_range(agno, agbno, len)) {
- dbprintf("blocks %u/%u..%u claimed by inode %lld\n",
+ dbprintf(_("blocks %u/%u..%u claimed by inode %lld\n"),
agno, agbno, agbno + len - 1, c_ino);
return 0;
}
@@ -1294,8 +1294,8 @@ check_inomap(
if (*idp) {
if (!sflag || (*idp)->ilist ||
CHECK_BLISTA(agno, agbno + i))
- dbprintf("block %u/%u claimed by inode %lld, "
- "previous inum %lld\n",
+ dbprintf(_("block %u/%u claimed by inode %lld, "
+ "previous inum %lld\n"),
agno, agbno + i, c_ino, (*idp)->ino);
error++;
rval = 0;
@@ -1323,20 +1323,20 @@ check_linkcounts(
path = xstrdup("?");
if (!sflag || ep->ilist) {
if (ep->link_add)
- dbprintf("link count mismatch "
+ dbprintf(_("link count mismatch "
"for inode %lld (name "
"%s), nlink %d, "
- "counted %d\n",
+ "counted %d\n"),
ep->ino, path,
ep->link_set,
ep->link_add);
else if (ep->link_set)
- dbprintf("disconnected inode "
- "%lld, nlink %d\n",
+ dbprintf(_("disconnected inode "
+ "%lld, nlink %d\n"),
ep->ino, ep->link_set);
else
- dbprintf("allocated inode %lld "
- "has 0 link count\n",
+ dbprintf(_("allocated inode %lld "
+ "has 0 link count\n"),
ep->ino);
}
if (path)
@@ -1345,7 +1345,7 @@ check_linkcounts(
} else if (verbose || ep->ilist) {
path = inode_name(ep->ino, NULL);
if (path) {
- dbprintf("inode %lld name %s\n",
+ dbprintf(_("inode %lld name %s\n"),
ep->ino, path);
xfree(path);
}
@@ -1379,11 +1379,11 @@ check_range(
/* Do nothing */
} else if (cur == 0 && prev == 1) {
if (low == high) {
- dbprintf("block %u/%u out of range\n",
+ dbprintf(_("block %u/%u out of range\n"),
agno, low);
} else {
- dbprintf("blocks %u/%u..%u "
- "out of range\n",
+ dbprintf(_("blocks %u/%u..%u "
+ "out of range\n"),
agno, low, high);
}
valid_range = 0;
@@ -1394,11 +1394,11 @@ check_range(
}
if (valid_range) {
if (low == high) {
- dbprintf("block %u/%u out of range\n",
+ dbprintf(_("block %u/%u out of range\n"),
agno, low);
} else {
- dbprintf("blocks %u/%u..%u "
- "out of range\n",
+ dbprintf(_("blocks %u/%u..%u "
+ "out of range\n"),
agno, low, high);
}
}
@@ -1420,8 +1420,8 @@ check_rdbmap(
for (i = 0, p = &dbmap[mp->m_sb.sb_agcount][bno]; i < len; i++, p++) {
if ((dbm_t)*p != type) {
if (!sflag || CHECK_BLIST(bno + i))
- dbprintf("rtblock %llu expected type %s got "
- "%s\n",
+ dbprintf(_("rtblock %llu expected type %s got "
+ "%s\n"),
bno + i, typename[type],
typename[(dbm_t)*p]);
error++;
@@ -1440,7 +1440,7 @@ check_rinomap(
int rval;
if (!check_rrange(bno, len)) {
- dbprintf("rtblocks %llu..%llu claimed by inode %lld\n",
+ dbprintf(_("rtblocks %llu..%llu claimed by inode %lld\n"),
bno, bno + len - 1, c_ino);
return 0;
}
@@ -1449,8 +1449,8 @@ check_rinomap(
i++, idp++) {
if (*idp) {
if (!sflag || (*idp)->ilist || CHECK_BLIST(bno + i))
- dbprintf("rtblock %llu claimed by inode %lld, "
- "previous inum %lld\n",
+ dbprintf(_("rtblock %llu claimed by inode %lld, "
+ "previous inum %lld\n"),
bno + i, c_ino, (*idp)->ino);
error++;
rval = 0;
@@ -1467,12 +1467,12 @@ check_rootdir(void)
id = find_inode(mp->m_sb.sb_rootino, 0);
if (id == NULL) {
if (!sflag)
- dbprintf("root inode %lld is missing\n",
+ dbprintf(_("root inode %lld is missing\n"),
mp->m_sb.sb_rootino);
error++;
} else if (!id->isdir) {
if (!sflag || id->ilist)
- dbprintf("root inode %lld is not a directory\n",
+ dbprintf(_("root inode %lld is not a directory\n"),
mp->m_sb.sb_rootino);
error++;
}
@@ -1488,7 +1488,7 @@ check_rrange(
if (bno + len - 1 >= mp->m_sb.sb_rblocks) {
for (i = 0; i < len; i++) {
if (!sflag || CHECK_BLIST(bno + i))
- dbprintf("rtblock %llu out of range\n",
+ dbprintf(_("rtblock %llu out of range\n"),
bno + i);
}
error++;
@@ -1512,7 +1512,7 @@ check_set_dbmap(
char *p;
if (!check_range(agno, agbno, len)) {
- dbprintf("blocks %u/%u..%u claimed by block %u/%u\n", agno,
+ dbprintf(_("blocks %u/%u..%u claimed by block %u/%u\n"), agno,
agbno, agbno + len - 1, c_agno, c_agbno);
return;
}
@@ -1521,7 +1521,7 @@ check_set_dbmap(
for (i = 0, p = &dbmap[agno][agbno]; i < len; i++, p++) {
*p = (char)type2;
if (mayprint && (verbose || CHECK_BLISTA(agno, agbno + i)))
- dbprintf("setting block %u/%u to %s\n", agno, agbno + i,
+ dbprintf(_("setting block %u/%u to %s\n"), agno, agbno + i,
typename[type2]);
}
}
@@ -1544,7 +1544,7 @@ check_set_rdbmap(
for (i = 0, p = &dbmap[mp->m_sb.sb_agcount][bno]; i < len; i++, p++) {
*p = (char)type2;
if (mayprint && (verbose || CHECK_BLIST(bno + i)))
- dbprintf("setting rtblock %llu to %s\n",
+ dbprintf(_("setting rtblock %llu to %s\n"),
bno + i, typename[type2]);
}
}
@@ -1565,9 +1565,9 @@ check_summary(void)
bno++, csp++, fsp++) {
if (*csp != *fsp) {
if (!sflag)
- dbprintf("rt summary mismatch, size %d "
+ dbprintf(_("rt summary mismatch, size %d "
"block %llu, file: %d, "
- "computed: %d\n",
+ "computed: %d\n"),
log, bno, *fsp, *csp);
error++;
}
@@ -1590,7 +1590,7 @@ checknot_dbmap(
for (i = 0, p = &dbmap[agno][agbno]; i < len; i++, p++) {
if ((1 << *p) & typemask) {
if (!sflag || CHECK_BLISTA(agno, agbno + i))
- dbprintf("block %u/%u type %s not expected\n",
+ dbprintf(_("block %u/%u type %s not expected\n"),
agno, agbno + i, typename[(dbm_t)*p]);
error++;
}
@@ -1611,7 +1611,7 @@ checknot_rdbmap(
for (i = 0, p = &dbmap[mp->m_sb.sb_agcount][bno]; i < len; i++, p++) {
if ((1 << *p) & typemask) {
if (!sflag || CHECK_BLIST(bno + i))
- dbprintf("rtblock %llu type %s not expected\n",
+ dbprintf(_("rtblock %llu type %s not expected\n"),
bno + i, typename[(dbm_t)*p]);
error++;
}
@@ -1648,8 +1648,8 @@ dir_hash_check(
if (p->seen)
continue;
if (!sflag || id->ilist || v)
- dbprintf("dir ino %lld missing leaf entry for "
- "%x/%x\n",
+ dbprintf(_("dir ino %lld missing leaf entry for "
+ "%x/%x\n"),
id->ino, p->hashval, p->address);
error++;
}
@@ -1767,7 +1767,7 @@ init(
serious_error = 0;
if (mp->m_sb.sb_magicnum != XFS_SB_MAGIC) {
- dbprintf("bad superblock magic number %x, giving up\n",
+ dbprintf(_("bad superblock magic number %x, giving up\n"),
mp->m_sb.sb_magicnum);
serious_error = 1;
return 0;
@@ -1821,7 +1821,7 @@ init(
verbose = 1;
break;
default:
- dbprintf("bad option for blockget command\n");
+ dbprintf(_("bad option for blockget command\n"));
return 0;
}
}
@@ -1884,7 +1884,7 @@ ncheck_f(
int security;
if (!inodata || !nflag) {
- dbprintf("must run blockget -n first\n");
+ dbprintf(_("must run blockget -n first\n"));
return 0;
}
security = optind = ilist_size = 0;
@@ -1901,7 +1901,7 @@ ncheck_f(
security = 1;
break;
default:
- dbprintf("bad option -%c for ncheck command\n", c);
+ dbprintf(_("bad option -%c for ncheck command\n"), c);
return 0;
}
}
@@ -1974,8 +1974,8 @@ process_block_dir_v2(
v = id->ilist || verbose;
if (nex == 0) {
if (!sflag || v)
- dbprintf("block 0 for directory inode %lld is "
- "missing\n",
+ dbprintf(_("block 0 for directory inode %lld is "
+ "missing\n"),
id->ino);
error++;
return 0;
@@ -1994,8 +1994,8 @@ process_block_dir_v2(
free(bmp);
if (iocur_top->data == NULL) {
if (!sflag || id->ilist || v)
- dbprintf("can't read block 0 for directory inode "
- "%lld\n",
+ dbprintf(_("can't read block 0 for directory inode "
+ "%lld\n"),
id->ino);
error++;
pop_cur();
@@ -2040,17 +2040,17 @@ process_bmbt_reclist(
for (i = 0; i < numrecs; i++, rp++) {
convert_extent((xfs_bmbt_rec_64_t *)rp, &o, &s, &c, &f);
if (v)
- dbprintf("inode %lld extent [%lld,%lld,%lld,%d]\n",
+ dbprintf(_("inode %lld extent [%lld,%lld,%lld,%d]\n"),
id->ino, o, s, c, f);
if (!sflag && i > 0 && op + cp > o)
- dbprintf("bmap rec out of order, inode %lld entry %d\n",
+ dbprintf(_("bmap rec out of order, inode %lld entry %d\n"),
id->ino, i);
op = o;
cp = c;
if (type == DBM_RTDATA) {
if (!sflag && s >= mp->m_sb.sb_rblocks) {
- dbprintf("inode %lld bad rt block number %lld, "
- "offset %lld\n",
+ dbprintf(_("inode %lld bad rt block number %lld, "
+ "offset %lld\n"),
id->ino, s, o);
continue;
}
@@ -2059,14 +2059,14 @@ process_bmbt_reclist(
agbno = XFS_FSB_TO_AGBNO(mp, s);
if (agno >= mp->m_sb.sb_agcount ||
agbno >= mp->m_sb.sb_agblocks) {
- dbprintf("inode %lld bad block number %lld "
- "[%d,%d], offset %lld\n",
+ dbprintf(_("inode %lld bad block number %lld "
+ "[%d,%d], offset %lld\n"),
id->ino, s, agno, agbno, o);
continue;
}
if (agbno + c - 1 >= mp->m_sb.sb_agblocks) {
- dbprintf("inode %lld bad block number %lld "
- "[%d,%d], offset %lld\n",
+ dbprintf(_("inode %lld bad block number %lld "
+ "[%d,%d], offset %lld\n"),
id->ino, s + c - 1, agno,
agbno + (xfs_agblock_t)c - 1, o);
continue;
@@ -2083,8 +2083,8 @@ process_bmbt_reclist(
blist_size && b < s + c;
b++, o++) {
if (CHECK_BLIST(b))
- dbprintf("inode %lld block %lld at "
- "offset %lld\n",
+ dbprintf(_("inode %lld block %lld at "
+ "offset %lld\n"),
id->ino, (xfs_dfsbno_t)b, o);
}
} else {
@@ -2097,8 +2097,8 @@ process_bmbt_reclist(
blist_size && b < s + c;
b++, o++, agbno++) {
if (CHECK_BLIST(b))
- dbprintf("inode %lld block %lld at "
- "offset %lld\n",
+ dbprintf(_("inode %lld block %lld at "
+ "offset %lld\n"),
id->ino, (xfs_dfsbno_t)b, o);
}
}
@@ -2125,10 +2125,10 @@ process_btinode(
dib = (xfs_bmdr_block_t *)XFS_DFORK_PTR(dip, whichfork);
if (be16_to_cpu(dib->bb_level) >= XFS_BM_MAXLEVELS(mp, whichfork)) {
if (!sflag || id->ilist)
- dbprintf("level for ino %lld %s fork bmap root too "
- "large (%u)\n",
+ dbprintf(_("level for ino %lld %s fork bmap root too "
+ "large (%u)\n"),
id->ino,
- whichfork == XFS_DATA_FORK ? "data" : "attr",
+ whichfork == XFS_DATA_FORK ? _("data") : _("attr"),
be16_to_cpu(dib->bb_level));
error++;
return;
@@ -2137,10 +2137,10 @@ process_btinode(
xfs_bmdr_maxrecs(mp, XFS_DFORK_SIZE(dip, mp, whichfork),
be16_to_cpu(dib->bb_level) == 0)) {
if (!sflag || id->ilist)
- dbprintf("numrecs for ino %lld %s fork bmap root too "
- "large (%u)\n",
+ dbprintf(_("numrecs for ino %lld %s fork bmap root too "
+ "large (%u)\n"),
id->ino,
- whichfork == XFS_DATA_FORK ? "data" : "attr",
+ whichfork == XFS_DATA_FORK ? _("data") : _("attr"),
be16_to_cpu(dib->bb_numrecs));
error++;
return;
@@ -2164,10 +2164,10 @@ process_btinode(
}
if (*nex <= XFS_DFORK_SIZE(dip, mp, whichfork) / sizeof(xfs_bmbt_rec_t)) {
if (!sflag || id->ilist)
- dbprintf("extent count for ino %lld %s fork too low "
- "(%d) for file format\n",
+ dbprintf(_("extent count for ino %lld %s fork too low "
+ "(%d) for file format\n"),
id->ino,
- whichfork == XFS_DATA_FORK ? "data" : "attr",
+ whichfork == XFS_DATA_FORK ? _("data") : _("attr"),
*nex);
error++;
}
@@ -2214,8 +2214,8 @@ process_data_dir_v2(
if (be32_to_cpu(block->hdr.magic) != XFS_DIR2_BLOCK_MAGIC &&
be32_to_cpu(data->hdr.magic) != XFS_DIR2_DATA_MAGIC) {
if (!sflag || v)
- dbprintf("bad directory data magic # %#x for dir ino "
- "%lld block %d\n",
+ dbprintf(_("bad directory data magic # %#x for dir ino "
+ "%lld block %d\n"),
be32_to_cpu(data->hdr.magic), id->ino, dabno);
error++;
return NULLFSINO;
@@ -2231,8 +2231,8 @@ process_data_dir_v2(
endptr = (char *)data + mp->m_dirblksize;
lep = NULL;
if (!sflag || v)
- dbprintf("bad block directory tail for dir ino "
- "%lld\n",
+ dbprintf(_("bad block directory tail for dir ino "
+ "%lld\n"),
id->ino);
error++;
}
@@ -2276,8 +2276,8 @@ process_data_dir_v2(
be16_to_cpu(dup->length) == 0 ||
(char *)tagp >= endptr) {
if (!sflag || v)
- dbprintf("dir %lld block %d bad free "
- "entry at %d\n",
+ dbprintf(_("dir %lld block %d bad free "
+ "entry at %d\n"),
id->ino, dabno,
(int)((char *)dup -
(char *)data));
@@ -2300,8 +2300,8 @@ process_data_dir_v2(
dep = (xfs_dir2_data_entry_t *)dup;
if (dep->namelen == 0) {
if (!sflag || v)
- dbprintf("dir %lld block %d zero length entry "
- "at %d\n",
+ dbprintf(_("dir %lld block %d zero length entry "
+ "at %d\n"),
id->ino, dabno,
(int)((char *)dep - (char *)data));
error++;
@@ -2309,7 +2309,7 @@ process_data_dir_v2(
tagp = xfs_dir2_data_entry_tag_p(dep);
if ((char *)tagp >= endptr) {
if (!sflag || v)
- dbprintf("dir %lld block %d bad entry at %d\n",
+ dbprintf(_("dir %lld block %d bad entry at %d\n"),
id->ino, dabno,
(int)((char *)dep - (char *)data));
error++;
@@ -2327,15 +2327,15 @@ process_data_dir_v2(
lino = be64_to_cpu(dep->inumber);
cid = find_inode(lino, 1);
if (v)
- dbprintf("dir %lld block %d entry %*.*s %lld\n",
+ dbprintf(_("dir %lld block %d entry %*.*s %lld\n"),
id->ino, dabno, dep->namelen, dep->namelen,
dep->name, lino);
if (cid)
addlink_inode(cid);
else {
if (!sflag || v)
- dbprintf("dir %lld block %d entry %*.*s bad "
- "inode number %lld\n",
+ dbprintf(_("dir %lld block %d entry %*.*s bad "
+ "inode number %lld\n"),
id->ino, dabno, dep->namelen,
dep->namelen, dep->name, lino);
error++;
@@ -2344,8 +2344,8 @@ process_data_dir_v2(
dep->name[1] == '.') {
if (parent) {
if (!sflag || v)
- dbprintf("multiple .. entries in dir "
- "%lld (%lld, %lld)\n",
+ dbprintf(_("multiple .. entries in dir "
+ "%lld (%lld, %lld)\n"),
id->ino, parent, lino);
error++;
} else
@@ -2361,8 +2361,8 @@ process_data_dir_v2(
} else {
if (lino != id->ino) {
if (!sflag || v)
- dbprintf("dir %lld entry . inode "
- "number mismatch (%lld)\n",
+ dbprintf(_("dir %lld entry . inode "
+ "number mismatch (%lld)\n"),
id->ino, lino);
error++;
}
@@ -2374,8 +2374,8 @@ process_data_dir_v2(
for (i = stale = 0; lep && i < be32_to_cpu(btp->count); i++) {
if ((char *)&lep[i] >= endptr) {
if (!sflag || v)
- dbprintf("dir %lld block %d bad count "
- "%u\n", id->ino, dabno,
+ dbprintf(_("dir %lld block %d bad count "
+ "%u\n"), id->ino, dabno,
be32_to_cpu(btp->count));
error++;
break;
@@ -2385,8 +2385,8 @@ process_data_dir_v2(
else if (dir_hash_see(be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address))) {
if (!sflag || v)
- dbprintf("dir %lld block %d extra leaf "
- "entry %x %x\n",
+ dbprintf(_("dir %lld block %d extra leaf "
+ "entry %x %x\n"),
id->ino, dabno,
be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address));
@@ -2397,7 +2397,7 @@ process_data_dir_v2(
bf_err += freeseen != 7;
if (bf_err) {
if (!sflag || v)
- dbprintf("dir %lld block %d bad bestfree data\n",
+ dbprintf(_("dir %lld block %d bad bestfree data\n"),
id->ino, dabno);
error++;
}
@@ -2405,8 +2405,8 @@ process_data_dir_v2(
count != be32_to_cpu(btp->count) -
be32_to_cpu(btp->stale)) {
if (!sflag || v)
- dbprintf("dir %lld block %d bad block tail count %d "
- "(stale %d)\n",
+ dbprintf(_("dir %lld block %d bad block tail count %d "
+ "(stale %d)\n"),
id->ino, dabno, be32_to_cpu(btp->count),
be32_to_cpu(btp->stale));
error++;
@@ -2414,20 +2414,20 @@ process_data_dir_v2(
if (be32_to_cpu(data->hdr.magic) == XFS_DIR2_BLOCK_MAGIC &&
stale != be32_to_cpu(btp->stale)) {
if (!sflag || v)
- dbprintf("dir %lld block %d bad stale tail count %d\n",
+ dbprintf(_("dir %lld block %d bad stale tail count %d\n"),
id->ino, dabno, be32_to_cpu(btp->stale));
error++;
}
if (lastfree_err) {
if (!sflag || v)
- dbprintf("dir %lld block %d consecutive free entries\n",
+ dbprintf(_("dir %lld block %d consecutive free entries\n"),
id->ino, dabno);
error++;
}
if (tag_err) {
if (!sflag || v)
- dbprintf("dir %lld block %d entry/unused tag "
- "mismatch\n",
+ dbprintf(_("dir %lld block %d entry/unused tag "
+ "mismatch\n"),
id->ino, dabno);
error++;
}
@@ -2479,21 +2479,21 @@ process_dir(
bno = XFS_INO_TO_FSB(mp, id->ino);
if (dot == 0) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("no . entry for directory %lld\n", id->ino);
+ dbprintf(_("no . entry for directory %lld\n"), id->ino);
error++;
}
if (dotdot == 0) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("no .. entry for directory %lld\n", id->ino);
+ dbprintf(_("no .. entry for directory %lld\n"), id->ino);
error++;
} else if (parent == id->ino && id->ino != mp->m_sb.sb_rootino) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf(". and .. same for non-root directory %lld\n",
+ dbprintf(_(". and .. same for non-root directory %lld\n"),
id->ino);
error++;
} else if (id->ino == mp->m_sb.sb_rootino && id->ino != parent) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("root directory %lld has .. %lld\n", id->ino,
+ dbprintf(_("root directory %lld has .. %lld\n"), id->ino,
parent);
error++;
} else if (parent != NULLFSINO && id->ino != parent)
@@ -2523,8 +2523,8 @@ process_dir_v1(
dip->di_core.di_format == XFS_DINODE_FMT_BTREE))
*parent = process_node_dir_v1(blkmap, dot, dotdot, id);
else {
- dbprintf("bad size (%lld) or format (%d) for directory inode "
- "%lld\n",
+ dbprintf(_("bad size (%lld) or format (%d) for directory inode "
+ "%lld\n"),
size, dip->di_core.di_format, id->ino);
error++;
return 1;
@@ -2558,8 +2558,8 @@ process_dir_v2(
dip->di_core.di_format == XFS_DINODE_FMT_BTREE))
*parent = process_leaf_node_dir_v2(blkmap, dot, dotdot, id, size);
else {
- dbprintf("bad size (%lld) or format (%d) for directory inode "
- "%lld\n",
+ dbprintf(_("bad size (%lld) or format (%d) for directory inode "
+ "%lld\n"),
size, dip->di_core.di_format, id->ino);
error++;
return 1;
@@ -2586,7 +2586,7 @@ process_exinode(
if (*nex < 0 || *nex > XFS_DFORK_SIZE(dip, mp, whichfork) /
sizeof(xfs_bmbt_rec_32_t)) {
if (!sflag || id->ilist)
- dbprintf("bad number of extents %d for inode %lld\n",
+ dbprintf(_("bad number of extents %d for inode %lld\n"),
*nex, id->ino);
error++;
return;
@@ -2656,14 +2656,14 @@ process_inode(
}
if (idic.di_magic != XFS_DINODE_MAGIC) {
if (!sflag || isfree || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad magic number %#x for inode %lld\n",
+ dbprintf(_("bad magic number %#x for inode %lld\n"),
idic.di_magic, ino);
error++;
return;
}
if (!XFS_DINODE_GOOD_VERSION(idic.di_version)) {
if (!sflag || isfree || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad version number %#x for inode %lld\n",
+ dbprintf(_("bad version number %#x for inode %lld\n"),
idic.di_version, ino);
error++;
return;
@@ -2671,8 +2671,8 @@ process_inode(
if (isfree) {
if (idic.di_nblocks != 0) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad nblocks %lld for free inode "
- "%lld\n",
+ dbprintf(_("bad nblocks %lld for free inode "
+ "%lld\n"),
idic.di_nblocks, ino);
error++;
}
@@ -2682,13 +2682,13 @@ process_inode(
nlink = idic.di_nlink;
if (nlink != 0) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad nlink %d for free inode %lld\n",
+ dbprintf(_("bad nlink %d for free inode %lld\n"),
nlink, ino);
error++;
}
if (idic.di_mode != 0) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad mode %#o for free inode %lld\n",
+ dbprintf(_("bad mode %#o for free inode %lld\n"),
idic.di_mode, ino);
error++;
}
@@ -2696,7 +2696,7 @@ process_inode(
}
if (be32_to_cpu(dip->di_next_unlinked) != NULLAGINO) {
if (!sflag || isfree || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad next unlinked %#x for inode %lld\n",
+ dbprintf(_("bad next unlinked %#x for inode %lld\n"),
be32_to_cpu(dip->di_next_unlinked), ino);
error++;
}
@@ -2706,29 +2706,29 @@ process_inode(
if ((((idic.di_mode & S_IFMT) >> 12) > 15) ||
(!(okfmts[(idic.di_mode & S_IFMT) >> 12] & (1 << idic.di_format)))) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad format %d for inode %lld type %#o\n",
+ dbprintf(_("bad format %d for inode %lld type %#o\n"),
idic.di_format, id->ino, idic.di_mode & S_IFMT);
error++;
return;
}
if ((unsigned int)XFS_DFORK_ASIZE(dip, mp) >= XFS_LITINO(mp)) {
if (!sflag || id->ilist)
- dbprintf("bad fork offset %d for inode %lld\n",
+ dbprintf(_("bad fork offset %d for inode %lld\n"),
idic.di_forkoff, id->ino);
error++;
return;
}
if ((unsigned int)idic.di_aformat > XFS_DINODE_FMT_BTREE) {
if (!sflag || id->ilist)
- dbprintf("bad attribute format %d for inode %lld\n",
+ dbprintf(_("bad attribute format %d for inode %lld\n"),
idic.di_aformat, id->ino);
error++;
return;
}
if (verbose || id->ilist || CHECK_BLIST(bno))
- dbprintf("inode %lld mode %#o fmt %s "
+ dbprintf(_("inode %lld mode %#o fmt %s "
"afmt %s "
- "nex %d anex %d nblk %lld sz %lld%s%s%s%s%s%s%s\n",
+ "nex %d anex %d nblk %lld sz %lld%s%s%s%s%s%s%s\n"),
id->ino, idic.di_mode, fmtnames[(int)idic.di_format],
fmtnames[(int)idic.di_aformat],
idic.di_nextents,
@@ -2846,21 +2846,21 @@ process_inode(
totblocks = totdblocks + totiblocks + atotdblocks + atotiblocks;
if (totblocks != idic.di_nblocks) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad nblocks %lld for inode %lld, counted "
- "%lld\n",
+ dbprintf(_("bad nblocks %lld for inode %lld, counted "
+ "%lld\n"),
idic.di_nblocks, id->ino, totblocks);
error++;
}
if (nextents != idic.di_nextents) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad nextents %d for inode %lld, counted %d\n",
+ dbprintf(_("bad nextents %d for inode %lld, counted %d\n"),
idic.di_nextents, id->ino, nextents);
error++;
}
if (anextents != idic.di_anextents) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad anextents %d for inode %lld, counted "
- "%d\n",
+ dbprintf(_("bad anextents %d for inode %lld, counted "
+ "%d\n"),
idic.di_anextents, id->ino, anextents);
error++;
}
@@ -2911,8 +2911,8 @@ process_lclinode(
if (whichfork == XFS_DATA_FORK && be64_to_cpu(dip->di_core.di_size) >
XFS_DFORK_DSIZE(dip, mp)) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("local inode %lld data is too large (size "
- "%lld)\n",
+ dbprintf(_("local inode %lld data is too large (size "
+ "%lld)\n"),
id->ino, be64_to_cpu(dip->di_core.di_size));
error++;
}
@@ -2920,8 +2920,8 @@ process_lclinode(
asf = (xfs_attr_shortform_t *)XFS_DFORK_APTR(dip);
if (be16_to_cpu(asf->hdr.totsize) > XFS_DFORK_ASIZE(dip, mp)) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("local inode %lld attr is too large "
- "(size %d)\n",
+ dbprintf(_("local inode %lld attr is too large "
+ "(size %d)\n"),
id->ino, be16_to_cpu(asf->hdr.totsize));
error++;
}
@@ -2941,8 +2941,8 @@ process_leaf_dir_v1(
bno = blkmap_get(blkmap, 0);
if (bno == NULLFSBLOCK) {
if (!sflag || id->ilist)
- dbprintf("block 0 for directory inode %lld is "
- "missing\n",
+ dbprintf(_("block 0 for directory inode %lld is "
+ "missing\n"),
id->ino);
error++;
return 0;
@@ -2952,8 +2952,8 @@ process_leaf_dir_v1(
NULL);
if (iocur_top->data == NULL) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("can't read block 0 for directory inode "
- "%lld\n",
+ dbprintf(_("can't read block 0 for directory inode "
+ "%lld\n"),
id->ino);
error++;
pop_cur();
@@ -2985,8 +2985,8 @@ process_leaf_dir_v1_int(
leaf = iocur_top->data;
if (be16_to_cpu(leaf->hdr.info.magic) != XFS_DIR_LEAF_MAGIC) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad directory leaf magic # %#x for dir ino "
- "%lld\n",
+ dbprintf(_("bad directory leaf magic # %#x for dir ino "
+ "%lld\n"),
be16_to_cpu(leaf->hdr.info.magic), id->ino);
error++;
return NULLFSINO;
@@ -2998,15 +2998,15 @@ process_leaf_dir_v1_int(
lino = XFS_GET_DIR_INO8(namest->inumber);
cid = find_inode(lino, 1);
if (v)
- dbprintf("dir %lld entry %*.*s %lld\n", id->ino,
+ dbprintf(_("dir %lld entry %*.*s %lld\n"), id->ino,
entry->namelen, entry->namelen, namest->name,
lino);
if (cid)
addlink_inode(cid);
else {
if (!sflag)
- dbprintf("dir %lld entry %*.*s bad inode "
- "number %lld\n",
+ dbprintf(_("dir %lld entry %*.*s bad inode "
+ "number %lld\n"),
id->ino, entry->namelen, entry->namelen,
namest->name, lino);
error++;
@@ -3015,8 +3015,8 @@ process_leaf_dir_v1_int(
namest->name[1] == '.') {
if (parent) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("multiple .. entries in dir "
- "%lld (%lld, %lld)\n",
+ dbprintf(_("multiple .. entries in dir "
+ "%lld (%lld, %lld)\n"),
id->ino, parent, lino);
error++;
} else
@@ -3032,8 +3032,8 @@ process_leaf_dir_v1_int(
} else {
if (lino != id->ino) {
if (!sflag)
- dbprintf("dir %lld entry . inode "
- "number mismatch (%lld)\n",
+ dbprintf(_("dir %lld entry . inode "
+ "number mismatch (%lld)\n"),
id->ino, lino);
error++;
}
@@ -3084,7 +3084,7 @@ process_leaf_node_dir_v2(
v = CHECK_BLIST(b);
}
if (v)
- dbprintf("dir inode %lld block %u=%llu\n", id->ino,
+ dbprintf(_("dir inode %lld block %u=%llu\n"), id->ino,
(__uint32_t)dbno,
(xfs_dfsbno_t)bmp->startblock);
push_cur();
@@ -3096,8 +3096,8 @@ process_leaf_node_dir_v2(
free(bmp);
if (iocur_top->data == NULL) {
if (!sflag || v)
- dbprintf("can't read block %u for directory "
- "inode %lld\n",
+ dbprintf(_("can't read block %u for directory "
+ "inode %lld\n"),
(__uint32_t)dbno, id->ino);
error++;
pop_cur();
@@ -3110,8 +3110,8 @@ process_leaf_node_dir_v2(
if (lino) {
if (parent) {
if (!sflag || v)
- dbprintf("multiple .. entries "
- "in dir %lld\n",
+ dbprintf(_("multiple .. entries "
+ "in dir %lld\n"),
id->ino);
error++;
} else
@@ -3132,8 +3132,8 @@ process_leaf_node_dir_v2(
for (i = 0; i < freetab->nents; i++) {
if (freetab->ents[i] != NULLDATAOFF) {
if (!sflag || v)
- dbprintf("missing free index for data block %d "
- "in dir ino %lld\n",
+ dbprintf(_("missing free index for data block %d "
+ "in dir ino %lld\n"),
xfs_dir2_db_to_da(mp, i), id->ino);
error++;
}
@@ -3158,8 +3158,8 @@ process_leaf_node_dir_v2_free(
free = iocur_top->data;
if (be32_to_cpu(free->hdr.magic) != XFS_DIR2_FREE_MAGIC) {
if (!sflag || v)
- dbprintf("bad free block magic # %#x for dir ino %lld "
- "block %d\n",
+ dbprintf(_("bad free block magic # %#x for dir ino %lld "
+ "block %d\n"),
be32_to_cpu(free->hdr.magic), id->ino, dabno);
error++;
return;
@@ -3168,8 +3168,8 @@ process_leaf_node_dir_v2_free(
if (be32_to_cpu(free->hdr.firstdb) != xfs_dir2_da_to_db(mp,
dabno - mp->m_dirfreeblk) * maxent) {
if (!sflag || v)
- dbprintf("bad free block firstdb %d for dir ino %lld "
- "block %d\n",
+ dbprintf(_("bad free block firstdb %d for dir ino %lld "
+ "block %d\n"),
be32_to_cpu(free->hdr.firstdb), id->ino, dabno);
error++;
return;
@@ -3181,8 +3181,8 @@ process_leaf_node_dir_v2_free(
be32_to_cpu(free->hdr.nused) >
be32_to_cpu(free->hdr.nvalid)) {
if (!sflag || v)
- dbprintf("bad free block nvalid/nused %d/%d for dir "
- "ino %lld block %d\n",
+ dbprintf(_("bad free block nvalid/nused %d/%d for dir "
+ "ino %lld block %d\n"),
be32_to_cpu(free->hdr.nvalid),
be32_to_cpu(free->hdr.nused), id->ino, dabno);
error++;
@@ -3195,8 +3195,8 @@ process_leaf_node_dir_v2_free(
ent = freetab->ents[be32_to_cpu(free->hdr.firstdb) + i];
if (ent != be16_to_cpu(free->bests[i])) {
if (!sflag || v)
- dbprintf("bad free block ent %d is %d should "
- "be %d for dir ino %lld block %d\n",
+ dbprintf(_("bad free block ent %d is %d should "
+ "be %d for dir ino %lld block %d\n"),
i, be16_to_cpu(free->bests[i]), ent,
id->ino, dabno);
error++;
@@ -3209,8 +3209,8 @@ process_leaf_node_dir_v2_free(
}
if (used != be32_to_cpu(free->hdr.nused)) {
if (!sflag || v)
- dbprintf("bad free block nused %d should be %d for dir "
- "ino %lld block %d\n",
+ dbprintf(_("bad free block nused %d should be %d for dir "
+ "ino %lld block %d\n"),
be32_to_cpu(free->hdr.nused), used, id->ino,
dabno);
error++;
@@ -3238,8 +3238,8 @@ process_leaf_node_dir_v2_int(
if (be32_to_cpu(leaf->hdr.info.forw) ||
be32_to_cpu(leaf->hdr.info.back)) {
if (!sflag || v)
- dbprintf("bad leaf block forw/back pointers "
- "%d/%d for dir ino %lld block %d\n",
+ dbprintf(_("bad leaf block forw/back pointers "
+ "%d/%d for dir ino %lld block %d\n"),
be32_to_cpu(leaf->hdr.info.forw),
be32_to_cpu(leaf->hdr.info.back),
id->ino, dabno);
@@ -3247,8 +3247,8 @@ process_leaf_node_dir_v2_int(
}
if (dabno != mp->m_dirleafblk) {
if (!sflag || v)
- dbprintf("single leaf block for dir ino %lld "
- "block %d should be at block %d\n",
+ dbprintf(_("single leaf block for dir ino %lld "
+ "block %d should be at block %d\n"),
id->ino, dabno,
(xfs_dablk_t)mp->m_dirleafblk);
error++;
@@ -3259,9 +3259,9 @@ process_leaf_node_dir_v2_int(
if (freetab->nents <= i || freetab->ents[i] !=
be16_to_cpu(lbp[i])) {
if (!sflag || v)
- dbprintf("bestfree %d for dir ino %lld "
+ dbprintf(_("bestfree %d for dir ino %lld "
"block %d doesn't match table "
- "value %d\n",
+ "value %d\n"),
freetab->nents <= i ?
NULLDATAOFF :
freetab->ents[i],
@@ -3283,8 +3283,8 @@ process_leaf_node_dir_v2_int(
be16_to_cpu(node->hdr.level) >
XFS_DA_NODE_MAXDEPTH) {
if (!sflag || v)
- dbprintf("bad node block level %d for dir ino "
- "%lld block %d\n",
+ dbprintf(_("bad node block level %d for dir ino "
+ "%lld block %d\n"),
be16_to_cpu(node->hdr.level), id->ino,
dabno);
error++;
@@ -3292,8 +3292,8 @@ process_leaf_node_dir_v2_int(
return;
default:
if (!sflag || v)
- dbprintf("bad directory data magic # %#x for dir ino "
- "%lld block %d\n",
+ dbprintf(_("bad directory data magic # %#x for dir ino "
+ "%lld block %d\n"),
be16_to_cpu(leaf->hdr.info.magic), id->ino,
dabno);
error++;
@@ -3306,8 +3306,8 @@ process_leaf_node_dir_v2_int(
else if (dir_hash_see(be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address))) {
if (!sflag || v)
- dbprintf("dir %lld block %d extra leaf entry "
- "%x %x\n", id->ino, dabno,
+ dbprintf(_("dir %lld block %d extra leaf entry "
+ "%x %x\n"), id->ino, dabno,
be32_to_cpu(lep[i].hashval),
be32_to_cpu(lep[i].address));
error++;
@@ -3315,8 +3315,8 @@ process_leaf_node_dir_v2_int(
}
if (stale != be16_to_cpu(leaf->hdr.stale)) {
if (!sflag || v)
- dbprintf("dir %lld block %d stale mismatch "
- "%d/%d\n",
+ dbprintf(_("dir %lld block %d stale mismatch "
+ "%d/%d\n"),
id->ino, dabno, stale,
be16_to_cpu(leaf->hdr.stale));
error++;
@@ -3347,13 +3347,13 @@ process_node_dir_v1(
v2 = bno != NULLFSBLOCK && CHECK_BLIST(bno);
if (bno == NULLFSBLOCK && dbno == 0) {
if (!sflag || v)
- dbprintf("can't read root block for directory "
- "inode %lld\n",
+ dbprintf(_("can't read root block for directory "
+ "inode %lld\n"),
id->ino);
error++;
}
if (v || v2)
- dbprintf("dir inode %lld block %u=%llu\n", id->ino,
+ dbprintf(_("dir inode %lld block %u=%llu\n"), id->ino,
(__uint32_t)dbno, (xfs_dfsbno_t)bno);
if (bno == NULLFSBLOCK)
continue;
@@ -3363,8 +3363,8 @@ process_node_dir_v1(
DB_RING_IGN, NULL);
if (iocur_top->data == NULL) {
if (!sflag || v || v2)
- dbprintf("can't read block %u for directory "
- "inode %lld\n",
+ dbprintf(_("can't read block %u for directory "
+ "inode %lld\n"),
(__uint32_t)dbno, id->ino);
error++;
continue;
@@ -3376,8 +3376,8 @@ process_node_dir_v1(
if (lino) {
if (parent) {
if (!sflag || v || v2)
- dbprintf("multiple .. entries in dir "
- "%lld\n",
+ dbprintf(_("multiple .. entries in dir "
+ "%lld\n"),
id->ino);
error++;
} else
@@ -3436,8 +3436,8 @@ process_quota(
DB_RING_IGN, NULL);
if ((dqb = iocur_top->data) == NULL) {
if (scicb)
- dbprintf("can't read block %lld for %s quota "
- "inode (fsblock %lld)\n",
+ dbprintf(_("can't read block %lld for %s quota "
+ "inode (fsblock %lld)\n"),
(xfs_dfiloff_t)qbno, s,
(xfs_dfsbno_t)bno);
error++;
@@ -3446,16 +3446,16 @@ process_quota(
}
for (i = 0; i < perblock; i++, dqid++, dqb++) {
if (verbose || id->ilist || cb)
- dbprintf("%s dqblk %lld entry %d id %u bc "
- "%lld ic %lld rc %lld\n",
+ dbprintf(_("%s dqblk %lld entry %d id %u bc "
+ "%lld ic %lld rc %lld\n"),
s, (xfs_dfiloff_t)qbno, i, dqid,
be64_to_cpu(dqb->dd_diskdq.d_bcount),
be64_to_cpu(dqb->dd_diskdq.d_icount),
be64_to_cpu(dqb->dd_diskdq.d_rtbcount));
if (be16_to_cpu(dqb->dd_diskdq.d_magic) != XFS_DQUOT_MAGIC) {
if (scicb)
- dbprintf("bad magic number %#x for %s "
- "dqblk %lld entry %d id %u\n",
+ dbprintf(_("bad magic number %#x for %s "
+ "dqblk %lld entry %d id %u\n"),
be16_to_cpu(dqb->dd_diskdq.d_magic), s,
(xfs_dfiloff_t)qbno, i, dqid);
error++;
@@ -3463,9 +3463,9 @@ process_quota(
}
if (dqb->dd_diskdq.d_version != XFS_DQUOT_VERSION) {
if (scicb)
- dbprintf("bad version number %#x for "
+ dbprintf(_("bad version number %#x for "
"%s dqblk %lld entry %d id "
- "%u\n",
+ "%u\n"),
dqb->dd_diskdq.d_version, s,
(xfs_dfiloff_t)qbno, i, dqid);
error++;
@@ -3473,8 +3473,8 @@ process_quota(
}
if (dqb->dd_diskdq.d_flags != exp_flags) {
if (scicb)
- dbprintf("bad flags %#x for %s dqblk "
- "%lld entry %d id %u\n",
+ dbprintf(_("bad flags %#x for %s dqblk "
+ "%lld entry %d id %u\n"),
dqb->dd_diskdq.d_flags, s,
(xfs_dfiloff_t)qbno, i, dqid);
error++;
@@ -3482,8 +3482,8 @@ process_quota(
}
if (be32_to_cpu(dqb->dd_diskdq.d_id) != dqid) {
if (scicb)
- dbprintf("bad id %u for %s dqblk %lld "
- "entry %d id %u\n",
+ dbprintf(_("bad id %u for %s dqblk %lld "
+ "entry %d id %u\n"),
be32_to_cpu(dqb->dd_diskdq.d_id), s,
(xfs_dfiloff_t)qbno, i, dqid);
error++;
@@ -3528,8 +3528,8 @@ process_rtbitmap(
bno = blkmap_get(blkmap, bmbno);
if (bno == NULLFSBLOCK) {
if (!sflag)
- dbprintf("block %lld for rtbitmap inode is "
- "missing\n",
+ dbprintf(_("block %lld for rtbitmap inode is "
+ "missing\n"),
(xfs_dfiloff_t)bmbno);
error++;
continue;
@@ -3539,8 +3539,8 @@ process_rtbitmap(
DB_RING_IGN, NULL);
if ((words = iocur_top->data) == NULL) {
if (!sflag)
- dbprintf("can't read block %lld for rtbitmap "
- "inode\n",
+ dbprintf(_("can't read block %lld for rtbitmap "
+ "inode\n"),
(xfs_dfiloff_t)bmbno);
error++;
pop_cur();
@@ -3595,8 +3595,8 @@ process_rtsummary(
bno = blkmap_get(blkmap, sumbno);
if (bno == NULLFSBLOCK) {
if (!sflag)
- dbprintf("block %lld for rtsummary inode is "
- "missing\n",
+ dbprintf(_("block %lld for rtsummary inode is "
+ "missing\n"),
(xfs_dfiloff_t)sumbno);
error++;
continue;
@@ -3606,8 +3606,8 @@ process_rtsummary(
blkbb, DB_RING_IGN, NULL);
if ((bytes = iocur_top->data) == NULL) {
if (!sflag)
- dbprintf("can't read block %lld for rtsummary "
- "inode\n",
+ dbprintf(_("can't read block %lld for rtsummary "
+ "inode\n"),
(xfs_dfiloff_t)sumbno);
error++;
pop_cur();
@@ -3639,7 +3639,7 @@ process_sf_dir_v2(
addlink_inode(id);
v = verbose || id->ilist;
if (v)
- dbprintf("dir %lld entry . %lld\n", id->ino, id->ino);
+ dbprintf(_("dir %lld entry . %lld\n"), id->ino, id->ino);
(*dot)++;
sfe = xfs_dir2_sf_firstentry(sf);
offset = XFS_DIR2_DATA_FIRST_OFFSET;
@@ -3647,7 +3647,7 @@ process_sf_dir_v2(
if ((__psint_t)sfe + xfs_dir2_sf_entsize_byentry(sf, sfe) -
(__psint_t)sf > be64_to_cpu(dip->di_core.di_size)) {
if (!sflag)
- dbprintf("dir %llu bad size in entry at %d\n",
+ dbprintf(_("dir %llu bad size in entry at %d\n"),
id->ino,
(int)((char *)sfe - (char *)sf));
error++;
@@ -3659,8 +3659,8 @@ process_sf_dir_v2(
cid = find_inode(lino, 1);
if (cid == NULL) {
if (!sflag)
- dbprintf("dir %lld entry %*.*s bad inode "
- "number %lld\n",
+ dbprintf(_("dir %lld entry %*.*s bad inode "
+ "number %lld\n"),
id->ino, sfe->namelen, sfe->namelen,
sfe->name, lino);
error++;
@@ -3671,12 +3671,12 @@ process_sf_dir_v2(
addname_inode(cid, (char *)sfe->name, sfe->namelen);
}
if (v)
- dbprintf("dir %lld entry %*.*s offset %d %lld\n",
+ dbprintf(_("dir %lld entry %*.*s offset %d %lld\n"),
id->ino, sfe->namelen, sfe->namelen, sfe->name,
xfs_dir2_sf_get_offset(sfe), lino);
if (xfs_dir2_sf_get_offset(sfe) < offset) {
if (!sflag)
- dbprintf("dir %lld entry %*.*s bad offset %d\n",
+ dbprintf(_("dir %lld entry %*.*s bad offset %d\n"),
id->ino, sfe->namelen, sfe->namelen,
sfe->name, xfs_dir2_sf_get_offset(sfe));
error++;
@@ -3689,7 +3689,7 @@ process_sf_dir_v2(
if (i < 0 && (__psint_t)sfe - (__psint_t)sf !=
be64_to_cpu(dip->di_core.di_size)) {
if (!sflag)
- dbprintf("dir %llu size is %lld, should be %u\n",
+ dbprintf(_("dir %llu size is %lld, should be %u\n"),
id->ino, be64_to_cpu(dip->di_core.di_size),
(uint)((char *)sfe - (char *)sf));
error++;
@@ -3697,7 +3697,7 @@ process_sf_dir_v2(
if (offset + (sf->hdr.count + 2) * sizeof(xfs_dir2_leaf_entry_t) +
sizeof(xfs_dir2_block_tail_t) > mp->m_dirblksize) {
if (!sflag)
- dbprintf("dir %llu offsets too high\n", id->ino);
+ dbprintf(_("dir %llu offsets too high\n"), id->ino);
error++;
}
lino = xfs_dir2_sf_get_inumber(sf, &sf->hdr.parent);
@@ -3708,16 +3708,16 @@ process_sf_dir_v2(
addlink_inode(cid);
else {
if (!sflag)
- dbprintf("dir %lld entry .. bad inode number %lld\n",
+ dbprintf(_("dir %lld entry .. bad inode number %lld\n"),
id->ino, lino);
error++;
}
if (v)
- dbprintf("dir %lld entry .. %lld\n", id->ino, lino);
+ dbprintf(_("dir %lld entry .. %lld\n"), id->ino, lino);
if (i8 != sf->hdr.i8count) {
if (!sflag)
- dbprintf("dir %lld i8count mismatch is %d should be "
- "%d\n",
+ dbprintf(_("dir %lld i8count mismatch is %d should be "
+ "%d\n"),
id->ino, sf->hdr.i8count, i8);
error++;
}
@@ -3743,7 +3743,7 @@ process_shortform_dir_v1(
addlink_inode(id);
v = verbose || id->ilist;
if (v)
- dbprintf("dir %lld entry . %lld\n", id->ino, id->ino);
+ dbprintf(_("dir %lld entry . %lld\n"), id->ino, id->ino);
(*dot)++;
sfe = &sf->list[0];
for (i = sf->hdr.count - 1; i >= 0; i--) {
@@ -3751,8 +3751,8 @@ process_shortform_dir_v1(
cid = find_inode(lino, 1);
if (cid == NULL) {
if (!sflag)
- dbprintf("dir %lld entry %*.*s bad inode "
- "number %lld\n",
+ dbprintf(_("dir %lld entry %*.*s bad inode "
+ "number %lld\n"),
id->ino, sfe->namelen, sfe->namelen,
sfe->name, lino);
error++;
@@ -3763,12 +3763,12 @@ process_shortform_dir_v1(
addname_inode(cid, (char *)sfe->name, sfe->namelen);
}
if (v)
- dbprintf("dir %lld entry %*.*s %lld\n", id->ino,
+ dbprintf(_("dir %lld entry %*.*s %lld\n"), id->ino,
sfe->namelen, sfe->namelen, sfe->name, lino);
sfe = xfs_dir_sf_nextentry(sfe);
}
if ((__psint_t)sfe - (__psint_t)sf != be64_to_cpu(dip->di_core.di_size))
- dbprintf("dir %llu size is %lld, should be %d\n",
+ dbprintf(_("dir %llu size is %lld, should be %d\n"),
id->ino, be64_to_cpu(dip->di_core.di_size),
(int)((char *)sfe - (char *)sf));
lino = XFS_GET_DIR_INO8(sf->hdr.parent);
@@ -3777,12 +3777,12 @@ process_shortform_dir_v1(
addlink_inode(cid);
else {
if (!sflag)
- dbprintf("dir %lld entry .. bad inode number %lld\n",
+ dbprintf(_("dir %lld entry .. bad inode number %lld\n"),
id->ino, lino);
error++;
}
if (v)
- dbprintf("dir %lld entry .. %lld\n", id->ino, lino);
+ dbprintf(_("dir %lld entry .. %lld\n"), id->ino, lino);
(*dotdot)++;
return cid ? lino : NULLFSINO;
}
@@ -3859,18 +3859,18 @@ quota_check(
qp->count.ic != qp->dq.ic ||
qp->count.rc != qp->dq.rc) {
if (!sflag) {
- dbprintf("%s quota id %u, have/exp",
+ dbprintf(_("%s quota id %u, have/exp"),
s, qp->id);
if (qp->count.bc != qp->dq.bc)
- dbprintf(" bc %lld/%lld",
+ dbprintf(_(" bc %lld/%lld"),
qp->dq.bc,
qp->count.bc);
if (qp->count.ic != qp->dq.ic)
- dbprintf(" ic %lld/%lld",
+ dbprintf(_(" ic %lld/%lld"),
qp->dq.ic,
qp->count.ic);
if (qp->count.rc != qp->dq.rc)
- dbprintf(" rc %lld/%lld",
+ dbprintf(_(" rc %lld/%lld"),
qp->dq.rc,
qp->count.rc);
dbprintf("\n");
@@ -3926,7 +3926,7 @@ scan_ag(
XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);
if (!iocur_top->data) {
- dbprintf("can't read superblock for ag %u\n", agno);
+ dbprintf(_("can't read superblock for ag %u\n"), agno);
serious_error++;
goto pop1_out;
}
@@ -3935,13 +3935,13 @@ scan_ag(
if (sb->sb_magicnum != XFS_SB_MAGIC) {
if (!sflag)
- dbprintf("bad sb magic # %#x in ag %u\n",
+ dbprintf(_("bad sb magic # %#x in ag %u\n"),
sb->sb_magicnum, agno);
error++;
}
if (!xfs_sb_good_version(sb)) {
if (!sflag)
- dbprintf("bad sb version # %#x in ag %u\n",
+ dbprintf(_("bad sb version # %#x in ag %u\n"),
sb->sb_versionnum, agno);
error++;
sbver_err++;
@@ -3951,7 +3951,7 @@ scan_ag(
}
if (agno == 0 && sb->sb_inprogress != 0) {
if (!sflag)
- dbprintf("mkfs not completed successfully\n");
+ dbprintf(_("mkfs not completed successfully\n"));
error++;
}
set_dbmap(agno, XFS_SB_BLOCK(mp), 1, DBM_SB, agno, XFS_SB_BLOCK(mp));
@@ -3963,19 +3963,19 @@ scan_ag(
XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)),
XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);
if ((agf = iocur_top->data) == NULL) {
- dbprintf("can't read agf block for ag %u\n", agno);
+ dbprintf(_("can't read agf block for ag %u\n"), agno);
serious_error++;
goto pop2_out;
}
if (be32_to_cpu(agf->agf_magicnum) != XFS_AGF_MAGIC) {
if (!sflag)
- dbprintf("bad agf magic # %#x in ag %u\n",
+ dbprintf(_("bad agf magic # %#x in ag %u\n"),
be32_to_cpu(agf->agf_magicnum), agno);
error++;
}
if (!XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum))) {
if (!sflag)
- dbprintf("bad agf version # %#x in ag %u\n",
+ dbprintf(_("bad agf version # %#x in ag %u\n"),
be32_to_cpu(agf->agf_versionnum), agno);
error++;
}
@@ -3991,19 +3991,19 @@ scan_ag(
XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)),
XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);
if ((agi = iocur_top->data) == NULL) {
- dbprintf("can't read agi block for ag %u\n", agno);
+ dbprintf(_("can't read agi block for ag %u\n"), agno);
serious_error++;
goto pop3_out;
}
if (be32_to_cpu(agi->agi_magicnum) != XFS_AGI_MAGIC) {
if (!sflag)
- dbprintf("bad agi magic # %#x in ag %u\n",
+ dbprintf(_("bad agi magic # %#x in ag %u\n"),
be32_to_cpu(agi->agi_magicnum), agno);
error++;
}
if (!XFS_AGI_GOOD_VERSION(be32_to_cpu(agi->agi_versionnum))) {
if (!sflag)
- dbprintf("bad agi version # %#x in ag %u\n",
+ dbprintf(_("bad agi version # %#x in ag %u\n"),
be32_to_cpu(agi->agi_versionnum), agno);
error++;
}
@@ -4028,14 +4028,14 @@ scan_ag(
1, scanfunc_ino, TYP_INOBT);
if (be32_to_cpu(agf->agf_freeblks) != agffreeblks) {
if (!sflag)
- dbprintf("agf_freeblks %u, counted %u in ag %u\n",
+ dbprintf(_("agf_freeblks %u, counted %u in ag %u\n"),
be32_to_cpu(agf->agf_freeblks),
agffreeblks, agno);
error++;
}
if (be32_to_cpu(agf->agf_longest) != agflongest) {
if (!sflag)
- dbprintf("agf_longest %u, counted %u in ag %u\n",
+ dbprintf(_("agf_longest %u, counted %u in ag %u\n"),
be32_to_cpu(agf->agf_longest),
agflongest, agno);
error++;
@@ -4043,7 +4043,7 @@ scan_ag(
if (lazycount &&
be32_to_cpu(agf->agf_btreeblks) != agfbtreeblks) {
if (!sflag)
- dbprintf("agf_btreeblks %u, counted %u in ag %u\n",
+ dbprintf(_("agf_btreeblks %u, counted %u in ag %u\n"),
be32_to_cpu(agf->agf_btreeblks),
agfbtreeblks, agno);
error++;
@@ -4051,14 +4051,14 @@ scan_ag(
agf_aggr_freeblks += agffreeblks + agfbtreeblks;
if (be32_to_cpu(agi->agi_count) != agicount) {
if (!sflag)
- dbprintf("agi_count %u, counted %u in ag %u\n",
+ dbprintf(_("agi_count %u, counted %u in ag %u\n"),
be32_to_cpu(agi->agi_count),
agicount, agno);
error++;
}
if (be32_to_cpu(agi->agi_freecount) != agifreecount) {
if (!sflag)
- dbprintf("agi_freecount %u, counted %u in ag %u\n",
+ dbprintf(_("agi_freecount %u, counted %u in ag %u\n"),
be32_to_cpu(agi->agi_freecount),
agifreecount, agno);
error++;
@@ -4067,8 +4067,8 @@ scan_ag(
if (be32_to_cpu(agi->agi_unlinked[i]) != NULLAGINO) {
if (!sflag) {
xfs_agino_t agino=be32_to_cpu(agi->agi_unlinked[i]);
- dbprintf("agi unlinked bucket %d is %u in ag "
- "%u (inode=%lld)\n", i, agino, agno,
+ dbprintf(_("agi unlinked bucket %d is %u in ag "
+ "%u (inode=%lld)\n"), i, agino, agno,
XFS_AGINO_TO_INO(mp, agno, agino));
}
error++;
@@ -4104,7 +4104,7 @@ scan_freelist(
XFS_AG_DADDR(mp, seqno, XFS_AGFL_DADDR(mp)),
XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);
if ((agfl = iocur_top->data) == NULL) {
- dbprintf("can't read agfl block for ag %u\n", seqno);
+ dbprintf(_("can't read agfl block for ag %u\n"), seqno);
serious_error++;
pop_cur();
return;
@@ -4123,7 +4123,7 @@ scan_freelist(
}
if (count != be32_to_cpu(agf->agf_flcount)) {
if (!sflag)
- dbprintf("freeblk count %u != flcount %u in ag %u\n",
+ dbprintf(_("freeblk count %u != flcount %u in ag %u\n"),
count, be32_to_cpu(agf->agf_flcount),
seqno);
error++;
@@ -4152,7 +4152,7 @@ scan_lbtree(
NULL);
if (iocur_top->data == NULL) {
if (!sflag)
- dbprintf("can't read btree block %u/%u\n",
+ dbprintf(_("can't read btree block %u/%u\n"),
XFS_FSB_TO_AGNO(mp, root),
XFS_FSB_TO_AGBNO(mp, root));
error++;
@@ -4180,7 +4180,7 @@ scan_sbtree(
XFS_AGB_TO_DADDR(mp, seqno, root), blkbb, DB_RING_IGN, NULL);
if (iocur_top->data == NULL) {
if (!sflag)
- dbprintf("can't read btree block %u/%u\n", seqno, root);
+ dbprintf(_("can't read btree block %u/%u\n"), seqno, root);
error++;
pop_cur();
return;
@@ -4213,15 +4213,15 @@ scanfunc_bmap(
agbno = XFS_FSB_TO_AGBNO(mp, bno);
if (be32_to_cpu(block->bb_magic) != XFS_BMAP_MAGIC) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad magic # %#x in inode %lld bmbt block "
- "%u/%u\n",
+ dbprintf(_("bad magic # %#x in inode %lld bmbt block "
+ "%u/%u\n"),
be32_to_cpu(block->bb_magic), id->ino, agno, agbno);
error++;
}
if (be16_to_cpu(block->bb_level) != level) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("expected level %d got %d in inode %lld bmbt "
- "block %u/%u\n",
+ dbprintf(_("expected level %d got %d in inode %lld bmbt "
+ "block %u/%u\n"),
level, be16_to_cpu(block->bb_level), id->ino, agno, agbno);
error++;
}
@@ -4232,8 +4232,8 @@ scanfunc_bmap(
if (be16_to_cpu(block->bb_numrecs) > mp->m_bmap_dmxr[0] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_bmap_dmnr[0])) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) "
- "in inode %lld bmap block %lld\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) "
+ "in inode %lld bmap block %lld\n"),
be16_to_cpu(block->bb_numrecs), mp->m_bmap_dmnr[0],
mp->m_bmap_dmxr[0], id->ino,
(xfs_dfsbno_t)bno);
@@ -4249,8 +4249,8 @@ scanfunc_bmap(
if (be16_to_cpu(block->bb_numrecs) > mp->m_bmap_dmxr[1] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_bmap_dmnr[1])) {
if (!sflag || id->ilist || CHECK_BLIST(bno))
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
- "inode %lld bmap block %lld\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) in "
+ "inode %lld bmap block %lld\n"),
be16_to_cpu(block->bb_numrecs), mp->m_bmap_dmnr[1],
mp->m_bmap_dmxr[1], id->ino, (xfs_dfsbno_t)bno);
error++;
@@ -4277,7 +4277,7 @@ scanfunc_bno(
xfs_agblock_t lastblock;
if (be32_to_cpu(block->bb_magic) != XFS_ABTB_MAGIC) {
- dbprintf("bad magic # %#x in btbno block %u/%u\n",
+ dbprintf(_("bad magic # %#x in btbno block %u/%u\n"),
be32_to_cpu(block->bb_magic), seqno, bno);
serious_error++;
return;
@@ -4286,8 +4286,8 @@ scanfunc_bno(
agfbtreeblks++;
if (be16_to_cpu(block->bb_level) != level) {
if (!sflag)
- dbprintf("expected level %d got %d in btbno block "
- "%u/%u\n",
+ dbprintf(_("expected level %d got %d in btbno block "
+ "%u/%u\n"),
level, be16_to_cpu(block->bb_level), seqno, bno);
error++;
}
@@ -4295,8 +4295,8 @@ scanfunc_bno(
if (level == 0) {
if (be16_to_cpu(block->bb_numrecs) > mp->m_alloc_mxr[0] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_alloc_mnr[0])) {
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
- "btbno block %u/%u\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) in "
+ "btbno block %u/%u\n"),
be16_to_cpu(block->bb_numrecs), mp->m_alloc_mnr[0],
mp->m_alloc_mxr[0], seqno, bno);
serious_error++;
@@ -4309,8 +4309,8 @@ scanfunc_bno(
be32_to_cpu(rp[i].ar_blockcount), DBM_FREE1,
seqno, bno);
if (be32_to_cpu(rp[i].ar_startblock) <= lastblock) {
- dbprintf(
- "out-of-order bno btree record %d (%u %u) block %u/%u\n",
+ dbprintf(_(
+ "out-of-order bno btree record %d (%u %u) block %u/%u\n"),
i, be32_to_cpu(rp[i].ar_startblock),
be32_to_cpu(rp[i].ar_blockcount),
be32_to_cpu(agf->agf_seqno), bno);
@@ -4323,8 +4323,8 @@ scanfunc_bno(
}
if (be16_to_cpu(block->bb_numrecs) > mp->m_alloc_mxr[1] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_alloc_mnr[1])) {
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
- "%u/%u\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
+ "%u/%u\n"),
be16_to_cpu(block->bb_numrecs), mp->m_alloc_mnr[1],
mp->m_alloc_mxr[1], seqno, bno);
serious_error++;
@@ -4350,7 +4350,7 @@ scanfunc_cnt(
xfs_extlen_t lastcount;
if (be32_to_cpu(block->bb_magic) != XFS_ABTC_MAGIC) {
- dbprintf("bad magic # %#x in btcnt block %u/%u\n",
+ dbprintf(_("bad magic # %#x in btcnt block %u/%u\n"),
be32_to_cpu(block->bb_magic), seqno, bno);
serious_error++;
return;
@@ -4359,8 +4359,8 @@ scanfunc_cnt(
agfbtreeblks++;
if (be16_to_cpu(block->bb_level) != level) {
if (!sflag)
- dbprintf("expected level %d got %d in btcnt block "
- "%u/%u\n",
+ dbprintf(_("expected level %d got %d in btcnt block "
+ "%u/%u\n"),
level, be16_to_cpu(block->bb_level), seqno, bno);
error++;
}
@@ -4368,8 +4368,8 @@ scanfunc_cnt(
if (level == 0) {
if (be16_to_cpu(block->bb_numrecs) > mp->m_alloc_mxr[0] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_alloc_mnr[0])) {
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
- "btbno block %u/%u\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) in "
+ "btbno block %u/%u\n"),
be16_to_cpu(block->bb_numrecs), mp->m_alloc_mnr[0],
mp->m_alloc_mxr[0], seqno, bno);
serious_error++;
@@ -4386,8 +4386,8 @@ scanfunc_cnt(
if (be32_to_cpu(rp[i].ar_blockcount) > agflongest)
agflongest = be32_to_cpu(rp[i].ar_blockcount);
if (be32_to_cpu(rp[i].ar_blockcount) < lastcount) {
- dbprintf(
- "out-of-order cnt btree record %d (%u %u) block %u/%u\n",
+ dbprintf(_(
+ "out-of-order cnt btree record %d (%u %u) block %u/%u\n"),
i, be32_to_cpu(rp[i].ar_startblock),
be32_to_cpu(rp[i].ar_blockcount),
be32_to_cpu(agf->agf_seqno), bno);
@@ -4399,8 +4399,8 @@ scanfunc_cnt(
}
if (be16_to_cpu(block->bb_numrecs) > mp->m_alloc_mxr[1] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_alloc_mnr[1])) {
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
- "%u/%u\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
+ "%u/%u\n"),
be16_to_cpu(block->bb_numrecs), mp->m_alloc_mnr[1],
mp->m_alloc_mxr[1], seqno, bno);
serious_error++;
@@ -4430,15 +4430,15 @@ scanfunc_ino(
xfs_inobt_rec_t *rp;
if (be32_to_cpu(block->bb_magic) != XFS_IBT_MAGIC) {
- dbprintf("bad magic # %#x in inobt block %u/%u\n",
+ dbprintf(_("bad magic # %#x in inobt block %u/%u\n"),
be32_to_cpu(block->bb_magic), seqno, bno);
serious_error++;
return;
}
if (be16_to_cpu(block->bb_level) != level) {
if (!sflag)
- dbprintf("expected level %d got %d in inobt block "
- "%u/%u\n",
+ dbprintf(_("expected level %d got %d in inobt block "
+ "%u/%u\n"),
level, be16_to_cpu(block->bb_level), seqno, bno);
error++;
}
@@ -4446,8 +4446,8 @@ scanfunc_ino(
if (level == 0) {
if (be16_to_cpu(block->bb_numrecs) > mp->m_inobt_mxr[0] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_inobt_mnr[0])) {
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
- "inobt block %u/%u\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) in "
+ "inobt block %u/%u\n"),
be16_to_cpu(block->bb_numrecs), mp->m_inobt_mnr[0],
mp->m_inobt_mxr[0], seqno, bno);
serious_error++;
@@ -4481,8 +4481,8 @@ scanfunc_ino(
DB_RING_IGN, NULL);
if (iocur_top->data == NULL) {
if (!sflag)
- dbprintf("can't read inode block "
- "%u/%u\n",
+ dbprintf(_("can't read inode block "
+ "%u/%u\n"),
seqno,
XFS_AGINO_TO_AGBNO(mp, agino));
error++;
@@ -4499,9 +4499,9 @@ scanfunc_ino(
}
if (nfree != be32_to_cpu(rp[i].ir_freecount)) {
if (!sflag)
- dbprintf("ir_freecount/free mismatch, "
+ dbprintf(_("ir_freecount/free mismatch, "
"inode chunk %u/%u, freecount "
- "%d nfree %d\n",
+ "%d nfree %d\n"),
seqno, agino,
be32_to_cpu(rp[i].ir_freecount), nfree);
error++;
@@ -4512,8 +4512,8 @@ scanfunc_ino(
}
if (be16_to_cpu(block->bb_numrecs) > mp->m_inobt_mxr[1] ||
(isroot == 0 && be16_to_cpu(block->bb_numrecs) < mp->m_inobt_mnr[1])) {
- dbprintf("bad btree nrecs (%u, min=%u, max=%u) in inobt block "
- "%u/%u\n",
+ dbprintf(_("bad btree nrecs (%u, min=%u, max=%u) in inobt block "
+ "%u/%u\n"),
be16_to_cpu(block->bb_numrecs), mp->m_inobt_mnr[1],
mp->m_inobt_mxr[1], seqno, bno);
serious_error++;
@@ -4554,7 +4554,7 @@ set_inomap(
*idp = id;
if (mayprint &&
(verbose || id->ilist || CHECK_BLISTA(agno, agbno + i)))
- dbprintf("setting inode to %lld for block %u/%u\n",
+ dbprintf(_("setting inode to %lld for block %u/%u\n"),
id->ino, agno, agbno + i);
}
}
@@ -4586,7 +4586,7 @@ set_rinomap(
i++, idp++) {
*idp = id;
if (mayprint && (verbose || id->ilist || CHECK_BLIST(bno + i)))
- dbprintf("setting inode to %lld for rtblock %llu\n",
+ dbprintf(_("setting inode to %lld for rtblock %llu\n"),
id->ino, bno + i);
}
}
@@ -4602,6 +4602,6 @@ setlink_inode(
id->isdir = isdir;
id->security = security;
if (verbose || id->ilist)
- dbprintf("inode %lld nlink %u %s dir\n", id->ino, nlink,
+ dbprintf(_("inode %lld nlink %u %s dir\n"), id->ino, nlink,
isdir ? "is" : "not");
}
diff --git a/db/command.c b/db/command.c
index 442fe25..b7e3165 100644
--- a/db/command.c
+++ b/db/command.c
@@ -79,18 +79,18 @@ command(
cmd = argv[0];
ct = find_command(cmd);
if (ct == NULL) {
- dbprintf("command %s not found\n", cmd);
+ dbprintf(_("command %s not found\n"), cmd);
return 0;
}
if (argc-1 < ct->argmin || (ct->argmax != -1 && argc-1 > ct->argmax)) {
- dbprintf("bad argument count %d to %s, expected ", argc-1, cmd);
+ dbprintf(_("bad argument count %d to %s, expected "), argc-1, cmd);
if (ct->argmax == -1)
- dbprintf("at least %d", ct->argmin);
+ dbprintf(_("at least %d"), ct->argmin);
else if (ct->argmin == ct->argmax)
dbprintf("%d", ct->argmin);
else
- dbprintf("between %d and %d", ct->argmin, ct->argmax);
- dbprintf(" arguments\n");
+ dbprintf(_("between %d and %d"), ct->argmin, ct->argmax);
+ dbprintf(_(" arguments\n"));
return 0;
}
platform_getoptreset();
diff --git a/db/convert.c b/db/convert.c
index 689eb0d..070ac1a 100644
--- a/db/convert.c
+++ b/db/convert.c
@@ -168,27 +168,27 @@ convert_f(int argc, char **argv)
argv++;
if ((argc % 2) != 1) {
- dbprintf("bad argument count %d to convert, expected 3,5,7,9 "
- "arguments\n", argc);
+ dbprintf(_("bad argument count %d to convert, expected 3,5,7,9 "
+ "arguments\n"), argc);
return 0;
}
if ((wtype = lookupcty(argv[argc - 1])) == CT_NONE) {
- dbprintf("unknown conversion type %s\n", argv[argc - 1]);
+ dbprintf(_("unknown conversion type %s\n"), argv[argc - 1]);
return 0;
}
for (i = mask = conmask = 0; i < (argc - 1) / 2; i++) {
c = lookupcty(argv[i * 2]);
if (c == CT_NONE) {
- dbprintf("unknown conversion type %s\n", argv[i * 2]);
+ dbprintf(_("unknown conversion type %s\n"), argv[i * 2]);
return 0;
}
if (c == wtype) {
- dbprintf("result type same as argument\n");
+ dbprintf(_("result type same as argument\n"));
return 0;
}
if (conmask & (1 << c)) {
- dbprintf("conflicting conversion type %s\n",
+ dbprintf(_("conflicting conversion type %s\n"),
argv[i * 2]);
return 0;
}
@@ -267,7 +267,7 @@ getvalue(char *s, ctype_t ctype, cval_t *val)
v = strtoull(s, &p, 0);
if (*p != '\0') {
- dbprintf("%s is not a number\n", s);
+ dbprintf(_("%s is not a number\n"), s);
return 0;
}
switch (ctype) {
diff --git a/db/debug.c b/db/debug.c
index aacc302..07a2482 100644
--- a/db/debug.c
+++ b/db/debug.c
@@ -24,8 +24,8 @@
static int debug_f(int argc, char **argv);
static const cmdinfo_t debug_cmd =
- { "debug", NULL, debug_f, 0, 1, 0, "[flagbits]",
- "set debug option bits", NULL };
+ { "debug", NULL, debug_f, 0, 1, 0, N_("[flagbits]"),
+ N_("set debug option bits"), NULL };
long debug_state;
@@ -39,7 +39,7 @@ debug_f(
if (argc > 1) {
debug_state = strtol(argv[1], &p, 0);
if (*p != '\0') {
- dbprintf("bad value for debug %s\n", argv[1]);
+ dbprintf(_("bad value for debug %s\n"), argv[1]);
return 0;
}
}
diff --git a/db/dquot.c b/db/dquot.c
index 283939d..daa47a3 100644
--- a/db/dquot.c
+++ b/db/dquot.c
@@ -34,8 +34,8 @@ static int dquot_f(int argc, char **argv);
static void dquot_help(void);
static const cmdinfo_t dquot_cmd =
- { "dquot", NULL, dquot_f, 1, 2, 1, "[projid|gid|uid]",
- "set current address to project, group or user quota block", dquot_help };
+ { "dquot", NULL, dquot_f, 1, 2, 1, N_("[projid|gid|uid]"),
+ N_("set current address to project, group or user quota block"), dquot_help };
const field_t dqblk_hfld[] = {
{ "", FLDT_DQBLK, OI(0), C1, 0, TYP_NONE },
@@ -121,25 +121,25 @@ dquot_f(
dogrp = doprj = 0;
break;
default:
- dbprintf("bad option for dquot command\n");
+ dbprintf(_("bad option for dquot command\n"));
return 0;
}
}
- s = doprj ? "project" : dogrp ? "group" : "user";
+ s = doprj ? _("project") : dogrp ? _("group") : _("user");
if (optind != argc - 1) {
- dbprintf("dquot command requires one %s id argument\n", s);
+ dbprintf(_("dquot command requires one %s id argument\n"), s);
return 0;
}
ino = (dogrp || doprj) ? mp->m_sb.sb_gquotino : mp->m_sb.sb_uquotino;
if (ino == 0 || ino == NULLFSINO ||
(dogrp && (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT)) ||
(doprj && (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT))) {
- dbprintf("no %s quota inode present\n", s);
+ dbprintf(_("no %s quota inode present\n"), s);
return 0;
}
id = (xfs_dqid_t)strtol(argv[optind], &p, 0);
if (*p != '\0') {
- dbprintf("bad %s id for dquot %s\n", s, argv[optind]);
+ dbprintf(_("bad %s id for dquot %s\n"), s, argv[optind]);
return 0;
}
perblock = (int)(mp->m_sb.sb_blocksize / sizeof(xfs_dqblk_t));
@@ -151,7 +151,7 @@ dquot_f(
bmap(qbno, 1, XFS_DATA_FORK, &nex, &bm);
pop_cur();
if (nex == 0) {
- dbprintf("no %s quota data for id %d\n", s, id);
+ dbprintf(_("no %s quota data for id %d\n"), s, id);
return 0;
}
set_cur(&typtab[TYP_DQBLK], XFS_FSB_TO_DADDR(mp, bm.startblock), blkbb,
diff --git a/db/echo.c b/db/echo.c
index 9e62567..813187b 100644
--- a/db/echo.c
+++ b/db/echo.c
@@ -24,8 +24,8 @@
static int echo_f(int argc, char **argv);
static const cmdinfo_t echo_cmd =
- { "echo", NULL, echo_f, 0, -1, 0, "[args]...",
- "echo arguments", NULL };
+ { "echo", NULL, echo_f, 0, -1, 0, N_("[args]..."),
+ N_("echo arguments"), NULL };
/*ARGSUSED*/
static int
diff --git a/db/faddr.c b/db/faddr.c
index 26c3676..d092663 100644
--- a/db/faddr.c
+++ b/db/faddr.c
@@ -37,12 +37,12 @@ fa_agblock(
xfs_agblock_t bno;
if (cur_agno == NULLAGNUMBER) {
- dbprintf("no current allocation group, cannot set new addr\n");
+ dbprintf(_("no current allocation group, cannot set new addr\n"));
return;
}
bno = (xfs_agblock_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == NULLAGBLOCK) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
ASSERT(typtab[next].typnm == next);
@@ -60,12 +60,12 @@ fa_agino(
xfs_agino_t agino;
if (cur_agno == NULLAGNUMBER) {
- dbprintf("no current allocation group, cannot set new addr\n");
+ dbprintf(_("no current allocation group, cannot set new addr\n"));
return;
}
agino = (xfs_agino_t)getbitval(obj, bit, bitsz(agino), BVUNSIGNED);
if (agino == NULLAGINO) {
- dbprintf("null inode number, cannot set new addr\n");
+ dbprintf(_("null inode number, cannot set new addr\n"));
return;
}
set_cur_inode(XFS_AGINO_TO_INO(mp, cur_agno, agino));
@@ -85,13 +85,13 @@ fa_attrblock(
bno = (__uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == 0) {
- dbprintf("null attribute block number, cannot set new addr\n");
+ dbprintf(_("null attribute block number, cannot set new addr\n"));
return;
}
nex = 1;
bmap(bno, 1, XFS_ATTR_FORK, &nex, &bm);
if (nex == 0) {
- dbprintf("attribute block is unmapped\n");
+ dbprintf(_("attribute block is unmapped\n"));
return;
}
dfsbno = bm.startblock + (bno - bm.startoff);
@@ -114,13 +114,13 @@ fa_cfileoffa(
bno = (xfs_dfiloff_t)getbitval(obj, bit, BMBT_STARTOFF_BITLEN,
BVUNSIGNED);
if (bno == NULLDFILOFF) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
nex = 1;
bmap(bno, 1, XFS_ATTR_FORK, &nex, &bm);
if (nex == 0) {
- dbprintf("file block is unmapped\n");
+ dbprintf(_("file block is unmapped\n"));
return;
}
dfsbno = bm.startblock + (bno - bm.startoff);
@@ -145,14 +145,14 @@ fa_cfileoffd(
bno = (xfs_dfiloff_t)getbitval(obj, bit, BMBT_STARTOFF_BITLEN,
BVUNSIGNED);
if (bno == NULLDFILOFF) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
nex = nb = next == TYP_DIR2 ? mp->m_dirblkfsbs : 1;
bmp = malloc(nb * sizeof(*bmp));
bmap(bno, nb, XFS_DATA_FORK, &nex, bmp);
if (nex == 0) {
- dbprintf("file block is unmapped\n");
+ dbprintf(_("file block is unmapped\n"));
free(bmp);
return;
}
@@ -177,7 +177,7 @@ fa_cfsblock(
bno = (xfs_dfsbno_t)getbitval(obj, bit, BMBT_STARTBLOCK_BITLEN,
BVUNSIGNED);
if (bno == NULLDFSBNO) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
nb = next == TYP_DIR2 ? mp->m_dirblkfsbs : 1;
@@ -199,13 +199,13 @@ fa_dfiloffa(
bno = (xfs_dfiloff_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == NULLDFILOFF) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
nex = 1;
bmap(bno, 1, XFS_ATTR_FORK, &nex, &bm);
if (nex == 0) {
- dbprintf("file block is unmapped\n");
+ dbprintf(_("file block is unmapped\n"));
return;
}
dfsbno = bm.startblock + (bno - bm.startoff);
@@ -229,14 +229,14 @@ fa_dfiloffd(
bno = (xfs_dfiloff_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == NULLDFILOFF) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
nex = nb = next == TYP_DIR2 ? mp->m_dirblkfsbs : 1;
bmp = malloc(nb * sizeof(*bmp));
bmap(bno, nb, XFS_DATA_FORK, &nex, bmp);
if (nex == 0) {
- dbprintf("file block is unmapped\n");
+ dbprintf(_("file block is unmapped\n"));
free(bmp);
return;
}
@@ -259,7 +259,7 @@ fa_dfsbno(
bno = (xfs_dfsbno_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == NULLDFSBNO) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
ASSERT(typtab[next].typnm == next);
@@ -282,14 +282,14 @@ fa_dirblock(
bno = (__uint32_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == 0) {
- dbprintf("null directory block number, cannot set new addr\n");
+ dbprintf(_("null directory block number, cannot set new addr\n"));
return;
}
nex = mp->m_dirblkfsbs;
bmp = malloc(nex * sizeof(*bmp));
bmap(bno, mp->m_dirblkfsbs, XFS_DATA_FORK, &nex, bmp);
if (nex == 0) {
- dbprintf("directory block is unmapped\n");
+ dbprintf(_("directory block is unmapped\n"));
free(bmp);
return;
}
@@ -313,7 +313,7 @@ fa_drfsbno(
bno = (xfs_drfsbno_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == NULLDRFSBNO) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
ASSERT(typtab[next].typnm == next);
@@ -332,7 +332,7 @@ fa_drtbno(
bno = (xfs_drtbno_t)getbitval(obj, bit, bitsz(bno), BVUNSIGNED);
if (bno == NULLDRTBNO) {
- dbprintf("null block number, cannot set new addr\n");
+ dbprintf(_("null block number, cannot set new addr\n"));
return;
}
/* need set_cur to understand rt subvolume */
@@ -350,7 +350,7 @@ fa_ino(
ASSERT(next == TYP_INODE);
ino = (xfs_ino_t)getbitval(obj, bit, bitsz(ino), BVUNSIGNED);
if (ino == NULLFSINO) {
- dbprintf("null inode number, cannot set new addr\n");
+ dbprintf(_("null inode number, cannot set new addr\n"));
return;
}
set_cur_inode(ino);
@@ -368,7 +368,7 @@ fa_ino4(
ASSERT(next == TYP_INODE);
ino = (xfs_ino_t)getbitval(obj, bit, bitsz(ino4), BVUNSIGNED);
if (ino == NULLFSINO) {
- dbprintf("null inode number, cannot set new addr\n");
+ dbprintf(_("null inode number, cannot set new addr\n"));
return;
}
set_cur_inode(ino);
@@ -386,7 +386,7 @@ fa_ino8(
ASSERT(next == TYP_INODE);
ino = (xfs_ino_t)getbitval(obj, bit, bitsz(ino8), BVUNSIGNED);
if (ino == NULLFSINO) {
- dbprintf("null inode number, cannot set new addr\n");
+ dbprintf(_("null inode number, cannot set new addr\n"));
return;
}
set_cur_inode(ino);
diff --git a/db/flist.c b/db/flist.c
index 9537d75..33f7da7 100644
--- a/db/flist.c
+++ b/db/flist.c
@@ -146,7 +146,7 @@ flist_parse(
while (fl) {
f = findfield(fl->name, fields, obj, startoff);
if (f == NULL) {
- dbprintf("field %s not found\n", fl->name);
+ dbprintf(_("field %s not found\n"), fl->name);
return 0;
}
fl->fld = f;
@@ -156,22 +156,22 @@ flist_parse(
low = (f->flags & FLD_ABASE1) != 0;
high = fcount(f, obj, startoff) + low - 1;
if (low > high) {
- dbprintf("no elements in %s\n", fl->name);
+ dbprintf(_("no elements in %s\n"), fl->name);
return 0;
}
if (fl->flags & FL_OKHIGH) {
if (fl->low < low || fl->low > high ||
fl->high < low || fl->high > high) {
- dbprintf("indices %d-%d for field %s "
- "out of range %d-%d\n",
+ dbprintf(_("indices %d-%d for field %s "
+ "out of range %d-%d\n"),
fl->low, fl->high, fl->name,
low, high);
return 0;
}
} else if (fl->flags & FL_OKLOW) {
if (fl->low < low || fl->low > high) {
- dbprintf("index %d for field %s out of "
- "range %d-%d\n",
+ dbprintf(_("index %d for field %s out of "
+ "range %d-%d\n"),
fl->low, fl->name, low, high);
return 0;
}
@@ -184,7 +184,7 @@ flist_parse(
}
} else {
if (fl->flags & FL_OKLOW) {
- dbprintf("field %s is not an array\n",
+ dbprintf(_("field %s is not an array\n"),
fl->name);
return 0;
}
@@ -197,7 +197,7 @@ flist_parse(
flist_expand_structs(fl, obj);
if (fl->child) {
if (fa->subfld == NULL) {
- dbprintf("field %s has no subfields\n",
+ dbprintf(_("field %s has no subfields\n"),
fl->name);
return 0;
}
@@ -217,17 +217,17 @@ flist_print(
if (!(debug_state & DEBUG_FLIST))
return;
while (fl) {
- dbprintf("fl@%p:\n", fl);
- dbprintf("\tname=%s, fld=%p, child=%p, sibling=%p\n",
+ dbprintf(_("fl@%p:\n"), fl);
+ dbprintf(_("\tname=%s, fld=%p, child=%p, sibling=%p\n"),
fl->name, fl->fld, fl->child, fl->sibling);
- dbprintf("\tlow=%d, high=%d, flags=%d (%s%s), offset=%d\n",
+ dbprintf(_("\tlow=%d, high=%d, flags=%d (%s%s), offset=%d\n"),
fl->low, fl->high, fl->flags,
- fl->flags & FL_OKLOW ? "oklow " : "",
- fl->flags & FL_OKHIGH ? "okhigh" : "", fl->offset);
- dbprintf("\tfld->name=%s, fld->ftyp=%d (%s)\n",
+ fl->flags & FL_OKLOW ? _("oklow ") : "",
+ fl->flags & FL_OKHIGH ? _("okhigh") : "", fl->offset);
+ dbprintf(_("\tfld->name=%s, fld->ftyp=%d (%s)\n"),
fl->fld->name, fl->fld->ftyp,
ftattrtab[fl->fld->ftyp].name);
- dbprintf("\tfld->flags=%d (%s%s%s%s%s)\n", fl->fld->flags,
+ dbprintf(_("\tfld->flags=%d (%s%s%s%s%s)\n"), fl->fld->flags,
fl->fld->flags & FLD_ABASE1 ? "abase1 " : "",
fl->fld->flags & FLD_SKIPALL ? "skipall " : "",
fl->fld->flags & FLD_ARRAY ? "array " : "",
@@ -319,7 +319,7 @@ flist_scan(
ftok_free(v);
return fl;
bad:
- dbprintf("bad syntax in field name %s\n", name);
+ dbprintf(_("bad syntax in field name %s\n"), name);
ftok_free(v);
if (fl)
flist_free(fl);
@@ -375,7 +375,7 @@ flist_split(
if (*s == '\"') {
s++; /* skip first quote */
if ((a = strrchr(s, '\"')) == NULL) {
- dbprintf("missing closing quote %s\n", s);
+ dbprintf(_("missing closing quote %s\n"), s);
ftok_free(v);
return NULL;
}
@@ -392,7 +392,7 @@ flist_split(
l = 1;
t = puncttypes[a - punctchars];
} else {
- dbprintf("bad character in field %s\n", s);
+ dbprintf(_("bad character in field %s\n"), s);
ftok_free(v);
return NULL;
}
diff --git a/db/fprint.c b/db/fprint.c
index 2e60f93..1d2f29c 100644
--- a/db/fprint.c
+++ b/db/fprint.c
@@ -95,7 +95,7 @@ fp_num(
if (array)
dbprintf("%d:", i + base);
if ((arg & FTARG_DONULL) && isnull)
- dbprintf("null");
+ dbprintf(_("null"));
else if (size > 32)
dbprintf(fmtstr, val);
else
diff --git a/db/frag.c b/db/frag.c
index 04c0567..925863d 100644
--- a/db/frag.c
+++ b/db/frag.c
@@ -170,7 +170,7 @@ frag_f(
(double)extcount_actual;
else
answer = 0.0;
- dbprintf("actual %llu, ideal %llu, fragmentation factor %.2f%%\n",
+ dbprintf(_("actual %llu, ideal %llu, fragmentation factor %.2f%%\n"),
extcount_actual, extcount_ideal, answer);
return 0;
}
@@ -211,7 +211,7 @@ init(
vflag = 1;
break;
default:
- dbprintf("bad option for frag command\n");
+ dbprintf(_("bad option for frag command\n"));
return 0;
}
}
@@ -349,7 +349,7 @@ process_inode(
if (!skipa)
process_fork(dip, XFS_ATTR_FORK);
if (vflag && (!skipd || !skipa))
- dbprintf("inode %lld actual %lld ideal %lld\n",
+ dbprintf(_("inode %lld actual %lld ideal %lld\n"),
ino, extcount_actual - actual, extcount_ideal - ideal);
}
@@ -365,7 +365,7 @@ scan_ag(
XFS_AG_DADDR(mp, agno, XFS_AGF_DADDR(mp)),
XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);
if ((agf = iocur_top->data) == NULL) {
- dbprintf("can't read agf block for ag %u\n", agno);
+ dbprintf(_("can't read agf block for ag %u\n"), agno);
pop_cur();
return;
}
@@ -374,7 +374,7 @@ scan_ag(
XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)),
XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);
if ((agi = iocur_top->data) == NULL) {
- dbprintf("can't read agi block for ag %u\n", agno);
+ dbprintf(_("can't read agi block for ag %u\n"), agno);
pop_cur();
pop_cur();
return;
@@ -397,7 +397,7 @@ scan_lbtree(
set_cur(&typtab[btype], XFS_FSB_TO_DADDR(mp, root), blkbb, DB_RING_IGN,
NULL);
if (iocur_top->data == NULL) {
- dbprintf("can't read btree block %u/%u\n",
+ dbprintf(_("can't read btree block %u/%u\n"),
XFS_FSB_TO_AGNO(mp, root),
XFS_FSB_TO_AGBNO(mp, root));
return;
@@ -420,7 +420,7 @@ scan_sbtree(
set_cur(&typtab[btype], XFS_AGB_TO_DADDR(mp, seqno, root),
blkbb, DB_RING_IGN, NULL);
if (iocur_top->data == NULL) {
- dbprintf("can't read btree block %u/%u\n", seqno, root);
+ dbprintf(_("can't read btree block %u/%u\n"), seqno, root);
return;
}
(*func)(iocur_top->data, nlevels - 1, agf);
@@ -476,7 +476,7 @@ scanfunc_ino(
XFS_FSB_TO_BB(mp, XFS_IALLOC_BLOCKS(mp)),
DB_RING_IGN, NULL);
if (iocur_top->data == NULL) {
- dbprintf("can't read inode block %u/%u\n",
+ dbprintf(_("can't read inode block %u/%u\n"),
seqno, XFS_AGINO_TO_AGBNO(mp, agino));
continue;
}
diff --git a/db/freesp.c b/db/freesp.c
index 6f303ad..51ce810 100644
--- a/db/freesp.c
+++ b/db/freesp.c
@@ -103,9 +103,9 @@ freesp_f(
if (histcount)
printhist();
if (summaryflag) {
- dbprintf("total free extents %lld\n", totexts);
- dbprintf("total free blocks %lld\n", totblocks);
- dbprintf("average free extent size %g\n",
+ dbprintf(_("total free extents %lld\n"), totexts);
+ dbprintf(_("total free blocks %lld\n"), totblocks);
+ dbprintf(_("average free extent size %g\n"),
(double)totblocks / (double)totexts);
}
if (aglist)
@@ -196,8 +196,8 @@ init(
static int
usage(void)
{
- dbprintf("freesp arguments: [-bcdfs] [-a agno] [-e binsize] [-h h1]... "
- "[-m binmult]\n");
+ dbprintf(_("freesp arguments: [-bcdfs] [-a agno] [-e binsize] [-h h1]... "
+ "[-m binmult]\n"));
return 0;
}
@@ -267,7 +267,7 @@ scan_sbtree(
set_cur(&typtab[typ], XFS_AGB_TO_DADDR(mp, seqno, root),
blkbb, DB_RING_IGN, NULL);
if (iocur_top->data == NULL) {
- dbprintf("can't read btree block %u/%u\n", seqno, root);
+ dbprintf(_("can't read btree block %u/%u\n"), seqno, root);
return;
}
(*func)(iocur_top->data, typ, nlevels - 1, agf);
@@ -397,7 +397,7 @@ printhist(void)
int i;
dbprintf("%7s %7s %7s %7s %6s\n",
- "from", "to", "extents", "blocks", "pct");
+ _("from"), _("to"), _("extents"), _("blocks"), _("pct"));
for (i = 0; i < histcount; i++) {
if (hist[i].count)
dbprintf("%7d %7d %7lld %7lld %6.2f\n", hist[i].low,
diff --git a/db/hash.c b/db/hash.c
index 793e6ae..02376e6 100644
--- a/db/hash.c
+++ b/db/hash.c
@@ -27,20 +27,20 @@ static int hash_f(int argc, char **argv);
static void hash_help(void);
static const cmdinfo_t hash_cmd =
- { "hash", NULL, hash_f, 1, 1, 0, "string",
- "calculate hash value", hash_help };
+ { "hash", NULL, hash_f, 1, 1, 0, N_("string"),
+ N_("calculate hash value"), hash_help };
static void
hash_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" 'hash' prints out the calculated hash value for a string using the\n"
"directory/attribute code hash function.\n"
"\n"
" Usage: \"hash <string>\"\n"
"\n"
-);
+));
}
diff --git a/db/help.c b/db/help.c
index d9caf35..7913100 100644
--- a/db/help.c
+++ b/db/help.c
@@ -27,8 +27,8 @@ static int help_f(int argc, char **argv);
static void help_oneline(const char *cmd, const cmdinfo_t *ct);
static const cmdinfo_t help_cmd =
- { "help", "?", help_f, 0, 1, 0, "[command]",
- "help for one or all commands", NULL };
+ { "help", "?", help_f, 0, 1, 0, N_("[command]"),
+ N_("help for one or all commands"), NULL };
static void
help_all(void)
@@ -37,7 +37,7 @@ help_all(void)
for (ct = cmdtab; ct < &cmdtab[ncmds]; ct++)
help_oneline(ct->name, ct);
- dbprintf("\nUse 'help commandname' for extended help.\n");
+ dbprintf(_("\nUse 'help commandname' for extended help.\n"));
}
static int
@@ -53,7 +53,7 @@ help_f(
}
ct = find_command(argv[1]);
if (ct == NULL) {
- dbprintf("command %s not found\n", argv[1]);
+ dbprintf(_("command %s not found\n"), argv[1]);
return 0;
}
help_onecmd(argv[1], ct);
@@ -86,7 +86,7 @@ help_oneline(
else {
dbprintf("%s ", ct->name);
if (ct->altname)
- dbprintf("(or %s) ", ct->altname);
+ dbprintf(_("(or %s) "), ct->altname);
}
if (ct->args)
dbprintf("%s ", ct->args);
diff --git a/db/init.c b/db/init.c
index e5f7951..2a5ef2b 100644
--- a/db/init.c
+++ b/db/init.c
@@ -57,6 +57,10 @@ init(
void *bufp = NULL;
int c;
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
progname = basename(argv[0]);
while ((c = getopt(argc, argv, "c:fFip:rxVl:")) != EOF) {
switch (c) {
@@ -86,7 +90,7 @@ init(
expert_mode = 1;
break;
case 'V':
- printf("%s version %s\n", progname, VERSION);
+ printf(_("%s version %s\n"), progname, VERSION);
exit(0);
case '?':
usage();
diff --git a/db/inode.c b/db/inode.c
index 6b93eff..4aa4e1a 100644
--- a/db/inode.c
+++ b/db/inode.c
@@ -378,14 +378,14 @@ inode_f(
if (argc > 1) {
ino = strtoull(argv[1], &p, 0);
if (*p != '\0') {
- dbprintf("bad value for inode number %s\n", argv[1]);
+ dbprintf(_("bad value for inode number %s\n"), argv[1]);
return 0;
}
set_cur_inode(ino);
} else if (iocur_top->ino == NULLFSINO)
- dbprintf("no current inode\n");
+ dbprintf(_("no current inode\n"));
else
- dbprintf("current inode number is %lld\n", iocur_top->ino);
+ dbprintf(_("current inode number is %lld\n"), iocur_top->ino);
return 0;
}
@@ -593,7 +593,7 @@ set_cur_inode(
if (agno >= mp->m_sb.sb_agcount || agbno >= mp->m_sb.sb_agblocks ||
offset >= mp->m_sb.sb_inopblock ||
XFS_AGINO_TO_INO(mp, agno, agino) != ino) {
- dbprintf("bad inode number %lld\n", ino);
+ dbprintf(_("bad inode number %lld\n"), ino);
return;
}
cur_agno = agno;
diff --git a/db/input.c b/db/input.c
index bb687c2..b73a1f8 100644
--- a/db/input.c
+++ b/db/input.c
@@ -40,8 +40,8 @@ static void popfile(void);
static int source_f(int argc, char **argv);
static const cmdinfo_t source_cmd =
- { "source", NULL, source_f, 1, 1, 0, "source-file",
- "get commands from source-file", NULL };
+ { "source", NULL, source_f, 1, 1, 0, N_("source-file"),
+ N_("get commands from source-file"), NULL };
/* our homegrown strtok that understands strings */
@@ -317,7 +317,7 @@ source_f(
f = fopen(argv[1], "r");
if (f == NULL)
- dbprintf("can't open %s\n", argv[0]);
+ dbprintf(_("can't open %s\n"), argv[0]);
else
pushfile(f);
return 0;
diff --git a/db/io.c b/db/io.c
index 368d136..39a1827 100644
--- a/db/io.c
+++ b/db/io.c
@@ -43,22 +43,22 @@ static void ring_help(void);
static const cmdinfo_t pop_cmd =
{ "pop", NULL, pop_f, 0, 0, 0, NULL,
- "pop location from the stack", pop_help };
+ N_("pop location from the stack"), pop_help };
static const cmdinfo_t push_cmd =
- { "push", NULL, push_f, 0, 2, 0, "[command]",
- "push location to the stack", push_help };
+ { "push", NULL, push_f, 0, 2, 0, N_("[command]"),
+ N_("push location to the stack"), push_help };
static const cmdinfo_t stack_cmd =
{ "stack", NULL, stack_f, 0, 0, 0, NULL,
- "view the location stack", stack_help };
+ N_("view the location stack"), stack_help };
static const cmdinfo_t forward_cmd =
{ "forward", "f", forward_f, 0, 0, 0, NULL,
- "move forward to next entry in the position ring", forward_help };
+ N_("move forward to next entry in the position ring"), forward_help };
static const cmdinfo_t back_cmd =
{ "back", "b", back_f, 0, 0, 0, NULL,
- "move to the previous location in the position ring", back_help };
+ N_("move to the previous location in the position ring"), back_help };
static const cmdinfo_t ring_cmd =
{ "ring", NULL, ring_f, 0, 1, 0, NULL,
- "show position ring or move to a specific entry", ring_help };
+ N_("show position ring or move to a specific entry"), ring_help };
iocur_t *iocur_base;
iocur_t *iocur_top;
@@ -88,7 +88,7 @@ off_cur(
int len)
{
if (iocur_top == NULL || off + len > BBTOB(iocur_top->blen))
- dbprintf("can't set block offset to %d\n", off);
+ dbprintf(_("can't set block offset to %d\n"), off);
else {
iocur_top->boff = off;
iocur_top->off = ((xfs_off_t)iocur_top->bb << BBSHIFT) + off;
@@ -101,7 +101,7 @@ void
pop_cur(void)
{
if (iocur_sp < 0) {
- dbprintf("can't pop anything from I/O stack\n");
+ dbprintf(_("can't pop anything from I/O stack\n"));
return;
}
if (iocur_top->buf)
@@ -128,11 +128,11 @@ pop_f(
static void
pop_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" Changes the address and data type to the first entry on the stack.\n"
"\n"
- );
+ ));
}
void
@@ -143,18 +143,18 @@ print_iocur(
int i;
dbprintf("%s\n", tag);
- dbprintf("\tbyte offset %lld, length %d\n", ioc->off, ioc->len);
- dbprintf("\tbuffer block %lld (fsbno %lld), %d bb%s\n", ioc->bb,
+ dbprintf(_("\tbyte offset %lld, length %d\n"), ioc->off, ioc->len);
+ dbprintf(_("\tbuffer block %lld (fsbno %lld), %d bb%s\n"), ioc->bb,
(xfs_dfsbno_t)XFS_DADDR_TO_FSB(mp, ioc->bb), ioc->blen,
ioc->blen == 1 ? "" : "s");
if (ioc->use_bbmap) {
- dbprintf("\tblock map");
+ dbprintf(_("\tblock map"));
for (i = 0; i < ioc->blen; i++)
dbprintf(" %d:%lld", i, ioc->bbmap.b[i]);
dbprintf("\n");
}
- dbprintf("\tinode %lld, dir inode %lld, type %s\n", ioc->ino,
- ioc->dirino, ioc->typ == NULL ? "none" : ioc->typ->name);
+ dbprintf(_("\tinode %lld, dir inode %lld, type %s\n"), ioc->ino,
+ ioc->dirino, ioc->typ == NULL ? _("none") : ioc->typ->name);
}
void
@@ -164,11 +164,11 @@ print_ring(void)
iocur_t *ioc;
if (ring_current == -1) {
- dbprintf("no entries in location ring.\n");
+ dbprintf(_("no entries in location ring.\n"));
return;
}
- dbprintf(" type bblock bblen fsbno inode\n");
+ dbprintf(_(" type bblock bblen fsbno inode\n"));
i = ring_head;
for (;;) {
@@ -222,11 +222,11 @@ push_f(
/* check we can execute command */
ct = find_command(argv[1]);
if (ct == NULL) {
- dbprintf("no such command %s\n", argv[1]);
+ dbprintf(_("no such command %s\n"), argv[1]);
return 0;
}
if (!ct->canpush) {
- dbprintf("no push form allowed for %s\n", argv[1]);
+ dbprintf(_("no push form allowed for %s\n"), argv[1]);
return 0;
}
}
@@ -249,13 +249,13 @@ push_f(
static void
push_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" Allows you to push the current address and data type on the stack for\n"
" later return. 'push' also accepts an additional command to execute after\n"
" storing the current address (ex: 'push a rootino' from the superblock).\n"
"\n"
- );
+ ));
}
/* move forward through the ring */
@@ -266,11 +266,11 @@ forward_f(
char **argv)
{
if (ring_current == -1) {
- dbprintf("ring is empty\n");
+ dbprintf(_("ring is empty\n"));
return 0;
}
if (ring_current == ring_head) {
- dbprintf("no further entries\n");
+ dbprintf(_("no further entries\n"));
return 0;
}
@@ -289,14 +289,14 @@ forward_f(
static void
forward_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" The 'forward' ('f') command moves to the next location in the position\n"
" ring, updating the current position and data type. If the current location\n"
" is the top entry in the ring, then the 'forward' command will have\n"
" no effect.\n"
"\n"
- );
+ ));
}
/* move backwards through the ring */
@@ -307,11 +307,11 @@ back_f(
char **argv)
{
if (ring_current == -1) {
- dbprintf("ring is empty\n");
+ dbprintf(_("ring is empty\n"));
return 0;
}
if (ring_current == ring_tail) {
- dbprintf("no previous entries\n");
+ dbprintf(_("no previous entries\n"));
return 0;
}
@@ -330,13 +330,13 @@ back_f(
static void
back_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" The 'back' ('b') command moves to the previous location in the position\n"
" ring, updating the current position and data type. If the current location\n"
" is the last entry in the ring, then the 'back' command will have no effect.\n"
"\n"
- );
+ ));
}
/* show or go to specific point in ring */
@@ -354,7 +354,7 @@ ring_f(
index = (int)strtoul(argv[1], NULL, 0);
if (index < 0 || index >= RING_ENTRIES)
- dbprintf("invalid entry: %d\n", index);
+ dbprintf(_("invalid entry: %d\n"), index);
ring_current = index;
@@ -370,7 +370,7 @@ ring_f(
static void
ring_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" The position ring automatically keeps track of each disk location and\n"
" structure type for each change of position you make during your xfs_db\n"
@@ -389,7 +389,7 @@ ring_help(void)
" Note: Unlike the 'stack', 'push' and 'pop' commands, the ring tracks your\n"
" location implicitly. Use the 'push' and 'pop' commands if you wish to\n"
" store a specific location explicitly for later return.\n"
-"\n",
+"\n"),
RING_ENTRIES);
}
@@ -435,7 +435,7 @@ write_bbs(
bbno = bbmap->b[j];
if (lseek64(x.dfd, bbno << BBSHIFT, SEEK_SET) < 0) {
rval = errno;
- dbprintf("can't seek in filesystem at bb %lld\n", bbno);
+ dbprintf(_("can't seek in filesystem at bb %lld\n"), bbno);
return rval;
}
c = BBTOB(bbmap ? 1 : count);
@@ -478,7 +478,7 @@ read_bbs(
bbno = bbmap->b[j];
if (lseek64(x.dfd, bbno << BBSHIFT, SEEK_SET) < 0) {
rval = errno;
- dbprintf("can't seek in filesystem at bb %lld\n", bbno);
+ dbprintf(_("can't seek in filesystem at bb %lld\n"), bbno);
if (*bufp == NULL)
xfree(buf);
buf = NULL;
@@ -512,24 +512,24 @@ write_cur(void)
int ret;
if (iocur_sp < 0) {
- dbprintf("nothing to write\n");
+ dbprintf(_("nothing to write\n"));
return;
}
ret = write_bbs(iocur_top->bb, iocur_top->blen, iocur_top->buf,
iocur_top->use_bbmap ? &iocur_top->bbmap : NULL);
if (ret == -1)
- dbprintf("incomplete write, block: %lld\n",
+ dbprintf(_("incomplete write, block: %lld\n"),
(iocur_base + iocur_sp)->bb);
else if (ret != 0)
- dbprintf("write error: %s\n", strerror(ret));
+ dbprintf(_("write error: %s\n"), strerror(ret));
/* re-read buffer from disk */
ret = read_bbs(iocur_top->bb, iocur_top->blen, &iocur_top->buf,
iocur_top->use_bbmap ? &iocur_top->bbmap : NULL);
if (ret == -1)
- dbprintf("incomplete read, block: %lld\n",
+ dbprintf(_("incomplete read, block: %lld\n"),
(iocur_base + iocur_sp)->bb);
else if (ret != 0)
- dbprintf("read error: %s\n", strerror(ret));
+ dbprintf(_("read error: %s\n"), strerror(ret));
}
void
@@ -545,13 +545,13 @@ set_cur(
__uint16_t mode;
if (iocur_sp < 0) {
- dbprintf("set_cur no stack element to set\n");
+ dbprintf(_("set_cur no stack element to set\n"));
return;
}
#ifdef DEBUG
if (bbmap)
- printf("xfs_db got a bbmap for %lld\n", (long long)d);
+ printf(_("xfs_db got a bbmap for %lld\n"), (long long)d);
#endif
ino = iocur_top->ino;
dirino = iocur_top->dirino;
@@ -581,7 +581,7 @@ set_cur(
static void
stack_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" The stack is used to explicitly store your location and data type\n"
" for later return. The 'push' operation stores the current address\n"
@@ -591,7 +591,7 @@ stack_help(void)
" The 'stack' allows explicit location saves, see 'ring' for implicit\n"
" position tracking.\n"
"\n"
- );
+ ));
}
/*ARGSUSED*/
diff --git a/db/malloc.c b/db/malloc.c
index c4eddc4..fe1eacf 100644
--- a/db/malloc.c
+++ b/db/malloc.c
@@ -24,7 +24,7 @@
static void
badmalloc(void)
{
- dbprintf("%s: out of memory\n", progname);
+ dbprintf(_("%s: out of memory\n"), progname);
exit(4);
}
diff --git a/db/metadump.c b/db/metadump.c
index ab663f3..19aed4f 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -44,8 +44,8 @@ static void metadump_help(void);
static const cmdinfo_t metadump_cmd =
{ "metadump", NULL, metadump_f, 0, -1, 0,
- "[-e] [-g] [-m max_extent] [-w] [-o] filename",
- "dump metadata to a file", metadump_help };
+ N_("[-e] [-g] [-m max_extent] [-w] [-o] filename"),
+ N_("dump metadata to a file"), metadump_help };
static FILE *outf; /* metadump file */
@@ -74,7 +74,7 @@ metadump_init(void)
static void
metadump_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" The 'metadump' command dumps the known metadata to a compact file suitable\n"
" for compressing and sending to an XFS maintainer for corruption analysis \n"
@@ -85,7 +85,7 @@ metadump_help(void)
" -m -- Specify max extent size in blocks to copy (default = %d blocks)\n"
" -o -- Don't obfuscate names and extended attributes\n"
" -w -- Show warnings of bad metadata information\n"
-"\n", DEFAULT_MAX_EXT_SIZE);
+"\n"), DEFAULT_MAX_EXT_SIZE);
}
static void
diff --git a/db/output.c b/db/output.c
index f524a4e..36669f4 100644
--- a/db/output.c
+++ b/db/output.c
@@ -27,8 +27,8 @@
static int log_f(int argc, char **argv);
static const cmdinfo_t log_cmd =
- { "log", NULL, log_f, 0, 2, 0, "[stop|start <filename>]",
- "start or stop logging to a file", NULL };
+ { "log", NULL, log_f, 0, 2, 0, N_("[stop|start <filename>]"),
+ N_("start or stop logging to a file"), NULL };
int dbprefix;
static FILE *log_file;
@@ -65,29 +65,29 @@ log_f(
{
if (argc == 1) {
if (log_file)
- dbprintf("logging to %s\n", log_file_name);
+ dbprintf(_("logging to %s\n"), log_file_name);
else
- dbprintf("no log file\n");
+ dbprintf(_("no log file\n"));
} else if (argc == 2 && strcmp(argv[1], "stop") == 0) {
if (log_file) {
xfree(log_file_name);
fclose(log_file);
log_file = NULL;
} else
- dbprintf("no log file\n");
+ dbprintf(_("no log file\n"));
} else if (argc == 3 && strcmp(argv[1], "start") == 0) {
if (log_file)
- dbprintf("already logging to %s\n", log_file_name);
+ dbprintf(_("already logging to %s\n"), log_file_name);
else {
log_file = fopen(argv[2], "a");
if (log_file == NULL)
- dbprintf("can't open %s for writing\n",
+ dbprintf(_("can't open %s for writing\n"),
argv[2]);
else
log_file_name = xstrdup(argv[1]);
}
} else
- dbprintf("bad log command, ignored\n");
+ dbprintf(_("bad log command, ignored\n"));
return 0;
}
diff --git a/db/print.c b/db/print.c
index 9821015..b865d64 100644
--- a/db/print.c
+++ b/db/print.c
@@ -38,8 +38,8 @@ static void print_somefields(const struct field *fields, int argc,
char **argv);
static const cmdinfo_t print_cmd =
- { "print", "p", print_f, 0, -1, 0, "[value]...",
- "print field values", NULL };
+ { "print", "p", print_f, 0, -1, 0, N_("[value]..."),
+ N_("print field values"), NULL };
static void
print_allfields(
@@ -71,12 +71,12 @@ print_f(
pfunc_t pf;
if (cur_typ == NULL) {
- dbprintf("no current type\n");
+ dbprintf(_("no current type\n"));
return 0;
}
pf = cur_typ->pfunc;
if (pf == NULL) {
- dbprintf("no print function for type %s\n", cur_typ->name);
+ dbprintf(_("no print function for type %s\n"), cur_typ->name);
return 0;
}
argc--;
@@ -150,7 +150,7 @@ print_flist_1(
dbprintf("\n");
} else {
ASSERT(fa->arg & FTARG_OKEMPTY);
- dbprintf("(empty)\n");
+ dbprintf(_("(empty)\n"));
}
}
free_strvec(pfx);
@@ -212,7 +212,7 @@ print_sarray(
f->flags & FLD_ARRAY);
else {
ASSERT(fa->arg & FTARG_OKEMPTY);
- dbprintf("(empty)");
+ dbprintf(_("(empty)"));
}
}
dbprintf("]");
@@ -272,7 +272,7 @@ print_string(
char *cp;
if (argc != 0)
- dbprintf("no arguments allowed\n");
+ dbprintf(_("no arguments allowed\n"));
dbprintf("\"");
for (cp = iocur_top->data;
cp < (char *)iocur_top->data + iocur_top->len && *cp &&
diff --git a/db/quit.c b/db/quit.c
index 06ff148..5e4413c 100644
--- a/db/quit.c
+++ b/db/quit.c
@@ -24,7 +24,7 @@ static int quit_f(int argc, char **argv);
static const cmdinfo_t quit_cmd =
{ "quit", "q", quit_f, 0, 0, 0, NULL,
- "exit xfs_db", NULL };
+ N_("exit xfs_db"), NULL };
static int
quit_f(
diff --git a/db/sb.c b/db/sb.c
index d47b901..f2bc14d 100644
--- a/db/sb.c
+++ b/db/sb.c
@@ -39,17 +39,17 @@ static int version_f(int argc, char **argv);
static void version_help(void);
static const cmdinfo_t sb_cmd =
- { "sb", NULL, sb_f, 0, 1, 1, "[agno]",
- "set current address to sb header", sb_help };
+ { "sb", NULL, sb_f, 0, 1, 1, N_("[agno]"),
+ N_("set current address to sb header"), sb_help };
static const cmdinfo_t uuid_cmd =
- { "uuid", NULL, uuid_f, 0, 1, 1, "[uuid]",
- "write/print FS uuid", uuid_help };
+ { "uuid", NULL, uuid_f, 0, 1, 1, N_("[uuid]"),
+ N_("write/print FS uuid"), uuid_help };
static const cmdinfo_t label_cmd =
- { "label", NULL, label_f, 0, 1, 1, "[label]",
- "write/print FS label", label_help };
+ { "label", NULL, label_f, 0, 1, 1, N_("[label]"),
+ N_("write/print FS label"), label_help };
static const cmdinfo_t version_cmd =
- { "version", NULL, version_f, 0, -1, 1, "[feature | [vnum fnum]]",
- "set feature bit(s) in the sb version field", version_help };
+ { "version", NULL, version_f, 0, -1, 1, N_("[feature | [vnum fnum]]"),
+ N_("set feature bit(s) in the sb version field"), version_help };
void
sb_init(void)
@@ -120,7 +120,7 @@ const field_t sb_hfld[] = {
static void
sb_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" set allocation group superblock\n"
"\n"
@@ -134,7 +134,7 @@ sb_help(void)
" remaining allocation groups only serve as backup for filesystem recovery.\n"
" The icount/ifree/fdblocks/frextents are only updated in superblock 0.\n"
"\n"
-);
+));
}
static int
@@ -148,7 +148,7 @@ sb_f(
if (argc > 1) {
agno = (xfs_agnumber_t)strtoul(argv[1], &p, 0);
if (*p != '\0' || agno >= mp->m_sb.sb_agcount) {
- dbprintf("bad allocation group number %s\n", argv[1]);
+ dbprintf(_("bad allocation group number %s\n"), argv[1]);
return 0;
}
cur_agno = agno;
@@ -180,7 +180,7 @@ get_sb(xfs_agnumber_t agno, xfs_sb_t *sb)
XFS_FSS_TO_BB(mp, 1), DB_RING_IGN, NULL);
if (!iocur_top->data) {
- dbprintf("can't read superblock for AG %u\n", agno);
+ dbprintf(_("can't read superblock for AG %u\n"), agno);
pop_cur();
return 0;
}
@@ -188,17 +188,17 @@ get_sb(xfs_agnumber_t agno, xfs_sb_t *sb)
libxfs_sb_from_disk(sb, iocur_top->data);
if (sb->sb_magicnum != XFS_SB_MAGIC) {
- dbprintf("bad sb magic # %#x in AG %u\n",
+ dbprintf(_("bad sb magic # %#x in AG %u\n"),
sb->sb_magicnum, agno);
return 0;
}
if (!xfs_sb_good_version(sb)) {
- dbprintf("bad sb version # %#x in AG %u\n",
+ dbprintf(_("bad sb version # %#x in AG %u\n"),
sb->sb_versionnum, agno);
return 0;
}
if (agno == 0 && sb->sb_inprogress != 0) {
- dbprintf("mkfs not completed successfully\n");
+ dbprintf(_("mkfs not completed successfully\n"));
return 0;
}
return 1;
@@ -215,14 +215,14 @@ sb_logcheck(void)
if (mp->m_sb.sb_logstart) {
if (x.logdev && x.logdev != x.ddev) {
- dbprintf("aborting - external log specified for FS "
- "with an internal log\n");
+ dbprintf(_("aborting - external log specified for FS "
+ "with an internal log\n"));
return 0;
}
} else {
if (!x.logdev || (x.logdev == x.ddev)) {
- dbprintf("aborting - no external log specified for FS "
- "with an external log\n");
+ dbprintf(_("aborting - no external log specified for FS "
+ "with an external log\n"));
return 0;
}
}
@@ -239,17 +239,17 @@ sb_logcheck(void)
log.l_mp = mp;
if (xlog_find_tail(&log, &head_blk, &tail_blk)) {
- dbprintf("ERROR: cannot find log head/tail, run xfs_repair\n");
+ dbprintf(_("ERROR: cannot find log head/tail, run xfs_repair\n"));
return 0;
}
if (head_blk != tail_blk) {
- dbprintf(
+ dbprintf(_(
"ERROR: The filesystem has valuable metadata changes in a log which needs to\n"
"be replayed. Mount the filesystem to replay the log, and unmount it before\n"
"re-running %s. If you are unable to mount the filesystem, then use\n"
"the xfs_repair -L option to destroy the log and attempt a repair.\n"
"Note that destroying the log may cause corruption -- please attempt a mount\n"
-"of the filesystem before doing this.\n", progname);
+"of the filesystem before doing this.\n"), progname);
return 0;
}
return 1;
@@ -261,7 +261,7 @@ sb_logzero(uuid_t *uuidp)
if (!sb_logcheck())
return 0;
- dbprintf("Clearing log and setting UUID\n");
+ dbprintf(_("Clearing log and setting UUID\n"));
if (libxfs_log_clear(
(mp->m_sb.sb_logstart == 0) ? x.logdev : x.ddev,
@@ -270,7 +270,7 @@ sb_logzero(uuid_t *uuidp)
uuidp,
xfs_sb_version_haslogv2(&mp->m_sb) ? 2 : 1,
mp->m_sb.sb_logsunit, XLOG_FMT)) {
- dbprintf("ERROR: cannot clear the log\n");
+ dbprintf(_("ERROR: cannot clear the log\n"));
return 0;
}
return 1;
@@ -280,7 +280,7 @@ sb_logzero(uuid_t *uuidp)
static void
uuid_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" write/print FS uuid\n"
"\n"
@@ -298,7 +298,7 @@ uuid_help(void)
"As a side effect of writing the UUID, the log is cleared (which is fine\n"
"on a CLEANLY unmounted FS).\n"
"\n"
-);
+));
}
static uuid_t *
@@ -333,14 +333,14 @@ uuid_f(
uuid_t *uup = NULL;
if (argc != 1 && argc != 2) {
- dbprintf("invalid parameters\n");
+ dbprintf(_("invalid parameters\n"));
return 0;
}
if (argc == 2) { /* WRITE UUID */
if ((x.isreadonly & LIBXFS_ISREADONLY) || !expert_mode) {
- dbprintf("%s: not in expert mode, writing disabled\n",
+ dbprintf(_("%s: not in expert mode, writing disabled\n"),
progname);
return 0;
}
@@ -352,15 +352,15 @@ uuid_f(
} else if (!strcasecmp(argv[1], "rewrite")) {
uup = do_uuid(0, NULL);
if (!uup) {
- dbprintf("failed to read UUID from AG 0\n");
+ dbprintf(_("failed to read UUID from AG 0\n"));
return 0;
}
memcpy(&uu, uup, sizeof(uuid_t));
platform_uuid_unparse(&uu, bp);
- dbprintf("old UUID = %s\n", bp);
+ dbprintf(_("old UUID = %s\n"), bp);
} else {
if (platform_uuid_parse(argv[1], &uu)) {
- dbprintf("invalid UUID\n");
+ dbprintf(_("invalid UUID\n"));
return 0;
}
}
@@ -369,15 +369,15 @@ uuid_f(
if (!sb_logzero(&uu))
return 0;
- dbprintf("writing all SBs\n");
+ dbprintf(_("writing all SBs\n"));
for (agno = 0; agno < mp->m_sb.sb_agcount; agno++)
if (!do_uuid(agno, &uu)) {
- dbprintf("failed to set UUID in AG %d\n", agno);
+ dbprintf(_("failed to set UUID in AG %d\n"), agno);
break;
}
platform_uuid_unparse(&uu, bp);
- dbprintf("new UUID = %s\n", bp);
+ dbprintf(_("new UUID = %s\n"), bp);
return 0;
} else { /* READ+CHECK UUID */
@@ -385,14 +385,14 @@ uuid_f(
for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) {
uup = do_uuid(agno, NULL);
if (!uup) {
- dbprintf("failed to read UUID from AG %d\n",
+ dbprintf(_("failed to read UUID from AG %d\n"),
agno);
return 0;
}
if (agno) {
if (memcmp(&uu, uup, sizeof(uuid_t))) {
- dbprintf("warning: UUID in AG %d "
- "differs to the primary SB\n",
+ dbprintf(_("warning: UUID in AG %d "
+ "differs to the primary SB\n"),
agno);
break;
}
@@ -402,15 +402,15 @@ uuid_f(
}
if (mp->m_sb.sb_logstart) {
if (x.logdev && x.logdev != x.ddev)
- dbprintf("warning - external log specified "
- "for FS with an internal log\n");
+ dbprintf(_("warning - external log specified "
+ "for FS with an internal log\n"));
} else if (!x.logdev || (x.logdev == x.ddev)) {
- dbprintf("warning - no external log specified "
- "for FS with an external log\n");
+ dbprintf(_("warning - no external log specified "
+ "for FS with an external log\n"));
}
platform_uuid_unparse(&uu, bp);
- dbprintf("UUID = %s\n", bp);
+ dbprintf(_("UUID = %s\n"), bp);
}
return 0;
@@ -420,7 +420,7 @@ uuid_f(
static void
label_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" write/print FS label\n"
"\n"
@@ -435,7 +435,7 @@ label_help(void)
"specified value. The maximum length of a label is 12 characters - use of a\n"
"longer label will result in truncation and a warning will be issued.\n"
"\n"
-);
+));
}
static char *
@@ -458,7 +458,7 @@ do_label(xfs_agnumber_t agno, char *label)
/* set label */
if ((len = strlen(label)) > sizeof(tsb.sb_fname)) {
if (agno == 0)
- dbprintf("%s: truncating label length from %d to %d\n",
+ dbprintf(_("%s: truncating label length from %d to %d\n"),
progname, (int)len, (int)sizeof(tsb.sb_fname));
len = sizeof(tsb.sb_fname);
}
@@ -485,40 +485,40 @@ label_f(
xfs_agnumber_t ag;
if (argc != 1 && argc != 2) {
- dbprintf("invalid parameters\n");
+ dbprintf(_("invalid parameters\n"));
return 0;
}
if (argc == 2) { /* WRITE LABEL */
if ((x.isreadonly & LIBXFS_ISREADONLY) || !expert_mode) {
- dbprintf("%s: not in expert mode, writing disabled\n",
+ dbprintf(_("%s: not in expert mode, writing disabled\n"),
progname);
return 0;
}
- dbprintf("writing all SBs\n");
+ dbprintf(_("writing all SBs\n"));
for (ag = 0; ag < mp->m_sb.sb_agcount; ag++)
if ((p = do_label(ag, argv[1])) == NULL) {
- dbprintf("failed to set label in AG %d\n", ag);
+ dbprintf(_("failed to set label in AG %d\n"), ag);
break;
}
- dbprintf("new label = \"%s\"\n", p);
+ dbprintf(_("new label = \"%s\"\n"), p);
} else { /* READ LABEL */
for (ag = 0; ag < mp->m_sb.sb_agcount; ag++) {
p = do_label(ag, NULL);
if (!p) {
- dbprintf("failed to read label in AG %d\n", ag);
+ dbprintf(_("failed to read label in AG %d\n"), ag);
return 0;
}
if (!ag)
memcpy(&sb.sb_fname, p, sizeof(sb.sb_fname));
else if (memcmp(&sb.sb_fname, p, sizeof(sb.sb_fname)))
- dbprintf("warning: AG %d label differs\n", ag);
+ dbprintf(_("warning: AG %d label differs\n"), ag);
}
- dbprintf("label = \"%s\"\n", p);
+ dbprintf(_("label = \"%s\"\n"), p);
}
return 0;
}
@@ -527,7 +527,7 @@ label_f(
static void
version_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" set/print feature bits in sb version\n"
"\n"
@@ -544,7 +544,7 @@ version_help(void)
"It can also be used to enable selected features, such as support for\n"
"unwritten extents. The upated version is written into all AGs.\n"
"\n"
-);
+));
}
static int
@@ -628,7 +628,7 @@ version_f(
if (argc == 2) { /* WRITE VERSION */
if ((x.isreadonly & LIBXFS_ISREADONLY) || !expert_mode) {
- dbprintf("%s: not in expert mode, writing disabled\n",
+ dbprintf(_("%s: not in expert mode, writing disabled\n"),
progname);
return 0;
}
@@ -647,8 +647,8 @@ version_f(
break;
case XFS_SB_VERSION_4:
if (xfs_sb_version_hasextflgbit(&mp->m_sb))
- dbprintf("unwritten extents flag"
- " is already enabled\n");
+ dbprintf(_("unwritten extents flag"
+ " is already enabled\n"));
else
version = mp->m_sb.sb_versionnum |
XFS_SB_VERSION_EXTFLGBIT;
@@ -667,8 +667,8 @@ version_f(
break;
case XFS_SB_VERSION_4:
if (xfs_sb_version_haslogv2(&mp->m_sb))
- dbprintf("version 2 log format"
- " is already in use\n");
+ dbprintf(_("version 2 log format"
+ " is already in use\n"));
else
version = mp->m_sb.sb_versionnum |
XFS_SB_VERSION_LOGV2BIT;
@@ -690,17 +690,17 @@ version_f(
version = mp->m_sb.sb_versionnum;
features = mp->m_sb.sb_features2;
} else {
- dbprintf("%s: invalid version change command \"%s\"\n",
+ dbprintf(_("%s: invalid version change command \"%s\"\n"),
progname, argv[1]);
return 0;
}
if (version) {
- dbprintf("writing all SBs\n");
+ dbprintf(_("writing all SBs\n"));
for (ag = 0; ag < mp->m_sb.sb_agcount; ag++)
if (!do_version(ag, version, features)) {
- dbprintf("failed to set versionnum "
- "in AG %d\n", ag);
+ dbprintf(_("failed to set versionnum "
+ "in AG %d\n"), ag);
break;
}
mp->m_sb.sb_versionnum = version;
@@ -717,7 +717,7 @@ version_f(
mp->m_sb.sb_features2 = strtoul(argv[2], &sp, 0);
}
- dbprintf("versionnum [0x%x+0x%x] = %s\n", mp->m_sb.sb_versionnum,
+ dbprintf(_("versionnum [0x%x+0x%x] = %s\n"), mp->m_sb.sb_versionnum,
mp->m_sb.sb_features2, version_string(&mp->m_sb));
if (argc == 3) { /* now reset... */
diff --git a/db/type.c b/db/type.c
index 9c2b1d7..e5fd9eb 100644
--- a/db/type.c
+++ b/db/type.c
@@ -47,8 +47,8 @@ static int type_f(int argc, char **argv);
const typ_t *cur_typ;
static const cmdinfo_t type_cmd =
- { "type", NULL, type_f, 0, 1, 1, "[newtype]",
- "set/show current data type", NULL };
+ { "type", NULL, type_f, 0, 1, 1, N_("[newtype]"),
+ N_("set/show current data type"), NULL };
const typ_t typtab[] = {
{ TYP_AGF, "agf", handle_struct, agf_hfld },
@@ -99,11 +99,11 @@ type_f(
if (argc == 1) {
if (cur_typ == NULL)
- dbprintf("no current type\n");
+ dbprintf(_("no current type\n"));
else
- dbprintf("current type is \"%s\"\n", cur_typ->name);
+ dbprintf(_("current type is \"%s\"\n"), cur_typ->name);
- dbprintf("\n supported types are:\n ");
+ dbprintf(_("\n supported types are:\n "));
for (tt = typtab, count = 0; tt->name != NULL; tt++) {
if ((tt+1)->name != NULL) {
dbprintf("%s, ", tt->name);
@@ -118,10 +118,10 @@ type_f(
} else {
tt = findtyp(argv[1]);
if (tt == NULL) {
- dbprintf("no such type %s\n", argv[1]);
+ dbprintf(_("no such type %s\n"), argv[1]);
} else {
if (iocur_top->typ == NULL) {
- dbprintf("no current object\n");
+ dbprintf(_("no current object\n"));
} else {
iocur_top->typ = cur_typ = tt;
}
diff --git a/db/write.c b/db/write.c
index bc3e4e5..091ddb3 100644
--- a/db/write.c
+++ b/db/write.c
@@ -38,8 +38,8 @@ static int write_f(int argc, char **argv);
static void write_help(void);
static const cmdinfo_t write_cmd =
- { "write", NULL, write_f, 0, -1, 0, "[field or value]...",
- "write value to disk", write_help };
+ { "write", NULL, write_f, 0, -1, 0, N_("[field or value]..."),
+ N_("write value to disk"), write_help };
void
write_init(void)
@@ -54,7 +54,7 @@ write_init(void)
static void
write_help(void)
{
- dbprintf(
+ dbprintf(_(
"\n"
" The 'write' command takes on different personalities depending on the\n"
" type of object being worked with.\n\n"
@@ -79,7 +79,7 @@ write_help(void)
" String mode: 'write \"This_is_a_filename\" - write null terminated string.\n"
"\n"
" In data mode type 'write' by itself for a list of specific commands.\n\n"
-);
+));
}
@@ -92,19 +92,19 @@ write_f(
extern char *progname;
if (x.isreadonly & LIBXFS_ISREADONLY) {
- dbprintf("%s started in read only mode, writing disabled\n",
+ dbprintf(_("%s started in read only mode, writing disabled\n"),
progname);
return 0;
}
if (cur_typ == NULL) {
- dbprintf("no current type\n");
+ dbprintf(_("no current type\n"));
return 0;
}
pf = cur_typ->pfunc;
if (pf == NULL) {
- dbprintf("no handler function for type %s, write unsupported.\n",
+ dbprintf(_("no handler function for type %s, write unsupported.\n"),
cur_typ->name);
return 0;
}
@@ -164,7 +164,7 @@ bwrite_lshift(
len = iocur_top->len - start;
if (len+start > iocur_top->len) {
- dbprintf("length (%d) too large for data block size (%d)",
+ dbprintf(_("length (%d) too large for data block size (%d)"),
len, iocur_top->len);
}
@@ -193,7 +193,7 @@ bwrite_rshift(
len = iocur_top->len - start;
if (len+start > iocur_top->len) {
- dbprintf("length (%d) too large for data block size (%d)",
+ dbprintf(_("length (%d) too large for data block size (%d)"),
len, iocur_top->len);
}
@@ -223,7 +223,7 @@ bwrite_lrot(
len = iocur_top->len - start;
if (len+start > iocur_top->len) {
- dbprintf("length (%d) too large for data block size (%d)",
+ dbprintf(_("length (%d) too large for data block size (%d)"),
len, iocur_top->len);
}
@@ -255,7 +255,7 @@ bwrite_rrot(
len = iocur_top->len - start;
if (len+start > iocur_top->len) {
- dbprintf("length (%d) too large for data block size (%d)",
+ dbprintf(_("length (%d) too large for data block size (%d)"),
len, iocur_top->len);
}
@@ -290,7 +290,7 @@ bwrite_seq(
len = iocur_top->len - start;
if (len+start > iocur_top->len) {
- dbprintf("length (%d) too large for data block size (%d)",
+ dbprintf(_("length (%d) too large for data block size (%d)"),
len, iocur_top->len);
}
@@ -339,7 +339,7 @@ bwrite_random(
len = iocur_top->len - start;
if (len+start > iocur_top->len) {
- dbprintf("length (%d) too large for data block size (%d)",
+ dbprintf(_("length (%d) too large for data block size (%d)"),
len, iocur_top->len);
}
@@ -368,7 +368,7 @@ bwrite_fill(
len = iocur_top->len - start;
if (len+start > iocur_top->len) {
- dbprintf("length (%d) too large for data block size (%d)",
+ dbprintf(_("length (%d) too large for data block size (%d)"),
len, iocur_top->len);
}
@@ -556,13 +556,13 @@ write_struct(
int parentoffset;
if (argc != 2) {
- dbprintf("usage: write fieldname value\n");
+ dbprintf(_("usage: write fieldname value\n"));
return;
}
fl = flist_scan(argv[0]);
if (!fl) {
- dbprintf("unable to parse '%s'.\n", argv[0]);
+ dbprintf(_("unable to parse '%s'.\n"), argv[0]);
return;
}
@@ -576,7 +576,7 @@ write_struct(
/* run down the field list and set offsets into the data */
if (!flist_parse(fields, fl, iocur_top->data, 0)) {
flist_free(fl);
- dbprintf("parsing error\n");
+ dbprintf(_("parsing error\n"));
return;
}
@@ -595,7 +595,7 @@ write_struct(
buf = convert_arg(argv[1], bit_length);
if (!buf) {
- dbprintf("unable to convert value '%s'.\n", argv[1]);
+ dbprintf(_("unable to convert value '%s'.\n"), argv[1]);
return;
}
@@ -618,7 +618,7 @@ write_string(
int i;
if (argc != 1) {
- dbprintf("usage (in string mode): write \"string...\"\n");
+ dbprintf(_("usage (in string mode): write \"string...\"\n"));
return;
}
@@ -660,12 +660,12 @@ write_block(
}
if (!cmd) {
- dbprintf("write: invalid subcommand\n");
+ dbprintf(_("write: invalid subcommand\n"));
goto block_usage;
}
if ((argc < cmd->argmin + 1) || (argc > cmd->argmax + 1)) {
- dbprintf("write %s: invalid number of arguments\n",
+ dbprintf(_("write %s: invalid number of arguments\n"),
cmd->cmdstr);
goto block_usage;
}
@@ -689,7 +689,7 @@ write_block(
block_usage:
- dbprintf("usage: write (in data mode)\n");
+ dbprintf(_("usage: write (in data mode)\n"));
for (i = 0; i < BWRITE_CMD_MAX; i++) {
dbprintf(" %-9.9s %s\n",
bw_cmdtab[i].cmdstr, bw_cmdtab[i].usage);
diff --git a/logprint/log_copy.c b/logprint/log_copy.c
index e453337..fd36317 100644
--- a/logprint/log_copy.c
+++ b/logprint/log_copy.c
@@ -41,28 +41,28 @@ xfs_log_copy(
for (blkno = 0; blkno < log->l_logBBsize; blkno++) {
r = read(fd, buf, sizeof(buf));
if (r < 0) {
- fprintf(stderr, "%s: read error (%lld): %s\n",
+ fprintf(stderr, _("%s: read error (%lld): %s\n"),
__FUNCTION__, (long long)blkno,
strerror(errno));
continue;
} else if (r == 0) {
- printf("%s: physical end of log at %lld\n",
+ printf(_("%s: physical end of log at %lld\n"),
__FUNCTION__, (long long)blkno);
break;
} else if (r != sizeof(buf)) {
- fprintf(stderr, "%s: short read? (%lld)\n",
+ fprintf(stderr, _("%s: short read? (%lld)\n"),
__FUNCTION__, (long long)blkno);
continue;
}
r = write(ofd, buf, sizeof(buf));
if (r < 0) {
- fprintf(stderr, "%s: write error (%lld): %s\n",
+ fprintf(stderr, _("%s: write error (%lld): %s\n"),
__FUNCTION__, (long long)blkno,
strerror(errno));
break;
} else if (r != sizeof(buf)) {
- fprintf(stderr, "%s: short write? (%lld)\n",
+ fprintf(stderr, _("%s: short write? (%lld)\n"),
__FUNCTION__, (long long)blkno);
continue;
}
diff --git a/logprint/log_dump.c b/logprint/log_dump.c
index 8bcd94e..1975b1b 100644
--- a/logprint/log_dump.c
+++ b/logprint/log_dump.c
@@ -40,20 +40,20 @@ xfs_log_dump(
for (blkno = 0; blkno < log->l_logBBsize; blkno++) {
r = read(fd, buf, sizeof(buf));
if (r < 0) {
- fprintf(stderr, "%s: read error (%lld): %s\n",
+ fprintf(stderr, _("%s: read error (%lld): %s\n"),
__FUNCTION__, (long long)blkno,
strerror(errno));
continue;
} else if (r == 0) {
- printf("%s: physical end of log at %lld\n",
+ printf(_("%s: physical end of log at %lld\n"),
__FUNCTION__, (long long)blkno);
break;
}
if (CYCLE_LSN(be64_to_cpu(*(__be64 *)buf)) ==
XLOG_HEADER_MAGIC_NUM && !print_no_data) {
- printf(
- "%6lld HEADER Cycle %d tail %d:%06d len %6d ops %d\n",
+ printf(_(
+ "%6lld HEADER Cycle %d tail %d:%06d len %6d ops %d\n"),
(long long)blkno,
be32_to_cpu(hdr->h_cycle),
CYCLE_LSN(be64_to_cpu(hdr->h_tail_lsn)),
@@ -63,8 +63,8 @@ xfs_log_dump(
}
if (xlog_get_cycle(buf) != last_cycle) {
- printf(
- "[%05lld - %05lld] Cycle 0x%08x New Cycle 0x%08x\n",
+ printf(_(
+ "[%05lld - %05lld] Cycle 0x%08x New Cycle 0x%08x\n"),
(long long)dupblkno, (long long)blkno,
last_cycle, xlog_get_cycle(buf));
last_cycle = xlog_get_cycle(buf);
diff --git a/logprint/log_misc.c b/logprint/log_misc.c
index 6d1428e..253e146 100644
--- a/logprint/log_misc.c
+++ b/logprint/log_misc.c
@@ -128,12 +128,12 @@ xlog_print_op_header(xlog_op_header_t *op_head,
memmove(&hbuf, op_head, sizeof(xlog_op_header_t));
op_head = &hbuf;
*ptr += sizeof(xlog_op_header_t);
- printf("Oper (%d): tid: %x len: %d clientid: %s ", i,
+ printf(_("Oper (%d): tid: %x len: %d clientid: %s "), i,
be32_to_cpu(op_head->oh_tid),
be32_to_cpu(op_head->oh_len),
(op_head->oh_clientid == XFS_TRANSACTION ? "TRANS" :
(op_head->oh_clientid == XFS_LOG ? "LOG" : "ERROR")));
- printf("flags: ");
+ printf(_("flags: "));
if (op_head->oh_flags) {
if (op_head->oh_flags & XLOG_START_TRANS)
printf("START ");
@@ -148,7 +148,7 @@ xlog_print_op_header(xlog_op_header_t *op_head,
if (op_head->oh_flags & XLOG_END_TRANS)
printf("END ");
} else {
- printf("none");
+ printf(_("none"));
}
printf("\n");
} /* xlog_print_op_header */
@@ -227,11 +227,11 @@ xlog_print_trans_header(xfs_caddr_t *ptr, int len)
#endif
}
if (len != sizeof(xfs_trans_header_t)) {
- printf(" Not enough data to decode further\n");
+ printf(_(" Not enough data to decode further\n"));
return 1;
}
h = (xfs_trans_header_t *)cptr;
- printf(" type: %s tid: %x num_items: %d\n",
+ printf(_(" type: %s tid: %x num_items: %d\n"),
trans_type[h->th_type], h->th_tid, h->th_num_items);
return 0;
} /* xlog_print_trans_header */
@@ -273,13 +273,13 @@ xlog_print_trans_buffer(xfs_caddr_t *ptr, int len, int *i, int num_ops)
if (len >= struct_size) {
ASSERT((len - sizeof(struct_size)) % sizeof(int) == 0);
- printf("#regs: %d start blkno: %lld (0x%llx) len: %d bmap size: %d flags: 0x%x\n",
+ printf(_("#regs: %d start blkno: %lld (0x%llx) len: %d bmap size: %d flags: 0x%x\n"),
size, (long long)blkno, (unsigned long long)blkno, blen, map_size, flags);
if (blkno == 0)
super_block = 1;
} else {
ASSERT(len >= 4); /* must have at least 4 bytes if != 0 */
- printf("#regs: %d Not printing rest of data\n", f->blf_size);
+ printf(_("#regs: %d Not printing rest of data\n"), f->blf_size);
return size;
}
num = size-1;
@@ -296,9 +296,9 @@ xlog_print_trans_buffer(xfs_caddr_t *ptr, int len, int *i, int num_ops)
head = (xlog_op_header_t *)*ptr;
xlog_print_op_header(head, *i, ptr);
if (super_block) {
- printf("SUPER BLOCK Buffer: ");
+ printf(_("SUPER BLOCK Buffer: "));
if (be32_to_cpu(head->oh_len) < 4*8) {
- printf("Out of space\n");
+ printf(_("Out of space\n"));
} else {
printf("\n");
/*
@@ -306,30 +306,30 @@ xlog_print_trans_buffer(xfs_caddr_t *ptr, int len, int *i, int num_ops)
*/
memmove(&x, *ptr, sizeof(__be64));
memmove(&y, *ptr+8, sizeof(__be64));
- printf("icount: %lld ifree: %lld ",
+ printf(_("icount: %lld ifree: %lld "),
be64_to_cpu(x), be64_to_cpu(y));
memmove(&x, *ptr+16, sizeof(__be64));
memmove(&y, *ptr+24, sizeof(__be64));
- printf("fdblks: %lld frext: %lld\n",
+ printf(_("fdblks: %lld frext: %lld\n"),
be64_to_cpu(x), be64_to_cpu(y));
}
super_block = 0;
} else if (be32_to_cpu(*(__be32 *)(*ptr)) == XFS_AGI_MAGIC) {
agi = (xfs_agi_t *)(*ptr);
- printf("AGI Buffer: XAGI ");
+ printf(_("AGI Buffer: XAGI "));
if (be32_to_cpu(head->oh_len) < sizeof(xfs_agi_t) -
XFS_AGI_UNLINKED_BUCKETS*sizeof(xfs_agino_t)) {
- printf("out of space\n");
+ printf(_("out of space\n"));
} else {
printf("\n");
- printf("ver: %d ",
+ printf(_("ver: %d "),
be32_to_cpu(agi->agi_versionnum));
- printf("seq#: %d len: %d cnt: %d root: %d\n",
+ printf(_("seq#: %d len: %d cnt: %d root: %d\n"),
be32_to_cpu(agi->agi_seqno),
be32_to_cpu(agi->agi_length),
be32_to_cpu(agi->agi_count),
be32_to_cpu(agi->agi_root));
- printf("level: %d free#: 0x%x newino: 0x%x\n",
+ printf(_("level: %d free#: 0x%x newino: 0x%x\n"),
be32_to_cpu(agi->agi_level),
be32_to_cpu(agi->agi_freecount),
be32_to_cpu(agi->agi_newino));
@@ -339,14 +339,14 @@ xlog_print_trans_buffer(xfs_caddr_t *ptr, int len, int *i, int num_ops)
buckets = 32 + 17;
} else {
if (head->oh_flags & XLOG_CONTINUE_TRANS) {
- printf("AGI unlinked data skipped ");
- printf("(CONTINUE set, no space)\n");
+ printf(_("AGI unlinked data skipped "));
+ printf(_("(CONTINUE set, no space)\n"));
continue;
}
buckets = XFS_AGI_UNLINKED_BUCKETS;
}
for (bucket = 0; bucket < buckets;) {
- printf("bucket[%d - %d]: ", bucket, bucket+3);
+ printf(_("bucket[%d - %d]: "), bucket, bucket+3);
for (col = 0; col < 4; col++, bucket++) {
if (bucket < buckets) {
printf("0x%x ",
@@ -358,23 +358,23 @@ xlog_print_trans_buffer(xfs_caddr_t *ptr, int len, int *i, int num_ops)
}
} else if (be32_to_cpu(*(__be32 *)(*ptr)) == XFS_AGF_MAGIC) {
agf = (xfs_agf_t *)(*ptr);
- printf("AGF Buffer: XAGF ");
+ printf(_("AGF Buffer: XAGF "));
if (be32_to_cpu(head->oh_len) < sizeof(xfs_agf_t)) {
- printf("Out of space\n");
+ printf(_("Out of space\n"));
} else {
printf("\n");
- printf("ver: %d seq#: %d len: %d \n",
+ printf(_("ver: %d seq#: %d len: %d \n"),
be32_to_cpu(agf->agf_versionnum),
be32_to_cpu(agf->agf_seqno),
be32_to_cpu(agf->agf_length));
- printf("root BNO: %d CNT: %d\n",
+ printf(_("root BNO: %d CNT: %d\n"),
be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNOi]),
be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNTi]));
- printf("level BNO: %d CNT: %d\n",
+ printf(_("level BNO: %d CNT: %d\n"),
be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi]),
be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi]));
- printf("1st: %d last: %d cnt: %d "
- "freeblks: %d longest: %d\n",
+ printf(_("1st: %d last: %d cnt: %d "
+ "freeblks: %d longest: %d\n"),
be32_to_cpu(agf->agf_flfirst),
be32_to_cpu(agf->agf_fllast),
be32_to_cpu(agf->agf_flcount),
@@ -383,33 +383,33 @@ xlog_print_trans_buffer(xfs_caddr_t *ptr, int len, int *i, int num_ops)
}
} else if (be32_to_cpu(*(__be32 *)(*ptr)) == XFS_DQUOT_MAGIC) {
dq = (xfs_disk_dquot_t *)(*ptr);
- printf("DQUOT Buffer: DQ ");
+ printf(_("DQUOT Buffer: DQ "));
if (be32_to_cpu(head->oh_len) <
sizeof(xfs_disk_dquot_t)) {
- printf("Out of space\n");
+ printf(_("Out of space\n"));
}
else {
printf("\n");
- printf("ver: %d flags: 0x%x id: %d \n",
+ printf(_("ver: %d flags: 0x%x id: %d \n"),
dq->d_version, dq->d_flags,
be32_to_cpu(dq->d_id));
- printf("blk limits hard: %llu soft: %llu\n",
+ printf(_("blk limits hard: %llu soft: %llu\n"),
be64_to_cpu(dq->d_blk_hardlimit),
be64_to_cpu(dq->d_blk_softlimit));
- printf("blk count: %llu warns: %d timer: %d\n",
+ printf(_("blk count: %llu warns: %d timer: %d\n"),
be64_to_cpu(dq->d_bcount),
be16_to_cpu(dq->d_bwarns),
be32_to_cpu(dq->d_btimer));
- printf("ino limits hard: %llu soft: %llu\n",
+ printf(_("ino limits hard: %llu soft: %llu\n"),
be64_to_cpu(dq->d_ino_hardlimit),
be64_to_cpu(dq->d_ino_softlimit));
- printf("ino count: %llu warns: %d timer: %d\n",
+ printf(_("ino count: %llu warns: %d timer: %d\n"),
be64_to_cpu(dq->d_icount),
be16_to_cpu(dq->d_iwarns),
be32_to_cpu(dq->d_itimer));
}
} else {
- printf("BUF DATA\n");
+ printf(_("BUF DATA\n"));
if (print_data) {
uint *dp = (uint *)*ptr;
int nums = be32_to_cpu(head->oh_len) >> 2;
@@ -451,14 +451,14 @@ xlog_print_trans_efd(xfs_caddr_t *ptr, uint len)
f = &lbuf;
*ptr += len;
if (len >= core_size) {
- printf("EFD: #regs: %d num_extents: %d id: 0x%llx\n",
+ printf(_("EFD: #regs: %d num_extents: %d id: 0x%llx\n"),
f->efd_size, f->efd_nextents, (unsigned long long)f->efd_efi_id);
/* don't print extents as they are not used */
return 0;
} else {
- printf("EFD: Not enough data to decode further\n");
+ printf(_("EFD: Not enough data to decode further\n"));
return 1;
}
} /* xlog_print_trans_efd */
@@ -478,7 +478,7 @@ xlog_print_trans_efi(xfs_caddr_t *ptr, uint src_len)
* xfs_efi_log_format_t structure
*/
if ((src_f = (xfs_efi_log_format_t *)malloc(src_len)) == NULL) {
- fprintf(stderr, "%s: xlog_print_trans_efi: malloc failed\n", progname);
+ fprintf(stderr, _("%s: xlog_print_trans_efi: malloc failed\n"), progname);
exit(1);
}
memmove((char*)src_f, *ptr, src_len);
@@ -487,7 +487,7 @@ xlog_print_trans_efi(xfs_caddr_t *ptr, uint src_len)
/* convert to native format */
dst_len = sizeof(xfs_efi_log_format_t) + (src_f->efi_nextents - 1) * sizeof(xfs_extent_t);
if ((f = (xfs_efi_log_format_t *)malloc(dst_len)) == NULL) {
- fprintf(stderr, "%s: xlog_print_trans_efi: malloc failed\n", progname);
+ fprintf(stderr, _("%s: xlog_print_trans_efi: malloc failed\n"), progname);
exit(1);
}
if (xfs_efi_copy_format((char*)src_f, src_len, f)) {
@@ -495,7 +495,7 @@ xlog_print_trans_efi(xfs_caddr_t *ptr, uint src_len)
goto error;
}
- printf("EFI: #regs: %d num_extents: %d id: 0x%llx\n",
+ printf(_("EFI: #regs: %d num_extents: %d id: 0x%llx\n"),
f->efi_size, f->efi_nextents, (unsigned long long)f->efi_id);
ex = f->efi_extents;
for (i=0; i < f->efi_nextents; i++) {
@@ -522,10 +522,10 @@ xlog_print_trans_qoff(xfs_caddr_t *ptr, uint len)
f = &lbuf;
*ptr += len;
if (len >= sizeof(xfs_qoff_logformat_t)) {
- printf("QOFF: #regs: %d flags: 0x%x\n", f->qf_size, f->qf_flags);
+ printf(_("QOFF: #regs: %d flags: 0x%x\n"), f->qf_size, f->qf_flags);
return 0;
} else {
- printf("QOFF: Not enough data to decode further\n");
+ printf(_("QOFF: Not enough data to decode further\n"));
return 1;
}
} /* xlog_print_trans_qoff */
@@ -534,21 +534,21 @@ xlog_print_trans_qoff(xfs_caddr_t *ptr, uint len)
void
xlog_print_trans_inode_core(xfs_icdinode_t *ip)
{
- printf("INODE CORE\n");
- printf("magic 0x%hx mode 0%ho version %d format %d\n",
+ printf(_("INODE CORE\n"));
+ printf(_("magic 0x%hx mode 0%ho version %d format %d\n"),
ip->di_magic, ip->di_mode, (int)ip->di_version,
(int)ip->di_format);
- printf("nlink %hd uid %d gid %d\n",
+ printf(_("nlink %hd uid %d gid %d\n"),
ip->di_nlink, ip->di_uid, ip->di_gid);
- printf("atime 0x%x mtime 0x%x ctime 0x%x\n",
+ printf(_("atime 0x%x mtime 0x%x ctime 0x%x\n"),
ip->di_atime.t_sec, ip->di_mtime.t_sec, ip->di_ctime.t_sec);
- printf("size 0x%llx nblocks 0x%llx extsize 0x%x nextents 0x%x\n",
+ printf(_("size 0x%llx nblocks 0x%llx extsize 0x%x nextents 0x%x\n"),
(unsigned long long)ip->di_size, (unsigned long long)ip->di_nblocks,
ip->di_extsize, ip->di_nextents);
- printf("naextents 0x%x forkoff %d dmevmask 0x%x dmstate 0x%hx\n",
+ printf(_("naextents 0x%x forkoff %d dmevmask 0x%x dmstate 0x%hx\n"),
ip->di_anextents, (int)ip->di_forkoff, ip->di_dmevmask,
ip->di_dmstate);
- printf("flags 0x%x gen 0x%x\n",
+ printf(_("flags 0x%x gen 0x%x\n"),
ip->di_flags, ip->di_gen);
}
@@ -564,16 +564,16 @@ xlog_print_dir_sf(xfs_dir_shortform_t *sfp, int size)
/* XXX need to determine whether this is v1 or v2, then
print appropriate structure */
- printf("SHORTFORM DIRECTORY size %d\n",
+ printf(_("SHORTFORM DIRECTORY size %d\n"),
size);
/* bail out for now */
return;
- printf("SHORTFORM DIRECTORY size %d count %d\n",
+ printf(_("SHORTFORM DIRECTORY size %d count %d\n"),
size, sfp->hdr.count);
memmove(&ino, &(sfp->hdr.parent), sizeof(ino));
- printf(".. ino 0x%llx\n", be64_to_cpu(*(__be64 *)&ino));
+ printf(_(".. ino 0x%llx\n"), be64_to_cpu(*(__be64 *)&ino));
count = (uint)(sfp->hdr.count);
sfep = &(sfp->list[0]);
@@ -581,7 +581,7 @@ xlog_print_dir_sf(xfs_dir_shortform_t *sfp, int size)
memmove(&ino, &(sfep->inumber), sizeof(ino));
memmove(namebuf, (sfep->name), sfep->namelen);
namebuf[sfep->namelen] = '\0';
- printf("%s ino 0x%llx namelen %d\n",
+ printf(_("%s ino 0x%llx namelen %d\n"),
namebuf, (unsigned long long)ino, sfep->namelen);
sfep = xfs_dir_sf_nextentry(sfep);
}
@@ -613,16 +613,16 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
if (len == sizeof(xfs_inode_log_format_32_t) ||
len == sizeof(xfs_inode_log_format_64_t)) {
f = xfs_inode_item_format_convert((char*)&src_lbuf, len, &dst_lbuf);
- printf("INODE: ");
- printf("#regs: %d ino: 0x%llx flags: 0x%x dsize: %d\n",
+ printf(_("INODE: "));
+ printf(_("#regs: %d ino: 0x%llx flags: 0x%x dsize: %d\n"),
f->ilf_size, (unsigned long long)f->ilf_ino,
f->ilf_fields, f->ilf_dsize);
- printf(" blkno: %lld len: %d boff: %d\n",
+ printf(_(" blkno: %lld len: %d boff: %d\n"),
(long long)f->ilf_blkno, f->ilf_len, f->ilf_boffset);
} else {
ASSERT(len >= 4); /* must have at least 4 bytes if != 0 */
f = (xfs_inode_log_format_t *)&src_lbuf;
- printf("INODE: #regs: %d Not printing rest of data\n",
+ printf(_("INODE: #regs: %d Not printing rest of data\n"),
f->ilf_size);
return f->ilf_size;
}
@@ -655,7 +655,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
ASSERT(f->ilf_size == 3);
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
- printf("EXTENTS inode data\n");
+ printf(_("EXTENTS inode data\n"));
*ptr += be32_to_cpu(op_head->oh_len);
if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) {
return 1;
@@ -666,7 +666,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
ASSERT(f->ilf_size == 3);
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
- printf("BTREE inode data\n");
+ printf(_("BTREE inode data\n"));
*ptr += be32_to_cpu(op_head->oh_len);
if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) {
return 1;
@@ -677,7 +677,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
ASSERT(f->ilf_size == 3);
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
- printf("LOCAL inode data\n");
+ printf(_("LOCAL inode data\n"));
if (mode == S_IFDIR) {
xlog_print_dir_sf((xfs_dir_shortform_t*)*ptr, size);
}
@@ -691,7 +691,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
ASSERT(f->ilf_size == 3);
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
- printf("EXTENTS inode attr\n");
+ printf(_("EXTENTS inode attr\n"));
*ptr += be32_to_cpu(op_head->oh_len);
if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) {
return 1;
@@ -702,7 +702,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
ASSERT(f->ilf_size == 3);
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
- printf("BTREE inode attr\n");
+ printf(_("BTREE inode attr\n"));
*ptr += be32_to_cpu(op_head->oh_len);
if (XLOG_SET(op_head->oh_flags, XLOG_CONTINUE_TRANS)) {
return 1;
@@ -713,7 +713,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
ASSERT(f->ilf_size == 3);
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
- printf("LOCAL inode attr\n");
+ printf(_("LOCAL inode attr\n"));
if (mode == S_IFDIR) {
xlog_print_dir_sf((xfs_dir_shortform_t*)*ptr, size);
}
@@ -725,12 +725,12 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
}
case XFS_ILOG_DEV: {
ASSERT(f->ilf_size == 2);
- printf("DEV inode: no extra region\n");
+ printf(_("DEV inode: no extra region\n"));
break;
}
case XFS_ILOG_UUID: {
ASSERT(f->ilf_size == 2);
- printf("UUID inode: no extra region\n");
+ printf(_("UUID inode: no extra region\n"));
break;
}
case 0: {
@@ -738,7 +738,7 @@ xlog_print_trans_inode(xfs_caddr_t *ptr, int len, int *i, int num_ops)
break;
}
default: {
- xlog_panic("xlog_print_trans_inode: illegal inode type");
+ xlog_panic(_("xlog_print_trans_inode: illegal inode type"));
}
}
return 0;
@@ -766,12 +766,12 @@ xlog_print_trans_dquot(xfs_caddr_t *ptr, int len, int *i, int num_ops)
*ptr += len;
if (len == sizeof(xfs_dq_logformat_t)) {
- printf("#regs: %d id: 0x%x", f->qlf_size, f->qlf_id);
- printf(" blkno: %lld len: %d boff: %d\n",
+ printf(_("#regs: %d id: 0x%x"), f->qlf_size, f->qlf_id);
+ printf(_(" blkno: %lld len: %d boff: %d\n"),
(long long)f->qlf_blkno, f->qlf_len, f->qlf_boffset);
} else {
ASSERT(len >= 4); /* must have at least 4 bytes if != 0 */
- printf("DQUOT: #regs: %d Not printing rest of data\n",
+ printf(_("DQUOT: #regs: %d Not printing rest of data\n"),
f->qlf_size);
return f->qlf_size;
}
@@ -790,7 +790,7 @@ xlog_print_trans_dquot(xfs_caddr_t *ptr, int len, int *i, int num_ops)
xlog_print_op_header(head, *i, ptr);
ASSERT(be32_to_cpu(head->oh_len) == sizeof(xfs_disk_dquot_t));
memmove(&ddq, *ptr, sizeof(xfs_disk_dquot_t));
- printf("DQUOT: magic 0x%hx flags 0%ho\n",
+ printf(_("DQUOT: magic 0x%hx flags 0%ho\n"),
be16_to_cpu(ddq.d_magic), ddq.d_flags);
*ptr += be32_to_cpu(head->oh_len);
}
@@ -818,7 +818,7 @@ xlog_print_lseek(xlog_t *log, int fd, xfs_daddr_t blkno, int whence)
else
offset = BBTOOFF64(blkno);
if (lseek64(fd, offset, whence) < 0) {
- fprintf(stderr, "%s: lseek64 to %lld failed: %s\n",
+ fprintf(stderr, _("%s: lseek64 to %lld failed: %s\n"),
progname, (long long)offset, strerror(errno));
exit(1);
}
@@ -861,7 +861,7 @@ xlog_print_record(int fd,
/* read_type => don't malloc() new buffer, use old one */
if (*read_type == FULL_READ) {
if ((ptr = buf = (xfs_caddr_t)malloc(read_len)) == NULL) {
- fprintf(stderr, "%s: xlog_print_record: malloc failed\n", progname);
+ fprintf(stderr, _("%s: xlog_print_record: malloc failed\n"), progname);
exit(1);
}
} else {
@@ -870,7 +870,7 @@ xlog_print_record(int fd,
ptr = *partial_buf;
}
if ((ret = (int) read(fd, buf, read_len)) == -1) {
- fprintf(stderr, "%s: xlog_print_record: read error\n", progname);
+ fprintf(stderr, _("%s: xlog_print_record: read error\n"), progname);
exit(1);
}
/* Did we overflow the end? */
@@ -957,7 +957,7 @@ xlog_print_record(int fd,
}
if (xlog_print_find_tid(be32_to_cpu(op_head->oh_tid),
op_head->oh_flags & XLOG_WAS_CONT_TRANS)) {
- printf("Left over region from split log item\n");
+ printf(_("Left over region from split log item\n"));
ptr += be32_to_cpu(op_head->oh_len);
continue;
}
@@ -1001,12 +1001,12 @@ xlog_print_record(int fd,
break;
}
case XLOG_UNMOUNT_TYPE: {
- printf("Unmount filesystem\n");
+ printf(_("Unmount filesystem\n"));
skip = 0;
break;
}
default: {
- fprintf(stderr, "%s: unknown log operation type (%x)\n",
+ fprintf(stderr, _("%s: unknown log operation type (%x)\n"),
progname, *(unsigned short *)ptr);
if (print_exit) {
free(buf);
@@ -1041,7 +1041,7 @@ xlog_print_rec_head(xlog_rec_header_t *head, int *len)
return ZEROED_LOG;
if (be32_to_cpu(head->h_magicno) != XLOG_HEADER_MAGIC_NUM) {
- printf("Header 0x%x wanted 0x%x\n",
+ printf(_("Header 0x%x wanted 0x%x\n"),
be32_to_cpu(head->h_magicno),
XLOG_HEADER_MAGIC_NUM);
return BAD_HEADER;
@@ -1055,19 +1055,19 @@ xlog_print_rec_head(xlog_rec_header_t *head, int *len)
datalen=be32_to_cpu(head->h_len);
bbs=BTOBB(datalen);
- printf("cycle: %d version: %d ",
+ printf(_("cycle: %d version: %d "),
be32_to_cpu(head->h_cycle),
be32_to_cpu(head->h_version));
print_lsn(" lsn", &head->h_lsn);
print_lsn(" tail_lsn", &head->h_tail_lsn);
printf("\n");
- printf("length of Log Record: %d prev offset: %d num ops: %d\n",
+ printf(_("length of Log Record: %d prev offset: %d num ops: %d\n"),
datalen,
be32_to_cpu(head->h_prev_block),
be32_to_cpu(head->h_num_logops));
if (print_overwrite) {
- printf("cycle num overwrites: ");
+ printf(_("cycle num overwrites: "));
for (i=0; i< MIN(bbs, XLOG_HEADER_CYCLE_SIZE / BBSIZE); i++)
printf("%d - 0x%x ",
i,
@@ -1076,25 +1076,25 @@ xlog_print_rec_head(xlog_rec_header_t *head, int *len)
}
platform_uuid_unparse(&head->h_fs_uuid, uub);
- printf("uuid: %s format: ", uub);
+ printf(_("uuid: %s format: "), uub);
switch (be32_to_cpu(head->h_fmt)) {
case XLOG_FMT_UNKNOWN:
- printf("unknown\n");
+ printf(_("unknown\n"));
break;
case XLOG_FMT_LINUX_LE:
- printf("little endian linux\n");
+ printf(_("little endian linux\n"));
break;
case XLOG_FMT_LINUX_BE:
- printf("big endian linux\n");
+ printf(_("big endian linux\n"));
break;
case XLOG_FMT_IRIX_BE:
- printf("big endian irix\n");
+ printf(_("big endian irix\n"));
break;
default:
printf("? (%d)\n", be32_to_cpu(head->h_fmt));
break;
}
- printf("h_size: %d\n", be32_to_cpu(head->h_size));
+ printf(_("h_size: %d\n"), be32_to_cpu(head->h_size));
*len = be32_to_cpu(head->h_len);
return(be32_to_cpu(head->h_num_logops));
@@ -1106,10 +1106,10 @@ xlog_print_rec_xhead(xlog_rec_ext_header_t *head, int coverage)
int i;
print_xlog_xhdr_line();
- printf("extended-header: cycle: %d\n", be32_to_cpu(head->xh_cycle));
+ printf(_("extended-header: cycle: %d\n"), be32_to_cpu(head->xh_cycle));
if (print_overwrite) {
- printf("cycle num overwrites: ");
+ printf(_("cycle num overwrites: "));
for (i = 0; i < coverage; i++)
printf("%d - 0x%x ",
i,
@@ -1122,7 +1122,7 @@ static void
print_xlog_bad_zeroed(xfs_daddr_t blkno)
{
print_stars();
- printf("* ERROR: found data after zeroed blocks block=%-21lld *\n",
+ printf(_("* ERROR: found data after zeroed blocks block=%-21lld *\n"),
(long long)blkno);
print_stars();
if (print_exit)
@@ -1133,7 +1133,7 @@ static void
print_xlog_bad_header(xfs_daddr_t blkno, xfs_caddr_t buf)
{
print_stars();
- printf("* ERROR: header cycle=%-11d block=%-21lld *\n",
+ printf(_("* ERROR: header cycle=%-11d block=%-21lld *\n"),
xlog_get_cycle(buf), (long long)blkno);
print_stars();
if (print_exit)
@@ -1144,7 +1144,7 @@ void
print_xlog_bad_data(xfs_daddr_t blkno)
{
print_stars();
- printf("* ERROR: data block=%-21lld *\n",
+ printf(_("* ERROR: data block=%-21lld *\n"),
(long long)blkno);
print_stars();
if (print_exit)
@@ -1155,13 +1155,13 @@ static void
print_xlog_bad_reqd_hdrs(xfs_daddr_t blkno, int num_reqd, int num_hdrs)
{
print_stars();
- printf("* ERROR: for header block=%lld\n"
+ printf(_("* ERROR: for header block=%lld\n"
"* not enough hdrs for data length, "
- "required num = %d, hdr num = %d\n",
+ "required num = %d, hdr num = %d\n"),
(long long)blkno, num_reqd, num_hdrs);
print_stars();
if (print_exit)
- xlog_exit("Not enough headers for data length.");
+ xlog_exit(_("Not enough headers for data length."));
} /* print_xlog_bad_reqd_hdrs */
static void
@@ -1171,7 +1171,7 @@ xlog_reallocate_xhdrs(int num_hdrs, xlog_rec_ext_header_t **ret_xhdrs)
*ret_xhdrs = (xlog_rec_ext_header_t *)realloc(*ret_xhdrs, len);
if (*ret_xhdrs == NULL) {
- fprintf(stderr, "%s: xlog_print: malloc failed for ext hdrs\n", progname);
+ fprintf(stderr, _("%s: xlog_print: malloc failed for ext hdrs\n"), progname);
exit(1);
}
}
@@ -1217,13 +1217,13 @@ xlog_print_extended_headers(
for (i = 1, x = *ret_xhdrs; i < num_hdrs; i++, (*blkno)++, x++) {
/* read one extra header blk */
if (read(fd, xhbuf, 512) == 0) {
- printf("%s: physical end of log\n", progname);
+ printf(_("%s: physical end of log\n"), progname);
print_xlog_record_line();
/* reached the end so return 1 */
return 1;
}
if (print_only_data) {
- printf("BLKNO: %lld\n", (long long)*blkno);
+ printf(_("BLKNO: %lld\n"), (long long)*blkno);
xlog_recover_print_data(xhbuf, 512);
}
else {
@@ -1280,7 +1280,7 @@ void xfs_log_print(xlog_t *log,
* we still end at the end of the logical log.
*/
if ((error = xlog_print_find_oldest(log, &block_end))) {
- fprintf(stderr, "%s: problem finding oldest LR\n", progname);
+ fprintf(stderr, _("%s: problem finding oldest LR\n"), progname);
return;
}
if (print_block_start == -1)
@@ -1292,12 +1292,12 @@ void xfs_log_print(xlog_t *log,
for (;;) {
if (read(fd, hbuf, 512) == 0) {
- printf("%s: physical end of log\n", progname);
+ printf(_("%s: physical end of log\n"), progname);
print_xlog_record_line();
break;
}
if (print_only_data) {
- printf("BLKNO: %lld\n", (long long)blkno);
+ printf(_("BLKNO: %lld\n"), (long long)blkno);
xlog_recover_print_data(hbuf, 512);
blkno++;
goto loop;
@@ -1306,7 +1306,7 @@ void xfs_log_print(xlog_t *log,
blkno++;
if (zeroed && num_ops != ZEROED_LOG) {
- printf("%s: after %d zeroed blocks\n", progname, zeroed);
+ printf(_("%s: after %d zeroed blocks\n"), progname, zeroed);
/* once we find zeroed blocks - that's all we expect */
print_xlog_bad_zeroed(blkno-1);
/* reset count since we're assuming previous zeroed blocks
@@ -1358,7 +1358,7 @@ void xfs_log_print(xlog_t *log,
}
case PARTIAL_READ: {
print_xlog_record_line();
- printf("%s: physical end of log\n", progname);
+ printf(_("%s: physical end of log\n"), progname);
print_xlog_record_line();
blkno = 0;
xlog_print_lseek(log, fd, 0, SEEK_SET);
@@ -1370,32 +1370,32 @@ void xfs_log_print(xlog_t *log,
goto end;
goto partial_log_read;
}
- default: xlog_panic("illegal value");
+ default: xlog_panic(_("illegal value"));
}
print_xlog_record_line();
loop:
if (blkno >= logBBsize) {
if (cleared) {
- printf("%s: skipped %d cleared blocks in range: %lld - %lld\n",
+ printf(_("%s: skipped %d cleared blocks in range: %lld - %lld\n"),
progname, cleared,
(long long)(cleared_blkno),
(long long)(cleared + cleared_blkno - 1));
if (cleared == logBBsize)
- printf("%s: totally cleared log\n", progname);
+ printf(_("%s: totally cleared log\n"), progname);
cleared=0;
}
if (zeroed) {
- printf("%s: skipped %d zeroed blocks in range: %lld - %lld\n",
+ printf(_("%s: skipped %d zeroed blocks in range: %lld - %lld\n"),
progname, zeroed,
(long long)(zeroed_blkno),
(long long)(zeroed + zeroed_blkno - 1));
if (zeroed == logBBsize)
- printf("%s: totally zeroed log\n", progname);
+ printf(_("%s: totally zeroed log\n"), progname);
zeroed=0;
}
- printf("%s: physical end of log\n", progname);
+ printf(_("%s: physical end of log\n"), progname);
print_xlog_record_line();
break;
}
@@ -1407,10 +1407,10 @@ loop:
xlog_print_lseek(log, fd, 0, SEEK_SET);
for (;;) {
if (read(fd, hbuf, 512) == 0) {
- xlog_panic("xlog_find_head: bad read");
+ xlog_panic(_("xlog_find_head: bad read"));
}
if (print_only_data) {
- printf("BLKNO: %lld\n", (long long)blkno);
+ printf(_("BLKNO: %lld\n"), (long long)blkno);
xlog_recover_print_data(hbuf, 512);
blkno++;
goto loop2;
@@ -1463,7 +1463,7 @@ loop2:
}
end:
- printf("%s: logical end of log\n", progname);
+ printf(_("%s: logical end of log\n"), progname);
print_xlog_record_line();
}
@@ -1555,7 +1555,7 @@ xfs_efi_copy_format(char *buf, uint len, xfs_efi_log_format_t *dst_efi_fmt)
}
return 0;
}
- fprintf(stderr, "%s: bad size of efi format: %u; expected %u or %u; nextents = %u\n",
+ fprintf(stderr, _("%s: bad size of efi format: %u; expected %u or %u; nextents = %u\n"),
progname, len, len32, len64, nextents);
return 1;
}
diff --git a/logprint/log_print_all.c b/logprint/log_print_all.c
index 955d942..c21e05c 100644
--- a/logprint/log_print_all.c
+++ b/logprint/log_print_all.c
@@ -95,7 +95,7 @@ xlog_recover_print_buffer(
len = item->ri_buf[0].i_len;
printf(" ");
ASSERT(f->blf_type == XFS_LI_BUF);
- printf("BUF: #regs:%d start blkno:0x%llx len:%d bmap size:%d flags:0x%x\n",
+ printf(_("BUF: #regs:%d start blkno:0x%llx len:%d bmap size:%d flags:0x%x\n"),
f->blf_size, (long long)f->blf_blkno, f->blf_len, f->blf_map_size, f->blf_flags);
blkno = (xfs_daddr_t)f->blf_blkno;
num = f->blf_size-1;
@@ -105,51 +105,51 @@ xlog_recover_print_buffer(
len = item->ri_buf[i].i_len;
i++;
if (blkno == 0) { /* super block */
- printf(" SUPER Block Buffer:\n");
+ printf(_(" SUPER Block Buffer:\n"));
if (!print_buffer)
continue;
- printf(" icount:%Ld ifree:%Ld ",
+ printf(_(" icount:%Ld ifree:%Ld "),
be64_to_cpu(*(__be64 *)(p)),
be64_to_cpu(*(__be64 *)(p+8)));
- printf("fdblks:%Ld frext:%Ld\n",
+ printf(_("fdblks:%Ld frext:%Ld\n"),
be64_to_cpu(*(__be64 *)(p+16)),
be64_to_cpu(*(__be64 *)(p+24)));
- printf(" sunit:%u swidth:%u\n",
+ printf(_(" sunit:%u swidth:%u\n"),
be32_to_cpu(*(__be32 *)(p+56)),
be32_to_cpu(*(__be32 *)(p+60)));
} else if (be32_to_cpu(*(__be32 *)p) == XFS_AGI_MAGIC) {
agi = (xfs_agi_t *)p;
- printf(" AGI Buffer: (XAGI)\n");
+ printf(_(" AGI Buffer: (XAGI)\n"));
if (!print_buffer)
continue;
- printf(" ver:%d ",
+ printf(_(" ver:%d "),
be32_to_cpu(agi->agi_versionnum));
- printf("seq#:%d len:%d cnt:%d root:%d\n",
+ printf(_("seq#:%d len:%d cnt:%d root:%d\n"),
be32_to_cpu(agi->agi_seqno),
be32_to_cpu(agi->agi_length),
be32_to_cpu(agi->agi_count),
be32_to_cpu(agi->agi_root));
- printf(" level:%d free#:0x%x newino:0x%x\n",
+ printf(_(" level:%d free#:0x%x newino:0x%x\n"),
be32_to_cpu(agi->agi_level),
be32_to_cpu(agi->agi_freecount),
be32_to_cpu(agi->agi_newino));
} else if (be32_to_cpu(*(__be32 *)p) == XFS_AGF_MAGIC) {
agf = (xfs_agf_t *)p;
- printf(" AGF Buffer: (XAGF)\n");
+ printf(_(" AGF Buffer: (XAGF)\n"));
if (!print_buffer)
continue;
- printf(" ver:%d seq#:%d len:%d \n",
+ printf(_(" ver:%d seq#:%d len:%d \n"),
be32_to_cpu(agf->agf_versionnum),
be32_to_cpu(agf->agf_seqno),
be32_to_cpu(agf->agf_length));
- printf(" root BNO:%d CNT:%d\n",
+ printf(_(" root BNO:%d CNT:%d\n"),
be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNOi]),
be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNTi]));
- printf(" level BNO:%d CNT:%d\n",
+ printf(_(" level BNO:%d CNT:%d\n"),
be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi]),
be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi]));
- printf(" 1st:%d last:%d cnt:%d "
- "freeblks:%d longest:%d\n",
+ printf(_(" 1st:%d last:%d cnt:%d "
+ "freeblks:%d longest:%d\n"),
be32_to_cpu(agf->agf_flfirst),
be32_to_cpu(agf->agf_fllast),
be32_to_cpu(agf->agf_flcount),
@@ -157,15 +157,15 @@ xlog_recover_print_buffer(
be32_to_cpu(agf->agf_longest));
} else if (*(uint *)p == XFS_DQUOT_MAGIC) {
ddq = (xfs_disk_dquot_t *)p;
- printf(" DQUOT Buffer:\n");
+ printf(_(" DQUOT Buffer:\n"));
if (!print_buffer)
continue;
- printf(" UIDs 0x%lx-0x%lx\n",
+ printf(_(" UIDs 0x%lx-0x%lx\n"),
(unsigned long)be32_to_cpu(ddq->d_id),
(unsigned long)be32_to_cpu(ddq->d_id) +
(BBTOB(f->blf_len) / sizeof(xfs_dqblk_t)) - 1);
} else {
- printf(" BUF DATA\n");
+ printf(_(" BUF DATA\n"));
if (!print_buffer) continue;
xlog_recover_print_data(p, len);
}
@@ -187,7 +187,7 @@ xlog_recover_print_quotaoff(
strcat(str, "GROUP QUOTA");
if (qoff_f->qf_flags & XFS_PQUOTA_ACCT)
strcat(str, "PROJECT QUOTA");
- printf("\tQUOTAOFF: #regs:%d type:%s\n",
+ printf(_("\tQUOTAOFF: #regs:%d type:%s\n"),
qoff_f->qf_size, str);
}
@@ -202,27 +202,27 @@ xlog_recover_print_dquot(
ASSERT(f);
ASSERT(f->qlf_len == 1);
d = (xfs_disk_dquot_t *)item->ri_buf[1].i_addr;
- printf("\tDQUOT: #regs:%d blkno:%lld boffset:%u id: %d\n",
+ printf(_("\tDQUOT: #regs:%d blkno:%lld boffset:%u id: %d\n"),
f->qlf_size, (long long)f->qlf_blkno, f->qlf_boffset, f->qlf_id);
if (!print_quota)
return;
- printf("\t\tmagic 0x%x\tversion 0x%x\tID 0x%x (%d)\t\n",
+ printf(_("\t\tmagic 0x%x\tversion 0x%x\tID 0x%x (%d)\t\n"),
be16_to_cpu(d->d_magic),
d->d_version,
be32_to_cpu(d->d_id),
be32_to_cpu(d->d_id));
- printf("\t\tblk_hard 0x%x\tblk_soft 0x%x\tino_hard 0x%x"
- "\tino_soft 0x%x\n",
+ printf(_("\t\tblk_hard 0x%x\tblk_soft 0x%x\tino_hard 0x%x"
+ "\tino_soft 0x%x\n"),
(int)be64_to_cpu(d->d_blk_hardlimit),
(int)be64_to_cpu(d->d_blk_softlimit),
(int)be64_to_cpu(d->d_ino_hardlimit),
(int)be64_to_cpu(d->d_ino_softlimit));
- printf("\t\tbcount 0x%x (%d) icount 0x%x (%d)\n",
+ printf(_("\t\tbcount 0x%x (%d) icount 0x%x (%d)\n"),
(int)be64_to_cpu(d->d_bcount),
(int)be64_to_cpu(d->d_bcount),
(int)be64_to_cpu(d->d_icount),
(int)be64_to_cpu(d->d_icount));
- printf("\t\tbtimer 0x%x itimer 0x%x \n",
+ printf(_("\t\tbtimer 0x%x itimer 0x%x \n"),
(int)be32_to_cpu(d->d_btimer),
(int)be32_to_cpu(d->d_itimer));
}
@@ -231,24 +231,24 @@ STATIC void
xlog_recover_print_inode_core(
xfs_icdinode_t *di)
{
- printf(" CORE inode:\n");
+ printf(_(" CORE inode:\n"));
if (!print_inode)
return;
- printf(" magic:%c%c mode:0x%x ver:%d format:%d "
- "onlink:%d\n",
+ printf(_(" magic:%c%c mode:0x%x ver:%d format:%d "
+ "onlink:%d\n"),
(di->di_magic>>8) & 0xff, di->di_magic & 0xff,
di->di_mode, di->di_version, di->di_format, di->di_onlink);
- printf(" uid:%d gid:%d nlink:%d projid:%d\n",
+ printf(_(" uid:%d gid:%d nlink:%d projid:%d\n"),
di->di_uid, di->di_gid, di->di_nlink, (uint)di->di_projid);
- printf(" atime:%d mtime:%d ctime:%d\n",
+ printf(_(" atime:%d mtime:%d ctime:%d\n"),
di->di_atime.t_sec, di->di_mtime.t_sec, di->di_ctime.t_sec);
- printf(" flushiter:%d\n", di->di_flushiter);
- printf(" size:0x%llx nblks:0x%llx exsize:%d "
- "nextents:%d anextents:%d\n", (unsigned long long)
+ printf(_(" flushiter:%d\n"), di->di_flushiter);
+ printf(_(" size:0x%llx nblks:0x%llx exsize:%d "
+ "nextents:%d anextents:%d\n"), (unsigned long long)
di->di_size, (unsigned long long)di->di_nblocks,
di->di_extsize, di->di_nextents, (int)di->di_anextents);
- printf(" forkoff:%d dmevmask:0x%x dmstate:%d flags:0x%x "
- "gen:%d\n",
+ printf(_(" forkoff:%d dmevmask:0x%x dmstate:%d flags:0x%x "
+ "gen:%d\n"),
(int)di->di_forkoff, di->di_dmevmask, (int)di->di_dmstate,
(int)di->di_flags, di->di_gen);
}
@@ -267,7 +267,7 @@ xlog_recover_print_inode(
item->ri_buf[0].i_len == sizeof(xfs_inode_log_format_64_t));
f = xfs_inode_item_format_convert(item->ri_buf[0].i_addr, item->ri_buf[0].i_len, &f_buf);
- printf(" INODE: #regs:%d ino:0x%llx flags:0x%x dsize:%d\n",
+ printf(_(" INODE: #regs:%d ino:0x%llx flags:0x%x dsize:%d\n"),
f->ilf_size, (unsigned long long)f->ilf_ino, f->ilf_fields,
f->ilf_dsize);
@@ -282,32 +282,32 @@ xlog_recover_print_inode(
switch (f->ilf_fields & (XFS_ILOG_DFORK|XFS_ILOG_DEV|XFS_ILOG_UUID)) {
case XFS_ILOG_DEXT:
ASSERT(f->ilf_size == 3 + hasattr);
- printf(" DATA FORK EXTENTS inode data:\n");
+ printf(_(" DATA FORK EXTENTS inode data:\n"));
if (print_inode && print_data)
xlog_recover_print_data(item->ri_buf[2].i_addr,
item->ri_buf[2].i_len);
break;
case XFS_ILOG_DBROOT:
ASSERT(f->ilf_size == 3 + hasattr);
- printf(" DATA FORK BTREE inode data:\n");
+ printf(_(" DATA FORK BTREE inode data:\n"));
if (print_inode && print_data)
xlog_recover_print_data(item->ri_buf[2].i_addr,
item->ri_buf[2].i_len);
break;
case XFS_ILOG_DDATA:
ASSERT(f->ilf_size == 3 + hasattr);
- printf(" DATA FORK LOCAL inode data:\n");
+ printf(_(" DATA FORK LOCAL inode data:\n"));
if (print_inode && print_data)
xlog_recover_print_data(item->ri_buf[2].i_addr,
item->ri_buf[2].i_len);
break;
case XFS_ILOG_DEV:
ASSERT(f->ilf_size == 2 + hasattr);
- printf(" DEV inode: no extra region\n");
+ printf(_(" DEV inode: no extra region\n"));
break;
case XFS_ILOG_UUID:
ASSERT(f->ilf_size == 2 + hasattr);
- printf(" UUID inode: no extra region\n");
+ printf(_(" UUID inode: no extra region\n"));
break;
case 0:
@@ -322,7 +322,7 @@ xlog_recover_print_inode(
switch (f->ilf_fields & XFS_ILOG_AFORK) {
case XFS_ILOG_AEXT:
ASSERT(f->ilf_size == 3 + hasdata);
- printf(" ATTR FORK EXTENTS inode data:\n");
+ printf(_(" ATTR FORK EXTENTS inode data:\n"));
if (print_inode && print_data)
xlog_recover_print_data(
item->ri_buf[attr_index].i_addr,
@@ -330,7 +330,7 @@ xlog_recover_print_inode(
break;
case XFS_ILOG_ABROOT:
ASSERT(f->ilf_size == 3 + hasdata);
- printf(" ATTR FORK BTREE inode data:\n");
+ printf(_(" ATTR FORK BTREE inode data:\n"));
if (print_inode && print_data)
xlog_recover_print_data(
item->ri_buf[attr_index].i_addr,
@@ -338,7 +338,7 @@ xlog_recover_print_inode(
break;
case XFS_ILOG_ADATA:
ASSERT(f->ilf_size == 3 + hasdata);
- printf(" ATTR FORK LOCAL inode data:\n");
+ printf(_(" ATTR FORK LOCAL inode data:\n"));
if (print_inode && print_data)
xlog_recover_print_data(
item->ri_buf[attr_index].i_addr,
@@ -363,7 +363,7 @@ xlog_recover_print_efd(
* Each element is of size xfs_extent_32_t or xfs_extent_64_t.
* However, the extents are never used and won't be printed.
*/
- printf(" EFD: #regs: %d num_extents: %d id: 0x%llx\n",
+ printf(_(" EFD: #regs: %d num_extents: %d id: 0x%llx\n"),
f->efd_size, f->efd_nextents, (unsigned long long)f->efd_efi_id);
}
@@ -387,7 +387,7 @@ xlog_recover_print_efi(
*/
dst_len = sizeof(xfs_efi_log_format_t) + (src_f->efi_nextents - 1) * sizeof(xfs_extent_t);
if ((f = (xfs_efi_log_format_t *)malloc(dst_len)) == NULL) {
- fprintf(stderr, "%s: xlog_recover_print_efi: malloc failed\n", progname);
+ fprintf(stderr, _("%s: xlog_recover_print_efi: malloc failed\n"), progname);
exit(1);
}
if (xfs_efi_copy_format((char*)src_f, src_len, f)) {
@@ -395,7 +395,7 @@ xlog_recover_print_efi(
return;
}
- printf(" EFI: #regs:%d num_extents:%d id:0x%llx\n",
+ printf(_(" EFI: #regs:%d num_extents:%d id:0x%llx\n"),
f->efi_size, f->efi_nextents, (unsigned long long)f->efi_id);
ex = f->efi_extents;
printf(" ");
@@ -435,7 +435,7 @@ xlog_recover_print_logitem(
xlog_recover_print_quotaoff(item);
break;
default:
- printf("xlog_recover_print_logitem: illegal type\n");
+ printf(_("xlog_recover_print_logitem: illegal type\n"));
break;
}
}
@@ -466,17 +466,17 @@ xlog_recover_print_item(
printf("QOFF");
break;
default:
- cmn_err(CE_PANIC, "%s: illegal type", __FUNCTION__);
+ cmn_err(CE_PANIC, _("%s: illegal type"), __FUNCTION__);
break;
}
/* type isn't filled in yet
- printf("ITEM: type: %d cnt: %d total: %d ",
+ printf(_("ITEM: type: %d cnt: %d total: %d "),
item->ri_type, item->ri_cnt, item->ri_total);
*/
- printf(": cnt:%d total:%d ", item->ri_cnt, item->ri_total);
+ printf(_(": cnt:%d total:%d "), item->ri_cnt, item->ri_total);
for (i=0; i<item->ri_cnt; i++) {
- printf("a:0x%lx len:%d ",
+ printf(_("a:0x%lx len:%d "),
(long)item->ri_buf[i].i_addr, item->ri_buf[i].i_len);
}
printf("\n");
diff --git a/logprint/log_print_trans.c b/logprint/log_print_trans.c
index d0f9481..8b21257 100644
--- a/logprint/log_print_trans.c
+++ b/logprint/log_print_trans.c
@@ -22,7 +22,7 @@ void
xlog_recover_print_trans_head(
xlog_recover_t *tr)
{
- printf("TRANS: tid:0x%x type:%s #items:%d trans:0x%x q:0x%lx\n",
+ printf(_("TRANS: tid:0x%x type:%s #items:%d trans:0x%x q:0x%lx\n"),
tr->r_log_tid, trans_type[tr->r_theader.th_type],
tr->r_theader.th_num_items,
tr->r_theader.th_tid, (long)tr->r_itemq);
@@ -48,18 +48,18 @@ xfs_log_print_trans(
error = xlog_find_tail(log, &head_blk, &tail_blk);
if (error) {
- fprintf(stderr, "%s: failed to find head and tail, error: %d\n",
+ fprintf(stderr, _("%s: failed to find head and tail, error: %d\n"),
progname, error);
exit(1);
}
- printf(" log tail: %lld head: %lld state: %s\n",
+ printf(_(" log tail: %lld head: %lld state: %s\n"),
(long long)tail_blk,
(long long)head_blk,
(tail_blk == head_blk)?"<CLEAN>":"<DIRTY>");
if (print_block_start != -1) {
- printf(" override tail: %d\n", print_block_start);
+ printf(_(" override tail: %d\n"), print_block_start);
tail_blk = print_block_start;
}
printf("\n");
@@ -69,7 +69,7 @@ xfs_log_print_trans(
if (head_blk == tail_blk)
return;
if ((error = xlog_do_recovery_pass(log, head_blk, tail_blk, XLOG_RECOVER_PASS1))) {
- fprintf(stderr, "%s: failed in xfs_do_recovery_pass, error: %d\n",
+ fprintf(stderr, _("%s: failed in xfs_do_recovery_pass, error: %d\n"),
progname, error);
exit(1);
}
diff --git a/logprint/logprint.c b/logprint/logprint.c
index 8af0943..482fd4e 100644
--- a/logprint/logprint.c
+++ b/logprint/logprint.c
@@ -39,7 +39,7 @@ int print_operation = OP_PRINT;
void
usage(void)
{
- fprintf(stderr, "Usage: %s [options...] <device>\n\n\
+ fprintf(stderr, _("Usage: %s [options...] <device>\n\n\
Options:\n\
-c try to continue if error found in log\n\
-C <filename> copy the log from the filesystem to filename\n\
@@ -55,7 +55,7 @@ Options:\n\
-i in transactional view, extract inode info\n\
-q in transactional view, extract quota info\n\
-D print only data; no decoding\n\
- -V print version information\n",
+ -V print version information\n"),
progname);
exit(1);
}
@@ -72,13 +72,13 @@ logstat(xfs_mount_t *mp)
* log. Otherwise we end up seeking forever. -- mkp
*/
if ((fd = open(x.dname, O_RDONLY)) == -1) {
- fprintf(stderr, " Can't open device %s: %s\n",
+ fprintf(stderr, _(" Can't open device %s: %s\n"),
x.dname, strerror(errno));
exit(1);
}
lseek64(fd, 0, SEEK_SET);
if (read(fd, buf, sizeof(buf)) != sizeof(buf)) {
- fprintf(stderr, " read of XFS superblock failed\n");
+ fprintf(stderr, _(" read of XFS superblock failed\n"));
exit(1);
}
close (fd);
@@ -94,7 +94,7 @@ logstat(xfs_mount_t *mp)
x.logBBsize = XFS_FSB_TO_BB(mp, sb->sb_logblocks);
x.logBBstart = XFS_FSB_TO_DADDR(mp, sb->sb_logstart);
if (!x.logname && sb->sb_logstart == 0) {
- fprintf(stderr, " external log device not specified\n\n");
+ fprintf(stderr, _(" external log device not specified\n\n"));
usage();
/*NOTREACHED*/
}
@@ -109,7 +109,7 @@ logstat(xfs_mount_t *mp)
if (x.logname && *x.logname) { /* External log */
if ((fd = open(x.logname, O_RDONLY)) == -1) {
- fprintf(stderr, "Can't open file %s: %s\n",
+ fprintf(stderr, _("Can't open file %s: %s\n"),
x.logname, strerror(errno));
exit(1);
}
@@ -131,6 +131,10 @@ main(int argc, char **argv)
xlog_t log = {0};
xfs_mount_t mount;
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
progname = basename(argv[0]);
while ((c = getopt(argc, argv, "bC:cdefl:iqnors:tDVv")) != EOF) {
switch (c) {
@@ -189,7 +193,7 @@ main(int argc, char **argv)
print_overwrite++;
break;
case 'V':
- printf("%s version %s\n", progname, VERSION);
+ printf(_("%s version %s\n"), progname, VERSION);
exit(0);
case '?':
usage();
@@ -205,7 +209,7 @@ main(int argc, char **argv)
usage();
x.isreadonly = LIBXFS_ISINACTIVE;
- printf("xfs_logprint:\n");
+ printf(_("xfs_logprint:\n"));
if (!libxfs_init(&x))
exit(1);
@@ -213,15 +217,15 @@ main(int argc, char **argv)
logfd = (x.logfd < 0) ? x.dfd : x.logfd;
- printf(" data device: 0x%llx\n", (unsigned long long)x.ddev);
+ printf(_(" data device: 0x%llx\n"), (unsigned long long)x.ddev);
if (x.logname) {
- printf(" log file: \"%s\" ", x.logname);
+ printf(_(" log file: \"%s\" "), x.logname);
} else {
- printf(" log device: 0x%llx ", (unsigned long long)x.logdev);
+ printf(_(" log device: 0x%llx "), (unsigned long long)x.logdev);
}
- printf("daddr: %lld length: %lld\n\n",
+ printf(_("daddr: %lld length: %lld\n\n"),
(long long)x.logBBstart, (long long)x.logBBsize);
ASSERT(x.logBBsize <= INT_MAX);
diff --git a/repair/avl.c b/repair/avl.c
index 169c859..eabecc3 100644
--- a/repair/avl.c
+++ b/repair/avl.c
@@ -1203,7 +1203,7 @@ main()
printf("\n");
while (1) {
- printf("Command [fpdir] : ");
+ printf(_("Command [fpdir] : "));
fgets(linebuf, 256, stdin);
if (feof(stdin)) break;
cmd[0] = NULL;
@@ -1212,7 +1212,7 @@ main()
switch (cmd[0]) {
case 'd':
case 'f':
- printf("end of range ? ");
+ printf(_("end of range ? "));
fgets(linebuf, 256, stdin);
j = atoi(linebuf);
@@ -1223,7 +1223,7 @@ main()
if (cmd[0] == 'd')
avl_delete(&tree, np);
} else
- printf("Cannot find %d\n", i);
+ printf(_("Cannot find %d\n"), i);
break;
case 'p':
avl_print(&tree, tree.avl_root, 0);
@@ -1236,7 +1236,7 @@ main()
np = alloc_avlnode();
ASSERT(np);
np->avl_start = i;
- printf("size of range ? ");
+ printf(_("size of range ? "));
fgets(linebuf, 256, stdin);
j = atoi(linebuf);
@@ -1247,18 +1247,18 @@ main()
avlnode_t *b, *e, *t;
int checklen;
- printf("End of range ? ");
+ printf(_("End of range ? "));
fgets(linebuf, 256, stdin);
j = atoi(linebuf);
- printf("checklen 0/1 ? ");
+ printf(_("checklen 0/1 ? "));
fgets(linebuf, 256, stdin);
checklen = atoi(linebuf);
b = avl_findanyrange(&tree, i, j, checklen);
if (b) {
- printf("Found something\n");
+ printf(_("Found something\n"));
t = b;
while (t) {
if (t != b &&
diff --git a/repair/avl64.c b/repair/avl64.c
index fc4cab4..c135da3 100644
--- a/repair/avl64.c
+++ b/repair/avl64.c
@@ -1224,7 +1224,7 @@ main()
printf("\n");
while (1) {
- printf("Command [fpdir] : ");
+ printf(_("Command [fpdir] : "));
fgets(linebuf, 256, stdin);
if (feof(stdin)) break;
cmd[0] = NULL;
@@ -1233,7 +1233,7 @@ main()
switch (cmd[0]) {
case 'd':
case 'f':
- printf("end of range ? ");
+ printf(_("end of range ? "));
fgets(linebuf, 256, stdin);
j = atoi(linebuf);
@@ -1244,7 +1244,7 @@ main()
if (cmd[0] == 'd')
avl64_delete(&tree, np);
} else
- printf("Cannot find %d\n", i);
+ printf(_("Cannot find %d\n"), i);
break;
case 'p':
avl64_print(&tree, tree.avl_root, 0);
@@ -1257,7 +1257,7 @@ main()
np = alloc_avlnode();
ASSERT(np);
np->avl_start = i;
- printf("size of range ? ");
+ printf(_("size of range ? "));
fgets(linebuf, 256, stdin);
j = atoi(linebuf);
@@ -1268,18 +1268,18 @@ main()
avl64node_t *b, *e, *t;
int checklen;
- printf("End of range ? ");
+ printf(_("End of range ? "));
fgets(linebuf, 256, stdin);
j = atoi(linebuf);
- printf("checklen 0/1 ? ");
+ printf(_("checklen 0/1 ? "));
fgets(linebuf, 256, stdin);
checklen = atoi(linebuf);
b = avl64_findanyrange(&tree, i, j, checklen);
if (b) {
- printf("Found something\n");
+ printf(_("Found something\n"));
t = b;
while (t) {
if (t != b &&
diff --git a/repair/dinode.c b/repair/dinode.c
index 28cc450..fdf52db 100644
--- a/repair/dinode.c
+++ b/repair/dinode.c
@@ -2774,7 +2774,7 @@ process_dinode(
const int uncertain = 0;
#ifdef XR_INODE_TRACE
- fprintf(stderr, "processing inode %d/%d\n", agno, ino);
+ fprintf(stderr, _("processing inode %d/%d\n"), agno, ino);
#endif
return process_dinode_int(mp, dino, agno, ino, was_free, dirty, used,
verify_mode, uncertain, ino_discovery,
diff --git a/repair/init.c b/repair/init.c
index 18298b6..8e508c4 100644
--- a/repair/init.c
+++ b/repair/init.c
@@ -91,7 +91,7 @@ increase_rlimit(void)
/* Increase limits */
if (getrlimit(RLIMIT_FSIZE, &rl) == -1) {
perror("getrlimit");
- fprintf(stderr, "getrlimit(RLIMIT_FSIZE) failed!\n");
+ fprintf(stderr, _("getrlimit(RLIMIT_FSIZE) failed!\n"));
exit(1);
}
if (rl.rlim_cur != RLIM_INFINITY) {
@@ -99,7 +99,7 @@ increase_rlimit(void)
if (setrlimit(RLIMIT_FSIZE, &rl) == -1) {
perror("setrlimit");
fprintf(stderr,
- "setrlimit failed - current: %lld, max: %lld\n",
+ _("setrlimit failed - current: %lld, max: %lld\n"),
(unsigned long long)rl.rlim_cur,
(unsigned long long)rl.rlim_max);
exit(1);
--
1.6.1.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic