Page MenuHomeFreeBSD

D6493.id16711.diff
No OneTemporary

D6493.id16711.diff

Index: FREEBSD-upgrade
===================================================================
--- FREEBSD-upgrade
+++ FREEBSD-upgrade
@@ -0,0 +1,145 @@
+$FreeBSD$
+
+This file contains notes regading the upgrade of top(1). See the vendor import
+instructions at:
+
+ https://www.freebsd.org/doc/en/articles/committers-guide/subversion-primer.html#svn-advanced-use-vendor-imports
+
+Top's upstream project pages are:
+
+ http://www.unixtop.org/
+
+ https://sourceforge.net/projects/unixtop/
+
+
+The version of top(1) in base is: 3.5-beta12, from March 2000.
+The current upstream release is: 3.8-beta1, from May 2008.
+This upgrade is in progress by Randy Westlund <rwestlun@gmail.com>.
+
+
+
+########### 3.8-beta1 ##########
+
+IMPORTING:
+
+When 3.8-beta1 was imported into vendor/top, the distribution's /machine
+directory that holds m_${OS_NAME}.c files was flattened, removing everything
+except m_freebsd.{c,man}.
+
+In addition, the following four files were removed:
+ config.amd64.make
+ config.amd64.makeinstall
+ config.sparcv9.make
+ config.sparcv9.makeinstall
+
+
+UPSTREAM CHANGES:
+
+Upstream has made many changes (see the Changes file in the distribution), a
+fair number of which are for FreeBSD. These likely came from pkgsrc.
+
+Upstream switched to GNU autoconf, replacing the csh configure script that we
+didn't use.
+
+The OS-specific bits specified in contrib/top/machine.h no longer require
+usr.bin/top/machine.c; there's now a m_freebsd.c module in the upstream
+distribution that handles this. It will likely need modification, but these
+can be upstreamed later.
+
+
+LOCAL CHANGES:
+
+These changes are what needs to be ported to 3.8-beta1. This is an overview of
+what we changed in 3.5-beta12 and how it might apply to 3.8-beta1.
+
+randy@mako ~/c/freebsd-base> svn diff https://svn.freebsd.org/base/vendor/top/3.5beta12/ https://svn.freebsd.org/base/head/contrib/top@r300394 | diffstat
+ commands.c | 25 ++-
+ display.c | 288 ++++++++++++++++++++++++++++++++++---
+ layout.h | 42 +++--
+ loadavg.h | 6
+ machine.h | 17 ++
+ screen.c | 11 +
+ sigconv.awk | 16 +-
+ top.X | 336 --------------------------------------------
+ top.c | 373 ++++++++++++++++++++++++++++++++++++++-----------
+ top.h | 17 +-
+ top.local.H | 68 --------
+ top.local.hs | 68 ++++++++
+ top.xs | 448 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ username.c | 8 -
+ utils.c | 50 +++++-
+ utils.h | 1
+
+commands.c
+ - add several new runtime commands format changed, conflicts
+
+display.c
+ - functions for printing uptime, mem, arc largely rewritten
+
+layout.h
+ - replace defines with ints mostly applies, but why do
+ we need it?
+loadavg.h (define load_avg typedef depending on platform)
+ - treat freebsd like netbsd applies cleanly
+ - typedef fixpt_t load_avg;
+
+machine.h
+ - additions to structures (swap, arc, ncpu) structs significantly changed
+
+screen.c
+ - replace strcpy with strncpy applies cleanly, but
+ probably use strlcpy
+sigconv.awk
+ - change regex to match signals with numbers applies cleanly
+ e.g. SIGUSR1
+ - change output format for signal list applies
+
+top.X -> top.xs (man page)
+ - renamed, significant changes
+
+top.c
+ - add headers: errno.h, sys.jail.h, jail.h whole file completely
+ - add {u|i}_{arc|swap}() functions rewritten, needs to be
+ - added handlers for new options reimplemented
+ - changes to screen resizing
+ - move quit handling to main loop with flags
+ rather than quitting from the cmd handler
+
+top.h
+ - add one to display lines (for swap and arc) display lines define is gone
+ - increase max display cols applies cleanly
+ - add display mode enum maybe no longer needed
+
+
+top.local.H -> top.local.hs (defines, processed by the csh configure script)
+ - renamed, no other changes file removed upstream
+
+username.c
+ - replace username length of 8 with new code provides a define
+ MAXLOGNAME and include for this
+ sys/param.h, sys/types.h
+
+utils.c
+ - add assertion for int width applies cleanly
+ - prevent division by 0 bug unnecessary in both versions
+ - prevent -Wimplicit-cast upstreamed
+ - make time format use consistent long format upstreamed
+ - add format_k2(.), used by applies cleanly
+ usr.bin/top/machine.c: changes format_k
+ to use 100k rather than 10k for
+ human-readable numbers
+
+utils.h
+ - declaration of format_k2(.) applies cleanly
+
+
+
+########### 3.5-beta12 ##########
+
+contrib/top/machine.h specifies an interface that must be provided by the
+target OS. That interface is implemented in usr.bin/top/machine.c
+
+The upstream configure script and makefile are ignored; usr.bin/top/Makefile
+implements all the necessary steps.
+
+

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 22, 2:55 AM (13 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31948775
Default Alt Text
D6493.id16711.diff (4 KB)

Event Timeline