Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/netbsd32 Some of this was sparc-specific, so ifde...



details:   https://anonhg.NetBSD.org/src/rev/513664492cf1
branches:  trunk
changeset: 511388:513664492cf1
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Tue Jun 19 00:36:21 2001 +0000

description:
Some of this was sparc-specific, so ifdef __sparc__ it (XXX). Also,
change the alignment of one structure with an MD ifdef. Should
be moved into the netbsd32_machdep parts.

diffstat:

 sys/compat/netbsd32/netbsd32.h        |  10 +++++++---
 sys/compat/netbsd32/netbsd32_ioctl.c  |  17 ++++++++++++++++-
 sys/compat/netbsd32/netbsd32_ioctl.h  |   5 ++++-
 sys/compat/netbsd32/netbsd32_netbsd.c |   6 +++---
 4 files changed, 30 insertions(+), 8 deletions(-)

diffs (185 lines):

diff -r 9224f8df40c2 -r 513664492cf1 sys/compat/netbsd32/netbsd32.h
--- a/sys/compat/netbsd32/netbsd32.h    Tue Jun 19 00:26:29 2001 +0000
+++ b/sys/compat/netbsd32/netbsd32.h    Tue Jun 19 00:36:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32.h,v 1.18 2001/06/06 21:45:56 mrg Exp $        */
+/*     $NetBSD: netbsd32.h,v 1.19 2001/06/19 00:36:21 fvdl Exp $       */
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -436,7 +436,11 @@
        u_int32_t st_flags;             /* user defined flags for file */
        u_int32_t st_gen;               /* file generation number */
        int64_t   st_qspare[2];
-};
+}
+#ifdef __x86_64__
+__attribute__((packed))
+#endif
+;
 
 /* from <sys/timex.h> */
 typedef u_int32_t netbsd32_ntptimevalp_t;
@@ -529,7 +533,7 @@
 #define        NETBSD32TOX_UAP(name, type)     NETBSD32TOX(uap, &ua, name, type);
 #define        NETBSD32TOX64_UAP(name, type)   NETBSD32TOX64(uap, &ua, name, type);
 
-/* hook for coredump() */
+/* hook for coredump */
 extern int coredump32(struct proc *, struct vnode *);
 
 /*
diff -r 9224f8df40c2 -r 513664492cf1 sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c      Tue Jun 19 00:26:29 2001 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c      Tue Jun 19 00:36:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_ioctl.c,v 1.9 2001/06/14 20:32:44 thorpej Exp $       */
+/*     $NetBSD: netbsd32_ioctl.c,v 1.10 2001/06/19 00:36:21 fvdl Exp $ */
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -50,8 +50,10 @@
 #include <sys/mount.h>
 #include <sys/syscallargs.h>
 
+#ifdef __sparc__
 #include <machine/fbio.h>
 #include <machine/openpromio.h>
+#endif
 
 #include <net/if.h>
 #include <net/route.h>
@@ -67,12 +69,14 @@
 #include <compat/netbsd32/netbsd32_syscallargs.h>
 
 /* prototypes for the converters */
+#ifdef __sparc__
 static __inline void
 netbsd32_to_fbcmap(struct netbsd32_fbcmap *, struct fbcmap *, u_long);
 static __inline void
 netbsd32_to_fbcursor(struct netbsd32_fbcursor *, struct fbcursor *, u_long);
 static __inline void
 netbsd32_to_opiocdesc(struct netbsd32_opiocdesc *, struct opiocdesc *, u_long);
+#endif
 static __inline void
 netbsd32_to_partinfo(struct netbsd32_partinfo *, struct partinfo *, u_long);
 static __inline void
@@ -88,12 +92,14 @@
 static __inline void
 netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *, struct sioc_sg_req *, u_long);
 
+#ifdef __sparc__
 static __inline void
 netbsd32_from_fbcmap(struct fbcmap *, struct netbsd32_fbcmap *);
 static __inline void
 netbsd32_from_fbcursor(struct fbcursor *, struct netbsd32_fbcursor *);
 static __inline void
 netbsd32_from_opiocdesc(struct opiocdesc *, struct netbsd32_opiocdesc *);
