Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Rename ifreqo2n() and ifreqo2n() to IFREQO2N_43() and IF...
details: https://anonhg.NetBSD.org/src/rev/be6e8a1b965f
branches: trunk
changeset: 840740:be6e8a1b965f
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Apr 16 04:31:42 2019 +0000
description:
Rename ifreqo2n() and ifreqo2n() to IFREQO2N_43() and IFREQN2O_43():
- ifreqo2n() and ifreqn2o() are for COMPAT_43, so add _43 to the name.
- Uppercase to make it clear those are macros.
diffstat:
sys/compat/common/if_43.c | 8 ++++----
sys/compat/sys/sockio.h | 6 +++---
sys/net/if.c | 15 +++++++++------
3 files changed, 16 insertions(+), 13 deletions(-)
diffs (126 lines):
diff -r 3f1fc39f4430 -r be6e8a1b965f sys/compat/common/if_43.c
--- a/sys/compat/common/if_43.c Tue Apr 16 04:26:02 2019 +0000
+++ b/sys/compat/common/if_43.c Tue Apr 16 04:31:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_43.c,v 1.20 2019/03/01 11:06:56 pgoyette Exp $ */
+/* $NetBSD: if_43.c,v 1.21 2019/04/16 04:31:42 msaitoh Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.20 2019/03/01 11:06:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_43.c,v 1.21 2019/04/16 04:31:42 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -254,7 +254,7 @@
if (cmd != ocmd) {
oifr = data;
data = ifr = &ifrb;
- ifreqo2n(oifr, ifr);
+ IFREQO2N_43(oifr, ifr);
}
switch (ocmd) {
@@ -290,7 +290,7 @@
}
if (cmd != ocmd)
- ifreqn2o(oifr, ifr);
+ IFREQN2O_43(oifr, ifr);
return error;
}
diff -r 3f1fc39f4430 -r be6e8a1b965f sys/compat/sys/sockio.h
--- a/sys/compat/sys/sockio.h Tue Apr 16 04:26:02 2019 +0000
+++ b/sys/compat/sys/sockio.h Tue Apr 16 04:31:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sockio.h,v 1.17 2019/04/11 04:43:40 msaitoh Exp $ */
+/* $NetBSD: sockio.h,v 1.18 2019/04/16 04:31:42 msaitoh Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993, 1994
@@ -123,7 +123,7 @@
#define OBIOCSETIF _IOW('B', 108, struct oifreq)
#define OTAPGIFNAME _IOR('e', 0, struct oifreq)
-#define ifreqn2o(oi, ni) \
+#define IFREQN2O_43(oi, ni) \
do { \
(void)memcpy((oi)->ifr_name, (ni)->ifr_name, \
sizeof((oi)->ifr_name)); \
@@ -131,7 +131,7 @@
sizeof((oi)->ifr_ifru)); \
} while (/*CONSTCOND*/0)
-#define ifreqo2n(oi, ni) \
+#define IFREQO2N_43(oi, ni) \
do { \
(void)memcpy((ni)->ifr_name, (oi)->ifr_name, \
sizeof((oi)->ifr_name)); \
diff -r 3f1fc39f4430 -r be6e8a1b965f sys/net/if.c
--- a/sys/net/if.c Tue Apr 16 04:26:02 2019 +0000
+++ b/sys/net/if.c Tue Apr 16 04:31:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.449 2019/04/15 20:51:46 christos Exp $ */
+/* $NetBSD: if.c,v 1.450 2019/04/16 04:31:43 msaitoh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.449 2019/04/15 20:51:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.450 2019/04/16 04:31:43 msaitoh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -3158,12 +3158,13 @@
}
ifr = data;
+ /* Pre-convesion */
MODULE_HOOK_CALL(if_cvtcmd_43_hook, (&cmd, ocmd), enosys(), hook);
if (hook != ENOSYS) {
if (cmd != ocmd) {
oifr = data;
data = ifr = &ifrb;
- ifreqo2n(oifr, ifr);
+ IFREQO2N_43(oifr, ifr);
}
}
@@ -3274,8 +3275,10 @@
splx(s);
}
}
+
+ /* Post-convesion */
if (cmd != ocmd)
- ifreqn2o(oifr, ifr);
+ IFREQN2O_43(oifr, ifr);
IFNET_UNLOCK(ifp);
KERNEL_UNLOCK_UNLESS_IFP_MPSAFE(ifp);
@@ -3421,7 +3424,7 @@
if (cmd != ocmd) {
oifr = (struct oifreq *)(void *)ifr;
ifr = &ifrb;
- ifreqo2n(oifr, ifr);
+ IFREQO2N_43(oifr, ifr);
len = sizeof(oifr->ifr_addr);
}
}
@@ -3433,7 +3436,7 @@
sockaddr_copy(&ifr->ifr_addr, len, sa);
if (cmd != ocmd)
- ifreqn2o(oifr, ifr);
+ IFREQN2O_43(oifr, ifr);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index