Package: moreutils
Version: 0.34
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu jaunty ubuntu-patch


I noticed that ifdata will error if a device in the list (not necessarily
the device you're querying) is longer than 6 characters. So I patched it
to accept up to 20 characters which I believe is the max possible in the
Linux kernel.


*** /tmp/tmpVwkMWJ
In Ubuntu, we've applied the attached patch to achieve the following:

  * Don't assume that all interface names are 6 characters or less, for
    instance "wmaster0" is longer. Increase the limit to 20 characters.
    (LP: #370557)

We thought you might be interested in doing the same. 


-- System Information:
Debian Release: 5.0
  APT prefers jaunty-updates
  APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 'jaunty')
Architecture: i386 (i686)

Kernel: Linux 2.6.28-11-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru moreutils-0.34/debian/changelog moreutils-0.34ubuntu1/debian/changelog
diff -Nru moreutils-0.34/debian/control moreutils-0.34ubuntu1/debian/control
--- moreutils-0.34/debian/control	2008-06-29 04:22:09.000000000 +0100
+++ moreutils-0.34ubuntu1/debian/control	2009-05-02 15:23:48.000000000 +0100
@@ -2,7 +2,8 @@
 Section: utils
 Priority: optional
 Build-Depends: debhelper (>= 7), dpkg-dev (>= 1.9.0), docbook2x, docbook-xml
-Maintainer: Joey Hess <[email protected]>
+Maintainer: Ubuntu MOTU Developers <[email protected]>
+XSBC-Original-Maintainer: Joey Hess <[email protected]>
 Standards-Version: 3.8.0
 Vcs-Git: git://git.kitenet.net/moreutils
 Homepage: http://kitenet.net/~joey/code/moreutils/
diff -Nru moreutils-0.34/ifdata.c moreutils-0.34ubuntu1/ifdata.c
--- moreutils-0.34/ifdata.c	2008-02-02 22:00:53.000000000 +0000
+++ moreutils-0.34ubuntu1/ifdata.c	2009-05-01 23:18:16.000000000 +0100
@@ -246,7 +246,7 @@
 
 	do {
 		int items = fscanf(fd,
-			" %6[^:]:%llu %llu %llu %llu %llu %llu %llu %llu "
+			" %20[^:]:%llu %llu %llu %llu %llu %llu %llu %llu "
 			"%llu %llu %llu %llu %llu %llu %llu %llu",
 			name,
 			&ifstat->in_bytes,    &ifstat->in_packets,

Reply via email to