> Then what is nonseekable_open() for? But that's not part of the ANSI file I/O. I gave this as a caveat. I'm not familiar with this nonseekable option (and I can't actually see the benefit of it in a proper file stream). But you did specify use of your own char device driver - I think. Perhaps you'll need to clarify much better what exactly your dev driver tries to do, not sure. Sorry I can't help more. B rgds Kris On Thu, 5 Mar 2009 14:42:06 +0300, Denis Borisevich <dennisfen@xxxxxxxxx> wrote: > 2009/3/5 <microbit@xxxxxxxxxxxxxxxxxxxxxx>: >> I presume that llseek results from a seek() call ? >> A seek() call implies (to me) the use of higher layer file I/O streams. >> I don't think there's a way to inhibit the high level library from >> wanting >> to call seek(). >> Also, note that some specific fread()/fwrite() sequences need a flush, or >> at least a seek() >> call to function properly. >> Maybe, just maybe if you can intercept these calls with your own dummy >> seek() or lseek() function, >> you can bypass these 'illegal' calls, but that probably would still break >> the functionality of the upper stream layer. >> >> I think the only sound way would be to ensure that some sort of >> meaningful >> data is returned from a seek() >> call, unless your char device driver can guarantee that it doesn't rely >> on >> low level seek calls to return something meaningful. >> >> HTH >> B rgds >> Kris >> >> >> On Thu, 5 Mar 2009 12:27:30 +0300, Denis Borisevich <dennisfen@xxxxxxxxx> >> wrote: >>> Hi! >>> >>> My char device is not seekable and I try to disable seeking on it >>> using nonseekable_open() in my open() function. But still I have >>> Illegal seek returned by userspace application when performing actions >>> on dev node connected to my device. Is there any way to _really_ >>> prevent llseek() to be performed on my device? >>> >>> -- >>> Denis >>> >>> > Then what is nonseekable_open() for? > > -- > Denis -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