[arch-commits] Commit in util-linux/repos (12 files)

Tom Gundersen tomegun at archlinux.org
Fri Sep 9 11:23:27 UTC 2011


    Date: Friday, September 9, 2011 @ 07:23:27
  Author: tomegun
Revision: 137553

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  util-linux/repos/testing-i686/PKGBUILD
    (from rev 137552, util-linux/trunk/PKGBUILD)
  util-linux/repos/testing-i686/agetty-typo.patch
    (from rev 137552, util-linux/trunk/agetty-typo.patch)
  util-linux/repos/testing-i686/dmesg-non-printk.patch
    (from rev 137552, util-linux/trunk/dmesg-non-printk.patch)
  util-linux/repos/testing-i686/dmesg-space.patch
    (from rev 137552, util-linux/trunk/dmesg-space.patch)
  util-linux/repos/testing-i686/write-freopen.patch
    (from rev 137552, util-linux/trunk/write-freopen.patch)
  util-linux/repos/testing-x86_64/PKGBUILD
    (from rev 137552, util-linux/trunk/PKGBUILD)
  util-linux/repos/testing-x86_64/agetty-typo.patch
    (from rev 137552, util-linux/trunk/agetty-typo.patch)
  util-linux/repos/testing-x86_64/dmesg-non-printk.patch
    (from rev 137552, util-linux/trunk/dmesg-non-printk.patch)
  util-linux/repos/testing-x86_64/dmesg-space.patch
    (from rev 137552, util-linux/trunk/dmesg-space.patch)
  util-linux/repos/testing-x86_64/write-freopen.patch
    (from rev 137552, util-linux/trunk/write-freopen.patch)
Deleted:
  util-linux/repos/testing-i686/PKGBUILD
  util-linux/repos/testing-x86_64/PKGBUILD

---------------------------------------+
 testing-i686/PKGBUILD                 |   99 ++++++++++++++++++--------------
 testing-i686/agetty-typo.patch        |   27 ++++++++
 testing-i686/dmesg-non-printk.patch   |   69 ++++++++++++++++++++++
 testing-i686/dmesg-space.patch        |   31 ++++++++++
 testing-i686/write-freopen.patch      |   27 ++++++++
 testing-x86_64/PKGBUILD               |   99 ++++++++++++++++++--------------
 testing-x86_64/agetty-typo.patch      |   27 ++++++++
 testing-x86_64/dmesg-non-printk.patch |   69 ++++++++++++++++++++++
 testing-x86_64/dmesg-space.patch      |   31 ++++++++++
 testing-x86_64/write-freopen.patch    |   27 ++++++++
 10 files changed, 420 insertions(+), 86 deletions(-)

Deleted: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD	2011-09-09 11:21:39 UTC (rev 137552)
+++ testing-i686/PKGBUILD	2011-09-09 11:23:27 UTC (rev 137553)
@@ -1,43 +0,0 @@
-# $Id$
-# Maintainer: Tom Gundersen <teg at jklm.no>
-# Contributor: judd <jvinet at zeroflux.org>
-
-pkgname=util-linux
-pkgver=2.20
-pkgrel=1
-pkgdesc="Miscellaneous system utilities for Linux"
-url="http://userweb.kernel.org/~kzak/util-linux-ng/"
-arch=('i686' 'x86_64')
-groups=('base')
-depends=('filesystem')
-replaces=('linux32' 'util-linux-ng')
-conflicts=('linux32' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
-provides=('linux32' "util-linux-ng=${pkgver}")
-license=('GPL2')
-options=('!libtool')
-source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.bz2)
-optdepends=('perl: for chkdupexe support')
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-
-  # hardware clock
-  sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i include/pathnames.h
-
-  ./configure --enable-arch\
-              --enable-write\
-              --enable-raw\
-              --disable-wall\
-              --enable-partx
-
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-
-  install -dm755 "${pkgdir}/var/lib/hwclock"
-
-  make DESTDIR="${pkgdir}" install
-}
-md5sums=('4dcacdbdafa116635e52b977d9d0e879')

