Commit 4aba12d
configure: check for FS_IOC_READ_VERITY_METADATA availability
Commit 6bfa843 ("mke2fs: enable
copying of fs-verity metadata") introduced support for reading
fs-verity metadata, which requires using the
FS_IOC_READ_VERITY_METADATA.
The code is conditionally compiled when the kernel headers have
<linux/fsverity.h> available. Unfortunately, this check is not
sufficient: <linux/fsverity.h> was introduced in Linux 5.10, but the
FS_IOC_READ_VERITY_METADATA was not introduced before 5.12, so if one
is using 5.10 or 5.11 kernel headers, the build fails with:
./../misc/create_inode.c: In function ‘copy_fs_verity_data’:
./../misc/create_inode.c:589:10: error: variable ‘arg’ has initializer but incomplete type
589 | struct fsverity_read_metadata_arg arg = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
./../misc/create_inode.c:600:20: error: ‘FS_IOC_READ_VERITY_METADATA’ undeclared (first use in this function)
600 | size = ioctl(fd, FS_IOC_READ_VERITY_METADATA, &arg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit therefore extends the configure.ac check to ensure that
not only <linux/fsverity.h> exists but also that it defines the
FS_IOC_READ_VERITY_METADATA ioctl.
Closes: #256
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>1 parent 6f03c69 commit 4aba12d
3 files changed
+59
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16823 | 16823 | | |
16824 | 16824 | | |
16825 | 16825 | | |
| 16826 | + | |
| 16827 | + | |
| 16828 | + | |
| 16829 | + | |
| 16830 | + | |
| 16831 | + | |
| 16832 | + | |
| 16833 | + | |
| 16834 | + | |
| 16835 | + | |
| 16836 | + | |
| 16837 | + | |
| 16838 | + | |
| 16839 | + | |
| 16840 | + | |
| 16841 | + | |
| 16842 | + | |
| 16843 | + | |
| 16844 | + | |
| 16845 | + | |
| 16846 | + | |
| 16847 | + | |
| 16848 | + | |
| 16849 | + | |
| 16850 | + | |
| 16851 | + | |
| 16852 | + | |
| 16853 | + | |
| 16854 | + | |
| 16855 | + | |
| 16856 | + | |
| 16857 | + | |
| 16858 | + | |
| 16859 | + | |
| 16860 | + | |
| 16861 | + | |
| 16862 | + | |
| 16863 | + | |
16826 | 16864 | | |
16827 | 16865 | | |
16828 | 16866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1997 | 1997 | | |
1998 | 1998 | | |
1999 | 1999 | | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
2000 | 2018 | | |
2001 | 2019 | | |
2002 | 2020 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
| 572 | + | |
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | | - | |
| 741 | + | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| |||
0 commit comments