Hi Gerd & list members, Gerd Knorr wrote: > I agree that priority levels are likely to complex. I was just trying to look ahead a little and find a solution that does not only solve my immediate problem. I do se a very similar problem one level up: when the user forgets that he has a TV recording running, he might fire up his TV app and start zapping through the channels, thereby destroying the recording. Of course that would be the user's fault, but it would be nice if there would be a way to prevent that kind of error in the first place. > Another way would be to have some kind of O_EXCL flag, but at ioctl > level. So nxtvepg could set that for the S_FREQUENCY ioctl and the > driver would refuse the switch with -EBUSY if there is more than one > file handle open at that time. This would solve my problem, but not the one described above. Also, wouldn't that mean to add a flag to every struct that's passed to a "set" type ioctl? To me (certainly not a driver expert) it'd seem simpler to pass this value once in a dedicated ioctl and keep it in the driver. If you agree to that, you could also take the next step and make an integer out of the boolean flag and do a loop across all device users to find the maximum value, before doing the EBUSY refusal. That's actually all I proposed; the rest is just some candy on top of the cake. But I'll shut up now :) I don't mean to insist on my proposal, I just can't quite see the complexity in it. bye -tom