Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190607065312.4445-1-petr.vorel@gmail.com>
Date: Fri,  7 Jun 2019 08:53:12 +0200
From: Petr Vorel <petr.vorel@...il.com>
To: musl@...ts.openwall.com
Cc: Petr Vorel <petr.vorel@...il.com>
Subject: [PATCH 1/1] fix mt_fileno and mt_fileno struct mtget members on mips{,n32}

These are defined in kernel sources as daddr_t, which is for mips
(and sparc which we don't support) defined as long.
Other archs define it as int.

Signed-off-by: Petr Vorel <petr.vorel@...il.com>
---
 arch/generic/bits/mtio.h |  9 +++++++++
 arch/mips/bits/mtio.h    |  9 +++++++++
 arch/mipsn32/bits/mtio.h |  9 +++++++++
 include/sys/mtio.h       | 12 ++----------
 4 files changed, 29 insertions(+), 10 deletions(-)
 create mode 100644 arch/generic/bits/mtio.h
 create mode 100644 arch/mips/bits/mtio.h
 create mode 100644 arch/mipsn32/bits/mtio.h

diff --git a/arch/generic/bits/mtio.h b/arch/generic/bits/mtio.h
new file mode 100644
index 00000000..3901eaf2
--- /dev/null
+++ b/arch/generic/bits/mtio.h
@@ -0,0 +1,9 @@
+struct mtget {
+	long mt_type;
+	long mt_resid;
+	long mt_dsreg;
+	long mt_gstat;
+	long mt_erreg;
+	int mt_fileno;
+	int mt_blkno;
+};
diff --git a/arch/mips/bits/mtio.h b/arch/mips/bits/mtio.h
new file mode 100644
index 00000000..ee0073ff
--- /dev/null
+++ b/arch/mips/bits/mtio.h
@@ -0,0 +1,9 @@
+struct mtget {
+	long mt_type;
+	long mt_resid;
+	long mt_dsreg;
+	long mt_gstat;
+	long mt_erreg;
+	long mt_fileno;
+	long mt_blkno;
+};
diff --git a/arch/mipsn32/bits/mtio.h b/arch/mipsn32/bits/mtio.h
new file mode 100644
index 00000000..ee0073ff
--- /dev/null
+++ b/arch/mipsn32/bits/mtio.h
@@ -0,0 +1,9 @@
+struct mtget {
+	long mt_type;
+	long mt_resid;
+	long mt_dsreg;
+	long mt_gstat;
+	long mt_erreg;
+	long mt_fileno;
+	long mt_blkno;
+};
diff --git a/include/sys/mtio.h b/include/sys/mtio.h
index f16a529b..ca995fa9 100644
--- a/include/sys/mtio.h
+++ b/include/sys/mtio.h
@@ -4,6 +4,8 @@
 #include <sys/types.h>
 #include <sys/ioctl.h>
 
+#include <bits/mtio.h>
+
 struct mtop {
 	short mt_op;
 	int mt_count;
@@ -48,16 +50,6 @@ struct mtop {
 #define MTSETPART 33
 #define MTMKPART  34
 
-struct mtget {
-	long mt_type;
-	long mt_resid;
-	long mt_dsreg;
-	long mt_gstat;
-	long mt_erreg;
-	int mt_fileno;
-	int mt_blkno;
-};
-
 #define MT_ISUNKNOWN		0x01
 #define MT_ISQIC02		0x02
 #define MT_ISWT5150		0x03
-- 
2.21.0

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.