Package: conky Version: 1.4.4-1 Severity: normal Tags: patch Hello,
There is a minor error in the programming logic in the get_ibm_acpi_volume routine which causes '$ibm_volume' to always return 0. The problem is that 'sscanf' sets the variable 'vol' to zero whenever it doesn't find the string match. The enclosed patch is one possible fix. Another possible fix is to check for the 'mute' by reading the line after the 'level:' line and then 'break' rather than 'continue'. Regards, Kapil. ================================== --- conky-1.4.4/src/linux.c.orig 2006-11-07 19:06:47.000000000 -0800 +++ conky-1.4.4/src/linux.c 2007-03-21 15:04:59.000000000 -0700 @@ -1693,8 +1693,12 @@ while (!feof(fp)) { char line[256]; + unsigned int read_vol=-1; if (fgets(line, 255, fp) == NULL) break; - if (sscanf(line, "level: %d", &vol)) continue; + if (sscanf(line, "level: %d", &read_vol)) { + vol = read_vol; + continue; + } if (sscanf(line, "mute: %s", mute)) break; } } ================================== -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-686 Locale: LANG=en_IN.UTF-8, LC_CTYPE=en_IN.UTF-8 (charmap=UTF-8) Versions of packages conky depends on: ii libc6 2.3.6.ds1-13 GNU C Library: Shared libraries ii libfontconfig1 2.4.2-1.2 generic font configuration library ii libx11-6 2:1.0.3-6 X11 client-side library ii libxdamage1 1:1.0.3-3 X11 damaged region extension libra ii libxext6 1:1.0.1-2 X11 miscellaneous extension librar ii libxfixes3 1:4.0.1-5 X11 miscellaneous 'fixes' extensio ii libxft2 2.1.8.2-8 FreeType-based font drawing librar conky recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]