summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/diag_nanobsd.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usr/local/www/diag_nanobsd.php b/src/usr/local/www/diag_nanobsd.php
index 34e1433..ec4dc55 100644
--- a/src/usr/local/www/diag_nanobsd.php
+++ b/src/usr/local/www/diag_nanobsd.php
@@ -168,7 +168,9 @@ $section->addInput(new Form_StaticText(
if (is_writable("/")) {
$refcount = refcount_read(1000);
/* refcount_read returns -1 when shared memory section does not exist */
- if ($refcount == 1 || $refcount == -1) {
+ /* refcount can be zero here when the user has set nanobsd_force_rw */
+ /* refcount 1 is normal, so only display the count for abnormal values */
+ if ($refcount == 1 || $refcount == 0 || $refcount == -1) {
$refdisplay = "";
} else {
$refdisplay = " (Reference count " . $refcount . ")";
OpenPOWER on IntegriCloud