[Nut-upsdev] [PATCH 17/36] quote the debug output so one can see how many spaces there are
Greg A. Woods
woods at planix.com
Thu Mar 8 23:21:28 UTC 2012
From: "Greg A. Woods" <woods at planix.com>
---
drivers/blazer_ser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/blazer_ser.c b/drivers/blazer_ser.c
index 4eb0460..fe65c61 100644
--- a/drivers/blazer_ser.c
+++ b/drivers/blazer_ser.c
@@ -58,7 +58,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen)
return ret;
}
- upsdebugx(3, "send: %.*s", (int)strcspn(cmd, "\r"), cmd);
+ upsdebugx(3, "send: '%.*s'", (int)strcspn(cmd, "\r"), cmd);
ret = ser_get_buf(upsfd, buf, buflen, SER_WAIT_SEC, 0);
@@ -67,7 +67,7 @@ int blazer_command(const char *cmd, char *buf, size_t buflen)
return ret;
}
- upsdebugx(3, "read: %.*s", (int)strcspn(buf, "\r"), buf);
+ upsdebugx(3, "read: '%.*s'", (int)strcspn(buf, "\r"), buf);
return ret;
#else
const struct {
--
1.7.9.2
More information about the Nut-upsdev
mailing list