RV: ppdev - libieee1284.so conflicts with 2.6.2{0,1,2}

From: Jonsito
Date: Tue Aug 14 2007 - 08:10:47 EST


El mié, 04-07-2007 a las 13:58 +0200, Jonsito escribió:
[...]

from libieee1284 bug tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=1739643&group_id=29314&atid=395778

---------------------------
/proc on on 2.6.22.1

# ls -la /proc/sys/dev/parport
total 0
dr-xr-xr-x 0 root root 0 2007-08-03 08:21 .
dr-xr-xr-x 0 root root 0 2007-08-03 08:19 ..
dr-xr-xr-x 0 root root 0 2007-08-03 08:25 default
dr-xr-xr-x 0 root root 0 2007-08-03 08:25 parport0

on 2.6.18
# ls -la /proc/sys/dev/parport/
total 0
dr-xr-xr-x 4 root root 0 Aug 3 08:29 .
dr-xr-xr-x 7 root root 0 Aug 3 08:29 ..
dr-xr-xr-x 2 root root 0 Aug 3 08:29 default
dr-xr-xr-x 3 root root 0 Aug 3 08:29 parport0

-----------------------------------

the offending and failing code was at libieee1284 sources:

libieee1284/src/detect.c, function check_proc_type (void)
....
if (stat ("/proc/sys/dev/parport", &st) == 0 &&
S_ISDIR (st.st_mode) &&
st.st_nlink > 2)
....
This test fail on st.st_nlink > 2 for kernels with new proc interface for
parport.

patch:

% diff -u detect.c.orig detect.c
--- detect.c.orig 2007-08-03 09:27:29.000000000 +0200
+++ detect.c 2007-08-03 09:27:46.000000000 +0200
@@ -69,8 +69,7 @@
int which = 0;
struct stat st;
if (stat ("/proc/sys/dev/parport", &st) == 0 &&
- S_ISDIR (st.st_mode) &&
- st.st_nlink > 2)
+ S_ISDIR (st.st_mode))
{
which = PROC_SYS_DEV_PARPORT_CAPABLE;
debugprintf ("This system has /proc/sys/dev/parport\n");

-------------------------------------------------------

The above patch to libieee1284 library sources solves the ppdev
problem w/o need to patch kernel, but i'm unsure what is the
exact meaning of "0" as inode link count on procfs directory
entries, and when this change was made (¿it's a bug or a feature? :)
¿any link?

Thanks in advance
Juan Antonio

Attachment: smime.p7s
Description: S/MIME cryptographic signature