[lkml]   [2001]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectBind oddity/trap
  Hi, Al. Here's an oddity I just ran across with VFS bindings:

# mkfifo /dev/modem (BTW: it would be nice not to have to make the node)
# mount --bind /dev/tts/0 /dev/modem
# kermit
kermit> set line /dev/modem
kermit> set speed 4800
?Sorry, you must SET LINE first

The reason this is happening is because Kermit will do a readdir(2),
scanning /dev for a node with the same inum as it gets from fstat(2).
In this case, fstat(2) is giving the inum of /dev/tts/0, which is of
course the correct behaviour. However, the d_ino field from readdir(2)
is giving the inum of the "mount point" (the FIFO I created). So there
is an inconsistency, and kermit gets confused.

Perhaps readdir(2) should return the same inum as fstat(2) does? I
realise that could be quite nasty to implement. However, it is an
inconsistency, and a potential trap. But there probably isn't a good
solution to this one.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:55    [W:0.056 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site