+#endif
 static __inline void
 netbsd32_from_partinfo(struct partinfo *, struct netbsd32_partinfo *);
 static __inline void
@@ -111,6 +117,8 @@
 
 /* convert to/from different structures */
 
+#ifdef __sparc__
+
 static __inline void
 netbsd32_to_fbcmap(s32p, p, cmd)
        struct netbsd32_fbcmap *s32p;
@@ -155,6 +163,7 @@
        p->op_buflen = s32p->op_buflen;
        p->op_buf = (char *)(u_long)s32p->op_buf;
 }
+#endif
 
 static __inline void
 netbsd32_to_partinfo(s32p, p, cmd)
@@ -264,6 +273,8 @@
  * handle ioctl conversions from sparc64 -> netbsd32
  */
 
+#ifdef __sparc__
+
 static __inline void
 netbsd32_from_fbcmap(p, s32p)
        struct fbcmap *p;
@@ -312,6 +323,8 @@
        s32p->op_buf = (netbsd32_charp)(u_long)p->op_buf;
 }
 
+#endif
+
 static __inline void
 netbsd32_from_partinfo(p, s32p)
        struct partinfo *p;
@@ -588,6 +601,7 @@
                *(int *)data32 = -*(int *)data32;
                break;
 
+#ifdef __sparc__
 /*
  * Here are calls that need explicit conversion.
  */
@@ -607,6 +621,7 @@
                IOCTL_STRUCT_CONV_TO(OPIOCSET, opiocdesc);
        case OPIOCNEXTPROP32:
                IOCTL_STRUCT_CONV_TO(OPIOCNEXTPROP, opiocdesc);
+#endif
 
        case DIOCGPART32:
                IOCTL_STRUCT_CONV_TO(DIOCGPART, partinfo);
diff -r 9224f8df40c2 -r 513664492cf1 sys/compat/netbsd32/netbsd32_ioctl.h
--- a/sys/compat/netbsd32/netbsd32_ioctl.h      Tue Jun 19 00:26:29 2001 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.h      Tue Jun 19 00:36:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_ioctl.h,v 1.4 2000/08/19 14:38:18 eeh Exp $   */
+/*     $NetBSD: netbsd32_ioctl.h,v 1.5 2001/06/19 00:36:21 fvdl Exp $  */
 
 /*
  * Copyright (c) 1998 Matthew R. Green
@@ -34,6 +34,7 @@
 #define        FBIOGINFO       _IOR('F', 2, struct fbinfo)
 #endif
 
+#ifdef __sparc__
 struct netbsd32_fbcmap {
        int     index;          /* first element (0 origin) */
        int     count;          /* number of elements */
@@ -74,6 +75,8 @@
 #define        OPIOCSET32      _IOW('O', 2, struct netbsd32_opiocdesc) /* set openprom field */
 #define        OPIOCNEXTPROP32 _IOWR('O', 3, struct netbsd32_opiocdesc) /* get next property */
 #endif
+
+#endif /* __sparc__ */
  
 /* from <sys/audioio.h> */
 #if 0
diff -r 9224f8df40c2 -r 513664492cf1 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Jun 19 00:26:29 2001 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Jun 19 00:36:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_netbsd.c,v 1.59 2001/06/18 02:00:53 christos Exp $    */
+/*     $NetBSD: netbsd32_netbsd.c,v 1.60 2001/06/19 00:36:21 fvdl Exp $        */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -96,7 +96,7 @@
 extern const char * const netbsd32_syscallnames[];
 #endif
 #ifdef __HAVE_SYSCALL_INTERN
-void syscall_intern __P((struct proc *));
+void netbsd32_syscall_intern __P((struct proc *));
 #else
 void syscall __P((void));
 #endif
@@ -124,7 +124,7 @@
        NULL,
        NULL,
 #ifdef __HAVE_SYSCALL_INTERN
-       syscall_intern,
+       netbsd32_syscall_intern,
 #else
        syscall,
 #endif



Home | Main Index | Thread Index | Old Index