Browse Source

Update documentation and hopefully it will work on OpenBSD. We shall
see...

douglas 14 years ago
parent
commit
93376cfbd2
4 changed files with 16 additions and 8 deletions
  1. 7 1
      GNUmakefile
  2. 3 2
      dtpstree.1.in
  3. 2 2
      dtpstree.cpp
  4. 4 3
      man1/dtpstree.1

+ 7 - 1
GNUmakefile

@@ -27,6 +27,12 @@ BINDIR ?= $(PREFIX)/bin
 MANDIR ?= $(PREFIX)/man
 MAN1DIR ?= $(MANDIR)/man1
 
+ifneq ($(shell which realpath),)
+REALPATH := realpath
+else
+REALPATH := readlink -f
+endif
+
 .PHONY: all man dist install uninstall clean
 
 all: dtpstree
@@ -34,7 +40,7 @@ all: dtpstree
 man: man1/dtpstree.1
 
 man1/%.1: % %.1.in
-	help2man -I $*.1.in -Nn '$(shell sed -e '$$ s|^// ||p;d' $<.cpp)' -o $@ $(shell realpath $<)
+	help2man -I $*.1.in -Nn '$(shell sed -e '$$ s|^// ||p;d' $<.cpp)' -o $@ $(shell $(REALPATH) $<)
 
 dist: man
 	bsdtar -cf $(TARNAME).tar.bz2 -js '/^\./$(TARNAME)/' -vX .gitignore --exclude='.git*' .

+ 3 - 2
dtpstree.1.in

@@ -1,8 +1,9 @@
 [DESCRIPTION]
 .B dtpstree
 shows running processes as a tree. It is a reimplementation of \fBpstree\fR from
-\fIPSmisc\fR for FreeBSD. It also works without \fI/proc\fR and will show the
-full set of processes in a jail even if \fBinit\fR is not present.
+\fIPSmisc\fR for FreeBSD, NetBSD, and OpenBSD. It also works without \fI/proc\fR
+and will show the full set of processes in a jail even if \fBinit\fR is not
+present.
 [AUTHOR]
 Written by \fBDouglas Thrift\fR <\fIdouglas@douglasthrift.net\fR>.
 [SEE ALSO]

+ 2 - 2
dtpstree.cpp

@@ -60,7 +60,7 @@
 #include "foreach.hpp"
 
 #define DTPSTREE_PROGRAM "dtpstree"
-#define DTPSTREE_VERSION "1.0.1"
+#define DTPSTREE_VERSION "1.0.2"
 
 namespace kvm
 {
@@ -83,7 +83,7 @@ inline uid_t ruid(Type *proc);
 template <typename Type>
 inline char *comm(Type *proc);
 
-#ifndef __NetBSD__
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
 typedef kinfo_proc Proc;
 
 const int Flags(O_RDONLY);

+ 4 - 3
man1/dtpstree.1

@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.38.2.
-.TH DTPSTREE "1" "June 2010" "dtpstree 1.0.1" "User Commands"
+.TH DTPSTREE "1" "June 2010" "dtpstree 1.0.2" "User Commands"
 .SH NAME
 dtpstree \- display a tree of processes
 .SH SYNOPSIS
@@ -8,8 +8,9 @@ dtpstree \- display a tree of processes
 .SH DESCRIPTION
 .B dtpstree
 shows running processes as a tree. It is a reimplementation of \fBpstree\fR from
-\fIPSmisc\fR for FreeBSD. It also works without \fI/proc\fR and will show the
-full set of processes in a jail even if \fBinit\fR is not present.
+\fIPSmisc\fR for FreeBSD, NetBSD, and OpenBSD. It also works without \fI/proc\fR
+and will show the full set of processes in a jail even if \fBinit\fR is not
+present.
 .SH OPTIONS
 .TP
 \fB\-a\fR, \fB\-\-arguments\fR