Messages in this thread | | | Date | Sun, 20 May 2001 11:46:33 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [RFD w/info-PATCH] device arguments from lookup, partion code |
| |
On Sun, 20 May 2001, Russell King wrote: > > On Sat, May 19, 2001 at 08:26:20PM -0700, Linus Torvalds wrote: > > You're missing the point. > > I don't think Richard is actually. I think Richard has hit a nail > dead on its head. > > > It's ok to do "read()/write()" on structures. > > Ok, we can read()/write() structures. So someone invents the following > structure: > > struct foo { > int cmd; > void *data; > } foo; > > Now they use write(fd, &foo, sizeof(foo)); Haven't they just swapped > the ioctl() interface for write() instead?
Wrong.
Nobody will expect the above to work, and everybody will agree that the above is a BUG if the read() call will actually follow the pointer.
Read my email. And read the last line: "psychology is important".
Step #1 in programming: understand people.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |