Undo binary-breaking struct _uzistat rearrangement.
authorDavid Given <dg@cowlark.com>
Thu, 21 Jan 2016 19:42:31 +0000 (20:42 +0100)
committerDavid Given <dg@cowlark.com>
Thu, 21 Jan 2016 19:42:31 +0000 (20:42 +0100)
Kernel/syscall_fs.c
Library/include/syscalls.h

index ac86884..2c8056a 100644 (file)
@@ -134,10 +134,9 @@ arg_t _fstat(void)
 /* Utility for stat and fstat */
 int stcpy(inoptr ino, char *buf)
 {
-       int err = uput((char *) &(ino->c_node.i_size),    buf + 0,         5*4);
-       err |=    uput((char *) &(ino->c_dev),            buf + 5*4,       2*2);
-       err |=    uput((char *) &(ino->c_node.i_mode),    buf + 5*4 + 2*2, 4*2);
-       err |=    uput((char *) &(ino->c_node.i_addr[0]), buf + 5*4 + 6*2, 1*2);
+       int err = uput((char *) &(ino->c_dev), buf, 12);
+       err |= uput((char *) &(ino->c_node.i_addr[0]), buf + 12, 2);
+       err |= uput((char *) &(ino->c_node.i_size), buf + 14, 16);
        return err;
 }
 
index dd501ee..3adde78 100644 (file)
@@ -15,13 +15,6 @@ extern int syscall(int callno, ...);
 
 struct  _uzistat
 {
-       /* For alignment reasons, arrange this structure with largest objects
-        * first. */
-       uint32_t   st_size;
-       uint32_t   st_atime;
-       uint32_t   st_mtime;
-       uint32_t   st_ctime;
-       uint32_t   st_timeh;    /* Time high bytes */
        int16_t    st_dev;
        uint16_t   st_ino;
        uint16_t   st_mode;
@@ -29,6 +22,11 @@ struct  _uzistat
        uint16_t   st_uid;
        uint16_t   st_gid;
        uint16_t   st_rdev;
+       uint32_t   st_size;
+       uint32_t   st_atime;
+       uint32_t   st_mtime;
+       uint32_t   st_ctime;
+       uint32_t   st_timeh;    /* Time high bytes */
 };
 
 struct _uzisysinfoblk {