Commit Diff
- Commit:
e071ad386d88cfe4c5303487dabdbbac64e3ddcd
- From:
- smytht <smytht@users.noreply.github.com>
- Via:
- GitHub <noreply@github.com>
- Date:
- Message:
- Update stats.c to fix mbuf prints (compatibility broken due to changes in base) Stefan@ reviewed On Sun, Aug 06, 2023 at 11:20:07PM +0100, Tom Smyth wrote: > Folks, > > I was trying to test the functions I was proposing to edit and I got the > following warning > > nsh(p)/sho kernel mbuf > % mbpr: unexpected change to mbstat; check source > > This issue occurs before and after made changes to get rid of the warning We will need the tweak below to fix this issue. This tweak is coming from the bottom of https://gothub.org/?action=diff&commit=cea35e798e12953fe0c2bf514e802d209589bc05&path=src.git which is another diff by yasuoka related to resizing mbstat.m_mtypes. diff /home/stsp/src/nsh commit - 574d5c2d6a16ae5600d65fedc157d03e7fcfdd43 path + /home/stsp/src/nsh blob - 8fc7ec538398cea9a0d4e2a87d378caf25b7ab6f file + stats.c --- stats.c +++ stats.c @@ -782,7 +782,7 @@ mbpr(void) memset(&seen, 0, sizeof(seen)); - if (nmbtypes != 256) { + if (nmbtypes != MBSTAT_COUNT) { printf("%% mbpr: unexpected change to mbstat; check source\n"); return; }
- Actions:
- Patch | Tree
--- stats.c +++ stats.c @@ -782,7 +782,7 @@ mbpr(void) memset(&seen, 0, sizeof(seen)); - if (nmbtypes != 256) { + if (nmbtypes != MBSTAT_COUNT) { printf("%% mbpr: unexpected change to mbstat; check source\n"); return; }