Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2023 08:57:14 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e0bfe0d62ca7 - main - linux(4): Make struct newstat to match actual Linux one
Message-ID:  <202304280857.33S8vEAe018031@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin:

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

commit e0bfe0d62ca708c8c6173296cc05f6bbfb79b2ee
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-04-28 08:55:01 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-04-28 08:55:01 +0000

    linux(4): Make struct newstat to match actual Linux one
    
    In the struct stat the st_dev, st_rdev are unsigned long.
---
 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 11cc9f05c6f5..4aa45ad8ca96 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 80311ebb988e..f26ff5c216d2 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 1b6852286662..f3c55ac0fd6b 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 dd99b4a6d721..db4b2990b92d 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304280857.33S8vEAe018031>