]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Couple of trivial fixes - cvtnum and EFI/EFD log printing.
authorNathan Scott <nathans@sgi.com>
Thu, 8 Dec 2005 14:14:52 +0000 (14:14 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 8 Dec 2005 14:14:52 +0000 (14:14 +0000)
Merge of master-melb:xfs-cmds:24743a by kenmcd.

VERSION
debian/changelog
doc/CHANGES
libxcmd/input.c
logprint/log_misc.c

diff --git a/VERSION b/VERSION
index 0516f7bcb9522d578040041430236f14b7b116fb..054cd1c574de89bf31b44cad23c8399c29548b4e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=2
 PKG_MINOR=7
-PKG_REVISION=8
+PKG_REVISION=9
 PKG_BUILD=1
index 4d91ece2edc3eda0b080f540623c6f2d78217b27..496f04476b395be52f50816700206dac0502d905 100644 (file)
@@ -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 <nathans@debian.org>  Mon, 05 Dec 2005 15:12:06 +1100
+ -- Nathan Scott <nathans@debian.org>  Thu, 08 Dec 2005 15:09:05 +1100
 
 xfsprogs (2.7.7-1) unstable; urgency=low
 
index db7a1387d616be829fe01a0aa5ae1edd68937922..655b39e7e732fad023ffa09003b3cdb6a13d3847 100644 (file)
@@ -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
index 6ee3176ebf4a8660a788656e19e71cca452ab1a2..4691f0213dbde1134cf4891ce9e2d91a58c214f7 100644 (file)
@@ -158,7 +158,7 @@ cvtnum(
        if (*sp == '\0')
                return i;
 
-       if (sp[1] == '\0')
+       if (sp[1] != '\0')
                return -1LL;
 
        c = tolower(*sp);
index efbe208f40b4a7e7450237f249a85bce1d63407b..fed4dbb80ccf3b0e2645f3fffc4f42fc06b63588 100644 (file)
@@ -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)) {