Re: problem with devfsd compilation

2001-02-06 Thread Andris Pavenis

>> I am trying to compile devfsd on my system running RedHat linux 7.0
>> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
>> sure where this symbol is defined. Is there anything that I am missing 
>> on my system. 
>
>
>Sounds like a missing include in the devfsd code. That comes from 
>dlfcn.h. 

Following small patch fixes this and workarounds devfs related problem
which appeared in 2.4.0-test12-pre8:
when I'm logging out, devfsd tries to state /dev/vcc/[1-6] but sometimes
fails perhaps due to some race in kernel. As result devfsd quits with 
error message. Retrying to state node suceeds on next attempt.
I don't know why it happens, but I guess it's related to 
change in drivers/char/tty_io.c between test12-pre7 and pre8
(change to use flush_scheduled_tasks())

Hint: it seems to be easier to reproduce on slower machine (it happens seldom 
on PIII-700, but very often on P200MMX)

Andris


--- devfsd/devfsd.c~1   Mon Jul  3 22:43:07 2000
+++ devfsd/devfsd.c Fri Jan 12 13:19:33 2001
@@ -189,6 +189,7 @@
 #include 
 #include 
 #include 
+#define __USE_GNU
 #include 
 #include 
 #include 
@@ -918,15 +919,29 @@
 [RETURNS] Nothing.
 */
 {
+int tries=0;
 mode_t new_mode;
 struct stat statbuf;
 
+Retry:   
 if (lstat (info->devname, ) != 0)
 {
-   SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
-   info->devname, ERRSTRING);
-   SYSLOG (LOG_ERR, "exiting\n");
-   exit (1);
+   if (tries<10)
+   {
+  tries++;
+   SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+  info->devname, ERRSTRING);
+   SYSLOG (LOG_ERR, "retrying (attempt %d) ...\n",tries);
+  usleep (1000);  /* Let's sleep a bit  */
+  goto Retry;
+   }
+   else
+   {
+  SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+  info->devname, ERRSTRING);
+  SYSLOG (LOG_ERR, "exiting\n");
+  exit (1);
+   }
 }
 new_mode = (statbuf.st_mode & S_IFMT) |
(entry->u.permissions.mode & ~S_IFMT);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-02 Thread Georg Nikodym

> "M" == Meunier   writes:

 M> Not true. I'm pretty sure /dev/.devfsd is only created when you
 M> mount devfs at boot time or via mount -t devfs devfs /dev in your
 M> system initialization script. Creating /dev/.devfsd with touch
 M> defeats the purpose of /etc/rc.sysinit example.

Right you are.  I looked at all this stuff _before_ I had devfs
mounted.  It never occured to me that "-e /dev/.devfsd" had a
connotation.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-02 Thread Michael B. Trausch

On Thu, 1 Feb 2001 [EMAIL PROTECTED] wrote:
>
> Hi,
> 
> I am trying to compile devfsd on my system running RedHat linux 7.0
> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
> sure where this symbol is defined. Is there anything that I am missing 
> on my system. 
> 

It's a problem with the makefile -- You need to have -D_GNU_SOURCE (or
#define _GNU_SOURCE as one of the first lines in all the source files of
the package)

- Mike

===
Michael B. Trausch[EMAIL PROTECTED]
Avid Linux User since April, '96!   AIM:  ML100Smkr

  Contactable via IRC (DALNet) or AIM as ML100Smkr
===

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-02 Thread Michael B. Trausch

On Thu, 1 Feb 2001 [EMAIL PROTECTED] wrote:

 Hi,
 
 I am trying to compile devfsd on my system running RedHat linux 7.0
 (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
 sure where this symbol is defined. Is there anything that I am missing 
 on my system. 
 

It's a problem with the makefile -- You need to have -D_GNU_SOURCE (or
#define _GNU_SOURCE as one of the first lines in all the source files of
the package)

- Mike

===
Michael B. Trausch[EMAIL PROTECTED]
Avid Linux User since April, '96!   AIM:  ML100Smkr

  Contactable via IRC (DALNet) or AIM as ML100Smkr