Copied: util-linux/repos/testing-i686/PKGBUILD (from rev 137552, util-linux/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Tom Gundersen <teg at jklm.no>
+# Contributor: judd <jvinet at zeroflux.org>
+
+pkgname=util-linux
+pkgver=2.20
+pkgrel=2
+pkgdesc="Miscellaneous system utilities for Linux"
+url="http://userweb.kernel.org/~kzak/util-linux-ng/"
+arch=('i686' 'x86_64')
+groups=('base')
+depends=('filesystem')
+replaces=('linux32' 'util-linux-ng')
+conflicts=('linux32' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
+provides=('linux32' "util-linux-ng=${pkgver}")
+license=('GPL2')
+options=('!libtool')
+source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.bz2
+	agetty-typo.patch
+	write-freopen.patch
+	dmesg-non-printk.patch
+	dmesg-space.patch)
+optdepends=('perl: for chkdupexe support')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # patches from master
+  for patch in agetty-typo.patch write-freopen.patch dmesg-non-printk.patch dmesg-space.patch; do
+    patch -Np1 -i "${srcdir}/${patch}"
+  done
+
+  # hardware clock
+  sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i include/pathnames.h
+
+  ./configure --enable-arch\
+              --enable-write\
+              --enable-raw\
+              --disable-wall\
+              --enable-partx
+
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  install -dm755 "${pkgdir}/var/lib/hwclock"
+
+  make DESTDIR="${pkgdir}" install
+}
+md5sums=('4dcacdbdafa116635e52b977d9d0e879'
+         '13838c6dd8df686e0f01ad0f236d2690'
+         '465817ff8f7c08411c8011ee91b50318'
+         'f3ca75a1a22a2a739c5c22d92dc07ab0'
+         'd9768f0b42d36d72c02ac7797b922ba1')

Copied: util-linux/repos/testing-i686/agetty-typo.patch (from rev 137552, util-linux/trunk/agetty-typo.patch)
===================================================================
--- testing-i686/agetty-typo.patch	                        (rev 0)
+++ testing-i686/agetty-typo.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,27 @@
+From 89aed1c950376d828e1e0ddef94909a028e0517d Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Wed, 7 Sep 2011 07:37:03 +0200
+Subject: [PATCH] agetty: double equals sign typo in opentty()
+
+Reported-by: Francesco Cosoleto <cosoleto at gmail.com>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ term-utils/agetty.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/term-utils/agetty.c b/term-utils/agetty.c
+index 733be38..35bb389 100644
+--- a/term-utils/agetty.c
++++ b/term-utils/agetty.c
+@@ -985,7 +985,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
+ 	 * In case of a virtual console the ioctl TIOCMGET fails and
+ 	 * the error number will be set to EINVAL.
+ 	 */
+-	if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno = EINVAL)) {
++	if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno == EINVAL)) {
+ 		op->flags |= F_VCONSOLE;
+ 		if (!op->term)
+ 			op->term = DEFAULT_VCTERM;
+-- 
+1.7.6.1
+

Copied: util-linux/repos/testing-i686/dmesg-non-printk.patch (from rev 137552, util-linux/trunk/dmesg-non-printk.patch)
===================================================================
--- testing-i686/dmesg-non-printk.patch	                        (rev 0)
+++ testing-i686/dmesg-non-printk.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,69 @@
+From 22f69825778f992ff98ed100252bf5e00a15d9d1 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Wed, 31 Aug 2011 12:28:39 +0200
+Subject: [PATCH] dmesg: fix for non-CONFIG_PRINTK_TIME kernels
+
+ * dmesg(1) incorrectly assumes that lines like "<6>\n"
+   are broken.
+
+ * it's more robust to assume the end of the record is "\n<"
+
+ * print \n for empty lines
+
+Reported-by: "Gabor Z. Papp" <gzp at papp.hu>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ sys-utils/dmesg.c |   16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
+index 6090f4e..8e7bb4b 100644
+--- a/sys-utils/dmesg.c
++++ b/sys-utils/dmesg.c
+@@ -442,12 +442,12 @@ static int get_next_record(struct dmesg_control *ctl, struct dmesg_record *rec)
+ 
+ 		if (!begin)
+ 			begin = p;
+-		if (*p == '\n')
+-			end = p;
+ 		if (i + 1 == rec->next_size) {
+ 			end = p + 1;
+ 			i++;
+-		}
++		} else if (*p == '\n' && *(p + 1) == '<')
++			end = p;
++
+ 		if (begin && !*begin)
+ 			begin = NULL;	/* zero(s) at the end of the buffer? */
+ 		if (!begin || !end)
+@@ -469,9 +469,6 @@ static int get_next_record(struct dmesg_control *ctl, struct dmesg_record *rec)
+ 			}
+ 		}
+ 
+-		if (end <= begin)
+-			return -1;	/* error */
+-
+ 		if (*begin == '[' && (*(begin + 1) == ' ' ||
+ 				      isdigit(*(begin + 1)))) {
+ 			if (ctl->delta || ctl->ctime) {
+@@ -534,12 +531,15 @@ static void print_buffer(const char *buf, size_t size,
+ 	}
+ 
+ 	while (get_next_record(ctl, &rec) == 0) {
+-		if (!rec.mesg_size)
+-			continue;
+ 
+ 		if (!accept_record(ctl, &rec))
+ 			continue;
+ 
++		if (!rec.mesg_size) {
++			putchar('\n');
++			continue;
++		}
++
+ 		if (ctl->decode && rec.level >= 0 && rec.facility >= 0)
+ 			printf("%-6s:%-6s: ", facility_names[rec.facility].name,
+ 					      level_names[rec.level].name);
+-- 
+1.7.6.1
+

Copied: util-linux/repos/testing-i686/dmesg-space.patch (from rev 137552, util-linux/trunk/dmesg-space.patch)
===================================================================
--- testing-i686/dmesg-space.patch	                        (rev 0)
+++ testing-i686/dmesg-space.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,31 @@
+From 31c9099a81d3a9c70fdceb198eebed678173d954 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Fri, 2 Sep 2011 14:42:04 +0200
+Subject: [PATCH] dmesg: remove extra space only after time stamp
+
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ sys-utils/dmesg.c |    5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
+index 8e7bb4b..b3713a0 100644
+--- a/sys-utils/dmesg.c
++++ b/sys-utils/dmesg.c
+@@ -480,11 +480,10 @@ static int get_next_record(struct dmesg_control *ctl, struct dmesg_record *rec)
+ 						break;
+ 				}
+ 			}
++			if (begin < end && *begin == ' ')
++				begin++;
+ 		}
+ 
+-		if (begin < end && *begin == ' ')
+-			begin++;
+-
+ 		rec->mesg = begin;
+ 		rec->mesg_size = end - begin;
+ 
+-- 
+1.7.6.1
+

