]> Git Repo - linux.git/commit
tools lib lk: Uninclude linux/magic.h in debugfs.c
authorVinson Lee <[email protected]>
Wed, 18 Sep 2013 23:16:40 +0000 (16:16 -0700)
committerArnaldo Carvalho de Melo <[email protected]>
Thu, 19 Sep 2013 18:08:53 +0000 (15:08 -0300)
commitce7eebe5c3deef8e19c177c24ee75843256e69ca
tree158558cb4f7be76de96807e398c11b9af78ab4ee
parent0f9654296eabf7f238661d20a6af545986cf713f
tools lib lk: Uninclude linux/magic.h in debugfs.c

The compilation only looks for linux/magic.h from the default include
paths, which does not include the source tree. This results in a build
error if linux/magic.h is not available or not installed.

For example, this build error occurs on CentOS 5.

$ make -C tools/lib/lk V=1
[...]
gcc -o debugfs.o -c -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6
-D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement
-Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wno-system-headers
-Wold-style-definition -Wpacked -Wredundant-decls -Wshadow
-Wstrict-aliasing=3 -Wstrict-prototypes -Wswitch-default -Wswitch-enum
-Wundef -Wwrite-strings -Wformat  -fPIC  -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 debugfs.c
debugfs.c:8:25: error: linux/magic.h: No such file or directory

The only symbol from linux/magic.h needed by debugfs.c is DEBUGFS_MAGIC,
and that is already defined in debugfs.h. linux/magic.h isn't providing
any extra symbols and can unincluded. This is similar to the approach by
perf, which has its own magic.h wrapper at
tools/perf/util/include/linux/magic.h

Signed-off-by: Vinson Lee <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Vinson Lee <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/lib/lk/debugfs.c
This page took 0.048762 seconds and 4 git commands to generate.