btrfs-progs: remove unnecessary linux/*.h includes
Decrease dependency on system headers, remove where they're not needed or became stale after code moved. The path-utils.h encapsulate path operations so include linux/limits.h here, that's where PATH_MAX is defined. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
aa56bf3a31
commit
b19a603d62
|
@ -25,7 +25,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <ftw.h>
|
||||
#include <mntent.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/version.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <limits.h>
|
||||
#include <getopt.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include <linux/magic.h>
|
||||
|
||||
#include <btrfsutil.h>
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <linux/limits.h>
|
||||
#include <blkid/blkid.h>
|
||||
#include <uuid/uuid.h>
|
||||
#include "kernel-lib/overflow.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#define __BTRFS_PATH_UTILS_H__
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <linux/limits.h>
|
||||
|
||||
char *path_canonicalize_dm_name(const char *ptname);
|
||||
char *path_canonicalize(const char *path);
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
#include <unistd.h>
|
||||
#include <mntent.h>
|
||||
#include <ctype.h>
|
||||
#include <linux/loop.h>
|
||||
#include <linux/major.h>
|
||||
#include <linux/kdev_t.h>
|
||||
#include <limits.h>
|
||||
#include <blkid/blkid.h>
|
||||
#include <sys/vfs.h>
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#define __BTRFS_CONVERT_SOURCE_FS_H__
|
||||
|
||||
#include "kerncompat.h"
|
||||
#include <linux/kdev_t.h>
|
||||
#include <sys/types.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#if BTRFSCONVERT_REISERFS
|
||||
|
||||
#include "kerncompat.h"
|
||||
#include <linux/limits.h>
|
||||
#include <linux/fs.h>
|
||||
#include <limits.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _PERF_LINUX_BITOPS_H_
|
||||
#define _PERF_LINUX_BITOPS_H_
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <endian.h>
|
||||
#include "common/internal.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fs.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "kernel-lib/list.h"
|
||||
|
|
Loading…
Reference in New Issue