Copied: util-linux/repos/testing-i686/write-freopen.patch (from rev 137552, util-linux/trunk/write-freopen.patch)
===================================================================
--- testing-i686/write-freopen.patch	                        (rev 0)
+++ testing-i686/write-freopen.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,27 @@
+From b89fdd9c05a6e5f12ab56441389e5ee9d1d7f30f Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Tue, 6 Sep 2011 03:18:46 +0200
+Subject: [PATCH] write: fix path for freopen()
+
+Reported-by: xinglp <xinglp at gmail.com>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ term-utils/write.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/term-utils/write.c b/term-utils/write.c
+index a825f62..a70eb7b 100644
+--- a/term-utils/write.c
++++ b/term-utils/write.c
+@@ -322,7 +322,7 @@ void do_write(char *tty, char *mytty, uid_t myuid)
+ 
+ 	if (strlen(tty) + 6 > sizeof(path))
+ 		errx(EXIT_FAILURE, _("tty path %s too long"), tty);
+-	printf(path, "/dev/%s", tty);
++	snprintf(path, sizeof(path), "/dev/%s", tty);
+ 	if ((freopen(path, "w", stdout)) == NULL)
+ 		err(EXIT_FAILURE, "%s", path);
+ 
+-- 
+1.7.6.1
+

Deleted: testing-x86_64/PKGBUILD
===================================================================
--- testing-x86_64/PKGBUILD	2011-09-09 11:21:39 UTC (rev 137552)
+++ testing-x86_64/PKGBUILD	2011-09-09 11:23:27 UTC (rev 137553)
@@ -1,43 +0,0 @@
-# $Id$
-# Maintainer: Tom Gundersen <teg at jklm.no>
-# Contributor: judd <jvinet at zeroflux.org>
-
-pkgname=util-linux
-pkgver=2.20
-pkgrel=1
-pkgdesc="Miscellaneous system utilities for Linux"
-url="http://userweb.kernel.org/~kzak/util-linux-ng/"
-arch=('i686' 'x86_64')
-groups=('base')
-depends=('filesystem')
-replaces=('linux32' 'util-linux-ng')
-conflicts=('linux32' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
-provides=('linux32' "util-linux-ng=${pkgver}")
-license=('GPL2')
-options=('!libtool')
-source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.bz2)
-optdepends=('perl: for chkdupexe support')
-
-build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-
-  # hardware clock
-  sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i include/pathnames.h
-
-  ./configure --enable-arch\
-              --enable-write\
-              --enable-raw\
-              --disable-wall\
-              --enable-partx
-
-  make
-}
-
-package() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-
-  install -dm755 "${pkgdir}/var/lib/hwclock"
-
-  make DESTDIR="${pkgdir}" install
-}
-md5sums=('4dcacdbdafa116635e52b977d9d0e879')

