Skip to contentSkip to conversation

ENOTTY from ext3 code?

DISCUSSION Pete Zaitcev 2 participants 2 messages Feb 19, 2002 – Feb 20, 2002 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 6 lines

ext3/ioctl.c:
...
return -ENOTTY;

Does it really make sense to return "not a typewriter" from ext3 ioctl?

Absolutely. In fact, it's a pet pieve of mine. Lots and lots of clueless driver writes return -EINVAL in such cases, and I keep cleaning it up. The problem with EINVAL is that it makes it harder to diagnose any problems that can come up.

Also, recent strerror() returns "Inappropriate ioctl for a device", if that is your concern. Personally, I think "Not a typewriter" was a warmer and fuzzier reference to the roots, but oh well... Dennis giveth, TOG taketh away...

-- Pete

#2 lore raw
Quoted 3 lines

if that is your concern. Personally, I think "Not a typewriter" was a warmer and fuzzier reference to the roots, but oh well... Dennis giveth, TOG taketh away...

TOG says you are right. -ENOTTY is the right thing in most cases