@@ -277,8 +277,8 @@ uint32_t attribute((pure)) crc32_be(uint32_t crc, unsigned char const *p, size_t
*
* A big-endian CRC written this way would be coded like:
* for (i = 0; i < input_bits; i++) {
- * multiple = remainder & 0x80000000 ? CRCPOLY : 0;
- * remainder = (remainder << 1 | next_input_bit()) ^ multiple;
+ * multiple = remainder & 0x80000000 ? CRCPOLY : 0;
+ * remainder = (remainder << 1 | next_input_bit()) ^ multiple;
* }
* Notice how, to get at bit 32 of the shifted remainder, we look
* at bit 31 of the remainder *before* shifting it.
@@ -297,14 +297,14 @@ uint32_t attribute((pure)) crc32_be(uint32_t crc, unsigned char const *p, size_t
* This changes the code to:
* for (i = 0; i < input_bits; i++) {
* remainder ^= next_input_bit() << 31;
- * multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
- * remainder = (remainder << 1) ^ multiple;
+ * multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
+ * remainder = (remainder << 1) ^ multiple;
* }
* With this optimization, the little-endian code is simpler:
* for (i = 0; i < input_bits; i++) {
* remainder ^= next_input_bit();
- * multiple = (remainder & 1) ? CRCPOLY : 0;
- * remainder = (remainder >> 1) ^ multiple;
+ * multiple = (remainder & 1) ? CRCPOLY : 0;
+ * remainder = (remainder >> 1) ^ multiple;
* }
*
* Note that the other details of endianness have been hidden in CRCPOLY
@@ -314,19 +314,19 @@ uint32_t attribute((pure)) crc32_be(uint32_t crc, unsigned char const *p, size_t
* order, we can actually do the merging 8 or more bits at a time rather
* than one bit at a time:
* for (i = 0; i < input_bytes; i++) {
- * remainder ^= next_input_byte() << 24;
- * for (j = 0; j < 8; j++) {
- * multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
- * remainder = (remainder << 1) ^ multiple;
- * }
+ * remainder ^= next_input_byte() << 24;
+ * for (j = 0; j < 8; j++) {
+ * multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
+ * remainder = (remainder << 1) ^ multiple;
+ * }
* }
* Or in little-endian:
* for (i = 0; i < input_bytes; i++) {
- * remainder ^= next_input_byte();
- * for (j = 0; j < 8; j++) {
- * multiple = (remainder & 1) ? CRCPOLY : 0;
- * remainder = (remainder << 1) ^ multiple;
- * }
+ * remainder ^= next_input_byte();
+ * for (j = 0; j < 8; j++) {
+ * multiple = (remainder & 1) ? CRCPOLY : 0;
+ * remainder = (remainder << 1) ^ multiple;
+ * }
* }
* If the input is a multiple of 32 bits, you can even XOR in a 32-bit
* word at a time and increase the inner loop count to 32.
@@ -113,7 +113,7 @@ typedef struct format1_label
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 DS1RECFM; /* record format */
uint8_t DS1OPTCD; /* option code */
uint16_t DS1BLKL; /* block length */
uint16_t DS1LRECL; /* record length */
@@ -121,7 +121,7 @@ typedef struct format1_label
uint16_t DS1RKP; /* relative key position */
uint8_t DS1DSIND; /* data set indicators */
uint8_t DS1SCAL1; /* secondary allocation flag byte */
- char DS1SCAL3[3]; /* secondary allocation quantity */
+ 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 */
@@ -333,7 +333,7 @@ is_gpt_valid(int fd, uint64_t lba,
if (__le64_to_cpu((*gpt)->my_lba) != lba) {
/*
printf( "my_lba % PRIx64 "x != lba %"PRIx64 "x.\n",
- __le64_to_cpu((*gpt)->my_lba), lba);
+ __le64_to_cpu((*gpt)->my_lba), lba);
*/
free(*gpt);
*gpt = NULL;
@@ -70,8 +70,3 @@ read_ps3_pt(int fd, struct slice all, struct slice *sp, int ns) {
return n;
}
-
-
-
-
-
@@ -11,7 +11,7 @@
struct solaris_x86_slice {
unsigned short s_tag; /* ID tag of partition */
unsigned short s_flag; /* permision flags */
- daddr_t s_start; /* start sector no of partition */
+ daddr_t s_start; /* start sector no of partition */
long s_size; /* # of blocks in partition */
};
@@ -37,7 +37,7 @@ read_solaris_pt(int fd, struct slice all, struct slice *sp, int ns) {
int i, n;
char *bp;
- bp = getblock(fd, offset+1); /* 1 sector suffices */
+ bp = getblock(fd, offset+1); /* 1 sector suffices */
if (bp == NULL)
return -1;
@@ -68,4 +68,3 @@ read_solaris_pt(int fd, struct slice all, struct slice *sp, int ns) {
}
return n;
}
-
@@ -126,4 +126,3 @@ read_sun_pt(int fd, struct slice all, struct slice *sp, int ns) {
}
return n;
}
-
@@ -17,7 +17,7 @@ struct unixware_disklabel {
unsigned int d_type; /* drive type */
unsigned char d_magic[4]; /* the magic number */
unsigned int d_version; /* version number */
- char d_serial[12]; /* serial number of the device */
+ char d_serial[12]; /* serial number of the device */
unsigned int d_ncylinders; /* # of data cylinders per device */
unsigned int d_ntracks; /* # of tracks per cylinder */
unsigned int d_nsectors; /* # of data sectors per track */
@@ -37,7 +37,7 @@ struct unixware_disklabel {
struct unixware_vtoc {
unsigned char v_magic[4]; /* the magic number */
unsigned int v_version; /* version number */
- char v_name[8]; /* volume name */
+ char v_name[8]; /* volume name */
unsigned short v_nslices; /* # of slices */
unsigned short v_unknown1; /* ? */
unsigned int v_reserved[10]; /* reserved */
@@ -55,7 +55,7 @@ read_unixware_pt(int fd, struct slice all, struct slice *sp, int ns) {
char *bp;
int n = 0;
- bp = getblock(fd, offset+29); /* 1 sector suffices */
+ bp = getblock(fd, offset+29); /* 1 sector suffices */
if (bp == NULL)
return -1;
@@ -31,38 +31,38 @@ extern "C" {
/*
* DESCRIPTION:
- * Connect to the running multipathd daemon. On systems with the
- * multipathd.socket systemd unit file installed, this command will
- * start multipathd if it is not already running. This function
- * must be run before any of the others in this library
+ * Connect to the running multipathd daemon. On systems with the
+ * multipathd.socket systemd unit file installed, this command will
+ * start multipathd if it is not already running. This function
+ * must be run before any of the others in this library
*
* RETURNS:
- * A file descriptor on success. -1 on failure (with errno set).
+ * A file descriptor on success. -1 on failure (with errno set).
*/
int mpath_connect(void);
/*
* DESCRIPTION:
- * Disconnect from the multipathd daemon. This function must be
- * run after after processing all the multipath commands.
+ * Disconnect from the multipathd daemon. This function must be
+ * run after after processing all the multipath commands.
*
* RETURNS:
- * 0 on success. -1 on failure (with errno set).
+ * 0 on success. -1 on failure (with errno set).
*/
int mpath_disconnect(int fd);
/*
* DESCRIPTION
- * Send multipathd a command and return the reply. This function
- * does the same as calling mpath_send_cmd() and then
+ * Send multipathd a command and return the reply. This function
+ * does the same as calling mpath_send_cmd() and then
* mpath_recv_reply()
*
* RETURNS:
- * 0 on successs, and reply will either be NULL (if there was no
- * reply data), or point to the reply string, which must be freed by
- * the caller. -1 on failure (with errno set).
+ * 0 on successs, and reply will either be NULL (if there was no
+ * reply data), or point to the reply string, which must be freed by
+ * the caller. -1 on failure (with errno set).
*/
int mpath_process_cmd(int fd, const char *cmd, char **reply,
unsigned int timeout);
@@ -70,50 +70,50 @@ int mpath_process_cmd(int fd, const char *cmd, char **reply,
/*
* DESCRIPTION:
- * Send a command to multipathd
+ * Send a command to multipathd
*
* RETURNS:
- * 0 on success. -1 on failure (with errno set)
+ * 0 on success. -1 on failure (with errno set)
*/
int mpath_send_cmd(int fd, const char *cmd);
/*
* DESCRIPTION:
- * Return a reply from multipathd for a previously sent command.
- * This is equivalent to calling mpath_recv_reply_len(), allocating
- * a buffer of the appropriate size, and then calling
+ * Return a reply from multipathd for a previously sent command.
+ * This is equivalent to calling mpath_recv_reply_len(), allocating
+ * a buffer of the appropriate size, and then calling
* mpath_recv_reply_data() with that buffer.
*
* RETURNS:
- * 0 on success, and reply will either be NULL (if there was no
- * reply data), or point to the reply string, which must be freed by
- * the caller, -1 on failure (with errno set).
+ * 0 on success, and reply will either be NULL (if there was no
+ * reply data), or point to the reply string, which must be freed by
+ * the caller, -1 on failure (with errno set).
*/
int mpath_recv_reply(int fd, char **reply, unsigned int timeout);
/*
* DESCRIPTION:
- * Return the size of the upcoming reply data from the sent multipath
- * command. This must be called before calling mpath_recv_reply_data().
+ * Return the size of the upcoming reply data from the sent multipath
+ * command. This must be called before calling mpath_recv_reply_data().
*
* RETURNS:
- * The required size of the reply data buffer on success. -1 on
- * failure (with errno set).
+ * The required size of the reply data buffer on success. -1 on
+ * failure (with errno set).
*/
ssize_t mpath_recv_reply_len(int fd, unsigned int timeout);
/*
* DESCRIPTION:
- * Return the reply data from the sent multipath command.
- * mpath_recv_reply_len must be called first. reply must point to a
- * buffer of len size.
+ * Return the reply data from the sent multipath command.
+ * mpath_recv_reply_len must be called first. reply must point to a
+ * buffer of len size.
*
* RETURNS:
- * 0 on success, and reply will contain the reply data string. -1
- * on failure (with errno set).
+ * 0 on success, and reply will contain the reply data string. -1
+ * on failure (with errno set).
*/
int mpath_recv_reply_data(int fd, char *reply, size_t len,
unsigned int timeout);
@@ -925,6 +925,3 @@ int update_map_pr(struct multipath *mpp)
free(resp);
return MPATH_PR_SUCCESS;
}
-
-
-
@@ -12,7 +12,7 @@ extern "C" {
#define MPATH_MAX_PARAM_LEN 8192
-#define MPATH_MX_TIDS 32 /* Max number of transport ids"*/
+#define MPATH_MX_TIDS 32 /* Max number of transport ids"*/
#define MPATH_MX_TID_LEN 256 /* Max lenght of transport id */
/* PRIN Service Actions */
@@ -34,24 +34,24 @@ extern "C" {
#define MPATH_LU_SCOPE 0x00 /* LU_SCOPE */
/* Persistent reservations type */
-#define MPATH_PRTPE_WE 0x01 /* Write Exclusive */
-#define MPATH_PRTPE_EA 0x03 /* Exclusive Access*/
-#define MPATH_PRTPE_WE_RO 0x05 /* WriteExclusive Registrants Only */
-#define MPATH_PRTPE_EA_RO 0x06 /* Exclusive Access. Registrants Only*/
+#define MPATH_PRTPE_WE 0x01 /* Write Exclusive */
+#define MPATH_PRTPE_EA 0x03 /* Exclusive Access*/
+#define MPATH_PRTPE_WE_RO 0x05 /* WriteExclusive Registrants Only */
+#define MPATH_PRTPE_EA_RO 0x06 /* Exclusive Access. Registrants Only*/
#define MPATH_PRTPE_WE_AR 0x07 /* Write Exclusive. All Registrants*/
-#define MPATH_PRTPE_EA_AR 0x08 /* Exclusive Access. All Registrants */
+#define MPATH_PRTPE_EA_AR 0x08 /* Exclusive Access. All Registrants */
/* PR RETURN_STATUS */
-#define MPATH_PR_SUCCESS 0
+#define MPATH_PR_SUCCESS 0
#define MPATH_PR_SYNTAX_ERROR 1 /* syntax error or invalid parameter */
/* status for check condition */
-#define MPATH_PR_SENSE_NOT_READY 2 /* [sk,asc,ascq: 0x2,*,*] */
+#define MPATH_PR_SENSE_NOT_READY 2 /* [sk,asc,ascq: 0x2,*,*] */
#define MPATH_PR_SENSE_MEDIUM_ERROR 3 /* [sk,asc,ascq: 0x3,*,*] */
#define MPATH_PR_SENSE_HARDWARE_ERROR 4 /* [sk,asc,ascq: 0x4,*,*] */
-#define MPATH_PR_ILLEGAL_REQ 5 /* [sk,asc,ascq: 0x5,*,*]*/
+#define MPATH_PR_ILLEGAL_REQ 5 /* [sk,asc,ascq: 0x5,*,*]*/
#define MPATH_PR_SENSE_UNIT_ATTENTION 6 /* [sk,asc,ascq: 0x6,*,*] */
-#define MPATH_PR_SENSE_INVALID_OP 7 /* [sk,asc,ascq: 0x5,0x20,0x0]*/
+#define MPATH_PR_SENSE_INVALID_OP 7 /* [sk,asc,ascq: 0x5,0x20,0x0]*/
#define MPATH_PR_SENSE_ABORTED_COMMAND 8 /* [sk,asc,ascq: 0xb,*,*] */
#define MPATH_PR_NO_SENSE 9 /* [sk,asc,ascq: 0x0,*,*] */
@@ -66,7 +66,7 @@ extern "C" {
#define MPATH_F_APTPL_MASK 0x01 /* APTPL MASK*/
#define MPATH_F_ALL_TG_PT_MASK 0x04 /* ALL_TG_PT MASK*/
#define MPATH_F_SPEC_I_PT_MASK 0x08 /* SPEC_I_PT MASK*/
-#define MPATH_PR_TYPE_MASK 0x0f /* TYPE MASK*/
+#define MPATH_PR_TYPE_MASK 0x0f /* TYPE MASK*/
#define MPATH_PR_SCOPE_MASK 0xf0 /* SCOPE MASK*/
/*Transport ID PROTOCOL IDENTIFIER values */
@@ -125,7 +125,7 @@ struct transportid
struct prin_fulldescr
{
uint8_t key[8];
- uint8_t flag; /* All_tg_pt and reservation holder */
+ uint8_t flag; /* All_tg_pt and reservation holder */
uint8_t scope_type; /* Use PR SCOPE AND TYPE MASK specified above.
Meaningful only for reservation holder */
uint16_t rtpi;
@@ -151,7 +151,7 @@ struct prin_resp
}prin_descriptor;
};
-struct prout_param_descriptor { /* PROUT parameter descriptor */
+struct prout_param_descriptor { /* PROUT parameter descriptor */
uint8_t key[8];
uint8_t sa_key[8];
uint32_t _obsolete;
@@ -195,7 +195,7 @@ extern int mpath_lib_exit (struct config *conf);
* @fd: The file descriptor of a multipath device. Input argument.
* @rq_servact: PRIN command service action. Input argument
* @resp: The response from PRIN service action. The resp is a struct specified above. The caller should
- * manage the memory allocation of this struct
+ * manage the memory allocation of this struct
* @noisy: Turn on debugging trace: Input argument. 0->Disable, 1->Enable
* @verbose: Set verbosity level. Input argument. value:[0-3]. 0->disabled, 3->Max verbose
*
@@ -221,7 +221,7 @@ extern int mpath_persistent_reserve_in (int fd, int rq_servact, struct prin_resp
* 7h (Write exclusive - All registrants)
* 8h (Exclusive access - All registrants).
* @paramp: PROUT command parameter data. The paramp is a struct which describes PROUT
- * parameter list. The caller should manage the memory allocation of this struct.
+ * parameter list. The caller should manage the memory allocation of this struct.
* @noisy: Turn on debugging trace: Input argument.0->Disable, 1->Enable.
* @verbose: Set verbosity level. Input argument. value:0 to 3. 0->disabled, 3->Max verbose
*
@@ -307,7 +307,7 @@ int prin_do_scsi_ioctl(char * dev, int rq_servact, struct prin_resp * resp, int
snprintf(devname, FILE_NAME_SIZE, "/dev/%s",dev);
fd = open(devname, O_WRONLY);
if(fd < 0){
- condlog(0, "%s: Unable to open device ", dev);
+ condlog(0, "%s: Unable to open device ", dev);
return MPATH_PR_FILE_ERROR;
}
@@ -107,5 +107,3 @@ typedef struct SenseData
/* Driver status */
#define DRIVER_OK 0x00
-
-
@@ -139,4 +139,3 @@ void cciss_free (struct checker * c);
int cciss_tur( struct checker *);
#endif
-
@@ -734,4 +734,3 @@ out:
free_config(conf);
return NULL;
}
-
@@ -290,7 +290,7 @@ static inline void list_splice_tail_init(struct list_head *list,
*/
#define list_for_each_entry(pos, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member); \
- &pos->member != (head); \
+ &pos->member != (head); \
pos = list_entry(pos->member.next, typeof(*pos), member))
/**
@@ -301,7 +301,7 @@ static inline void list_splice_tail_init(struct list_head *list,
*/
#define list_for_each_entry_reverse(pos, head, member) \
for (pos = list_entry((head)->prev, typeof(*pos), member); \
- &pos->member != (head); \
+ &pos->member != (head); \
pos = list_entry(pos->member.prev, typeof(*pos), member))
/**
@@ -314,7 +314,7 @@ static inline void list_splice_tail_init(struct list_head *list,
#define list_for_each_entry_safe(pos, n, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member), \
n = list_entry(pos->member.next, typeof(*pos), member); \
- &pos->member != (head); \
+ &pos->member != (head); \
pos = n, n = list_entry(n->member.next, typeof(*n), member))
#endif /* _LIST_H */
@@ -6,4 +6,3 @@ void cleanup_lock (void * data)
{
unlock ((*(struct mutex_lock *)data));
}
-
@@ -130,4 +130,3 @@ void log_thread_stop (void)
log_close();
}
-
@@ -1827,4 +1827,3 @@ print_all_paths_custo (vector pathvec, int banner, char *fmt)
vector_foreach_slot (pathvec, pp, i)
print_path(pp, fmt);
}
-
@@ -125,4 +125,3 @@ void print_map (struct multipath * mpp, char * params);
void print_all_paths (vector pathvec, int banner);
void print_all_paths_custo (vector pathvec, int banner, char *fmt);
void print_hwtable (vector hwtable);
-
@@ -357,4 +357,3 @@ out:
free(buf);
return rc;
}
-
@@ -27,4 +27,3 @@ int get_target_port_group(struct path * pp, unsigned int timeout);
int get_asymmetric_access_state(int fd, unsigned int tpg, unsigned int timeout);
#endif /* __RTPG_H__ */
-
@@ -323,4 +323,3 @@ struct rtpg_data {
)
#endif /* __SPC3_H__ */
-
@@ -110,4 +110,3 @@ int getprio (struct path * pp, char * args)
{
return datacore_prio(pp->dev, pp->fd, args);
}
-
@@ -140,4 +140,3 @@ int getprio(struct path *pp, char *args)
{
return prio_path_weight(pp, args);
}
-
@@ -689,4 +689,3 @@ out:
return 0;
}
-
@@ -636,4 +636,3 @@ void update_queue_mode_add_path(struct multipath *mpp)
}
condlog(2, "%s: remaining active paths: %d", mpp->alias, mpp->nr_active);
}
-
@@ -213,4 +213,3 @@ out:
condlog(0, "failed to start waiter thread");
return 1;
}
-
@@ -834,4 +834,3 @@ my_cont_b:
}
return 0;
}
-
@@ -26,4 +26,3 @@ static struct option long_options[] = {
};
static void usage(void);
-
@@ -688,4 +688,3 @@ key_generator (const char * str, int state)
*/
return ((char *)NULL);
}
-
@@ -43,4 +43,3 @@ int cli_reassign (void * v, char ** reply, int * len, void * data);
int cli_getprstatus(void * v, char ** reply, int * len, void * data);
int cli_setprstatus(void * v, char ** reply, int * len, void * data);
int cli_unsetprstatus(void * v, char ** reply, int * len, void * data);
-
@@ -2713,4 +2713,3 @@ int mpath_pr_event_handle(struct path *pp)
rc = pthread_join(thread, NULL);
return 0;
}
-
@@ -10,4 +10,3 @@ extern volatile sig_atomic_t reconfig_sig;
extern volatile sig_atomic_t log_reset_sig;
#endif
-
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com> Cc: device-mapper development <dm-devel@redhat.com> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> --- kpartx/crc32.c | 32 ++++++++--------- kpartx/dasd.h | 4 +-- kpartx/gpt.c | 2 +- kpartx/ps3.c | 5 --- kpartx/solaris.c | 5 ++- kpartx/sun.c | 1 - kpartx/unixware.c | 6 ++-- libmpathcmd/mpath_cmd.h | 60 ++++++++++++++++---------------- libmpathpersist/mpath_persist.c | 3 -- libmpathpersist/mpath_persist.h | 30 ++++++++-------- libmpathpersist/mpath_pr_ioctl.c | 2 +- libmpathpersist/mpath_pr_ioctl.h | 2 -- libmultipath/checkers/cciss.h | 1 - libmultipath/config.c | 1 - libmultipath/list.h | 6 ++-- libmultipath/lock.c | 1 - libmultipath/log_pthread.c | 1 - libmultipath/print.c | 1 - libmultipath/print.h | 1 - libmultipath/prioritizers/alua_rtpg.c | 1 - libmultipath/prioritizers/alua_rtpg.h | 1 - libmultipath/prioritizers/alua_spc3.h | 1 - libmultipath/prioritizers/datacore.c | 1 - libmultipath/prioritizers/weightedpath.c | 1 - libmultipath/structs.c | 1 - libmultipath/structs_vec.c | 1 - libmultipath/waiter.c | 1 - mpathpersist/main.c | 1 - mpathpersist/main.h | 1 - multipathd/cli.c | 1 - multipathd/cli_handlers.h | 1 - multipathd/main.c | 1 - multipathd/uxlsnr.h | 1 - 33 files changed, 73 insertions(+), 105 deletions(-)