[1/1] fix mt_fileno and mt_fileno struct mtget members on mips{,n32}

Submitted by Petr Vorel on June 7, 2019, 6:53 a.m.

Details

Message ID 20190607065312.4445-1-petr.vorel@gmail.com
State New
Series "Series without cover letter"
Headers show

Commit Message

Petr Vorel June 7, 2019, 6:53 a.m.
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@gmail.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

Patch hide | download patch | download mbox

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