Author: trasz
Date: Wed Oct 22 09:17:17 2014
New Revision: 273464
URL: https://svnweb.freebsd.org/changeset/base/273464

Log:
  Whitespace fixes.
  
  MFC after:    1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.bin/iscsictl/Makefile
  head/usr.bin/iscsictl/iscsictl.c
  head/usr.sbin/ctladm/Makefile
  head/usr.sbin/ctladm/ctladm.c
  head/usr.sbin/ctld/ctld.c
  head/usr.sbin/ctld/kernel.c
  head/usr.sbin/ctld/keys.c
  head/usr.sbin/ctld/login.c
  head/usr.sbin/ctld/parse.y
  head/usr.sbin/iscsid/keys.c
  head/usr.sbin/iscsid/login.c

Modified: head/usr.bin/iscsictl/Makefile
==============================================================================
--- head/usr.bin/iscsictl/Makefile      Wed Oct 22 09:12:20 2014        
(r273463)
+++ head/usr.bin/iscsictl/Makefile      Wed Oct 22 09:17:17 2014        
(r273464)
@@ -6,7 +6,7 @@ CFLAGS+=        -I${.CURDIR}
 CFLAGS+=       -I${.CURDIR}/../../sys/dev/iscsi
 MAN=           iscsictl.8
 
-DPADD=         ${LIBCAM} ${LIBUTIL} 
+DPADD=         ${LIBCAM} ${LIBUTIL}
 LDADD=         -lcam -lutil
 
 YFLAGS+=       -v

