Commit 2fe45193 authored by Peter Pentchev's avatar Peter Pentchev
Browse files

Tweak the decrease-numblocks diagnostic message.

parent 7eced0e4
mbuffer (20200929+ds2-6) UNRELEASED; urgency=medium
* Add a newline character at the end of the diagnostic message in
the decrease-numblocks patch and make the message more informative.
-- Peter Pentchev <roam@debian.org> Fri, 06 Nov 2020 11:30:31 +0200
mbuffer (20200929+ds2-5) unstable; urgency=medium mbuffer (20200929+ds2-5) unstable; urgency=medium
* Brown paperbag upload: fix the autopkgtest. * Brown paperbag upload: fix the autopkgtest.
......
...@@ -10,7 +10,7 @@ Last-Update: 2020-11-04 ...@@ -10,7 +10,7 @@ Last-Update: 2020-11-04
debugmsg("Blocksize set to physical page size of %ld bytes\n",PgSz); debugmsg("Blocksize set to physical page size of %ld bytes\n",PgSz);
Numblocks = NumP/50; Numblocks = NumP/50;
+ if ((Blocksize * (long long)Numblocks) > (long long)SSIZE_MAX) { + if ((Blocksize * (long long)Numblocks) > (long long)SSIZE_MAX) {
+ debugmsg("Cannot allocate that many blocks"); + debugmsg("Cannot allocate that many blocks (%lld * %lld > %lld)\n", (long long)Blocksize, (long long)Numblocks, (long long)SSIZE_MAX);
+ while ((Blocksize * (long long)Numblocks) > (long long)SSIZE_MAX) + while ((Blocksize * (long long)Numblocks) > (long long)SSIZE_MAX)
+ Numblocks >>= 1; + Numblocks >>= 1;
+ } + }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment