Re: "File 'cd0' exists but cannot be stated" fix for QNX 6.x


Quoting Dmitry Alexeyev <dmi_a qnx org ru>:

> Hello!
> QNX 6.x CDROM driver always keeps file '/fs/cd0', which exists, but
> cannot be stat()'ed if there's no disk in drive.
> a.e. you may see something like that (without mc running):

There is no such word "stat()ed".  Whoever wrote that code didn't care about
users who don't know C programming.  Perhaps that author of that code didn't
expect that to happen.

I have already said that whoever adds new messages should think how the messages
would sound in his native language.  English is often considered as a "computer
language" by those who learn it while using computers, but there are many native
English speakers who have absolutely no idea what the stat() function does.

Small hacks cannot really help here.  A better fix would be to treat such files
 like directories and to remove that message.  Maybe such files should be marked
by "?" instead of "/".  Displaying an error message for every such entry is
clearly an overkill.

> +#ifdef __QNXNTO__

I prefer generic solutions.  We have similar hacks for SCO UNIX in the code, and
it's hard to figure out now whether that code is still functional and whether
the hack could be useful for other OSes.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]