From 595187eb19a18c6f534d1e44aeb912c01b8dc41b Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 9 Mar 2010 15:39:15 -0600 Subject: PR 11338 (partial): Used '@defined()' in task, dentry, and scsi tapsets. * tapset/task.stp: Used '@defined()' to remove kernel version checks. * tapset/dentry.stp: Ditto. * tapset/scsi.stp: Ditto. --- tapset/dentry.stp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tapset/dentry.stp') diff --git a/tapset/dentry.stp b/tapset/dentry.stp index af8a866f..1d045d02 100644 --- a/tapset/dentry.stp +++ b/tapset/dentry.stp @@ -86,14 +86,12 @@ function reverse_path_walk:string(dentry:long) function d_path:string(nd:long) { root = __dentry_get_current_root() - dentry = %( kernel_vr < "2.6.25" - %? @cast(nd,"nameidata")->dentry - %: @cast(nd,"nameidata")->path->dentry - %) - vfsmnt = %( kernel_vr < "2.6.25" - %? @cast(nd,"nameidata")->mnt - %: @cast(nd,"nameidata")->path->mnt - %) + dentry = (@defined(@cast(nd,"nameidata")->path->dentry) + ? @cast(nd,"nameidata")->path->dentry + : @cast(nd,"nameidata")->dentry) + vfsmnt = (@defined(@cast(nd,"nameidata")->path->mnt) + ? @cast(nd,"nameidata")->path->mnt + : @cast(nd,"nameidata")->mnt) while (1) { if (dentry == @cast(root, "path")->dentry && vfsmnt == @cast(root, "path")->mnt) -- cgit