diff options
author | William Cohen <wcohen@redhat.com> | 2010-03-01 15:39:23 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2010-03-02 11:52:20 -0500 |
commit | 1f95aa31dd8859031149678651916e2441a8d3c5 (patch) | |
tree | 8f83fcb48cbc98ba1834a9f91a39c818a6d28404 /doc/tutorial/inode-watch.stp | |
parent | bfbbb76e5d0294cc1d44f42ab6c2d91149067b6c (diff) | |
download | systemtap-steved-1f95aa31dd8859031149678651916e2441a8d3c5.tar.gz systemtap-steved-1f95aa31dd8859031149678651916e2441a8d3c5.tar.xz systemtap-steved-1f95aa31dd8859031149678651916e2441a8d3c5.zip |
Make the inode-watch.stp example work on newer kernels.
Diffstat (limited to 'doc/tutorial/inode-watch.stp')
-rw-r--r-- | doc/tutorial/inode-watch.stp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/tutorial/inode-watch.stp b/doc/tutorial/inode-watch.stp index caf04b9a..2209f309 100644 --- a/doc/tutorial/inode-watch.stp +++ b/doc/tutorial/inode-watch.stp @@ -1,13 +1,16 @@ probe kernel.function ("vfs_write"), kernel.function ("vfs_read") { +%( kernel_v >= "2.6.20" %? + dev_nr = $file->f_path->dentry->d_inode->i_sb->s_dev + inode_nr = $file->f_path->dentry->d_inode->i_ino +%: dev_nr = $file->f_dentry->d_inode->i_sb->s_dev inode_nr = $file->f_dentry->d_inode->i_ino +%) if (dev_nr == ($1 << 20 | $2) # major/minor device && inode_nr == $3) printf ("%s(%d) %s 0x%x/%u\n", execname(), pid(), probefunc(), dev_nr, inode_nr) } - -# dev_name = kernel_string ($file->f_dentry->d_inode->i_sb->s_id) |