Project

General

Profile

Bug #8944

vsnprintf is still confused about padding numbers

Added by Yuri Pankov almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2017-12-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

This can be seen in ACPI tables output:

...
Dec 19 21:05:07 loki acpica: [ID 647731 kern.notice] ACPI: RSDP 0x       0   FA5D0 000024 (v2 ACPIAM)
Dec 19 21:05:07 loki acpica: [ID 134381 kern.notice] ACPI: XSDT 0x       0D7E90100 000084 (v1 SMCI            20111110 MSFT 00000097)
Dec 19 21:05:07 loki acpica: [ID 516601 kern.notice] ACPI: FACP 0x       0D7E90290 0000F4 (v4 111011 FACP1157 20111110 MSFT 00000097)
...

The relevant ACPI CA code is:

...
        ACPI_INFO ((
            "%-4.4s 0x%8.8X%8.8X" 
            " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
...

hence the address after the table name should be padded using '0' and not whitespace.

#1

Updated by Yuri Pankov almost 3 years ago

  • Subject changed from vsnprintf improperly pads numbers with precision to vsnprintf is still confused about padding numbers

Apparently, there are other issues when width, precision, and left-aligned padding are mixed together.

#2

Updated by Electric Monk almost 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 30 to 100

git commit 77889f88de304cc448614fdeea6fe6c189350319

commit  77889f88de304cc448614fdeea6fe6c189350319
Author: Yuri Pankov <yuri.pankov@nexenta.com>
Date:   2018-01-11T22:35:31.000Z

    8944 vsnprintf is still confused about padding numbers
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF