From: Nathan Scott Date: Thu, 8 Dec 2005 14:14:52 +0000 (+0000) Subject: Couple of trivial fixes - cvtnum and EFI/EFD log printing. X-Git-Tag: v2.8.0~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f63b46a2c42b024b35a1fbc95ce4a08e6cfd2b17;p=thirdparty%2Fxfsprogs-dev.git Couple of trivial fixes - cvtnum and EFI/EFD log printing. Merge of master-melb:xfs-cmds:24743a by kenmcd. --- diff --git a/VERSION b/VERSION index 0516f7bcb..054cd1c57 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=7 -PKG_REVISION=8 +PKG_REVISION=9 PKG_BUILD=1 diff --git a/debian/changelog b/debian/changelog index 4d91ece2e..496f04476 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -xfsprogs (2.7.8-1) unstable; urgency=low +xfsprogs (2.7.9-1) unstable; urgency=low * New upstream release. - -- Nathan Scott Mon, 05 Dec 2005 15:12:06 +1100 + -- Nathan Scott Thu, 08 Dec 2005 15:09:05 +1100 xfsprogs (2.7.7-1) unstable; urgency=low diff --git a/doc/CHANGES b/doc/CHANGES index db7a1387d..655b39e7e 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,7 @@ +xfsprogs-2.7.9 (08 December 2005) + - Fix thinko in libxcmd cvtnum routine + - Fix EFI/EFD printing in xfs_logprint + xfsprogs-2.7.8 (05 December 2005) - Extend xfs_io to do aligned direct IO automatically - Report direct IO parameters (dioinfo) in xfs_io diff --git a/libxcmd/input.c b/libxcmd/input.c index 6ee3176eb..4691f0213 100644 --- a/libxcmd/input.c +++ b/libxcmd/input.c @@ -158,7 +158,7 @@ cvtnum( if (*sp == '\0') return i; - if (sp[1] == '\0') + if (sp[1] != '\0') return -1LL; c = tolower(*sp); diff --git a/logprint/log_misc.c b/logprint/log_misc.c index efbe208f4..fed4dbb80 100644 --- a/logprint/log_misc.c +++ b/logprint/log_misc.c @@ -478,17 +478,19 @@ xlog_print_trans_efd(xfs_caddr_t *ptr, uint len) * bcopy to ensure 8-byte alignment for the long longs in * xfs_efd_log_format_t structure */ - bcopy(*ptr, &lbuf, sizeof(xfs_efd_log_format_t)); + bcopy(*ptr, &lbuf, len); f = &lbuf; *ptr += len; if (len >= sizeof(xfs_efd_log_format_t)) { printf("EFD: #regs: %d num_extents: %d id: 0x%llx\n", f->efd_size, f->efd_nextents, (unsigned long long)f->efd_efi_id); ex = f->efd_extents; - for (i=0; i< f->efd_size; i++) { + len -= (sizeof(xfs_efd_log_format_t) - sizeof(xfs_extent_t)); + for (i = 0; len > 0 && i < f->efd_nextents; i++) { printf("(s: 0x%llx, l: %d) ", (unsigned long long)ex->ext_start, ex->ext_len); if (i % 4 == 3) printf("\n"); + len -= sizeof(xfs_extent_t); ex++; } if (i % 4 != 0) printf("\n"); @@ -512,17 +514,19 @@ xlog_print_trans_efi(xfs_caddr_t *ptr, uint len) * bcopy to ensure 8-byte alignment for the long longs in * xfs_efi_log_format_t structure */ - bcopy(*ptr, &lbuf, sizeof(xfs_efi_log_format_t)); + bcopy(*ptr, &lbuf, len); f = &lbuf; *ptr += len; if (len >= sizeof(xfs_efi_log_format_t)) { 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_size; i++) { + len -= (sizeof(xfs_efi_log_format_t) - sizeof(xfs_extent_t)); + for (i=0; len > 0 && i < f->efi_nextents; i++) { printf("(s: 0x%llx, l: %d) ", (unsigned long long)ex->ext_start, ex->ext_len); if (i % 4 == 3) printf("\n"); + len -= sizeof(xfs_extent_t); ex++; } if (i % 4 != 0) printf("\n"); @@ -540,7 +544,7 @@ xlog_print_trans_qoff(xfs_caddr_t *ptr, uint len) xfs_qoff_logformat_t *f; xfs_qoff_logformat_t lbuf; - bcopy(*ptr, &lbuf, sizeof(xfs_qoff_logformat_t)); + bcopy(*ptr, &lbuf, MIN(sizeof(xfs_qoff_logformat_t), len)); f = &lbuf; *ptr += len; if (len >= sizeof(xfs_qoff_logformat_t)) {