Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: Xose Vazquez Perez <xose.vazquez@gmail.com> |
| 3 | Date: Fri, 11 May 2018 15:43:11 +0200 |
| 4 | Subject: [PATCH] multipath-tools: Remove trailing/leading whitespaces and |
| 5 | reformat code |
| 6 | |
| 7 | Cc: Christophe Varoqui <christophe.varoqui@opensvc.com> |
| 8 | Cc: device-mapper development <dm-devel@redhat.com> |
| 9 | Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> |
| 10 | Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> |
| 11 | --- |
| 12 | Makefile.inc | 23 +++++++++++------------ |
| 13 | kpartx/mac.h | 2 +- |
| 14 | kpartx/test-kpartx | 2 +- |
| 15 | libmpathcmd/Makefile | 2 +- |
| 16 | libmultipath/hwtable.c | 14 +++++++------- |
| 17 | libmultipath/print.h | 2 +- |
| 18 | multipathd/main.h | 6 +++--- |
| 19 | 7 files changed, 25 insertions(+), 26 deletions(-) |
| 20 | |
| 21 | diff --git a/Makefile.inc b/Makefile.inc |
| 22 | index 57a1835..af2f5ba 100644 |
| 23 | --- a/Makefile.inc |
| 24 | +++ b/Makefile.inc |
| 25 | @@ -103,21 +103,20 @@ LDFLAGS = -Wl,-z,relro -Wl,-z,now |
| 26 | BIN_LDFLAGS = -pie |
| 27 | |
| 28 | # Check whether a function with name $1 has been declared in header file $2. |
| 29 | -check_func = \ |
| 30 | - $(shell \ |
| 31 | +check_func = $(shell \ |
| 32 | if grep -Eq "^[^[:blank:]]+[[:blank:]]+$1[[:blank:]]*(.*)*" "$2"; then \ |
| 33 | - found=1; \ |
| 34 | - status="yes"; \ |
| 35 | - else \ |
| 36 | - found=0; \ |
| 37 | - status="no"; \ |
| 38 | - fi; \ |
| 39 | - echo 1>&2 "Checking for $1 in $2 ... $$status"; \ |
| 40 | - echo "$$found" \ |
| 41 | - ) |
| 42 | + found=1; \ |
| 43 | + status="yes"; \ |
| 44 | + else \ |
| 45 | + found=0; \ |
| 46 | + status="no"; \ |
| 47 | + fi; \ |
| 48 | + echo 1>&2 "Checking for $1 in $2 ... $$status"; \ |
| 49 | + echo "$$found" \ |
| 50 | + ) |
| 51 | |
| 52 | # Checker whether a file with name $1 exists |
| 53 | -check_file = $(shell \ |
| 54 | +check_file = $(shell \ |
| 55 | if [ -f "$1" ]; then \ |
| 56 | found=1; \ |
| 57 | status="yes"; \ |
| 58 | diff --git a/kpartx/mac.h b/kpartx/mac.h |
| 59 | index a44cf38..55c3ec9 100644 |
| 60 | --- a/kpartx/mac.h |
| 61 | +++ b/kpartx/mac.h |
| 62 | @@ -24,7 +24,7 @@ struct mac_driver_desc { |
| 63 | uint16_t signature; /* expected to be MAC_DRIVER_MAGIC */ |
| 64 | uint16_t block_size; |
| 65 | uint32_t block_count; |
| 66 | - /* ... more stuff */ |
| 67 | + /* ... more stuff */ |
| 68 | }; |
| 69 | |
| 70 | #endif |
| 71 | diff --git a/kpartx/test-kpartx b/kpartx/test-kpartx |
| 72 | index 9cee20f..d2001dc 100755 |
| 73 | --- a/kpartx/test-kpartx |
| 74 | +++ b/kpartx/test-kpartx |
| 75 | @@ -131,7 +131,7 @@ step "create DM devices (spans)" |
| 76 | # They also serve as DM devices to test partition removal on those. |
| 77 | |
| 78 | TABLE="\ |
| 79 | -0 $((SIZE/SECTSIZ-OFFS)) linear $DEV1 $OFFS |
| 80 | +0 $((SIZE/SECTSIZ-OFFS)) linear $DEV1 $OFFS |
| 81 | $((SIZE/SECTSIZ-OFFS)) $((SIZE/SECTSIZ-OFFS)) linear $DEV2 $OFFS" |
| 82 | |
| 83 | SPAN1=kpt |
| 84 | diff --git a/libmpathcmd/Makefile b/libmpathcmd/Makefile |
| 85 | index 53c0899..0f6b816 100644 |
| 86 | --- a/libmpathcmd/Makefile |
| 87 | +++ b/libmpathcmd/Makefile |
| 88 | @@ -27,7 +27,7 @@ uninstall: |
| 89 | $(RM) $(DESTDIR)$(includedir)/mpath_cmd.h |
| 90 | |
| 91 | clean: dep_clean |
| 92 | - $(RM) core *.a *.o *.so *.so.* *.gz |
| 93 | + $(RM) core *.a *.o *.so *.so.* *.gz |
| 94 | |
| 95 | include $(wildcard $(OBJS:.o=.d)) |
| 96 | |
| 97 | diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c |
| 98 | index 827e899..2ca6888 100644 |
| 99 | --- a/libmultipath/hwtable.c |
| 100 | +++ b/libmultipath/hwtable.c |
| 101 | @@ -78,13 +78,13 @@ |
| 102 | #endif |
| 103 | |
| 104 | static struct hwentry default_hw[] = { |
| 105 | - /* |
| 106 | - * Generic NVMe |
| 107 | - * |
| 108 | - * Due to the parsing logic in find_hwe(), generic entries |
| 109 | - * have to be put on top of this list, and more specific ones |
| 110 | - * below. |
| 111 | - */ |
| 112 | + /* |
| 113 | + * Generic NVMe devices |
| 114 | + * |
| 115 | + * Due to the parsing logic in find_hwe(), generic entries |
| 116 | + * have to be put on top of this list, and more specific ones |
| 117 | + * below. |
| 118 | + */ |
| 119 | { |
| 120 | .vendor = "NVME", |
| 121 | .product = ".*", |
| 122 | diff --git a/libmultipath/print.h b/libmultipath/print.h |
| 123 | index 7ba6438..9b5a23a 100644 |
| 124 | --- a/libmultipath/print.h |
| 125 | +++ b/libmultipath/print.h |
| 126 | @@ -113,7 +113,7 @@ int _snprint_multipath (const struct gen_multipath *, char *, int, |
| 127 | const char *, int); |
| 128 | #define snprint_multipath(buf, len, fmt, mp, v) \ |
| 129 | _snprint_multipath(dm_multipath_to_gen(mp), buf, len, fmt, v) |
| 130 | -int _snprint_multipath_topology (const struct gen_multipath *, char *, int, |
| 131 | +int _snprint_multipath_topology (const struct gen_multipath *, char *, int, |
| 132 | int verbosity); |
| 133 | #define snprint_multipath_topology(buf, len, mpp, v) \ |
| 134 | _snprint_multipath_topology (dm_multipath_to_gen(mpp), buf, len, v) |
| 135 | diff --git a/multipathd/main.h b/multipathd/main.h |
| 136 | index af39558..8fd426b 100644 |
| 137 | --- a/multipathd/main.h |
| 138 | +++ b/multipathd/main.h |
| 139 | @@ -29,11 +29,11 @@ int ev_remove_map (char *, char *, int, struct vectors *); |
| 140 | int set_config_state(enum daemon_status); |
| 141 | void * mpath_alloc_prin_response(int prin_sa); |
| 142 | int prin_do_scsi_ioctl(char *, int rq_servact, struct prin_resp * resp, |
| 143 | - int noisy); |
| 144 | + int noisy); |
| 145 | void dumpHex(const char * , int len, int no_ascii); |
| 146 | int prout_do_scsi_ioctl(char * , int rq_servact, int rq_scope, |
| 147 | - unsigned int rq_type, struct prout_param_descriptor *param, |
| 148 | - int noisy); |
| 149 | + unsigned int rq_type, |
| 150 | + struct prout_param_descriptor *param, int noisy); |
| 151 | int mpath_pr_event_handle(struct path *pp); |
| 152 | void * mpath_pr_event_handler_fn (void * ); |
| 153 | int update_map_pr(struct multipath *mpp); |
| 154 | -- |
| 155 | 2.7.4 |
| 156 | |