[ENBD] bug in /dev/nd* file name in nbd-client (?)
Teofilis Martisius
teo@ice.pit.ktu.lt
Thu, 22 Mar 2001 12:29:14 +0200 (EET)
Hello,
I am using NBD-2.4.32,
linux kernel 2.4.2 WITHOUT devfs
Debian GNU/Linux testing/unstable
Today I compiled NBD-2.4.32 and got this error when trying to run
nbd client:
# nbd-client localhost:1234 localhost /dev/nda
nbd-client: Cannot open NBD device /dev/nda: Not a directory
>From what I found out from the sources, nbd-client tries to open file
named /dev/nda/0 (nbd-client.c, line 2319):
sprintf(buffer,"%s/0",devicename[0]);
self->dev = open (buffer, O_RDWR);
if (self->dev < 0) {
PERR ("Cannot open NBD device %s: %m\n",devicename[0]);
exit(1);
}
Maybe this works with devfs, where device files are put into separate
directories, but i doesn't work in my system. Maybe you could at least
modify MAKEDEV script so that it could create device files in devfs
fashion? Or at least suggest me how to make a quick & dirty fix so that it
would only work on non-devfs system.
Teofilis Martisius,
teo@ice.pit.ktu.lt