Dag-Erling Smorgrav <[EMAIL PROTECTED]> writes:
> Jens Schweikhardt <[EMAIL PROTECTED]> writes:
> > -current as of Jun 17, even with an updated sysctl.c revision 1.36,
> > prints garbage when used with -A:
> Remove the line that says "offset--;" near the end of
> sys/vm/vm_zone.c.

Ick, what am I saying - this alone isn't enough, you need to
increment offset after setting *offset to '\0'.

Index: vm_zone.c
===================================================================
RCS file: /home/ncvs/src/sys/vm/vm_zone.c,v
retrieving revision 1.45
diff -u -u -r1.45 vm_zone.c
--- vm_zone.c   2001/07/04 16:20:28     1.45
+++ vm_zone.c   2001/07/09 01:09:51
@@ -451,8 +451,7 @@
                offset += len;
        }
        mtx_unlock(&zone_mtx);
-       offset--;
-       *offset = '\0';
+       *offset++ = '\0';
        error = SYSCTL_OUT(req, tmpbuf, offset - tmpbuf);
 out:
        FREE(tmpbuf, M_TEMP);

Untested, caveat emptor, etc.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to