]> granicus.if.org Git - procps-ng/commit
top: extend rcfile conversions for '--enable-oomem'
authorJim Warner <james.warner@comcast.net>
Fri, 2 Mar 2012 18:34:56 +0000 (12:34 -0600)
committerCraig Small <csmall@enc.com.au>
Sat, 3 Mar 2012 03:01:35 +0000 (14:01 +1100)
commit0053eefbb9086cd1f2d44d57d1552adb751e85d0
tree2ee513e672808428eccf8869df297d4c2f59d76e
parent502a79e02fdf7e2b5125f150b3d22aaf0ec1a208
top: extend rcfile conversions for '--enable-oomem'

Under openSUSE, old top uses additional fields for
out-of-memory reporting.  As a result, under the
original approach to rcfile conversion, new top would
issue a fatal corrupt window entry message asking that
the rcfile be deleted.

This patch extends the conversion range to include
the extra openSUSE field characters.  It's effective
when ./configure specifies the --enable-oomem option
which in turn defines OOMEM_ENABLE.

This commit also makes the conversion logic slightly
more forgiving.  While enforcing an upper limit on the
expected number of old style field characters, amounts
less than that will be handled seemlessly.

Reference:
commit 4b987331323fe7b0d8a8566c33b786682acf12c9

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top.h