Copied: util-linux/repos/testing-x86_64/PKGBUILD (from rev 137552, util-linux/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Tom Gundersen <teg at jklm.no>
+# Contributor: judd <jvinet at zeroflux.org>
+
+pkgname=util-linux
+pkgver=2.20
+pkgrel=2
+pkgdesc="Miscellaneous system utilities for Linux"
+url="http://userweb.kernel.org/~kzak/util-linux-ng/"
+arch=('i686' 'x86_64')
+groups=('base')
+depends=('filesystem')
+replaces=('linux32' 'util-linux-ng')
+conflicts=('linux32' 'util-linux-ng' 'e2fsprogs<1.41.8-2')
+provides=('linux32' "util-linux-ng=${pkgver}")
+license=('GPL2')
+options=('!libtool')
+source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.bz2
+	agetty-typo.patch
+	write-freopen.patch
+	dmesg-non-printk.patch
+	dmesg-space.patch)
+optdepends=('perl: for chkdupexe support')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  # patches from master
+  for patch in agetty-typo.patch write-freopen.patch dmesg-non-printk.patch dmesg-space.patch; do
+    patch -Np1 -i "${srcdir}/${patch}"
+  done
+
+  # hardware clock
+  sed -e 's%etc/adjtime%var/lib/hwclock/adjtime%' -i include/pathnames.h
+
+  ./configure --enable-arch\
+              --enable-write\
+              --enable-raw\
+              --disable-wall\
+              --enable-partx
+
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  install -dm755 "${pkgdir}/var/lib/hwclock"
+
+  make DESTDIR="${pkgdir}" install
+}
+md5sums=('4dcacdbdafa116635e52b977d9d0e879'
+         '13838c6dd8df686e0f01ad0f236d2690'
+         '465817ff8f7c08411c8011ee91b50318'
+         'f3ca75a1a22a2a739c5c22d92dc07ab0'
+         'd9768f0b42d36d72c02ac7797b922ba1')

