LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jonsito <jonsito@teleline.es>
To: Chuck Ebbert <cebbert@redhat.com>
Cc: linux-kernel@vger.kernel.org, Adrian Bunk <bunk@stusta.de>
Subject: RV: ppdev - libieee1284.so  conflicts with 2.6.2{0,1,2}
Date: Tue, 14 Aug 2007 13:15:50 +0200	[thread overview]
Message-ID: <1187090150.24874.45.camel@jonsy.dit.upm.es> (raw)
In-Reply-To: <1183550290.30882.8.camel@jonsy.dit.upm.es>

[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]

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 #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3250 bytes --]

      reply	other threads:[~2007-08-14 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-03  6:16 ppdev - libieee1284.so conflicts with 2.6.21 Juan Antonio Martinez
2007-07-03 21:31 ` Chuck Ebbert
2007-07-04 11:58   ` Jonsito
2007-08-14 11:15     ` Jonsito [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1187090150.24874.45.camel@jonsy.dit.upm.es \
    --to=jonsito@teleline.es \
    --cc=bunk@stusta.de \
    --cc=cebbert@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: RV: ppdev - libieee1284.so  conflicts with 2.6.2{0,1,2}' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).