]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
fix obj_to_handle on 64bit, Big Endian Systems
authorChristoph Hellwig <hch@sgi.com>
Tue, 19 Apr 2005 07:33:02 +0000 (07:33 +0000)
committerChristoph Hellwig <hch@sgi.com>
Tue, 19 Apr 2005 07:33:02 +0000 (07:33 +0000)
bump to 2.6.29

VERSION
doc/CHANGES
libhandle/handle.c

diff --git a/VERSION b/VERSION
index 34f2296fe1cba202c835548922f6ac2d294200f7..a0373dc1d7f47c9497395f9697cda424a0bb357e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
 #
 PKG_MAJOR=2
 PKG_MINOR=6
-PKG_REVISION=28
+PKG_REVISION=29
 PKG_BUILD=1
index 6099216c3312f48f67ec9fda0dfccf4fc3f3d487..815b086f83af0779f531018bac03dbc0f743a1c4 100644 (file)
@@ -1,3 +1,7 @@
+xfsprogs-2.6.29 (19 April 2005)
+       - Fix mkfs.xfs -dfile.
+       - Fix libhandle on 64bit, Big Endian systems.
+
 xfsprogs-2.6.28 (30 March 2005)
        - Fix compiler warning in repair/dir.c size checks.
        - Fix more compilation problem with version 4 of gcc
index 749a45fc3687c217e3da81e8a20093959da6c888..988f36dab2ccb5b47fc2d86048d8de166c8e5173 100644 (file)
@@ -191,6 +191,7 @@ obj_to_handle(
 {
        char            hbuf [MAXHANSIZ];
        int             ret;
+       __uint32_t      handlen;
        xfs_fsop_handlereq_t hreq;
 
        if (opcode == XFS_IOC_FD_TO_HANDLE) {
@@ -205,24 +206,20 @@ obj_to_handle(
        hreq.ihandle  = NULL;
        hreq.ihandlen = 0;
        hreq.ohandle  = hbuf;
-       hreq.ohandlen = (__u32 *)hlen;
-
-       /* the xfsctl call will only modify the low 32 bits of *hlen,
-        * but *hlen (size_t) could be a 64 bit value on some systems.
-        * zero it out beforehand in case any upper bits are set. */
-       *hlen = 0;
+       hreq.ohandlen = &handlen;
 
        ret = xfsctl(fspath, fsfd, opcode, &hreq);
        if (ret)
                return ret;
 
-       *hanp = malloc(*hlen);
+       *hanp = malloc(handlen);
        if (*hanp == NULL) {
                errno = ENOMEM;
                return -1;
        }
 
-       memcpy(*hanp, hbuf, (int) *hlen);
+       memcpy(*hanp, hbuf, handlen);
+       *hlen = handlen;
        return 0;
 }