Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat KNF. No functional change.
details: https://anonhg.NetBSD.org/src/rev/aaf2415de41a
branches: trunk
changeset: 998595:aaf2415de41a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Apr 23 07:45:06 2019 +0000
description:
KNF. No functional change.
diffstat:
sys/compat/common/uipc_syscalls_40.c | 12 +-
sys/compat/netbsd32/netbsd32_ioctl.c | 283 +++++++++++++++++-----------------
sys/compat/sunos/sunos_ioctl.c | 66 ++++---
sys/compat/sunos32/sunos32_ioctl.c | 118 ++++++++------
sys/compat/ultrix/ultrix_ioctl.c | 84 ++++++----
5 files changed, 298 insertions(+), 265 deletions(-)
diffs (truncated from 1633 to 300 lines):
diff -r d61c26648f1e -r aaf2415de41a sys/compat/common/uipc_syscalls_40.c
--- a/sys/compat/common/uipc_syscalls_40.c Tue Apr 23 07:29:04 2019 +0000
+++ b/sys/compat/common/uipc_syscalls_40.c Tue Apr 23 07:45:06 2019 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: uipc_syscalls_40.c,v 1.19 2019/04/18 17:45:12 christos Exp $ */
+/* $NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $ */
/* written by Pavel Cahyna, 2006. Public domain. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.19 2019/04/18 17:45:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.20 2019/04/23 07:45:06 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -29,10 +29,8 @@
#include <compat/common/compat_mod.h>
/*
- * Return interface configuration
- * of system. List may be used
- * in later ioctl's (above) to get
- * other information.
+ * Return interface configuration of system. List may be used in later
+ * ioctl's (above) to get other information.
*/
/*ARGSUSED*/
static int
@@ -158,7 +156,7 @@
ifc->ifc_len -= space;
else
ifc->ifc_len = -space;
- return (0);
+ return 0;
release_exit:
if_release(ifp, &psref);
diff -r d61c26648f1e -r aaf2415de41a sys/compat/netbsd32/netbsd32_ioctl.c
--- a/sys/compat/netbsd32/netbsd32_ioctl.c Tue Apr 23 07:29:04 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_ioctl.c Tue Apr 23 07:45:06 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_ioctl.c,v 1.101 2019/01/27 02:08:40 pgoyette Exp $ */
+/* $NetBSD: netbsd32_ioctl.c,v 1.102 2019/04/23 07:45:06 msaitoh Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.101 2019/01/27 02:08:40 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.102 2019/04/23 07:45:06 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
@@ -94,7 +94,8 @@
#if 0
static inline void
-netbsd32_to_format_op(struct netbsd32_format_op *s32p, struct format_op *p, u_long cmd)
+netbsd32_to_format_op(struct netbsd32_format_op *s32p,
+ struct format_op *p, u_long cmd)
{
p->df_buf = (char *)NETBSD32PTR64(s32p->df_buf);
@@ -142,8 +143,9 @@
static inline void
netbsd32_to_if_addrprefreq(const struct netbsd32_if_addrprefreq *ifap32,
- struct if_addrprefreq *ifap, u_long cmd)
+ struct if_addrprefreq *ifap, u_long cmd)
{
+
strlcpy(ifap->ifap_name, ifap32->ifap_name, sizeof(ifap->ifap_name));
ifap->ifap_preference = ifap32->ifap_preference;
memcpy(&ifap->ifap_addr, &ifap32->ifap_addr,
@@ -160,7 +162,8 @@
}
static inline void
-netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *s32p, struct ifmediareq *p, u_long cmd)
+netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *s32p,
+ struct ifmediareq *p, u_long cmd)
{
memcpy(p, s32p, sizeof *s32p);
@@ -211,7 +214,8 @@
}
static inline void
-netbsd32_to_sioc_vif_req(struct netbsd32_sioc_vif_req *s32p, struct sioc_vif_req *p, u_long cmd)
+netbsd32_to_sioc_vif_req(struct netbsd32_sioc_vif_req *s32p,
+ struct sioc_vif_req *p, u_long cmd)
{
p->vifi = s32p->vifi;
@@ -222,7 +226,8 @@
}
static inline void
-netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *s32p, struct sioc_sg_req *p, u_long cmd)
+netbsd32_to_sioc_sg_req(struct netbsd32_sioc_sg_req *s32p,
+ struct sioc_sg_req *p, u_long cmd)
{
p->src = s32p->src;
@@ -235,6 +240,7 @@
static inline void
netbsd32_to_atareq(struct netbsd32_atareq *s32p, struct atareq *p, u_long cmd)
{
+
p->flags = (u_long)s32p->flags;
p->command = s32p->command;
p->features = s32p->features;
@@ -250,7 +256,8 @@
}
static inline void
-netbsd32_to_vnd_ioctl(struct netbsd32_vnd_ioctl *s32p, struct vnd_ioctl *p, u_long cmd)
+netbsd32_to_vnd_ioctl(struct netbsd32_vnd_ioctl *s32p,
+ struct vnd_ioctl *p, u_long cmd)
{
p->vnd_file = (char *)NETBSD32PTR64(s32p->vnd_file);
@@ -261,7 +268,8 @@
}
static inline void
-netbsd32_to_vnd_user(struct netbsd32_vnd_user *s32p, struct vnd_user *p, u_long cmd)
+netbsd32_to_vnd_user(struct netbsd32_vnd_user *s32p,
+ struct vnd_user *p, u_long cmd)
{
p->vnu_unit = s32p->vnu_unit;
@@ -270,7 +278,8 @@
}
static inline void
-netbsd32_to_vnd_ioctl50(struct netbsd32_vnd_ioctl50 *s32p, struct vnd_ioctl50 *p, u_long cmd)
+netbsd32_to_vnd_ioctl50(struct netbsd32_vnd_ioctl50 *s32p,
+ struct vnd_ioctl50 *p, u_long cmd)
{
p->vnd_file = (char *)NETBSD32PTR64(s32p->vnd_file);
@@ -280,7 +289,8 @@
}
static inline void
-netbsd32_to_plistref(struct netbsd32_plistref *s32p, struct plistref *p, u_long cmd)
+netbsd32_to_plistref(struct netbsd32_plistref *s32p,
+ struct plistref *p, u_long cmd)
{
p->pref_plist = NETBSD32PTR64(s32p->pref_plist);
@@ -288,7 +298,8 @@
}
static inline void
-netbsd32_to_nvlist_ref_t(netbsd32_nvlist_ref_t *s32p, nvlist_ref_t *p, u_long cmd)
+netbsd32_to_nvlist_ref_t(netbsd32_nvlist_ref_t *s32p,
+ nvlist_ref_t *p, u_long cmd)
{
p->buf = NETBSD32PTR64(s32p->buf);
@@ -311,7 +322,8 @@
}
static inline void
-netbsd32_to_wdog_conf(struct netbsd32_wdog_conf *s32p, struct wdog_conf *p, u_long cmd)
+netbsd32_to_wdog_conf(struct netbsd32_wdog_conf *s32p,
+ struct wdog_conf *p, u_long cmd)
{
p->wc_names = (char *)NETBSD32PTR64(s32p->wc_names);
@@ -319,10 +331,8 @@
}
static inline void
-netbsd32_to_npf_ioctl_table(
- const struct netbsd32_npf_ioctl_table *s32p,
- struct npf_ioctl_table *p,
- u_long cmd)
+netbsd32_to_npf_ioctl_table(const struct netbsd32_npf_ioctl_table *s32p,
+ struct npf_ioctl_table *p, u_long cmd)
{
p->nct_cmd = s32p->nct_cmd;
@@ -341,7 +351,8 @@
}
static inline void
-netbsd32_to_bpf_program(struct netbsd32_bpf_program *s32p, struct bpf_program *p, u_long cmd)
+netbsd32_to_bpf_program(struct netbsd32_bpf_program *s32p,
+ struct bpf_program *p, u_long cmd)
{
p->bf_insns = (void *)NETBSD32PTR64(s32p->bf_insns);
@@ -349,7 +360,8 @@
}
static inline void
-netbsd32_to_bpf_dltlist(struct netbsd32_bpf_dltlist *s32p, struct bpf_dltlist *p, u_long cmd)
+netbsd32_to_bpf_dltlist(struct netbsd32_bpf_dltlist *s32p,
+ struct bpf_dltlist *p, u_long cmd)
{
p->bfl_list = (void *)NETBSD32PTR64(s32p->bfl_list);
@@ -358,10 +370,11 @@
/* wsdisplay stuff */
static inline void
-netbsd32_to_wsdisplay_addscreendata(struct netbsd32_wsdisplay_addscreendata *asd32,
- struct wsdisplay_addscreendata *asd,
- u_long cmd)
+netbsd32_to_wsdisplay_addscreendata(
+ struct netbsd32_wsdisplay_addscreendata *asd32,
+ struct wsdisplay_addscreendata *asd, u_long cmd)
{
+
asd->screentype = (char *)NETBSD32PTR64(asd32->screentype);
asd->emul = (char *)NETBSD32PTR64(asd32->emul);
asd->idx = asd32->idx;
@@ -369,8 +382,9 @@
static inline void
netbsd32_to_ieee80211req(struct netbsd32_ieee80211req *ireq32,
- struct ieee80211req *ireq, u_long cmd)
+ struct ieee80211req *ireq, u_long cmd)
{
+
strlcpy(ireq->i_name, ireq32->i_name, IFNAMSIZ);
ireq->i_type = ireq32->i_type;
ireq->i_val = ireq32->i_val;
@@ -380,8 +394,7 @@
static inline void
netbsd32_to_ieee80211_nwkey(struct netbsd32_ieee80211_nwkey *nwk32,
- struct ieee80211_nwkey *nwk,
- u_long cmd)
+ struct ieee80211_nwkey *nwk, u_long cmd)
{
int i;
@@ -397,9 +410,9 @@
static inline void
netbsd32_to_wsdisplay_cursor(struct netbsd32_wsdisplay_cursor *c32,
- struct wsdisplay_cursor *c,
- u_long cmd)
+ struct wsdisplay_cursor *c, u_long cmd)
{
+
c->which = c32->which;
c->enable = c32->enable;
c->pos.x = c32->pos.x;
@@ -419,9 +432,9 @@
static inline void
netbsd32_to_wsdisplay_cmap(struct netbsd32_wsdisplay_cmap *c32,
- struct wsdisplay_cmap *c,
- u_long cmd)
+ struct wsdisplay_cmap *c, u_long cmd)
{
+
c->index = c32->index;
c->count = c32->count;
c->red = NETBSD32PTR64(c32->red);
@@ -431,9 +444,9 @@
static inline void
netbsd32_to_wsdisplay_font(struct netbsd32_wsdisplay_font *f32,
- struct wsdisplay_font *f,
- u_long cmd)
+ struct wsdisplay_font *f, u_long cmd)
{
+
f->name = NETBSD32PTR64(f32->name);
f->firstchar = f32->firstchar;
f->numchars = f32->numchars;
@@ -448,17 +461,16 @@
static inline void
netbsd32_to_wsdisplay_usefontdata(struct netbsd32_wsdisplay_usefontdata *f32,
- struct wsdisplay_usefontdata *f,
- u_long cmd)
+ struct wsdisplay_usefontdata *f, u_long cmd)
{
+
f->name = NETBSD32PTR64(f32->name);
}
static inline void
netbsd32_to_clockctl_settimeofday(
const struct netbsd32_clockctl_settimeofday *s32p,
- struct clockctl_settimeofday *p,
- u_long cmd)
+ struct clockctl_settimeofday *p, u_long cmd)
{
p->tv = NETBSD32PTR64(s32p->tv);
Home |
Main Index |
Thread Index |
Old Index