Not a typewriter
Quoted 5 lines · On 05/10/2001 at 05:38:32 PM [email protected] (H. Peter Anvin) wrote:
Sounds like someone has just clarified what the heck it means. "tty" and "typewriter" aren't exactly the same thing (even though "tty" stands for "teletypewriter" it has come to mean something completely different in a Unix context)... "not a typewriter" is just a completely confusing error message for the uninitiated.
I disagree. "Not a typewriter" is part of Unix tradition, and ought to be retained as a historical reference. It's also an opportunity for "the uninitiated" to learn a little more and move a little closer to becoming "the initiated."
Wayne
Quoted 4 lines
I disagree. "Not a typewriter" is part of Unix tradition, and ought to be retained as a historical reference. It's also an opportunity for "the uninitiated" to learn a little more and move a little closer to becoming "the initiated."
Heaven help us when tradition is more important than clarity.
Typewriter has always been wrong. I'd agree that "Not a teletypewriter" would suffice.
On the other hand "Inappropriate ioctl for device" is also not very clear.
I'd like to see "Not a serial or character device" or "Not a serial device" if that's more appropriate. Something like that...
Quoted 7 lines · Hacksaw
Quoted 4 lines
I disagree. "Not a typewriter" is part of Unix tradition, and ought to be retained as a historical reference. It's also an opportunity for "the uninitiated" to learn a little more and move a little closer to becoming "the initiated."
Heaven help us when tradition is more important than clarity.
Quoted 7 lines
Typewriter has always been wrong. I'd agree that "Not a teletypewriter" would suffice.
On the other hand "Inappropriate ioctl for device" is also not very clear.
I'd like to see "Not a serial or character device" or "Not a serial device" if that's more appropriate. Something like that...
ENOTTY is used by several non-serial devices (or file systems) to object to an unrecognized ioctl command. There's also ENOIOCTLCMD (apparently supposed to be a non-user errno, but i don't see where it gets changed to something else) and EINVAL. I'm not sure what the rationale is for choosing among them; perhaps someone would elucidate?
Signature · 1 line
/Jonathan Lundell.
Quoted 5 lines · Jonathan Lundell
ENOTTY is used by several non-serial devices (or file systems) to object to an unrecognized ioctl command. There's also ENOIOCTLCMD (apparently supposed to be a non-user errno, but i don't see where it gets changed to something else) and EINVAL. I'm not sure what the rationale is for choosing among them; perhaps someone would elucidate?
ENOIOCTLCMD is something I've never met in the kernel. Normal reaction to unrecognized ioctl() is ENOTTY, for a lot of reasons, starting with the fact that ioctls are last-ditch API to be used when you just can't think of better one and historically TTY had the earliest (and largest) infestation. IOW, "not a tty" used to mean "WTF are you using ioctls here?" OTOH, EINVAL is a catch-all thing for "something is wrong with arguments".
Quoted 8 lines · Alexander Viro
Quoted 5 lines · Jonathan Lundell
ENOTTY is used by several non-serial devices (or file systems) to object to an unrecognized ioctl command. There's also ENOIOCTLCMD (apparently supposed to be a non-user errno, but i don't see where it gets changed to something else) and EINVAL. I'm not sure what the rationale is for choosing among them; perhaps someone would elucidate?
Quoted 6 lines
ENOIOCTLCMD is something I've never met in the kernel. Normal reaction to unrecognized
ioctl()is ENOTTY, for a lot of reasons, starting with the fact that ioctls are last-ditch API to be used when you just can't think of better one and historically TTY had the earliest (and largest) infestation. IOW, "not a tty" used to mean "WTF are you using ioctls here?" OTOH, EINVAL is a catch-all thing for "something is wrong with arguments".
That's pretty much what I would have said a couple of hours ago before grepping the kernel. Try it, though. ENOTTY is rarely used. ENOIOCTLCMD is all over the damned place, though its comment in errno.h warns that a user shouldn't see it. And if you browse a bunch of random ioctl handlers, you'll see EINVAL used for a bad command much more often than ENOTTY.
FWIW, the comment in errno.h under Solaris 2.6 is "Inappropriate ioctl for device". I believe that's the POSIX interpretation.
Signature · 1 line
/Jonathan Lundell.
Quoted 2 lines · Jonathan Lundell
FWIW, the comment in
errno.hunder Solaris 2.6 is "Inappropriate ioctl for device". I believe that's the POSIX interpretation.
POSIX has
[ENOTTY] Inappropriate I/O control operation
A control function was attempted for a file or special file for which the operation was inappropriate.
which is quite a nice way of putting it.
--Malcolm
Signature · 3 lines
Malcolm Beattie <[email protected]> Unix Systems Programmer Oxford University Computing Services
Quoted 9 lines · [email protected] wrote:
Quoted 5 lines · On 05/10/2001 at 05:38:32 PM [email protected] (H. Peter Anvin) wrote:
Sounds like someone has just clarified what the heck it means. "tty" and "typewriter" aren't exactly the same thing (even though "tty" stands for "teletypewriter" it has come to mean something completely different in a Unix context)... "not a typewriter" is just a completely confusing error message for the uninitiated.
Quoted 5 lines
I disagree. "Not a typewriter" is part of Unix tradition, and ought to be retained as a historical reference. It's also an opportunity for "the uninitiated" to learn a little more and move a little closer to becoming "the initiated."
Nowhere else in Unix is a "tty" referred to as a "typewriter". "Not a tty" is one thing; "Not a typewriter" is just plain misleading.
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt
Quoted 2 lines · H. Peter Anvin
Nowhere else in Unix is a "tty" referred to as a "typewriter". "Not a tty" is one thing; "Not a typewriter" is just plain misleading.
If anything it should be "Not a teletype"
Later,
David S. Miller
[email protected]
Quoted 4 lines · David S. Miller
Quoted 2 lines
Nowhere else in Unix is a "tty" referred to as a "typewriter". "Not a tty" is one thing; "Not a typewriter" is just plain misleading.
If anything it should be "Not a teletype"
fork it and see which code base the users support! ;) (would support the one that doesn't mention !#@$%#$ typewriters. that irritated me for months when i used DYNIX and my terms never worked properly.)
Signature · 3 lines
Blue Lang http://www.gator.net/~blue Unix Administrator Veritas Software 2315 McMullan Circle, Raleigh, North Carolina, USA 919 835 1540
Quoted 5 lines
Quoted 1 line
If anything it should be "Not a teletype"
fork it and see which code base the users support! ;) (would support the one that doesn't mention !#@$%#$ typewriters. that irritated me for months when i used DYNIX and my terms never worked properly.)
You can internationalise the error string in glibc to something else if you wish. Confining 'not a teletyte' to bell-prehistoric language tables wouldnt be that bad a thing.
Quoted 10 lines · H. Peter Anvin
Quoted 9 lines · [email protected] wrote:
Quoted 5 lines · On 05/10/2001 at 05:38:32 PM [email protected] (H. Peter Anvin) wrote:
Sounds like someone has just clarified what the heck it means. "tty" and "typewriter" aren't exactly the same thing (even though "tty" stands for "teletypewriter" it has come to mean something completely different in a Unix context)... "not a typewriter" is just a completely confusing error message for the uninitiated.
Quoted 9 lines
Quoted 5 lines
I disagree. "Not a typewriter" is part of Unix tradition, and ought to be retained as a historical reference. It's also an opportunity for "the uninitiated" to learn a little more and move a little closer to becoming "the initiated."
Nowhere else in Unix is a "tty" referred to as a "typewriter". "Not a tty" is one thing; "Not a typewriter" is just plain misleading.
I was told that "Not a typewriter" was a catch-all for a screw-up. It was to advise that it wasn't a typewriter keyboard you were hacking at, where you could enter anything.
Over the years, I have used ENOTTY as a temporary return-code from drivers and library procedures so I could tell what procedure was returning an error. For instance, if you have a number of calls that return ETIME, during testing it would be nice to see what routine timed out. I was quite surprised to find out that perror() was printing an error string that none of my procedures were thought to have generated. Then I wrote:
#include <stdio.h>
#include <errno.h>
main() {
errno = ENOTTY;
perror("");
}So "Not a typewriter" has been depreciated (deprecated?). The text in the header file probably should be changed to show this.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).
"Memory is like gasoline. You use it up when you are running. Of course you get it all back when you reboot..."; Actual explanation obtained from the Micro$oft help desk.
Quoted 4 lines
I disagree. "Not a typewriter" is part of Unix tradition, and ought to be retained as a historical reference. It's also an opportunity for "the uninitiated" to learn a little more and move a little closer to becoming "the initiated."
Thats fine. Keep it for the
'Install seriously weird prehistoric stuff'
option that most users really don't want
Alan [who hacked on a GCOS3 box, used DDT on a DEC10 and VTECO and quite frankly
thinks Gnome and KDE are probably the future not them]
Quoted 4 lines · On Thu, 10 May 2001 [email protected] wrote:
I disagree. "Not a typewriter" is part of Unix tradition, and ought to be retained as a historical reference. It's also an opportunity for "the uninitiated" to learn a little more and move a little closer to becoming "the initiated."
We should maintain the Unix tradition. I would feel very unhappy if I happen to use a system call "create" to make a file.
Anuradha
----------------------------------------------------------
<a href="http://www.bee.lk/people/anuradha/">home page</a>