path: root/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
diff options
authorSteven Hartland <smh@FreeBSD.org>2015-01-17 14:44:59 +0000
committerSteven Hartland <smh@FreeBSD.org>2015-01-17 14:44:59 +0000
commitbc96366c864c07ef352edb92017357917c75b36c (patch)
tree09e9633064b6303a8afc6891fff761eb6e399cee /cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
parentb0b74fb366450ac61b7df38daa92bc19cbfc3ecc (diff)
Mechanically convert cddl sun #ifdef's to illumos
Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay
Notes: svn path=/head/; revision=277300
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/plockstat/plockstat.c')
1 files changed, 7 insertions, 7 deletions
diff --git a/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c b/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
index 12884682c4a5..8dfb0ba25b81 100644
--- a/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
+++ b/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c
@@ -24,7 +24,7 @@
* Use is subject to license terms.
-#if defined(sun)
+#ifdef illumos
#pragma ident "%Z%%M% %I% %E% SMI"
@@ -505,7 +505,7 @@ getsym(struct ps_prochandle *P, uintptr_t addr, char *buf, size_t size,
char name[256];
GElf_Sym sym;
-#if defined(sun)
+#ifdef illumos
prsyminfo_t info;
prmap_t *map;
@@ -518,7 +518,7 @@ getsym(struct ps_prochandle *P, uintptr_t addr, char *buf, size_t size,
(void) snprintf(buf, size, "%#lx", addr);
return (0);
-#if defined(sun)
+#ifdef illumos
if (info.prs_object == NULL)
info.prs_object = "<unknown>";
@@ -668,7 +668,7 @@ process_aggregate(const dtrace_aggdata_t **aggsdata, int naggvars, void *arg)
static void
prochandler(struct ps_prochandle *P, const char *msg, void *arg)
-#if defined(sun)
+#ifdef illumos
const psinfo_t *prp = Ppsinfo(P);
int pid = Pstatus(P)->pr_pid;
@@ -773,7 +773,7 @@ intr(int signo)
main(int argc, char **argv)
-#if defined(sun)
+#ifdef illumos
ucred_t *ucp;
int err;
@@ -785,7 +785,7 @@ main(int argc, char **argv)
g_pname = basename(argv[0]);
argv[0] = g_pname; /* rewrite argv[0] for getopt errors */
-#if defined(sun)
+#ifdef illumos
* Make sure we have the required dtrace_proc privilege.
@@ -988,7 +988,7 @@ main(int argc, char **argv)
if (opt_v)
(void) printf("%s: tracing enabled for pid %d\n", g_pname,
-#if defined(sun)
+#ifdef illumos