===

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-02 Thread Georg Nikodym

 "M" == Meunier  iso-8859-1 writes:

 M Not true. I'm pretty sure /dev/.devfsd is only created when you
 M mount devfs at boot time or via mount -t devfs devfs /dev in your
 M system initialization script. Creating /dev/.devfsd with touch
 M defeats the purpose of /etc/rc.sysinit example.

Right you are.  I looked at all this stuff _before_ I had devfs
mounted.  It never occured to me that "-e /dev/.devfsd" had a
connotation.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Michael B. Trausch


On Thu, 1 Feb 2001, Alan Cox wrote:

> > I am trying to compile devfsd on my system running RedHat linux 7.0
> > (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
> > sure where this symbol is defined. Is there anything that I am missing 
> > on my system. 
> 
> Sounds like a missing include in the devfsd code. That comes from
> dlfcn.h.
> 

If you add -D_GNU_SOURCE to the make line in CC_OPTS (or CCOPTS, I forget
which) it works fine.  Had the same exact problem here.

- Mike

===
Michael B. Trausch[EMAIL PROTECTED]
Avid Linux User since April, '96!   AIM:  ML100Smkr

  Contactable via IRC (DALNet) or AIM as ML100Smkr
===

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Frédéric L. W. Meunier

Georg Nikodym wrote:

> Also, RH7's /etc/rc.sysinit can already start devfsd
> automatically with the following line:   

> [ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev

If devfs is mounted and devfsd exists, start devfsd.

> So, all you have to do is create an empty file /dev/.devfsd

Not true. I'm pretty sure /dev/.devfsd is only created when you
mount devfs at boot time or via mount -t devfs devfs /dev in
your system initialization script. Creating /dev/.devfsd with
touch defeats the purpose of /etc/rc.sysinit example.

crw---  1 root root 144,  0 Dec 31  1969 .devfsd

-- 
Frédéric L. W. Meunier - http://www.pervalidus.net/
0@pervalidus.{net, {dyndns.}org} Tel: 55-21-717-2399 (Niterói-RJ BR)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Georg Nikodym

> "hm" == hiren mehta <[EMAIL PROTECTED]> writes:

 hm> Hi, I am trying to compile devfsd on my system running RedHat
 hm> linux 7.0 (kernel 2.2.16-22). I get the error "RTLD_NEXT"
 hm> undefined. I am not sure where this symbol is defined. Is there
 hm> anything that I am missing on my system.

Oh yeah, here's the two other things I forgot.

The install target of the devfsd GNUmakefile attempts to copy the
devfsd.8 man page into /usr/man/man8 which doesn't exist.  RH7 has
its man pages in /usr/share/man though you might prefer
/usr/local/man, whatever.  I just changed the GNUmakefile.

Also, RH7's /etc/rc.sysinit can already start devfsd automatically
with the following line:

[ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev

So, all you have to do is create an empty file /dev/.devfsd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Alan Cox

> I am trying to compile devfsd on my system running RedHat linux 7.0
> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
> sure where this symbol is defined. Is there anything that I am missing 
> on my system. 

Sounds like a missing include in the devfsd code. That comes from
dlfcn.h.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Georg Nikodym

> "hm" == hiren mehta <[EMAIL PROTECTED]> writes:

 hm> Hi, I am trying to compile devfsd on my system running RedHat
 hm> linux 7.0 (kernel 2.2.16-22). I get the error "RTLD_NEXT"
 hm> undefined. I am not sure where this symbol is defined. Is there
 hm> anything that I am missing on my system.

make CEXTRAS=-D_GNU_SOURCE

is one way to get around this.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



problem with devfsd compilation

2001-02-01 Thread hiren_mehta

Hi,

I am trying to compile devfsd on my system running RedHat linux 7.0
(kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
sure where this symbol is defined. Is there anything that I am missing 
on my system. 

Also, I applied the devfs patch to the kernel, installed the new
kernel, modified lilo.conf, ran lilo and rebooted the system
with the  option "devfs=nomount". The system is able to mount
the root file system in readonly mode. But after that when
it tries to do fsck to the root file system before mounting 
it in "rw" mode, it fails. Looks like devfs seems to be
having a problem with my /etc/fstab. My /etc/fstab has device names
specified in the "LABEL=.." format. Does devfs understand LABEL=..
format ?

Any help is appreciated.

-hiren
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



problem with devfsd compilation

2001-02-01 Thread hiren_mehta

Hi,

I am trying to compile devfsd on my system running RedHat linux 7.0
(kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
sure where this symbol is defined. Is there anything that I am missing 
on my system. 

Also, I applied the devfs patch to the kernel, installed the new
kernel, modified lilo.conf, ran lilo and rebooted the system
with the  option "devfs=nomount". The system is able to mount
the root file system in readonly mode. But after that when
it tries to do fsck to the root file system before mounting 
it in "rw" mode, it fails. Looks like devfs seems to be
having a problem with my /etc/fstab. My /etc/fstab has device names
specified in the "LABEL=.." format. Does devfs understand LABEL=..
format ?

Any help is appreciated.

-hiren
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Georg Nikodym

 "hm" == hiren mehta [EMAIL PROTECTED] writes:

 hm Hi, I am trying to compile devfsd on my system running RedHat
 hm linux 7.0 (kernel 2.2.16-22). I get the error "RTLD_NEXT"
 hm undefined. I am not sure where this symbol is defined. Is there
 hm anything that I am missing on my system.

make CEXTRAS=-D_GNU_SOURCE

is one way to get around this.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Alan Cox

 I am trying to compile devfsd on my system running RedHat linux 7.0
 (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
 sure where this symbol is defined. Is there anything that I am missing 
 on my system. 

Sounds like a missing include in the devfsd code. That comes from
dlfcn.h.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Georg Nikodym

 "hm" == hiren mehta [EMAIL PROTECTED] writes:

 hm Hi, I am trying to compile devfsd on my system running RedHat
 hm linux 7.0 (kernel 2.2.16-22). I get the error "RTLD_NEXT"
 hm undefined. I am not sure where this symbol is defined. Is there
 hm anything that I am missing on my system.

Oh yeah, here's the two other things I forgot.

The install target of the devfsd GNUmakefile attempts to copy the
devfsd.8 man page into /usr/man/man8 which doesn't exist.  RH7 has
its man pages in /usr/share/man though you might prefer
/usr/local/man, whatever.  I just changed the GNUmakefile.

Also, RH7's /etc/rc.sysinit can already start devfsd automatically
with the following line:

[ -e /dev/.devfsd -a -x /sbin/devfsd ]  /sbin/devfsd /dev

So, all you have to do is create an empty file /dev/.devfsd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Frédéric L. W. Meunier

Georg Nikodym wrote:

 Also, RH7's /etc/rc.sysinit can already start devfsd
 automatically with the following line:   

 [ -e /dev/.devfsd -a -x /sbin/devfsd ]  /sbin/devfsd /dev

If devfs is mounted and devfsd exists, start devfsd.

 So, all you have to do is create an empty file /dev/.devfsd

Not true. I'm pretty sure /dev/.devfsd is only created when you
mount devfs at boot time or via mount -t devfs devfs /dev in
your system initialization script. Creating /dev/.devfsd with
touch defeats the purpose of /etc/rc.sysinit example.

crw---  1 root root 144,  0 Dec 31  1969 .devfsd

-- 
Frdric L. W. Meunier - http://www.pervalidus.net/
0@pervalidus.{net, {dyndns.}org} Tel: 55-21-717-2399 (Niteri-RJ BR)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: problem with devfsd compilation

2001-02-01 Thread Michael B. Trausch


On Thu, 1 Feb 2001, Alan Cox wrote:

  I am trying to compile devfsd on my system running RedHat linux 7.0
  (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
  sure where this symbol is defined. Is there anything that I am missing 
  on my system. 
 
 Sounds like a missing include in the devfsd code. That comes from
 dlfcn.h.
 

If you add -D_GNU_SOURCE to the make line in CC_OPTS (or CCOPTS, I forget
which) it works fine.  Had the same exact problem here.

- Mike

===
Michael B. Trausch[EMAIL PROTECTED]
Avid Linux User since April, '96!   AIM:  ML100Smkr

  Contactable via IRC (DALNet) or AIM as ML100Smkr
===

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/