Modified: head/usr.bin/iscsictl/iscsictl.c
==============================================================================
--- head/usr.bin/iscsictl/iscsictl.c    Wed Oct 22 09:12:20 2014        
(r273463)
+++ head/usr.bin/iscsictl/iscsictl.c    Wed Oct 22 09:17:17 2014        
(r273464)
@@ -172,7 +172,7 @@ valid_iscsi_name(const char *name)
                for (i = strlen("iqn."); name[i] != '\0'; i++) {
                        /*
                         * XXX: We should verify UTF-8 normalisation, as defined
-                        *      by 3.2.6.2: iSCSI Name Encoding.
+                        *      by 3.2.6.2: iSCSI Name Encoding.
                         */
                        if (isalnum(name[i]))
                                continue;

Modified: head/usr.sbin/ctladm/Makefile
==============================================================================
--- head/usr.sbin/ctladm/Makefile       Wed Oct 22 09:12:20 2014        
(r273463)
+++ head/usr.sbin/ctladm/Makefile       Wed Oct 22 09:17:17 2014        
(r273464)
@@ -2,12 +2,12 @@
 
 PROG=          ctladm
 SRCS=          ctladm.c util.c ctl_util.c ctl_scsi_all.c
-.PATH:         ${.CURDIR}/../../sys/cam/ctl 
+.PATH:         ${.CURDIR}/../../sys/cam/ctl
 SDIR=          ${.CURDIR}/../../sys
 CFLAGS+=       -I${SDIR}
 # This is necessary because of these warnings:
 # warning: cast increases required alignment of target type
-# The solution is to either upgrade the compiler (preferred), or do void 
+# The solution is to either upgrade the compiler (preferred), or do void
 # pointer gymnastics to get around the warning.  For now, disable the
 # warning instead of doing the void pointer workaround.
 .if ${MACHINE_CPUARCH} == "arm"

Modified: head/usr.sbin/ctladm/ctladm.c
==============================================================================
--- head/usr.sbin/ctladm/ctladm.c       Wed Oct 22 09:12:20 2014        
(r273463)
+++ head/usr.sbin/ctladm/ctladm.c       Wed Oct 22 09:17:17 2014        
(r273464)
@@ -148,7 +148,7 @@ typedef enum {
        CTLADM_ARG_ONOFFLINE    = 0x0080000,
        CTLADM_ARG_ONESHOT      = 0x0100000,
        CTLADM_ARG_TIMEOUT      = 0x0200000,
-       CTLADM_ARG_INITIATOR    = 0x0400000,
+       CTLADM_ARG_INITIATOR    = 0x0400000,
        CTLADM_ARG_NOCOPY       = 0x0800000,
        CTLADM_ARG_NEED_TL      = 0x1000000
 } ctladm_cmdargs;
@@ -237,7 +237,7 @@ static int cctl_sync_cache(int fd, int t
                           int argc, char **argv, char *combinedopt);
 static int cctl_start_stop(int fd, int target, int lun, int iid, int retries,
                           int start, int argc, char **argv, char *combinedopt);
-static int cctl_mode_sense(int fd, int target, int lun, int iid, int retries, 
+static int cctl_mode_sense(int fd, int target, int lun, int iid, int retries,
                           int argc, char **argv, char *combinedopt);
 static int cctl_read_capacity(int fd, int target, int lun, int iid,
                              int retries, int argc, char **argv,
@@ -258,7 +258,7 @@ static int cctl_req_sense(int fd, int ta
 static int cctl_persistent_reserve_in(int fd, int target, int lun,
                                      int initiator, int argc, char **argv,
                                      char *combinedopt, int retry_count);
-static int cctl_persistent_reserve_out(int fd, int target, int lun, 
+static int cctl_persistent_reserve_out(int fd, int target, int lun,
                                       int initiator, int argc, char **argv,
                                       char *combinedopt, int retry_count);
 static int cctl_create_lun(int fd, int argc, char **argv, char *combinedopt);
@@ -394,7 +394,7 @@ retry:
                cmd_latency = ts.tv_sec * 1000;
                if (ts.tv_nsec > 0)
                        cmd_latency += ts.tv_nsec / 1000000;
-               
+
                fprintf(stdout, "LUN %jd tag 0x%04x%s%s%s%s%s: %s. CDB: %s "
                        "(%0.0Lf ms)\n",
                        (intmax_t)entry->lun_num, entry->tag_num,
@@ -622,7 +622,7 @@ cctl_port(int fd, int argc, char **argv,
                case 'o':
                        if (port_mode != CCTL_PORT_MODE_NONE)
                                goto bailout_badarg;
-                       
+
                        if (strcasecmp(optarg, "on") == 0)
                                port_mode = CCTL_PORT_MODE_ON;
                        else if (strcasecmp(optarg, "off") == 0)
@@ -1041,7 +1041,7 @@ static struct ctladm_opts cctl_err_patte
 };
 
 static int
-cctl_error_inject(int fd, uint32_t target, uint32_t lun, int argc, char 
**argv, 
+cctl_error_inject(int fd, uint32_t target, uint32_t lun, int argc, char **argv,
                  char *combinedopt)
 {
        int retval = 0;
@@ -1206,12 +1206,12 @@ cctl_error_inject(int fd, uint32_t targe
         if (fd_sense == 1) {
                ssize_t amt_read;
                int amt_to_read = sense_len;
-               u_int8_t *buf_ptr = (uint8_t *)&err_desc.custom_sense;
+               u_int8_t *buf_ptr = (uint8_t *)&err_desc.custom_sense;
 
                for (amt_read = 0; amt_to_read > 0;
                     amt_read = read(STDIN_FILENO, buf_ptr, amt_to_read)) {
                        if (amt_read == -1) {
-                               warn("error reading sense data from stdin");
+                               warn("error reading sense data from stdin");
                                retval = 1;
                                goto bailout;
                        }
@@ -1617,7 +1617,7 @@ cctl_startup_shutdown(int fd, int target
                        }
 
                        if (ooa_info.status != CTL_OOA_SUCCESS) {
-                               printf("%s CTL_CHECK_OOA returned status %d\n", 
+                               printf("%s CTL_CHECK_OOA returned status %d\n",
                                       scsi_path, ooa_info.status);
                                continue;
                        }
@@ -1629,7 +1629,7 @@ cctl_startup_shutdown(int fd, int target
                                continue;
                        }
                }
-               
+
                ctl_scsi_start_stop(/*io*/ io,
                                    /*start*/(command == CTLADM_CMD_STARTUP) ?
                                              1 : 0,
@@ -1682,7 +1682,7 @@ cctl_sync_cache(int fd, int target, int 
        int retval;
        uint64_t our_lba = 0;
        uint32_t our_block_count = 0;
-       int reladr = 0, immed = 0; 
+       int reladr = 0, immed = 0;
        int c;
 
        id.id = iid;
@@ -1830,7 +1830,7 @@ bailout:
 }
 
 static int
-cctl_mode_sense(int fd, int target, int lun, int iid, int retries, 
+cctl_mode_sense(int fd, int target, int lun, int iid, int retries,
                int argc, char **argv, char *combinedopt)
 {
        union ctl_io *io;
@@ -2048,8 +2048,8 @@ bailout:
 }
 
 static int
-cctl_read_capacity(int fd, int target, int lun, int iid, int retries, 
-                  int argc, char **argv, char *combinedopt)
+cctl_read_capacity(int fd, int target, int lun, int iid, int retries,
+                  int argc, char **argv, char *combinedopt)
 {
        union ctl_io *io;
        struct ctl_id id;
@@ -2518,7 +2518,7 @@ cctl_tur(int fd, int target, int lun, in
 }
 
 static int
-cctl_get_inquiry(int fd, int target, int lun, int iid, int retries, 
+cctl_get_inquiry(int fd, int target, int lun, int iid, int retries,
                 char *path_str, int path_len,
                 struct scsi_inquiry_data *inq_data)
 {
@@ -2669,7 +2669,7 @@ cctl_report_target_port_group(int fd, in
        dataptr = (uint8_t *)malloc(datalen);
        if (dataptr == NULL) {
                warn("%s: can't allocate %d bytes", __func__, datalen);
-               retval = 1;
+               retval = 1;
                goto bailout;
        }
 
@@ -2737,7 +2737,7 @@ cctl_inquiry_vpd_devid(int fd, int targe
        dataptr = (uint8_t *)malloc(datalen);
        if (dataptr == NULL) {
                warn("%s: can't allocate %d bytes", __func__, datalen);
-               retval = 1;
+               retval = 1;
                goto bailout;
        }
 
@@ -2784,7 +2784,7 @@ bailout:
 }
 
 static int
-cctl_persistent_reserve_in(int fd, int target, int lun, int initiator, 
+cctl_persistent_reserve_in(int fd, int target, int lun, int initiator,
                            int argc, char **argv, char *combinedopt,
                           int retry_count)
 {
@@ -2827,7 +2827,7 @@ cctl_persistent_reserve_in(int fd, int t
        dataptr = (uint8_t *)malloc(datalen);
        if (dataptr == NULL) {
                warn("%s: can't allocate %d bytes", __func__, datalen);
-               retval = 1;
+               retval = 1;
                goto bailout;
        }
 
@@ -2890,8 +2890,8 @@ bailout:
 }
 
 static int
-cctl_persistent_reserve_out(int fd, int target, int lun, int initiator, 
-                           int argc, char **argv, char *combinedopt, 
+cctl_persistent_reserve_out(int fd, int target, int lun, int initiator,
+                           int argc, char **argv, char *combinedopt,
                            int retry_count)
 {
        union ctl_io *io;
@@ -3835,7 +3835,7 @@ struct cctl_lun_nv {
 };
 
 /*
- * Backend LUN information.  
+ * Backend LUN information.
  */
 struct cctl_lun {
        uint64_t lun_id;
@@ -3951,7 +3951,7 @@ cctl_end_element(void *user_data, const 
        } else if (strcmp(name, "lun") == 0) {
                devlist->cur_lun = NULL;
        } else if (strcmp(name, "ctllunlist") == 0) {
-               
+               /* Nothing. */
        } else {
                struct cctl_lun_nv *nv;
 
@@ -4216,7 +4216,7 @@ cctl_end_pelement(void *user_data, const
        } else if (strcmp(name, "targ_port") == 0) {
                portlist->cur_port = NULL;
        } else if (strcmp(name, "ctlportlist") == 0) {
-               
+               /* Nothing. */
        } else {
                struct cctl_lun_nv *nv;
 
@@ -4575,7 +4575,7 @@ main(int argc, char **argv)
        }
 
        if (cmdargs & CTLADM_ARG_NEED_TL) {
-               if ((argc < 3)
+               if ((argc < 3)
                 || (!isdigit(argv[2][0]))) {
                        warnx("option %s requires a target:lun argument",
                              argv[1]);
@@ -4802,12 +4802,12 @@ main(int argc, char **argv)
                retval = cctl_dump_structs(fd, cmdargs);
                break;
        case CTLADM_CMD_PRES_IN:
-               retval = cctl_persistent_reserve_in(fd, target, lun, initid, 
+               retval = cctl_persistent_reserve_in(fd, target, lun, initid,
                                                    argc, argv, combinedopt,
                                                    retries);
                break;
        case CTLADM_CMD_PRES_OUT:
-               retval = cctl_persistent_reserve_out(fd, target, lun, initid, 
+               retval = cctl_persistent_reserve_out(fd, target, lun, initid,
                                                     argc, argv, combinedopt,
                                                     retries);
                break;

Modified: head/usr.sbin/ctld/ctld.c
==============================================================================
--- head/usr.sbin/ctld/ctld.c   Wed Oct 22 09:12:20 2014        (r273463)
+++ head/usr.sbin/ctld/ctld.c   Wed Oct 22 09:17:17 2014        (r273464)
@@ -255,7 +255,7 @@ auth_new_chap_mutual(struct auth_group *
                if (ag->ag_name != NULL)
                        log_warnx("cannot mix \"chap-mutual\" authentication "
                            "with other types for auth-group \"%s\"",
-                           ag->ag_name); 
+                           ag->ag_name);
                else
                        log_warnx("cannot mix \"chap-mutual\" authentication "
                            "with other types for target \"%s\"",
@@ -754,7 +754,7 @@ valid_iscsi_name(const char *name)
                for (i = strlen("iqn."); name[i] != '\0'; i++) {
                        /*
                         * XXX: We should verify UTF-8 normalisation, as defined
-                        *      by 3.2.6.2: iSCSI Name Encoding.
+                        *      by 3.2.6.2: iSCSI Name Encoding.
                         */
                        if (isalnum(name[i]))
                                continue;
@@ -1281,10 +1281,10 @@ conf_apply(struct conf *oldconf, struct 
 
        /*
         * XXX: If target or lun removal fails, we should somehow "move"
-        *      the old lun or target into newconf, so that subsequent
-        *      conf_apply() would try to remove them again.  That would
-        *      be somewhat hairy, though, and lun deletion failures don't
-        *      really happen, so leave it as it is for now.
+        *      the old lun or target into newconf, so that subsequent
+        *      conf_apply() would try to remove them again.  That would
+        *      be somewhat hairy, though, and lun deletion failures don't
+        *      really happen, so leave it as it is for now.
         */
        TAILQ_FOREACH_SAFE(oldtarg, &oldconf->conf_targets, t_next, tmptarg) {
                /*

Modified: head/usr.sbin/ctld/kernel.c
==============================================================================
--- head/usr.sbin/ctld/kernel.c Wed Oct 22 09:12:20 2014        (r273463)
+++ head/usr.sbin/ctld/kernel.c Wed Oct 22 09:17:17 2014        (r273464)
@@ -105,7 +105,7 @@ struct cctl_lun_nv {
 };
 
 /*
- * Backend LUN information.  
+ * Backend LUN information.
  */
 struct cctl_lun {
        uint64_t lun_id;
@@ -237,7 +237,7 @@ cctl_end_element(void *user_data, const 
        } else if (strcmp(name, "lun") == 0) {
                devlist->cur_lun = NULL;
        } else if (strcmp(name, "ctllunlist") == 0) {
-               
+               /* Nothing. */
        } else {
                struct cctl_lun_nv *nv;
 
@@ -342,7 +342,7 @@ cctl_end_pelement(void *user_data, const
        } else if (strcmp(name, "targ_port") == 0) {
                devlist->cur_port = NULL;
        } else if (strcmp(name, "ctlportlist") == 0) {
-               
+               /* Nothing. */
        } else {
                struct cctl_lun_nv *nv;
 

Modified: head/usr.sbin/ctld/keys.c
==============================================================================
--- head/usr.sbin/ctld/keys.c   Wed Oct 22 09:12:20 2014        (r273463)
+++ head/usr.sbin/ctld/keys.c   Wed Oct 22 09:17:17 2014        (r273464)
@@ -116,7 +116,7 @@ keys_save(struct keys *keys, struct pdu 
        for (i = 0; i < KEYS_MAX; i++) {
                if (keys->keys_names[i] == NULL)
                        break;
-               /*
+               /*
                 * +1 for '=', +1 for '\0'.
                 */
                len += strlen(keys->keys_names[i]) +

Modified: head/usr.sbin/ctld/login.c
==============================================================================
--- head/usr.sbin/ctld/login.c  Wed Oct 22 09:12:20 2014        (r273463)
+++ head/usr.sbin/ctld/login.c  Wed Oct 22 09:17:17 2014        (r273464)
@@ -640,7 +640,7 @@ login_negotiate(struct connection *conn,
                if (conn->conn_target->t_alias != NULL)
                        keys_add(response_keys,
                            "TargetAlias", conn->conn_target->t_alias);
-               keys_add_int(response_keys, "TargetPortalGroupTag", 
+               keys_add_int(response_keys, "TargetPortalGroupTag",
                    conn->conn_portal->p_portal_group->pg_tag);
        }
 
@@ -852,7 +852,7 @@ login(struct connection *conn)
                        if (conn->conn_target->t_alias != NULL)
                                keys_add(response_keys,
                                    "TargetAlias", conn->conn_target->t_alias);
-                       keys_add_int(response_keys, "TargetPortalGroupTag", 
+                       keys_add_int(response_keys, "TargetPortalGroupTag",
                            conn->conn_portal->p_portal_group->pg_tag);
                }
                keys_save(response_keys, response);
@@ -903,7 +903,7 @@ login(struct connection *conn)
                if (conn->conn_target->t_alias != NULL)
                        keys_add(response_keys,
                            "TargetAlias", conn->conn_target->t_alias);
-               keys_add_int(response_keys, "TargetPortalGroupTag", 
+               keys_add_int(response_keys, "TargetPortalGroupTag",
                    conn->conn_portal->p_portal_group->pg_tag);
        }
        keys_save(response_keys, response);

Modified: head/usr.sbin/ctld/parse.y
==============================================================================
--- head/usr.sbin/ctld/parse.y  Wed Oct 22 09:12:20 2014        (r273463)
+++ head/usr.sbin/ctld/parse.y  Wed Oct 22 09:17:17 2014        (r273464)
@@ -625,7 +625,7 @@ lun_device_id:      DEVICE_ID STR
 lun_option:    OPTION STR STR
        {
                struct lun_option *clo;
-               
+
                clo = lun_option_new(lun, $2, $3);
                free($2);
                free($3);

Modified: head/usr.sbin/iscsid/keys.c
==============================================================================
--- head/usr.sbin/iscsid/keys.c Wed Oct 22 09:12:20 2014        (r273463)
+++ head/usr.sbin/iscsid/keys.c Wed Oct 22 09:17:17 2014        (r273464)
@@ -117,7 +117,7 @@ keys_save(struct keys *keys, struct pdu 
        for (i = 0; i < KEYS_MAX; i++) {
                if (keys->keys_names[i] == NULL)
                        break;
-               /*
+               /*
                 * +1 for '=', +1 for '\0'.
                 */
                len += strlen(keys->keys_names[i]) +

Modified: head/usr.sbin/iscsid/login.c
==============================================================================
--- head/usr.sbin/iscsid/login.c        Wed Oct 22 09:12:20 2014        
(r273463)
+++ head/usr.sbin/iscsid/login.c        Wed Oct 22 09:17:17 2014        
(r273464)
@@ -182,7 +182,7 @@ kernel_modify(const struct connection *c
  *     be much more complicated: we would need to keep "dependencies"
  *     for sessions, so that, in case described in draft and using draft
  *     terminology, we would have three sessions: one for discovery,
- *     one for initial target portal, and one for redirect portal.  
+ *     one for initial target portal, and one for redirect portal.
  *     This would allow us to "backtrack" on connection failure,
  *     as described in draft.
  */
@@ -756,8 +756,8 @@ login(struct connection *conn)
                 * to parse things such as TargetAlias.
                 *
                 * XXX: This is somewhat ugly.  We should have a way to apply
-                *      all the keys to the session and use that by default
-                *      instead of discarding them.
+                *      all the keys to the session and use that by default
+                *      instead of discarding them.
                 */
                if (strcmp(response_keys->keys_names[i], "AuthMethod") == 0)
                        continue;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to