[Top][All Lists]

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

Re: [PATCH v3 1/3] update-linux-headers: Include const.h

From: Eric Farman
Subject: Re: [PATCH v3 1/3] update-linux-headers: Include const.h
Date: Thu, 7 Jan 2021 11:51:27 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 1/6/21 2:03 PM, Peter Xu wrote:
On Mon, Jan 04, 2021 at 09:20:55PM +0100, Eric Farman wrote:
Kernel commit a85cbe6159ff ("uapi: move constants from
<linux/kernel.h> to <linux/const.h>") breaks our script
because of the unrecognized include. Let's add that to
our processing.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
  scripts/update-linux-headers.sh | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index 9efbaf2f84..fa6f2b6272 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -41,6 +41,7 @@ cp_portable() {
                                       -e 'pvrdma_verbs' \
                                       -e 'drm.h' \
                                       -e 'limits' \
+                                     -e 'linux/const' \
                                       -e 'linux/kernel' \
                                       -e 'linux/sysinfo' \
                                       -e 'asm-generic/kvm_para' \
@@ -190,7 +191,9 @@ for i in "$tmpdir"/include/linux/*virtio*.h \
           "$tmpdir/include/linux/input.h" \
           "$tmpdir/include/linux/input-event-codes.h" \
           "$tmpdir/include/linux/pci_regs.h" \
-         "$tmpdir/include/linux/ethtool.h" "$tmpdir/include/linux/kernel.h" \
+         "$tmpdir/include/linux/ethtool.h" \
+         "$tmpdir/include/linux/const.h" \
+         "$tmpdir/include/linux/kernel.h" \
           "$tmpdir/include/linux/vhost_types.h" \
           "$tmpdir/include/linux/sysinfo.h"; do
      cp_portable "$i" "$output/include/standard-headers/linux"

So I think I came to the same change when trying to update the headers. :)

Reviewed-by: Peter Xu <peterx@redhat.com>

Thank you!  :)

Could I ask why the const.h is installed into include/standard-headers/linux
rather than linux-headers/linux?  When I was working on my version I failed to
figure out the difference.

Considering the main difference is whether the header file is copied directly or edited with a bunch of substitutions, and const.h doesn't get modified by those substitutions, I suppose it could go in linux-headers itself. But I opted to just keep it near its friends (ethtool.h and kernel.h both include const.h, and end up including if_ether.h, sysinfo.h, and types.h) in include/standard-headers.

One answer is ethtool.h is there which included const.h, but I guess that's not
the real one.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]