blob: 91445d3e8961a009a3c7b613fb8136f4ca69f39b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
global device_of_interest
probe begin {
/* The following is not the most efficient way to do this.
One could directly put the result of usrdev2kerndev()
into device_of_interest. However, want to test out
the other device functions */
dev = usrdev2kerndev($1)
device_of_interest = MKDEV(MAJOR(dev), MINOR(dev))
}
probe vfs.write,
vfs.read
{
dev_nr = $file->
%( kernel_v < "2.6.19" %? f_dentry %: f_path->dentry %)
->d_inode->i_sb->s_dev
if (dev_nr == device_of_interest)
printf ("%s(%d) %s 0x%x\n",
execname(), pid(), probefunc(), dev_nr)
}
|