int si_skip;
} xlog_split_item_t;
-xlog_split_item_t *split_list = NULL;
+static xlog_split_item_t *split_list = NULL;
void
print_xlog_op_line(void)
"--------------------------------------\n");
} /* print_xlog_op_line */
-void
+static void
print_xlog_xhdr_line(void)
{
printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
* Given a pointer to a data segment, print out the data as if it were
* a log operation header.
*/
-void
+static void
xlog_print_op_header(xlog_op_header_t *op_head,
int i,
char **ptr)
} /* xlog_print_op_header */
-void
+static void
xlog_print_add_to_trans(xlog_tid_t tid,
int skip)
{
} /* xlog_print_add_to_trans */
-int
+static int
xlog_print_find_tid(xlog_tid_t tid, uint was_cont)
{
xlog_split_item_t *listp = split_list;
return 1;
} /* xlog_print_find_tid */
-int
+static int
xlog_print_trans_header(char **ptr, int len)
{
xfs_trans_header_t *h;
} /* xlog_print_trans_header */
-int
+static int
xlog_print_trans_buffer(char **ptr, int len, int *i, int num_ops)
{
xfs_buf_log_format_t *f;
int64_t blkno;
xfs_buf_log_format_t lbuf;
int size, blen, map_size, struct_size;
- __be64 x, y;
unsigned short flags;
/*
if (be32_to_cpu(head->oh_len) < 4*8) {
printf(_("Out of space\n"));
} else {
+ __be64 a, b;
+
printf("\n");
/*
* memmove because *ptr may not be 8-byte aligned
*/
- memmove(&x, *ptr, sizeof(__be64));
- memmove(&y, *ptr+8, sizeof(__be64));
- printf(_("icount: %llu ifree: %llu "),
- (unsigned long long) be64_to_cpu(x),
- (unsigned long long) be64_to_cpu(y));
- memmove(&x, *ptr+16, sizeof(__be64));
- memmove(&y, *ptr+24, sizeof(__be64));
- printf(_("fdblks: %llu frext: %llu\n"),
- (unsigned long long) be64_to_cpu(x),
- (unsigned long long) be64_to_cpu(y));
+ memmove(&a, *ptr, sizeof(__be64));
+ memmove(&b, *ptr+8, sizeof(__be64));
+ printf(_("icount: %llu ifree: %llu "),
+ (unsigned long long) be64_to_cpu(a),
+ (unsigned long long) be64_to_cpu(b));
+ memmove(&a, *ptr+16, sizeof(__be64));
+ memmove(&b, *ptr+24, sizeof(__be64));
+ printf(_("fdblks: %llu frext: %llu\n"),
+ (unsigned long long) be64_to_cpu(a),
+ (unsigned long long) be64_to_cpu(b));
}
super_block = 0;
} else if (be32_to_cpu(*(__be32 *)(*ptr)) == XFS_AGI_MAGIC) {
if (print_data) {
uint *dp = (uint *)*ptr;
int nums = be32_to_cpu(head->oh_len) >> 2;
- int i = 0;
+ int byte = 0;
- while (i < nums) {
- if ((i % 8) == 0)
- printf("%2x ", i);
+ while (byte < nums) {
+ if ((byte % 8) == 0)
+ printf("%2x ", byte);
printf("%8x ", *dp);
dp++;
- i++;
- if ((i % 8) == 0)
+ byte++;
+ if ((byte % 8) == 0)
printf("\n");
}
printf("\n");
} /* xlog_print_trans_buffer */
-int
+static int
xlog_print_trans_qoff(char **ptr, uint len)
{
xfs_qoff_logformat_t *f;
} /* xlog_print_trans_qoff */
-void
+static void
xlog_print_trans_inode_core(
struct xfs_log_dinode *ip)
{
}
}
-void
+static void
xlog_print_dir2_sf(
struct xlog *log,
xfs_dir2_sf_hdr_t *sfp,
int size)
{
+ __be64 pino; /* parent inode nr */
xfs_ino_t ino;
int count;
int i;
printf(_("SHORTFORM DIRECTORY size %d count %d\n"),
size, sfp->count);
- memmove(&ino, &(sfp->parent), sizeof(ino));
- printf(_(".. ino 0x%llx\n"), (unsigned long long) be64_to_cpu(ino));
+ memmove(&pino, &(sfp->parent), sizeof(pino));
+ printf(_(".. ino 0x%llx\n"), (unsigned long long) be64_to_cpu(pino));
count = sfp->count;
sfep = xfs_dir2_sf_firstentry(sfp);
}
}
-int
+static int
xlog_print_trans_inode(
struct xlog *log,
char **ptr,
} /* xlog_print_trans_inode */
-int
+static int
xlog_print_trans_dquot(char **ptr, int len, int *i, int num_ops)
{
xfs_dq_logformat_t *f;
} /* xlog_print_lseek */
-void
+static void
print_lsn(char *string,
__be64 *lsn)
{
}
-int
+static int
xlog_print_record(
struct xlog *log,
int fd,
} /* xlog_print_record */
-int
+static int
xlog_print_rec_head(xlog_rec_header_t *head, int *len, int bad_hdr_warn)
{
int i;
return(be32_to_cpu(head->h_num_logops));
} /* xlog_print_rec_head */
-void
+static void
xlog_print_rec_xhead(xlog_rec_ext_header_t *head, int coverage)
{
int i;
xlog_exit("Bad log record header");
} /* print_xlog_bad_header */
-void
+static void
print_xlog_bad_data(xfs_daddr_t blkno)
{
print_stars();
int num_hdrs;
int num_required;
char xhbuf[XLOG_HEADER_SIZE];
- xlog_rec_ext_header_t *x;
+ xlog_rec_ext_header_t *xhdr;
num_required = howmany(len, XLOG_HEADER_CYCLE_SIZE);
num_hdrs = be32_to_cpu(hdr->h_size) / XLOG_HEADER_CYCLE_SIZE;
*ret_num_hdrs = num_hdrs;
/* don't include 1st header */
- for (i = 1, x = *ret_xhdrs; i < num_hdrs; i++, (*blkno)++, x++) {
+ for (i = 1, xhdr = *ret_xhdrs; i < num_hdrs; i++, (*blkno)++, xhdr++) {
/* read one extra header blk */
if (read(fd, xhbuf, 512) == 0) {
printf(_("%s: physical end of log\n"), progname);
* will look asymmetric with the 1 hdr normal case
* which does endian coversion on access.
*/
- x->xh_cycle = ((xlog_rec_ext_header_t*)xhbuf)->xh_cycle;
+ xhdr->xh_cycle = ((xlog_rec_ext_header_t*)xhbuf)->xh_cycle;
for (j = 0; j < XLOG_HEADER_CYCLE_SIZE / BBSIZE; j++) {
- x->xh_cycle_data[j] =
+ xhdr->xh_cycle_data[j] =
((xlog_rec_ext_header_t*)xhbuf)->xh_cycle_data[j];
}
}