diff --git a/Makefile.deps b/Makefile.deps index 75b437e..4147cad 100644 --- a/Makefile.deps +++ b/Makefile.deps @@ -7,7 +7,7 @@ # by selectively including just the uAPI header of the family directly # from the kernel sources. -UAPI_PATH:=../uapi/ +UAPI_PATH:=../include/ # scripts/headers_install.sh strips "_UAPI" from header guards so we # need the explicit -D matching what's in /usr, to avoid multiple definitions. diff --git a/uapi/linux/devlink.h b/include/linux/devlink.h similarity index 100% rename from uapi/linux/devlink.h rename to include/linux/devlink.h diff --git a/uapi/linux/dpll.h b/include/linux/dpll.h similarity index 100% rename from uapi/linux/dpll.h rename to include/linux/dpll.h diff --git a/uapi/linux/ethtool_netlink.h b/include/linux/ethtool_netlink.h similarity index 100% rename from uapi/linux/ethtool_netlink.h rename to include/linux/ethtool_netlink.h diff --git a/uapi/linux/genetlink.h b/include/linux/genetlink.h similarity index 100% rename from uapi/linux/genetlink.h rename to include/linux/genetlink.h diff --git a/uapi/linux/handshake.h b/include/linux/handshake.h similarity index 100% rename from uapi/linux/handshake.h rename to include/linux/handshake.h diff --git a/uapi/linux/mptcp_pm.h b/include/linux/mptcp_pm.h similarity index 100% rename from uapi/linux/mptcp_pm.h rename to include/linux/mptcp_pm.h diff --git a/uapi/linux/netdev.h b/include/linux/netdev.h similarity index 100% rename from uapi/linux/netdev.h rename to include/linux/netdev.h diff --git a/uapi/linux/nfsd_netlink.h b/include/linux/nfsd_netlink.h similarity index 100% rename from uapi/linux/nfsd_netlink.h rename to include/linux/nfsd_netlink.h diff --git a/uapi/linux/openvswitch.h b/include/linux/openvswitch.h similarity index 100% rename from uapi/linux/openvswitch.h rename to include/linux/openvswitch.h diff --git a/uapi/linux/psp.h b/include/linux/psp.h similarity index 100% rename from uapi/linux/psp.h rename to include/linux/psp.h diff --git a/update-from-kernel.sh b/update-from-kernel.sh index e00ca4b..72a872a 100755 --- a/update-from-kernel.sh +++ b/update-from-kernel.sh @@ -14,11 +14,11 @@ KSRC=$1 make -C ${KSRC}/tools/net/ynl -j $(nproc) || exit 1 cp -v ${KSRC}/tools/net/ynl/Makefile.deps ./ -sed -i 's@^UAPI_PATH:=.*@UAPI_PATH:=../uapi/@' Makefile.deps +sed -i 's@^UAPI_PATH:=.*@UAPI_PATH:=../include/@' Makefile.deps -mkdir -p uapi/linux/ +mkdir -p include/linux/ for hdr in $(cat Makefile.deps | sed -n 's/.*,\([^,]*\.h\))/\1/p'); do - cp -v ${KSRC}/include/uapi/linux/$hdr ./uapi/linux/ + cp -v ${KSRC}/include/uapi/linux/$hdr ./include/linux/ done mkdir -p lib @@ -32,6 +32,6 @@ for hdr in $(ls generated/ | grep -user.h); do mv -v generated/$hdr ./include/ynl-c/${hdr/-user/} ( cd generated - ln -sv ../include/ynl-c/${hdr/-user/} ./$hdr + ln -svf ../include/ynl-c/${hdr/-user/} ./$hdr ) done