* No atime updates of /dev nodes on local keyboard, mouse input in 2.4.26
@ 2004-10-12 15:03 David McBride
0 siblings, 0 replies; only message in thread
From: David McBride @ 2004-10-12 15:03 UTC (permalink / raw)
To: linux-kernel
Greetings,
Some software, such as Condor[1], depends on the fact that the atime of
the /dev/console and /dev/input/mice files is updated when keystrokes
are entered or a mouse is used, respectively.
However, certainly in recent kernels (I've tried stock 2.4.21 and
2.4.26) this doesn't appear to be the case. As I'm running Condor (for
which source isn't available) and depend on these atime update semantics
for correct operation I'm trying to re-add this functionality.
I found via Google a patch[2] to do exactly this for 2.6; I've been
trying to implement my own equivilent on 2.4. However, I'm not at all
familiar with the kernel internals and could use some help from someone
with a better understanding of the code involved.
Specifically, the patch above for evdev.c and related input drivers
apply cleanly on 2.4.26 -- and they work; atimes are now updated when
mouse input occurs.
However, PS/2 keyboard support is more problematic. Code to do what I
want already appears to exist in drivers/char/pc_keyb.c:
static ssize_t read_aux(struct file * file, char * buffer,
size_t count, loff_t *ppos)
{
[...]
if (count-i) {
file->f_dentry->d_inode->i_atime = CURRENT_TIME;
return count-i;
}
[...]
However, no /dev node receives an atime update when keystrokes are
entered *and* when I added debugging printks to this section of code no
messages appeared in dmesg -- suggesting that this conditional never
evaluates to true. (I suspect that this function never gets called at all.)
I'm now a little lost. Can anyone help?
(If you reply, please explicitly CC me.)
Cheers,
Davidj
[2] http://www.ussg.iu.edu/hypermail/linux/kernel/0406.1/1612.html
--
David McBride <dwm99@doc.ic.ac.uk>
Department of Computing, Imperial College, London
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-12 15:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-12 15:03 No atime updates of /dev nodes on local keyboard, mouse input in 2.4.26 David McBride
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox