diff options
author | David Smith <dsmith@redhat.com> | 2008-08-26 12:48:40 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2008-08-26 12:48:40 -0500 |
commit | 36ba5475952aa7ee1388ce9d94695550c2258c86 (patch) | |
tree | 793efc1b713d5cd5ccb6fa73d777c7e0d38c6001 /runtime/task_finder.c | |
parent | 9b2e2b5856ee6986340f2b4cf4a43c4654b07a6a (diff) | |
download | systemtap-steved-36ba5475952aa7ee1388ce9d94695550c2258c86.tar.gz systemtap-steved-36ba5475952aa7ee1388ce9d94695550c2258c86.tar.xz systemtap-steved-36ba5475952aa7ee1388ce9d94695550c2258c86.zip |
Uses STAPCONF_DPATH_PATH instead of a kernel version check.
2008-08-26 David Smith <dsmith@redhat.com>
* buildrun.cxx (compile_pass): Added autoconf-dpath-path.c.
2008-08-26 David Smith <dsmith@redhat.com>
* autoconf-d_path-path.c: New file.
* task_finder.c (__stp_get_mm_path): Uses STAPCONF_DPATH_PATH
instead of a kernel version check to determine how to call
d_path().
(__stp_utrace_task_finder_target_quiesce): Ditto.
(__stp_target_call_vm_callback): Ditto.
Diffstat (limited to 'runtime/task_finder.c')
-rw-r--r-- | runtime/task_finder.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/runtime/task_finder.c b/runtime/task_finder.c index d81ad115..af2345be 100644 --- a/runtime/task_finder.c +++ b/runtime/task_finder.c @@ -326,11 +326,11 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen) vma = vma->vm_next; } if (vma) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +#ifdef STAPCONF_DPATH_PATH + rc = d_path(&(vma->vm_file->f_path), buf, buflen); +#else rc = d_path(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt, buf, buflen); -#else - rc = d_path(&(vma->vm_file->f_path), buf, buflen); #endif } else { @@ -721,12 +721,12 @@ __stp_utrace_task_finder_target_quiesce(enum utrace_resume_action action, vma = mm->mmap; while (vma) { if (vma->vm_file) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) - mmpath = d_path(vma->vm_file->f_dentry, - vma->vm_file->f_vfsmnt, +#ifdef STAPCONF_DPATH_PATH + mmpath = d_path(&(vma->vm_file->f_path), mmpath_buf, PATH_MAX); #else - mmpath = d_path(&(vma->vm_file->f_path), + mmpath = d_path(vma->vm_file->f_dentry, + vma->vm_file->f_vfsmnt, mmpath_buf, PATH_MAX); #endif if (mmpath) { @@ -855,11 +855,11 @@ __stp_target_call_vm_callback(struct stap_task_finder_target *tgt, } // Grab the path associated with this vma. -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +#ifdef STAPCONF_DPATH_PATH + mmpath = d_path(&(vma->vm_file->f_path), mmpath_buf, PATH_MAX); +#else mmpath = d_path(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt, mmpath_buf, PATH_MAX); -#else - mmpath = d_path(&(vma->vm_file->f_path), mmpath_buf, PATH_MAX); #endif if (mmpath == NULL || IS_ERR(mmpath)) { rc = -PTR_ERR(mmpath); |