multipath-tools: replace leading spaces with tabs
Subsystems (2)
PATCH 1/1 multipath-tools: replace leading spaces with tabs
replace ^8x(1,2,3,4,5,6 and 7) spaces with tabs.
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
Signed-off-by Xose Vazquez Perez <[email protected]>
--- kpartx/dasd.h | 76 +++++------ kpartx/gpt.c | 238 +++++++++++++++++------------------ kpartx/gpt.h | 6 +- kpartx/lopart.c | 2 +- kpartx/mac.c | 4 +- kpartx/mac.h | 18 +-- kpartx/ps3.c | 2 +- libmpathpersist/mpath_pr_ioctl.c | 62 ++++----- libmpathpersist/mpathpr.h | 36 +++--- libmultipath/configure.c | 2 +- libmultipath/devmapper.c | 8 +- libmultipath/memory.h | 8 +- libmultipath/print.c | 10 +- libmultipath/print.h | 70 +++++------ libmultipath/prioritizers/datacore.c | 6 +- libmultipath/prioritizers/hds.c | 2 +- libmultipath/prioritizers/ontap.c | 2 +- mpathpersist/main.c | 24 ++-- 18 files changed, 288 insertions(+), 288 deletions(-)
kpartx/dasd.h +38 -38
@@ -27,40 +27,40 @@typedef struct ttr { -uint16_t tt; -uint8_t r; +uint16_t tt; +uint8_t r; } __attribute__ ((packed))ttr_t ;typedef struct cchhb { -uint16_t cc; -uint16_t hh; -uint8_t b; +uint16_t cc; +uint16_t hh; +uint8_t b; } __attribute__ ((packed))cchhb_t ;typedef struct cchh { -uint16_t cc; -uint16_t hh; +uint16_t cc; +uint16_t hh; } __attribute__ ((packed))cchh_t ;typedef struct labeldate { -uint8_t year; -uint16_t day; +uint8_t year; +uint16_t day; } __attribute__ ((packed))labeldate_t ; typedef struct volume_label { - char volkey[4]; /* volume key = volume label */ + char volkey[4]; /* volume key = volume label */ char vollbl[4]; /* volume label */ char volid[6]; /* volume identifier */ uint8_t security; /* security byte */ cchhb_t vtoc; /* VTOC address */ char res1[5]; /* reserved */ - char cisize[4]; /* CI-size for FBA,... */ - /* ...blanks for CKD */ + char cisize[4]; /* CI-size for FBA,... */ + /* ...blanks for CKD */ char blkperci[4]; /* no of blocks per CI (FBA), blanks for CKD */ char labperci[4]; /* no of labels per CI (FBA), blanks for CKD */ char res2[4]; /* reserved */
@@ -73,25 +73,25 @@ typedef struct volume_labeltypedef struct extent { -uint8_t typeind;/* extent type indicator */ -uint8_t seqno;/* extent sequence number */ -cchh_t llimit;/* starting point of this extent */ -cchh_t ulimit;/* ending point of this extent */ +uint8_t typeind;/* extent type indicator */ +uint8_t seqno;/* extent sequence number */ +cchh_t llimit;/* starting point of this extent */ +cchh_t ulimit;/* ending point of this extent */ } __attribute__ ((packed))extent_t ;typedef struct dev_const { -uint16_t DS4DSCYL;/* number of logical cyls */ -uint16_t DS4DSTRK;/* number of tracks in a logical cylinder */ -uint16_t DS4DEVTK;/* device track length */ -uint8_t DS4DEVI;/* non-last keyed record overhead */ -uint8_t DS4DEVL;/* last keyed record overhead */ -uint8_t DS4DEVK;/* non-keyed record overhead differential */ -uint8_t DS4DEVFG;/* flag byte */ -uint16_t DS4DEVTL;/* device tolerance */ -uint8_t DS4DEVDT;/* number of DSCB's per track */ -uint8_t DS4DEVDB;/* number of directory blocks per track */ +uint16_t DS4DSCYL;/* number of logical cyls */ +uint16_t DS4DSTRK;/* number of tracks in a logical cylinder */ +uint16_t DS4DEVTK;/* device track length */ +uint8_t DS4DEVI;/* non-last keyed record overhead */ +uint8_t DS4DEVL;/* last keyed record overhead */ +uint8_t DS4DEVK;/* non-keyed record overhead differential */ +uint8_t DS4DEVFG;/* flag byte */ +uint16_t DS4DEVTL;/* device tolerance */ +uint8_t DS4DEVDT;/* number of DSCB's per track */ +uint8_t DS4DEVDB;/* number of directory blocks per track */ } __attribute__ ((packed))dev_const_t ;
@@ -104,15 +104,15 @@ typedef struct format1_labellabeldate_t DS1CREDT ;/* creation date: ydd */ labeldate_t DS1EXPDT ;/* expiration date */ uint8_t DS1NOEPV ;/* number of extents on volume */ -uint8_t DS1NOBDB ;/* no. of bytes used in last direction blk */ +uint8_t DS1NOBDB ;/* no. of bytes used in last direction blk */ uint8_t DS1FLAG1 ;/* flag 1 */ char DS1SYSCD [13 ];/* system code */ labeldate_t DS1REFD ;/* date last referenced */ -uint8_t DS1SMSFG ;/* system managed storage indicators */ -uint8_t DS1SCXTF ;/* sec. space extension flag byte */ -uint16_t DS1SCXTV ;/* secondary space extension value */ -uint8_t DS1DSRG1 ;/* data set organisation byte 1 */ -uint8_t DS1DSRG2 ;/* data set organisation byte 2 */ +uint8_t DS1SMSFG ;/* system managed storage indicators */ +uint8_t DS1SCXTF ;/* sec. space extension flag byte */ +uint16_t DS1SCXTV ;/* secondary space extension value */ +uint8_t DS1DSRG1 ;/* data set organisation byte 1 */ +uint8_t DS1DSRG2 ;/* data set organisation byte 2 */ uint8_t DS1RECFM ;/* record format */ uint8_t DS1OPTCD ;/* option code */ uint16_t DS1BLKL ;/* block length */
@@ -120,11 +120,11 @@ typedef struct format1_labeluint8_t DS1KEYL ;/* key length */ uint16_t DS1RKP ;/* relative key position */ uint8_t DS1DSIND ;/* data set indicators */ -uint8_t DS1SCAL1 ;/* secondary allocation flag byte */ +uint8_t DS1SCAL1 ;/* secondary allocation flag byte */ char DS1SCAL3 [3 ];/* secondary allocation quantity */ ttr_t DS1LSTAR ;/* last used track and block on track */ uint16_t DS1TRBAL ;/* space remaining on last used track */ -uint16_t res1;/* reserved */ +uint16_t res1;/* reserved */ extent_t DS1EXT1 ;/* first extent description */ extent_t DS1EXT2 ;/* second extent description */ extent_t DS1EXT3 ;/* third extent description */
@@ -176,16 +176,16 @@ static unsigned char EBCtoASC[256] =/* 0x08 -GE -SPS -RPT VT FF CR SO SI */ 0x07 ,0x07 ,0x07 ,0x0B ,0x0C ,0x0D ,0x0E ,0x0F ,/* 0x10 DLE DC1 DC2 DC3 -RES -NL BS -POC --ENP ->LF */ +-ENP ->LF */ 0x10 ,0x11 ,0x12 ,0x13 ,0x07 ,0x0A ,0x08 ,0x07 ,/* 0x18 CAN EM -UBS -CU1 -IFS -IGS -IRS -ITB --IUS */ +-IUS */ 0x18 ,0x19 ,0x07 ,0x07 ,0x07 ,0x07 ,0x07 ,0x07 ,/* 0x20 -DS -SOS FS -WUS -BYP LF ETB ESC --INP */ +-INP */ 0x07 ,0x07 ,0x1C ,0x07 ,0x07 ,0x0A ,0x17 ,0x1B ,/* 0x28 -SA -SFE -SM -CSP -MFA ENQ ACK BEL --SW */ +-SW */ 0x07 ,0x07 ,0x07 ,0x07 ,0x07 ,0x05 ,0x06 ,0x07 ,/* 0x30 ---- ---- SYN -IR -PP -TRN -NBS EOT */ 0x07, 0x07, 0x16, 0x07, 0x07, 0x07, 0x07, 0x04,
kpartx/gpt.c +119 -119
378 lines not on this page · raw message
kpartx/gpt.h +3 -3
@@ -62,7 +62,7 @@ typedef struct _gpt_header {typedef struct _gpt_entry_attributes {uint64_t required_to_function:1 ;uint64_t reserved:47 ; -uint64_t type_guid_specific:16 ; +uint64_t type_guid_specific:16 ; } __attribute__ ((packed))gpt_entry_attributes ; typedef struct _gpt_entry {
@@ -86,8 +86,8 @@ typedef struct _gpt_entry {as: */ #define GPT_DEFAULT_RESERVED_PARTITION_ENTRIES \ - (GPT_DEFAULT_RESERVED_PARTITION_ENTRY_ARRAY_SIZE / \ - sizeof(gpt_entry)) + (GPT_DEFAULT_RESERVED_PARTITION_ENTRY_ARRAY_SIZE / \ + sizeof(gpt_entry))/* Protected Master Boot Record & Legacy MBR share same structure */
kpartx/lopart.c +1 -1
@@ -38,7 +38,7 @@#endif #if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \ - && !defined (__s390x__) + && !defined (__s390x__)#define int2ptr (x) ((void *) ((int) x))#else #define int2ptr (x) ((void *) ((long) x))
kpartx/mac.c +2 -2
@@ -7,11 +7,11 @@int read_mac_pt (int fd,struct slice all,struct slice *sp,int ns) {struct mac_driver_desc *md; -struct mac_partition *part; +struct mac_partition *part;unsigned secsize;char *data;int blk, blocks_in_map; -int n =0 ; +int n =0 ; md = (struct mac_driver_desc *)getblock (fd,0 );if (md ==NULL )
kpartx/mac.h +9 -9
@@ -9,21 +9,21 @@#define APPLE_AUX_TYPE "Apple_UNIX_SVR2"struct mac_partition { -uint16_t signature;/* expected to be MAC_PARTITION_MAGIC */ -uint16_t res1; -uint32_t map_count;/* # blocks in partition map */ -uint32_t start_block;/* absolute starting block # of partition */ -uint32_t block_count;/* number of blocks in partition */ -/* there is more stuff after this that we don't need */ +uint16_t signature;/* expected to be MAC_PARTITION_MAGIC */ +uint16_t res1; +uint32_t map_count;/* # blocks in partition map */ +uint32_t start_block;/* absolute starting block # of partition */ +uint32_t block_count;/* number of blocks in partition */ +/* there is more stuff after this that we don't need */ };#define MAC_DRIVER_MAGIC 0x4552/* Driver descriptor structure, in block 0 */ struct mac_driver_desc { -uint16_t signature;/* expected to be MAC_DRIVER_MAGIC */ -uint16_t block_size; -uint32_t block_count; +uint16_t signature;/* expected to be MAC_DRIVER_MAGIC */ +uint16_t block_size; +uint32_t block_count;/* ... more stuff */ };
kpartx/ps3.c +1 -1
@@ -50,7 +50,7 @@ read_disklabel(int fd, struct disklabel *label) {int read_ps3_pt (int fd,struct slice all,struct slice *sp,int ns) {struct disklabel label; -int n =0 ; +int n =0 ;int i;if (!read_disklabel (fd, &label))
libmpathpersist/mpath_pr_ioctl.c +31 -31
106 lines not on this page · raw message
libmpathpersist/mpathpr.h +18 -18
@@ -3,26 +3,26 @@struct prin_param {char dev[FILE_NAME_SIZE ]; -int rq_servact; -struct prin_resp *resp; -int noisy; -int status; +int rq_servact; +struct prin_resp *resp; +int noisy; +int status; };struct prout_param {char dev[FILE_NAME_SIZE ]; -int rq_servact; -int rq_scope; -unsigned int rq_type; -struct prout_param_descriptor *paramp; -int noisy; -int status; +int rq_servact; +int rq_scope; +unsigned int rq_type; +struct prout_param_descriptor *paramp; +int noisy; +int status; };struct threadinfo { -int status; -pthread_t id; -struct prout_param param; +int status; +pthread_t id; +struct prout_param param; };
@@ -31,7 +31,7 @@ struct config * conf;int prin_do_scsi_ioctl (char * dev,int rq_servact,struct prin_resp * resp,int noisy);int prout_do_scsi_ioctl (char * dev,int rq_servact,int rq_scope, -unsigned int rq_type,struct prout_param_descriptor *paramp,int noisy); +unsigned int rq_type,struct prout_param_descriptor *paramp,int noisy);void *_mpath_pr_update (void *arg);int mpath_send_prin_activepath (char * dev,int rq_servact,struct prin_resp * resp,int noisy);int get_mpvec (vector curmp,vector pathvec,char * refwwid);
@@ -39,13 +39,13 @@ void * mpath_prout_pthread_fn(void *p);void dumpHex (const char * ,int len,int no_ascii);int mpath_prout_reg (struct multipath *mpp,int rq_servact,int rq_scope, -unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy); +unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy);int mpath_prout_common (struct multipath *mpp,int rq_servact,int rq_scope, -unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy); +unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy);int mpath_prout_rel (struct multipath *mpp,int rq_servact,int rq_scope, -unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy); +unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy);int send_prout_activepath (char * dev,int rq_servact,int rq_scope, -unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy); +unsigned int rq_type,struct prout_param_descriptor * paramp,int noisy);int update_prflag (char * arg1,char * arg2,int noisy);void *mpath_alloc_prin_response (int prin_sa);
libmultipath/configure.c +1 -1
@@ -459,7 +459,7 @@ select_action (struct multipath * mpp, vector curmp, int force_reload)return ; }if (mpp->retain_hwhandler !=RETAIN_HWHANDLER_ON && - (strlen (cmpp->hwhandler) !=strlen (mpp->hwhandler) || + (strlen (cmpp->hwhandler) !=strlen (mpp->hwhandler) ||strncmp (cmpp->hwhandler, mpp->hwhandler,strlen (mpp->hwhandler)))) { mpp->action =ACT_RELOAD ;
libmultipath/devmapper.c +4 -4
@@ -167,9 +167,9 @@ dm_drv_version (unsigned int * version, char * str) goto out; } v = target->version; - version[0 ] = v[0 ]; - version[1 ] = v[1 ]; - version[2 ] = v[2 ]; + version[0 ] = v[0 ]; + version[1 ] = v[1 ]; + version[2 ] = v[2 ]; r =0 ; out:dm_task_destroy (dmt);
@@ -181,7 +181,7 @@ dm_drv_prereq (void) {unsigned int minv[3 ] = {1 ,0 ,3 };unsigned int version[3 ] = {0 ,0 ,0 }; -unsigned int * v = version; +unsigned int * v = version;if (dm_drv_version (v,TGT_MPATH )) {/* in doubt return not capable */
libmultipath/memory.h +4 -4
@@ -46,13 +46,13 @@ int debug;#define MAX_ALLOC_LIST 2048#define MALLOC (n) ( dbg_malloc((n), \ - (__FILE__), (char *)(__FUNCTION__), (__LINE__)) ) + (__FILE__), (char *)(__FUNCTION__), (__LINE__)) )#define FREE (b) ( dbg_free((b), \ - (__FILE__), (char *)(__FUNCTION__), (__LINE__)) ) + (__FILE__), (char *)(__FUNCTION__), (__LINE__)) )#define REALLOC (b,n) ( dbg_realloc((b), (n), \ - (__FILE__), (char *)(__FUNCTION__), (__LINE__)) ) + (__FILE__), (char *)(__FUNCTION__), (__LINE__)) )#define STRDUP (n) ( dbg_strdup((n), \ - (__FILE__), (char *)(__FUNCTION__), (__LINE__)) ) + (__FILE__), (char *)(__FUNCTION__), (__LINE__)) )/* Memory debug prototypes defs */ extern void *dbg_malloc (unsigned long ,char *,char *,int );
libmultipath/print.c +5 -5
@@ -1671,12 +1671,12 @@ snprint_status (char * buff, int len, struct vectors *vecs) checker_state_name(i), count[i]); } -int monitored_count =0 ; +int monitored_count =0 ; - vector_foreach_slot(vecs->pathvec, pp, i) -if (pp->fd !=-1 ) - monitored_count++; - fwd +=snprintf (buff + fwd, len - fwd,"\npaths: %d\nbusy: %s\n" , + vector_foreach_slot(vecs->pathvec, pp, i) +if (pp->fd !=-1 ) + monitored_count++; + fwd +=snprintf (buff + fwd, len - fwd,"\npaths: %d\nbusy: %s\n" , monitored_count,is_uevent_busy ()?"True" :"False" );if (fwd > len)
libmultipath/print.h +35 -35
88 lines not on this page · raw message
libmultipath/prioritizers/datacore.c +3 -3
@@ -46,7 +46,7 @@ int datacore_prio (const char *dev, int sg_fd, char * args)unsigned char sense_buffer[32 ];sg_io_hdr_t io_hdr; -int timeout =2000 ; +int timeout =2000 ;char preferredsds_buff[255 ] ="" ;char * preferredsds = &preferredsds_buff[0 ];
@@ -56,7 +56,7 @@ int datacore_prio (const char *dev, int sg_fd, char * args) }if (sscanf (args,"timeout=%i preferredsds=%s" , - &timeout, preferredsds) ==2 ) {} + &timeout, preferredsds) ==2 ) {}else if (sscanf (args,"preferredsds=%s timeout=%i" , preferredsds, &timeout) ==2 ) {} else if (sscanf(args, "preferredsds=%s",
@@ -108,6 +108,6 @@ int datacore_prio (const char *dev, int sg_fd, char * args)int getprio (struct path * pp,char * args) { -return datacore_prio (pp->dev, pp->fd, args); +return datacore_prio (pp->dev, pp->fd, args); }
libmultipath/prioritizers/hds.c +1 -1
@@ -82,7 +82,7 @@#define INQ_CMD_LEN 6 #define pp_hds_log(prio, fmt, args...) \ - condlog(prio, "%s: hds prio: " fmt, dev, ##args) + condlog(prio, "%s: hds prio: " fmt, dev, ##args)int hds_modular_prio (const char *dev,int fd,unsigned int timeout) {
libmultipath/prioritizers/ontap.c +1 -1
@@ -31,7 +31,7 @@#define SG_TIMEOUT 60000 #define pp_ontap_log(prio, fmt, args...) \ - condlog(prio, "%s: ontap prio: " fmt, dev, ##args) + condlog(prio, "%s: ontap prio: " fmt, dev, ##args)static void dump_cdb (unsigned char *cdb,int size) {
mpathpersist/main.c +12 -12
@@ -243,15 +243,15 @@ int main (int argc, char * argv[])break ;case 'l' : -if (1 !=sscanf (optarg,"%u" , &mpath_mx_alloc_len)) { -fprintf (stderr,"bad argument to '--alloc-length'\n" ); -return MPATH_PR_SYNTAX_ERROR ; - }else if (MPATH_MAX_PARAM_LEN < mpath_mx_alloc_len) { -fprintf (stderr,"'--alloc-length' argument exceeds maximum" -" limit(%d)\n" ,MPATH_MAX_PARAM_LEN ); -return MPATH_PR_SYNTAX_ERROR ; - } -break ; +if (1 !=sscanf (optarg,"%u" , &mpath_mx_alloc_len)) { +fprintf (stderr,"bad argument to '--alloc-length'\n" ); +return MPATH_PR_SYNTAX_ERROR ; + }else if (MPATH_MAX_PARAM_LEN < mpath_mx_alloc_len) { +fprintf (stderr,"'--alloc-length' argument exceeds maximum" +" limit(%d)\n" ,MPATH_MAX_PARAM_LEN ); +return MPATH_PR_SYNTAX_ERROR ; + } +break ;default :fprintf (stderr,"unrecognised switch " "code 0x%x ??\n" , c);
@@ -745,9 +745,9 @@ mpath_print_transport_id(struct prin_fulldescr *fdesc)case MPATH_PROTOCOL_ID_SAS :printf (" SAS " );if (0 != fdesc->trnptid.format_code) -printf (" [Unexpected format code: %d]\n" , - fdesc->trnptid.format_code); -dumpHex ((const char *)fdesc->trnptid.sas_address,8 ,0 ); +printf (" [Unexpected format code: %d]\n" , + fdesc->trnptid.format_code); +dumpHex ((const char *)fdesc->trnptid.sas_address,8 ,0 );break ;default :return ;
Signature · 1 line
2.7.4