[PATCH] fix-linebreaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

error messages (DM message failed) in the logs look like this in multipath:

Jul 24 06:17:47 onosendai multipathd: DM message failed [queue_if_no_path
Jul 24 06:17:47 onosendai ]
Jul 24 06:17:47 onosendai multipathd: sdc: alua not supported
Jul 24 06:17:47 onosendai multipathd: sdd: alua not supported
Jul 24 06:17:47 onosendai multipathd: DM message failed [queue_if_no_path
Jul 24 06:17:47 onosendai ]

The patch fixes the unneccessary \n in libmultipath/devmapper.c

Best regards,

Craig
>From bb1354f917b7bd205605a41016e0a3e1aff6feac Mon Sep 17 00:00:00 2001
From: craig <craig@xxxxxxxxxxxx>
Date: Sun, 24 Jul 2011 06:38:55 +0200
Subject: [PATCH] fix linebreaks

---
 libmultipath/devmapper.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index a70ae0a..de7d446 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -776,7 +776,7 @@ dm_fail_path(char * mapname, char * path)
 {
 	char message[32];
 
-	if (snprintf(message, 32, "fail_path %s\n", path) > 32)
+	if (snprintf(message, 32, "fail_path %s", path) > 32)
 		return 1;
 
 	return dm_message(mapname, message);
@@ -787,7 +787,7 @@ dm_reinstate_path(char * mapname, char * path)
 {
 	char message[32];
 
-	if (snprintf(message, 32, "reinstate_path %s\n", path) > 32)
+	if (snprintf(message, 32, "reinstate_path %s", path) > 32)
 		return 1;
 
 	return dm_message(mapname, message);
@@ -799,9 +799,9 @@ dm_queue_if_no_path(char *mapname, int enable)
 	char *message;
 
 	if (enable)
-		message = "queue_if_no_path\n";
+		message = "queue_if_no_path";
 	else
-		message = "fail_if_no_path\n";
+		message = "fail_if_no_path";
 
 	return dm_message(mapname, message);
 }
@@ -821,7 +821,7 @@ dm_groupmsg (char * msg, char * mapname, int index)
 {
 	char message[32];
 
-	if (snprintf(message, 32, "%s_group %i\n", msg, index) > 32)
+	if (snprintf(message, 32, "%s_group %i", msg, index) > 32)
 		return 1;
 
 	return dm_message(mapname, message);
-- 
1.7.3.4

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux