Print this page
2915 DTrace in a zone should see "cpu", "curpsinfo", et al
2916 DTrace in a zone should be able to access fds[]
2917 DTrace in a zone should have limited provider access
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Adam Leventhal <ahl@delphix.com>
@@ -21,11 +21,13 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ */
#pragma D depends_on module unix
#pragma D depends_on provider io
inline int B_BUSY = @B_BUSY@;
@@ -195,13 +197,11 @@
F->f_vnode->v_vfsp->vfs_vnodecovered->v_path == NULL ? "<unknown>" :
cleanpath(F->f_vnode->v_vfsp->vfs_vnodecovered->v_path);
fi_oflags = F == NULL ? 0 : F->f_flag + (int)@FOPEN@;
};
-inline fileinfo_t fds[int fd] = xlate <fileinfo_t> (
- fd >= 0 && fd < curthread->t_procp->p_user.u_finfo.fi_nfiles ?
- curthread->t_procp->p_user.u_finfo.fi_list[fd].uf_file : NULL);
+inline fileinfo_t fds[int fd] = xlate <fileinfo_t> (getf(fd));
#pragma D attributes Stable/Stable/Common fds
#pragma D binding "1.1" fds
#pragma D binding "1.2" translator