All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Christophe Varoqui <christophe.varoqui@gmail.com>
Cc: dm-devel@redhat.com
Subject: [PATCH 02/42] Remove newline from condlog()
Date: Tue,  8 Jan 2013 14:53:40 +0100	[thread overview]
Message-ID: <1357653259-62650-3-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1357653259-62650-1-git-send-email-hare@suse.de>

condlog() already adds a newline to each message.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 libmultipath/devmapper.c   |    8 ++++----
 libmultipath/dmparser.c    |    4 ++--
 libmultipath/structs_vec.c |    2 +-
 libmultipath/sysfs.c       |    2 +-
 libmultipath/uevent.c      |    4 ++--
 libmultipath/util.c        |   12 ++++++------
 multipath/main.c           |    2 +-
 multipathd/main.c          |   27 ++++++++++++++-------------
 8 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index 5132399..051ecb2 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -284,7 +284,7 @@ dm_addmap (int task, const char *target, struct multipath *mpp, char * params,
 	if (use_uuid && strlen(mpp->wwid) > 0){
 		prefixed_uuid = MALLOC(UUID_PREFIX_LEN + strlen(mpp->wwid) + 1);
 		if (!prefixed_uuid) {
-			condlog(0, "cannot create prefixed uuid : %s\n",
+			condlog(0, "cannot create prefixed uuid : %s",
 				strerror(errno));
 			goto addout;
 		}
@@ -302,7 +302,7 @@ dm_addmap (int task, const char *target, struct multipath *mpp, char * params,
 	if (mpp->attribute_flags & (1 << ATTR_GID) &&
 	    !dm_task_set_gid(dmt, mpp->gid))
 		goto freeout;
-	condlog(4, "%s: addmap [0 %llu %s %s]\n", mpp->alias, mpp->size,
+	condlog(4, "%s: addmap [0 %llu %s %s]", mpp->alias, mpp->size,
 		target, params);
 
 	dm_task_no_open_count(dmt);
@@ -931,7 +931,7 @@ dm_get_name(char *uuid)
 
 	prefixed_uuid = MALLOC(UUID_PREFIX_LEN + strlen(uuid) + 1);
 	if (!prefixed_uuid) {
-		condlog(0, "cannot create prefixed uuid : %s\n",
+		condlog(0, "cannot create prefixed uuid : %s",
 			strerror(errno));
 		goto freeout;
 	}
@@ -1366,7 +1366,7 @@ int dm_reassign(const char *mapname)
 	int r = 0, i;
 
 	if (dm_dev_t(mapname, &dev_t[0], 32)) {
-		condlog(3, "%s: failed to get device number\n", mapname);
+		condlog(3, "%s: failed to get device number", mapname);
 		return 1;
 	}
 
diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 5848ec5..b3c52fc 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -100,7 +100,7 @@ assemble_map (struct multipath * mp, char * params, int len)
 		shift = snprintf(p, freechar, " %s %i 1", mp->selector,
 				 VECTOR_SIZE(pgp->paths));
 		if (shift >= freechar) {
-			condlog(0, "%s: params too small\n", mp->alias);
+			condlog(0, "%s: params too small", mp->alias);
 			return 1;
 		}
 		p += shift;
@@ -113,7 +113,7 @@ assemble_map (struct multipath * mp, char * params, int len)
 			    && pp->priority > 0)
 				tmp_minio = minio * pp->priority;
 			if (!strlen(pp->dev_t) ) {
-				condlog(0, "dev_t not set for '%s'\n", pp->dev);
+				condlog(0, "dev_t not set for '%s'", pp->dev);
 				return 1;
 			}
 			shift = snprintf(p, freechar, " %s %d",
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 6e70d63..f998708 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -483,7 +483,7 @@ int update_multipath (struct vectors *vecs, char *mapname, int reset)
 	mpp = find_mp_by_alias(vecs->mpvec, mapname);
 
 	if (!mpp) {
-		condlog(3, "%s: multipath map not found\n", mapname);
+		condlog(3, "%s: multipath map not found", mapname);
 		return 2;
 	}
 
diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c
index 8e986e8..9c554dd 100644
--- a/libmultipath/sysfs.c
+++ b/libmultipath/sysfs.c
@@ -77,7 +77,7 @@ ssize_t sysfs_attr_set_value(struct udev_device *dev, const char *attr_name,
 		condlog(4, "write to %s failed: %s", devpath, strerror(errno));
 		size = 0;
 	} else if (size < value_len) {
-		condlog(4, "tried to write %ld to %s. Wrote %ld\n",
+		condlog(4, "tried to write %ld to %s. Wrote %ld",
 			(long)value_len, devpath, (long)size);
 		size = 0;
 	}
diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
index 0b7eb7a..b74fb08 100644
--- a/libmultipath/uevent.c
+++ b/libmultipath/uevent.c
@@ -422,10 +422,10 @@ int uevent_listen(void)
 	err = udev_monitor_filter_add_match_subsystem_devtype(monitor, "block",
 							      NULL);
 	if (err)
-		condlog(2, "failed to create filter : %s\n", strerror(-err));
+		condlog(2, "failed to create filter : %s", strerror(-err));
 	err = udev_monitor_enable_receiving(monitor);
 	if (err) {
-		condlog(2, "failed to enable receiving : %s\n", strerror(-err));
+		condlog(2, "failed to enable receiving : %s", strerror(-err));
 		goto out;
 	}
 	while (1) {
diff --git a/libmultipath/util.c b/libmultipath/util.c
index 70735e6..7cdfd28 100644
--- a/libmultipath/util.c
+++ b/libmultipath/util.c
@@ -86,7 +86,7 @@ get_word (char * sentence, char ** word)
 	*word = MALLOC(len + 1);
 
 	if (!*word) {
-		condlog(0, "get_word : oom\n");
+		condlog(0, "get_word : oom");
 		return 0;
 	}
 	strncpy(*word, sentence, len);
@@ -178,7 +178,7 @@ devt2devname (char *devname, int devname_len, char *devt)
 				char *p = strrchr(dev, '/');
 
 				if (!p) {
-					condlog(0, "No sysfs entry for %s\n",
+					condlog(0, "No sysfs entry for %s",
 						block_path);
 					return 1;
 				}
@@ -208,7 +208,7 @@ devt2devname (char *devname, int devname_len, char *devt)
 		if ((major == tmpmaj) && (minor == tmpmin)) {
 			if (snprintf(block_path, sizeof(block_path),
 				     "/sys/block/%s", dev) >= sizeof(block_path)) {
-				condlog(0, "device name %s is too long\n", dev);
+				condlog(0, "device name %s is too long", dev);
 				fclose(fd);
 				return 1;
 			}
@@ -218,17 +218,17 @@ devt2devname (char *devname, int devname_len, char *devt)
 	fclose(fd);
 skip_proc:
 	if (strncmp(block_path,"/sys/block", 10)) {
-		condlog(3, "No device found for %u:%u\n", major, minor);
+		condlog(3, "No device found for %u:%u", major, minor);
 		return 1;
 	}
 
 	if (stat(block_path, &statbuf) < 0) {
-		condlog(0, "No sysfs entry for %s\n", block_path);
+		condlog(0, "No sysfs entry for %s", block_path);
 		return 1;
 	}
 
 	if (S_ISDIR(statbuf.st_mode) == 0) {
-		condlog(0, "sysfs entry %s is not a directory\n", block_path);
+		condlog(0, "sysfs entry %s is not a directory", block_path);
 		return 1;
 	}
 	basenamecpy((const char *)block_path, devname, devname_len);
diff --git a/multipath/main.c b/multipath/main.c
index 92e852b..6208995 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -535,7 +535,7 @@ main (int argc, char *argv[])
 		fd_limit.rlim_cur = conf->max_fds;
 		fd_limit.rlim_max = conf->max_fds;
 		if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0)
-			condlog(0, "can't set open fds limit to %d : %s\n",
+			condlog(0, "can't set open fds limit to %d : %s",
 				conf->max_fds, strerror(errno));
 	}
 
diff --git a/multipathd/main.c b/multipathd/main.c
index 64c1a0c..84574b2 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1154,7 +1154,7 @@ check_path (struct vectors * vecs, struct path * pp)
 	 * Synchronize with kernel state
 	 */
 	if (update_multipath_strings(pp->mpp, vecs->pathvec)) {
-		condlog(1, "%s: Could not synchronize with kernel state\n",
+		condlog(1, "%s: Could not synchronize with kernel state",
 			pp->dev);
 		pp->dmstate = PSTATE_UNDEF;
 	}
@@ -1611,7 +1611,7 @@ child (void * param)
 		struct rlimit fd_limit;
 
 		if (getrlimit(RLIMIT_NOFILE, &fd_limit) < 0) {
-			condlog(0, "can't get open fds limit: %s\n",
+			condlog(0, "can't get open fds limit: %s",
 				strerror(errno));
 			fd_limit.rlim_cur = 0;
 			fd_limit.rlim_max = 0;
@@ -1622,11 +1622,11 @@ child (void * param)
 				fd_limit.rlim_max = conf->max_fds;
 			if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0) {
 				condlog(0, "can't set open fds limit to "
-					"%lu/%lu : %s\n",
+					"%lu/%lu : %s",
 					fd_limit.rlim_cur, fd_limit.rlim_max,
 					strerror(errno));
 			} else {
-				condlog(3, "set open fds limit to %lu/%lu\n",
+				condlog(3, "set open fds limit to %lu/%lu",
 					fd_limit.rlim_cur, fd_limit.rlim_max);
 			}
 		}
@@ -1713,7 +1713,8 @@ child (void * param)
 	/* Now all the waitevent threads will start rushing in. */
 	while (vecs->lock.depth > 0) {
 		sleep (1); /* This is weak. */
-		condlog(3,"Have %d wait event checkers threads to de-alloc, waiting..\n", vecs->lock.depth);
+		condlog(3, "Have %d wait event checkers threads to de-alloc,"
+			" waiting...", vecs->lock.depth);
 	}
 	pthread_mutex_destroy(vecs->lock.mutex);
 	FREE(vecs->lock.mutex);
@@ -1900,18 +1901,18 @@ void *  mpath_pr_event_handler_fn (void * pathp )
 
 	resp = mpath_alloc_prin_response(MPATH_PRIN_RKEY_SA);
 	if (!resp){
-		condlog(0,"%s Alloc failed for prin response \n", pp->dev);
+		condlog(0,"%s Alloc failed for prin response", pp->dev);
 		return NULL;
 	}
 
 	ret = prin_do_scsi_ioctl(pp->dev, MPATH_PRIN_RKEY_SA, resp, 0);
 	if (ret != MPATH_PR_SUCCESS )
 	{
-		condlog(0,"%s : pr in read keys service action failed. Error=%d\n", pp->dev, ret);
+		condlog(0,"%s : pr in read keys service action failed. Error=%d", pp->dev, ret);
 		goto out;
 	}
 
-	condlog(3, " event pr=%d addlen=%d\n",resp->prin_descriptor.prin_readkeys.prgeneration,
+	condlog(3, " event pr=%d addlen=%d",resp->prin_descriptor.prin_readkeys.prgeneration,
 			resp->prin_descriptor.prin_readkeys.additional_length );
 
 	if (resp->prin_descriptor.prin_readkeys.additional_length == 0 )
@@ -1933,7 +1934,7 @@ void *  mpath_pr_event_handler_fn (void * pathp )
 	isFound =0;
 	for (i = 0; i < resp->prin_descriptor.prin_readkeys.additional_length/8; i++ )
 	{
-		condlog(2, "PR IN READKEYS[%d]  reservation key:\n",i);
+		condlog(2, "PR IN READKEYS[%d]  reservation key:",i);
 		dumpHex((char *)&resp->prin_descriptor.prin_readkeys.key_list[i*8], 8 , -1);
 		if (!memcmp(mpp->reservation_key, &resp->prin_descriptor.prin_readkeys.key_list[i*8], 8))
 		{
@@ -1945,7 +1946,7 @@ void *  mpath_pr_event_handler_fn (void * pathp )
 	if (!isFound)
 	{
 		condlog(0, "%s: Either device not registered or ", pp->dev);
-		condlog(0, "host is not authorised for registration. Skip path\n");
+		condlog(0, "host is not authorised for registration. Skip path");
 		ret = MPATH_PR_OTHER;
 		goto out;
 	}
@@ -1959,12 +1960,12 @@ void *  mpath_pr_event_handler_fn (void * pathp )
 	}
 	param->num_transportid = 0;
 
-	condlog(3, "device %s:%s \n", pp->dev, pp->mpp->wwid);
+	condlog(3, "device %s:%s", pp->dev, pp->mpp->wwid);
 
 	ret = prout_do_scsi_ioctl(pp->dev, MPATH_PROUT_REG_IGN_SA, 0, 0, param, 0);
 	if (ret != MPATH_PR_SUCCESS )
 	{
-		condlog(0,"%s: Reservation registration failed. Error: %d\n", pp->dev, ret);
+		condlog(0,"%s: Reservation registration failed. Error: %d", pp->dev, ret);
 	}
 	mpp->prflag = 1;
 
@@ -1991,7 +1992,7 @@ int mpath_pr_event_handle(struct path *pp)
 
 	rc = pthread_create(&thread, NULL , mpath_pr_event_handler_fn, pp);
 	if (rc) {
-		condlog(0, "%s: ERROR; return code from pthread_create() is %d\n", pp->dev, rc);
+		condlog(0, "%s: ERROR; return code from pthread_create() is %d", pp->dev, rc);
 		return -1;
 	}
 	pthread_attr_destroy(&attr);
-- 
1.7.4.2

  parent reply	other threads:[~2013-01-08 13:53 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-08 13:53 [PATCH 00/42] SLES resync Hannes Reinecke
2013-01-08 13:53 ` [PATCH 01/42] libmultipath: Invalid check for mpp->wwid in dm_addmap() Hannes Reinecke
2013-01-08 13:53 ` Hannes Reinecke [this message]
2013-01-08 13:53 ` [PATCH 03/42] Fixup pathgroup allocation in disassemble_map() Hannes Reinecke
2013-01-08 13:53 ` [PATCH 04/42] libmultipath: resource leak in read_value_block() Hannes Reinecke
2013-01-08 13:53 ` [PATCH 05/42] prio: fix merging of prioritizers with different args Hannes Reinecke
2013-01-08 13:53 ` [PATCH 06/42] Accept several whitespaces in bindings file Hannes Reinecke
2013-01-08 13:53 ` [PATCH 07/42] Add TAGS makefile target Hannes Reinecke
2013-01-08 13:53 ` [PATCH 08/42] libmultipath: Fix typo in mp_prio_handler() Hannes Reinecke
2013-01-08 13:53 ` [PATCH 09/42] Do not trigger a map reload on priority updates Hannes Reinecke
2013-01-08 13:53 ` [PATCH 10/42] Introduce MP_FAST_IO_FAIL_UNSET Hannes Reinecke
2013-01-08 13:53 ` [PATCH 11/42] Checker name is not displayed on failure Hannes Reinecke
2013-01-08 13:53 ` [PATCH 12/42] Valgrind fixes for prioritizer Hannes Reinecke
2013-01-08 13:53 ` [PATCH 13/42] Incorrect inquiry vendor length in hds prioritizer Hannes Reinecke
2013-01-08 13:53 ` [PATCH 14/42] Print out multipath alias for flush_on_last_del messages Hannes Reinecke
2013-01-08 13:53 ` [PATCH 15/42] Clarify setting origin in propsel.c Hannes Reinecke
2013-01-08 13:53 ` [PATCH 16/42] libmultipath: error checking in remove_features() Hannes Reinecke
2013-01-08 13:53 ` [PATCH 17/42] Increase parameter buffer Hannes Reinecke
2013-01-08 13:53 ` [PATCH 18/42] Check return code from pathinfo() Hannes Reinecke
2013-01-08 13:53 ` [PATCH 19/42] Inconsistent string quoting Hannes Reinecke
2013-01-08 13:53 ` [PATCH 20/42] Switch off 'queue_if_no_path' before removing maps Hannes Reinecke
2013-01-08 13:53 ` [PATCH 21/42] Double free in disassemble_map() Hannes Reinecke
2013-01-08 13:54 ` [PATCH 22/42] libmultipath: prio keyword ignored for multipath config Hannes Reinecke
2013-01-08 13:54 ` [PATCH 23/42] Path checker should return PATH_DOWN when no path is found Hannes Reinecke
2013-01-08 13:54 ` [PATCH 24/42] Do not call sysfs_get_timeout for non-SCSI devices Hannes Reinecke
2013-01-08 13:54 ` [PATCH 25/42] Make log_pthread more robust Hannes Reinecke
2013-01-09  0:16   ` Christophe Varoqui
2013-01-09 19:15     ` Xose Vazquez Perez
2013-01-08 13:54 ` [PATCH 26/42] Print log messages when updating tables failed Hannes Reinecke
2013-01-08 13:54 ` [PATCH 27/42] Update 'no_path_retry' correctly for failed paths Hannes Reinecke
2013-01-08 13:54 ` [PATCH 28/42] Clean up uevent queue on shutdown Hannes Reinecke
2013-01-08 13:54 ` [PATCH 29/42] libmultipath: Print out uevent sequence number Hannes Reinecke
2013-01-08 13:54 ` [PATCH 30/42] Fix race condition in stop_waiter_thread() Hannes Reinecke
2013-01-08 13:54 ` [PATCH 31/42] Use VECTOR_SIZE() defines Hannes Reinecke
2013-01-08 13:54 ` [PATCH 32/42] Make 'allocated' an integer in vector.h Hannes Reinecke
2013-01-08 13:54 ` [PATCH 33/42] Syntax error in /etc/init.d/boot.multipath Hannes Reinecke
2013-01-08 13:54 ` [PATCH 34/42] multipath.init.suse: Update usage message Hannes Reinecke
2013-01-08 13:54 ` [PATCH 35/42] multipath.conf.5: Clarify dev_loss_tmo settings Hannes Reinecke
2013-01-08 13:54 ` [PATCH 36/42] Clarify dev_loss_tmo capping in multipath.conf.5 Hannes Reinecke
2013-01-08 13:54 ` [PATCH 38/42] multipathd: Ignore errors when creating pidfile Hannes Reinecke
2013-01-08 13:54 ` [PATCH 39/42] multipathd deadlocks during restart Hannes Reinecke
2013-01-08 13:54 ` [PATCH 40/42] multipathd: sighandlers might use uninitialized gvecs Hannes Reinecke
2013-01-08 13:54 ` [PATCH 41/42] multipathd: crash in reconfigure CLI command Hannes Reinecke
2013-01-08 13:54 ` [PATCH 42/42] multipathd: lock vectors during initial configuration Hannes Reinecke
2013-01-08 23:37   ` Christophe Varoqui
2013-01-09  7:01     ` Hannes Reinecke
2013-01-08 23:53 ` [PATCH 00/42] SLES resync Christophe Varoqui
2013-01-10  5:36   ` Benjamin Marzinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357653259-62650-3-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=christophe.varoqui@gmail.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.