Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nccf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
702
Provoz
nccf
Commits
c340980b
Commit
c340980b
authored
Jun 4, 2020
by
Christian Göttsche
Browse files
Options
Downloads
Patches
Plain Diff
is_kernfs: Check only defined magic numbers
Avoid undeclared identifiers when compiling with older kernel headers.
parent
19cfe9b1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dir_scan.c
+29
-2
29 additions, 2 deletions
src/dir_scan.c
with
29 additions
and
2 deletions
src/dir_scan.c
+
29
−
2
View file @
c340980b
...
...
@@ -63,18 +63,45 @@ static struct dir_ext buf_ext[1];
int
exclude_kernfs
;
/* Exclude Linux pseudo filesystems */
static
int
is_kernfs
(
unsigned
long
type
)
{
if
(
type
==
BINFMTFS_MAGIC
||
if
(
#ifdef BINFMTFS_MAGIC
type
==
BINFMTFS_MAGIC
||
#endif
#ifdef BPF_FS_MAGIC
type
==
BPF_FS_MAGIC
||
#endif
#ifdef CGROUP_SUPER_MAGIC
type
==
CGROUP_SUPER_MAGIC
||
#endif
#ifdef CGROUP2_SUPER_MAGIC
type
==
CGROUP2_SUPER_MAGIC
||
#endif
#ifdef DEBUGFS_MAGIC
type
==
DEBUGFS_MAGIC
||
#endif
#ifdef DEVPTS_SUPER_MAGIC
type
==
DEVPTS_SUPER_MAGIC
||
#endif
#ifdef PROC_SUPER_MAGIC
type
==
PROC_SUPER_MAGIC
||
#endif
#ifdef PSTOREFS_MAGIC
type
==
PSTOREFS_MAGIC
||
#endif
#ifdef SECURITYFS_MAGIC
type
==
SECURITYFS_MAGIC
||
#endif
#ifdef SELINUX_MAGIC
type
==
SELINUX_MAGIC
||
#endif
#ifdef SYSFS_MAGIC
type
==
SYSFS_MAGIC
||
type
==
TRACEFS_MAGIC
)
#endif
#ifdef TRACEFS_MAGIC
type
==
TRACEFS_MAGIC
||
#endif
0
)
return
1
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment