The branch stable/13 has been updated by dchagin:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=38e5a2a185bc87d6775b96f07055263ca3377bcd

commit 38e5a2a185bc87d6775b96f07055263ca3377bcd
Author:     Dmitry Chagin <[email protected]>
AuthorDate: 2023-04-28 08:55:01 +0000
Commit:     Dmitry Chagin <[email protected]>
CommitDate: 2023-06-29 08:15:36 +0000

    linux(4): Make struct newstat to match actual Linux one
    
    In the struct stat the st_dev, st_rdev are unsigned long.
    
    (cherry picked from commit e0bfe0d62ca708c8c6173296cc05f6bbfb79b2ee)
---
 sys/amd64/linux/linux.h   | 6 +++---
 sys/amd64/linux32/linux.h | 6 ++----
 sys/arm64/linux/linux.h   | 4 ++--
 sys/i386/linux/linux.h    | 6 ++----
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h
index 0cf7d02c5833..81d9f48f6271 100644
--- a/sys/amd64/linux/linux.h
+++ b/sys/amd64/linux/linux.h
@@ -134,14 +134,14 @@ struct l_timespec {
 };
 
 struct l_newstat {
-       l_dev_t         st_dev;
+       l_ulong         st_dev;
        l_ino_t         st_ino;
        l_ulong         st_nlink;
        l_uint          st_mode;
        l_uid_t         st_uid;
        l_gid_t         st_gid;
-       l_uint          __st_pad1;
-       l_dev_t         st_rdev;
+       l_uint          __st_pad0;
+       l_ulong         st_rdev;
        l_off_t         st_size;
        l_long          st_blksize;
        l_long          st_blocks;
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index 4552c60e260b..02fcd320152d 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -180,15 +180,13 @@ struct l_timespec64 {
 };
 
 struct l_newstat {
-       l_ushort        st_dev;
-       l_ushort        __pad1;
+       l_ulong         st_dev;
        l_ulong         st_ino;
        l_ushort        st_mode;
        l_ushort        st_nlink;
        l_ushort        st_uid;
        l_ushort        st_gid;
-       l_ushort        st_rdev;
-       l_ushort        __pad2;
+       l_ulong         st_rdev;
        l_ulong         st_size;
        l_ulong         st_blksize;
        l_ulong         st_blocks;
diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h
index bee97691b744..a20b3c90a066 100644
--- a/sys/arm64/linux/linux.h
+++ b/sys/arm64/linux/linux.h
@@ -128,7 +128,7 @@ struct l_timespec {
 #define        LINUX_O_LARGEFILE       000400000
 
 struct l_newstat {
-       l_dev_t         st_dev;
+       l_ulong         st_dev;
        l_ino_t         st_ino;
        l_uint          st_mode;
        l_uint          st_nlink;
@@ -136,7 +136,7 @@ struct l_newstat {
        l_uid_t         st_uid;
        l_gid_t         st_gid;
 
-       l_dev_t         st_rdev;
+       l_ulong         st_rdev;
        l_ulong         __st_pad1;
        l_off_t         st_size;
        l_int           st_blksize;
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index 7e10ff357e00..2ccb2f92ef22 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -153,15 +153,13 @@ struct l_timespec64 {
 };
 
 struct l_newstat {
-       l_ushort        st_dev;
-       l_ushort        __pad1;
+       l_ulong         st_dev;
        l_ulong         st_ino;
        l_ushort        st_mode;
        l_ushort        st_nlink;
        l_ushort        st_uid;
        l_ushort        st_gid;
-       l_ushort        st_rdev;
-       l_ushort        __pad2;
+       l_ulong         st_rdev;
        l_ulong         st_size;
        l_ulong         st_blksize;
        l_ulong         st_blocks;

Reply via email to