From: James Simmons Date: Thu, 11 Jun 2015 15:13:07 +0000 (-0400) Subject: LU-6245 utils: remove libcfs.h from lustre utilities code X-Git-Tag: 2.7.57~67 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a8012629fa66bfeab28b41e23130d020d2367001;p=fs%2Flustre-release.git LU-6245 utils: remove libcfs.h from lustre utilities code Since user land libcfs is mostly gone libcfs.h can be removed from the code that is used to create the lustre utilities such as lfs and mount.lustre. Change-Id: I5e0dd7d9ad44e988b2045906d2179dc3e2538d38 Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/15217 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: frank zago Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/create_iam.c b/lustre/utils/create_iam.c index da5c0eb..98d7dea 100644 --- a/lustre/utils/create_iam.c +++ b/lustre/utils/create_iam.c @@ -52,8 +52,6 @@ #include #endif -#include - void usage(void) { printf("usage: create_iam " diff --git a/lustre/utils/l_getidentity.c b/lustre/utils/l_getidentity.c index 9495643..46bd22c 100644 --- a/lustre/utils/l_getidentity.c +++ b/lustre/utils/l_getidentity.c @@ -49,7 +49,6 @@ #include #include -#include #include #include #include diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 2100ac8..f8ec6d5 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,6 @@ #endif #include -#include #include #include #include @@ -940,8 +940,9 @@ static int lfs_setstripe(int argc, char **argv) delete = 1; break; case 'o': - nr_osts = parse_targets(osts, ARRAY_SIZE(osts), nr_osts, - optarg); + nr_osts = parse_targets(osts, + sizeof(osts) / sizeof(__u32), + nr_osts, optarg); if (nr_osts < 0) { fprintf(stderr, "error: %s: bad OST indices '%s'\n", diff --git a/lustre/utils/libiam.c b/lustre/utils/libiam.c index 3c1299c..42d1a47 100644 --- a/lustre/utils/libiam.c +++ b/lustre/utils/libiam.c @@ -49,7 +49,7 @@ #include #include #include - +#include #include #ifdef HAVE_ENDIAN_H @@ -57,7 +57,6 @@ #endif #include -#include #include typedef __u32 lvar_hash_t; diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 74ab27f..4c3ca8c 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -72,7 +72,6 @@ #include #include -#include #include #include #include diff --git a/lustre/utils/liblustreapi_hsm.c b/lustre/utils/liblustreapi_hsm.c index 492a3b1..f569fc6 100644 --- a/lustre/utils/liblustreapi_hsm.c +++ b/lustre/utils/liblustreapi_hsm.c @@ -55,7 +55,6 @@ #include #endif -#include #include #include #include @@ -84,8 +83,6 @@ struct hsm_copyaction_private { lstat_t stat; }; -#include - enum ct_progress_type { CT_START = 0, CT_RUNNING = 50, diff --git a/lustre/utils/liblustreapi_json.c b/lustre/utils/liblustreapi_json.c index e454837..74936ce 100644 --- a/lustre/utils/liblustreapi_json.c +++ b/lustre/utils/liblustreapi_json.c @@ -42,7 +42,6 @@ #endif #include -#include #include /** Quick-n'-dirty JSON string escape routine. diff --git a/lustre/utils/liblustreapi_nodemap.c b/lustre/utils/liblustreapi_nodemap.c index 5c2bea7..a79fc85 100644 --- a/lustre/utils/liblustreapi_nodemap.c +++ b/lustre/utils/liblustreapi_nodemap.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "lustreapi_internal.h" diff --git a/lustre/utils/ll_decode_filter_fid.c b/lustre/utils/ll_decode_filter_fid.c index f2ff2dc..809e994 100644 --- a/lustre/utils/ll_decode_filter_fid.c +++ b/lustre/utils/ll_decode_filter_fid.c @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include int main(int argc, char *argv[]) diff --git a/lustre/utils/llog_reader.c b/lustre/utils/llog_reader.c index cf84329..e2d4183 100644 --- a/lustre/utils/llog_reader.c +++ b/lustre/utils/llog_reader.c @@ -46,7 +46,6 @@ #include #include -#include #include #include #include diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index cc9763d..4652f5a 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -50,7 +50,6 @@ #include #include -#include #include #include #include diff --git a/lustre/utils/mount_utils_ldiskfs.c b/lustre/utils/mount_utils_ldiskfs.c index 5bbc41d..4f662fa 100644 --- a/lustre/utils/mount_utils_ldiskfs.c +++ b/lustre/utils/mount_utils_ldiskfs.c @@ -66,9 +66,6 @@ #include #include -/* libcfs.h is not really needed here, but on SLES10/PPC, fs.h includes idr.h - * which requires BITS_PER_LONG to be defined */ -#include #ifndef BLKGETSIZE64 #include /* for BLKGETSIZE64 */ #endif diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index e1e1b0e..5381876 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -64,7 +64,6 @@ #include #include "obdctl.h" -#include #include #include diff --git a/lustre/utils/req-layout.c b/lustre/utils/req-layout.c index 02f41b9..a0c2393 100644 --- a/lustre/utils/req-layout.c +++ b/lustre/utils/req-layout.c @@ -49,7 +49,6 @@ #define __REQ_LAYOUT_USER__ (1) #define EXPORT_SYMBOL(s) -#include #include #include diff --git a/lustre/utils/wirehdr.c b/lustre/utils/wirehdr.c index f337dce..b57f332 100644 --- a/lustre/utils/wirehdr.c +++ b/lustre/utils/wirehdr.c @@ -35,7 +35,6 @@ */ #include -#include #include #include #include diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 7497a91..efe13d6 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -35,7 +35,6 @@ */ #include -#include #include #include #include