master - cleanup: reduce inclusion of unnecessary headers
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=559c003ee248704e758dec63cf480447d4de6cd7 Commit: 559c003ee248704e758dec63cf480447d4de6cd7 Parent: 589983a257cd2f92489f41d2d7ec62784bf357e7 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Apr 17 10:48:55 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Apr 18 16:38:50 2014 +0200
cleanup: reduce inclusion of unnecessary headers
Remove those file which are not needed by .c files or already include because the headers already needs them.
--- lib/commands/toolcontext.h | 1 - lib/config/config.h | 3 +-- lib/config/config_settings.h | 1 + lib/datastruct/lvm-types.h | 3 --- lib/format_text/import-export.h | 1 - lib/mirror/mirrored.c | 1 - lib/misc/lib.h | 5 ----- lib/misc/lvm-string.h | 6 +++--- lib/raid/raid.c | 2 -- lib/report/properties.c | 1 - lib/snapshot/snapshot.c | 2 -- lib/thin/thin.c | 6 ------ lib/unknown/unknown.c | 2 -- lib/zero/zero.c | 1 - 14 files changed, 5 insertions(+), 30 deletions(-)
lib/commands/toolcontext.h +0 -1
@@ -19,7 +19,6 @@#include "dev-cache.h" #include "dev-type.h" -#include <stdio.h> #include <limits.h> /*
lib/config/config.h +1 -2
@@ -16,8 +16,7 @@#ifndef _LVM_CONFIG_H#define _LVM_CONFIG_H -#include "lvm-types.h" -#include "defaults.h" +#include "libdevmapper.h" /* 16 bits: 3 bits for major, 4 bits for minor, 9 bits for patchlevel */ /* FIXME Max LVM version supported: 7.15.511. Extend bits when needed. */
lib/config/config_settings.h +1 -0
@@ -65,6 +65,7 @@* that parent nodes are consistent with versioning, no check done * if parent node is older or the same age as any child node!) */ +#include "defaults.h" cfg_section (root_CFG_SECTION,"(root)" , root_CFG_SECTION,0 ,vsn (0 ,0 ,0 ),NULL )
lib/datastruct/lvm-types.h +0 -3
@@ -16,9 +16,6 @@#ifndef _LVM_TYPES_H#define _LVM_TYPES_H -#include <sys/types.h> -#include <inttypes.h> -#include "libdevmapper.h" struct str_list {
lib/format_text/import-export.h +0 -1
@@ -17,7 +17,6 @@#define _LVM_TEXT_IMPORT_EXPORT_H#include "config.h" -#include "lvm-types.h" #include "metadata.h" #include <stdio.h>
lib/mirror/mirrored.c +0 -1
@@ -21,7 +21,6 @@#include "text_export.h" #include "text_import.h" #include "config.h" -#include "defaults.h" #include "lvm-string.h" #include "targets.h" #include "activate.h"
lib/misc/lib.h +0 -5
@@ -43,11 +43,6 @@# include "lvm-types.h" #endif -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <unistd.h> -#include <sys/stat.h> #endif
lib/misc/lvm-string.h +3 -3
@@ -16,12 +16,12 @@#ifndef _LVM_STRING_H#define _LVM_STRING_H -#include <stdio.h> -#include <stdarg.h> -#define NAME_LEN 128#define UUID_PREFIX "LVM-" +#include <sys/types.h> + +struct dm_pool ;struct pool ;struct logical_volume ;
lib/raid/raid.c +0 -2
@@ -13,7 +13,6 @@*/ #include "lib.h" -#include "toolcontext.h" #include "segtype.h" #include "display.h" #include "text_export.h"
@@ -25,7 +24,6 @@#include "activate.h" #include "metadata.h" #include "lv_alloc.h" -#include "defaults.h" static const char *_raid_name (const struct lv_segment *seg) {
lib/report/properties.c +0 -1
@@ -15,7 +15,6 @@#include "lib.h" #include "properties.h" #include "activate.h" -#include "lvm-types.h" #include "metadata.h"
lib/snapshot/snapshot.c +0 -2
@@ -14,14 +14,12 @@*/ #include "lib.h" -#include "toolcontext.h" #include "metadata.h" #include "segtype.h" #include "text_export.h" #include "config.h" #include "activate.h" #include "str_list.h" -#include "defaults.h" #define SEG_LOG_ERROR(t, p...) \ log_error(t " segment %s of logical volume %s.", ## p, \
lib/thin/thin.c +0 -6
@@ -13,18 +13,12 @@*/ #include "lib.h" -#include "toolcontext.h" #include "metadata.h" #include "segtype.h" #include "text_export.h" #include "config.h" #include "activate.h" #include "str_list.h" -#include "defaults.h" - -#ifdef DMEVENTD -# include "libdevmapper-event.h" -#endif /* Dm kernel module name for thin provisiong */ static const char _thin_pool_module[] ="thin-pool" ;
lib/unknown/unknown.c +0 -2
@@ -15,10 +15,8 @@#include "lib.h" #include "toolcontext.h" #include "segtype.h" -#include "display.h" #include "text_export.h" #include "config.h" -#include "activate.h" static const char *_unknown_name (const struct lv_segment *seg) {
lib/zero/zero.c +0 -1
@@ -13,7 +13,6 @@*/ #include "lib.h" -#include "toolcontext.h" #include "segtype.h" #include "display.h" #include "config.h"