Hello community, here is the log from the commit of package libdlm for openSUSE:Factory checked in at 2014-05-05 21:09:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdlm (Old) and /work/SRC/openSUSE:Factory/.libdlm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdlm" Changes: -------- --- /work/SRC/openSUSE:Factory/libdlm/libdlm.changes 2014-04-05 16:49:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libdlm.new/libdlm.changes 2014-05-05 21:09:58.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Apr 28 02:36:41 UTC 2014 - lzh...@suse.com + +- dlm_controld print out error format message(bnc#875122) + + bnc#875122dlm_controld-fix-long-name-in-log-entry.patch + +------------------------------------------------------------------- New: ---- bnc#875122dlm_controld-fix-long-name-in-log-entry.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdlm.spec ++++++ --- /var/tmp/diff_new_pack.9FiHEM/_old 2014-05-05 21:09:59.000000000 +0200 +++ /var/tmp/diff_new_pack.9FiHEM/_new 2014-05-05 21:09:59.000000000 +0200 @@ -36,6 +36,7 @@ Patch1: Makefile-for-diff-arch.patch Patch2: build-dlm_stonith.patch Patch3: remove-sd-notify.patch +Patch4: bnc#875122dlm_controld-fix-long-name-in-log-entry.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: glib2-devel BuildRequires: libcorosync-devel @@ -75,6 +76,7 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 ########################################################### %build ++++++ bnc#875122dlm_controld-fix-long-name-in-log-entry.patch ++++++ >From 4283123f0b13eafc46d825050c5142cf44be79c3 Mon Sep 17 00:00:00 2001 From: Lidong Zhong <lzh...@suse.com> Date: Fri, 25 Apr 2014 10:52:52 -0500 Subject: [PATCH 1/1] dlm_controld: fix long name in log entry When the length of name_in is NAME_ID_SIZE, the last byte of the name and a whitespace will get lost. (Modified by teigl...@redhat.com to also handle names longer than NAME_ID_SIZE.) Signed-off-by: Lidong Zhong <lzh...@suse.com> --- dlm_controld/logging.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dlm_controld/logging.c b/dlm_controld/logging.c index 9347e43..4aa3406 100644 --- a/dlm_controld/logging.c +++ b/dlm_controld/logging.c @@ -122,17 +122,23 @@ static void log_save_str(int len, char *log_buf, unsigned int *point, void log_level(char *name_in, uint32_t level_in, const char *fmt, ...) { va_list ap; - char name[NAME_ID_SIZE + 1]; + char name[NAME_ID_SIZE + 2]; uint32_t level = level_in & 0x0000FFFF; uint32_t extra = level_in & 0xFFFF0000; int ret, pos = 0; int len = LOG_STR_LEN - 2; + int namelen = 0; int plock = extra & LOG_PLOCK; memset(name, 0, sizeof(name)); - if (name_in) - snprintf(name, NAME_ID_SIZE, "%s ", name_in); + if (name_in) { + namelen = snprintf(name, NAME_ID_SIZE + 1, "%s", name_in); + if (namelen > NAME_ID_SIZE) + namelen = NAME_ID_SIZE; + name[namelen] = ' '; + name[namelen+1] = '\0'; + } ret = snprintf(log_str + pos, len - pos, "%llu %s", (unsigned long long)monotime(), name); -- 1.8.1.4 -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org