Copied: util-linux/repos/testing-x86_64/agetty-typo.patch (from rev 137552, util-linux/trunk/agetty-typo.patch)
===================================================================
--- testing-x86_64/agetty-typo.patch	                        (rev 0)
+++ testing-x86_64/agetty-typo.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,27 @@
+From 89aed1c950376d828e1e0ddef94909a028e0517d Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Wed, 7 Sep 2011 07:37:03 +0200
+Subject: [PATCH] agetty: double equals sign typo in opentty()
+
+Reported-by: Francesco Cosoleto <cosoleto at gmail.com>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ term-utils/agetty.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/term-utils/agetty.c b/term-utils/agetty.c
+index 733be38..35bb389 100644
+--- a/term-utils/agetty.c
++++ b/term-utils/agetty.c
+@@ -985,7 +985,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
+ 	 * In case of a virtual console the ioctl TIOCMGET fails and
+ 	 * the error number will be set to EINVAL.
+ 	 */
+-	if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno = EINVAL)) {
++	if (ioctl(STDIN_FILENO, TIOCMGET, &serial) < 0 && (errno == EINVAL)) {
+ 		op->flags |= F_VCONSOLE;
+ 		if (!op->term)
+ 			op->term = DEFAULT_VCTERM;
+-- 
+1.7.6.1
+

Copied: util-linux/repos/testing-x86_64/dmesg-non-printk.patch (from rev 137552, util-linux/trunk/dmesg-non-printk.patch)
===================================================================
--- testing-x86_64/dmesg-non-printk.patch	                        (rev 0)
+++ testing-x86_64/dmesg-non-printk.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,69 @@
+From 22f69825778f992ff98ed100252bf5e00a15d9d1 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Wed, 31 Aug 2011 12:28:39 +0200
+Subject: [PATCH] dmesg: fix for non-CONFIG_PRINTK_TIME kernels
+
+ * dmesg(1) incorrectly assumes that lines like "<6>\n"
+   are broken.
+
+ * it's more robust to assume the end of the record is "\n<"
+
+ * print \n for empty lines
+
+Reported-by: "Gabor Z. Papp" <gzp at papp.hu>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ sys-utils/dmesg.c |   16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
+index 6090f4e..8e7bb4b 100644
+--- a/sys-utils/dmesg.c
++++ b/sys-utils/dmesg.c
+@@ -442,12 +442,12 @@ static int get_next_record(struct dmesg_control *ctl, struct dmesg_record *rec)
+ 
+ 		if (!begin)
+ 			begin = p;
+-		if (*p == '\n')
+-			end = p;
+ 		if (i + 1 == rec->next_size) {
+ 			end = p + 1;
+ 			i++;
+-		}
++		} else if (*p == '\n' && *(p + 1) == '<')
++			end = p;
++
+ 		if (begin && !*begin)
+ 			begin = NULL;	/* zero(s) at the end of the buffer? */
+ 		if (!begin || !end)
+@@ -469,9 +469,6 @@ static int get_next_record(struct dmesg_control *ctl, struct dmesg_record *rec)
+ 			}
+ 		}
+ 
+-		if (end <= begin)
+-			return -1;	/* error */
+-
+ 		if (*begin == '[' && (*(begin + 1) == ' ' ||
+ 				      isdigit(*(begin + 1)))) {
+ 			if (ctl->delta || ctl->ctime) {
+@@ -534,12 +531,15 @@ static void print_buffer(const char *buf, size_t size,
+ 	}
+ 
+ 	while (get_next_record(ctl, &rec) == 0) {
+-		if (!rec.mesg_size)
+-			continue;
+ 
+ 		if (!accept_record(ctl, &rec))
+ 			continue;
+ 
++		if (!rec.mesg_size) {
++			putchar('\n');
++			continue;
++		}
++
+ 		if (ctl->decode && rec.level >= 0 && rec.facility >= 0)
+ 			printf("%-6s:%-6s: ", facility_names[rec.facility].name,
+ 					      level_names[rec.level].name);
+-- 
+1.7.6.1
+

Copied: util-linux/repos/testing-x86_64/dmesg-space.patch (from rev 137552, util-linux/trunk/dmesg-space.patch)
===================================================================
--- testing-x86_64/dmesg-space.patch	                        (rev 0)
+++ testing-x86_64/dmesg-space.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,31 @@
+From 31c9099a81d3a9c70fdceb198eebed678173d954 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Fri, 2 Sep 2011 14:42:04 +0200
+Subject: [PATCH] dmesg: remove extra space only after time stamp
+
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ sys-utils/dmesg.c |    5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
+index 8e7bb4b..b3713a0 100644
+--- a/sys-utils/dmesg.c
++++ b/sys-utils/dmesg.c
+@@ -480,11 +480,10 @@ static int get_next_record(struct dmesg_control *ctl, struct dmesg_record *rec)
+ 						break;
+ 				}
+ 			}
++			if (begin < end && *begin == ' ')
++				begin++;
+ 		}
+ 
+-		if (begin < end && *begin == ' ')
+-			begin++;
+-
+ 		rec->mesg = begin;
+ 		rec->mesg_size = end - begin;
+ 
+-- 
+1.7.6.1
+

Copied: util-linux/repos/testing-x86_64/write-freopen.patch (from rev 137552, util-linux/trunk/write-freopen.patch)
===================================================================
--- testing-x86_64/write-freopen.patch	                        (rev 0)
+++ testing-x86_64/write-freopen.patch	2011-09-09 11:23:27 UTC (rev 137553)
@@ -0,0 +1,27 @@
+From b89fdd9c05a6e5f12ab56441389e5ee9d1d7f30f Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Tue, 6 Sep 2011 03:18:46 +0200
+Subject: [PATCH] write: fix path for freopen()
+
+Reported-by: xinglp <xinglp at gmail.com>
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ term-utils/write.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/term-utils/write.c b/term-utils/write.c
+index a825f62..a70eb7b 100644
+--- a/term-utils/write.c
++++ b/term-utils/write.c
+@@ -322,7 +322,7 @@ void do_write(char *tty, char *mytty, uid_t myuid)
+ 
+ 	if (strlen(tty) + 6 > sizeof(path))
+ 		errx(EXIT_FAILURE, _("tty path %s too long"), tty);
+-	printf(path, "/dev/%s", tty);
++	snprintf(path, sizeof(path), "/dev/%s", tty);
+ 	if ((freopen(path, "w", stdout)) == NULL)
+ 		err(EXIT_FAILURE, "%s", path);
+ 
+-- 
+1.7.6.1
+




More information about the arch-commits mailing list