From: David McBride <dwm99@doc.ic.ac.uk>
To: linux-kernel@vger.kernel.org
Subject: No atime updates of /dev nodes on local keyboard, mouse input in 2.4.26
Date: Tue, 12 Oct 2004 16:03:52 +0100 [thread overview]
Message-ID: <416BF258.90204@doc.ic.ac.uk> (raw)
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
reply other threads:[~2004-10-12 15:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=416BF258.90204@doc.ic.ac.uk \
--to=dwm99@doc.ic.ac.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox