Page MenuHomeFreeBSD

D51558.id159187.diff
No OneTemporary

D51558.id159187.diff

Index: sys/compat/linuxkpi/common/src/linux_compat.c
===================================================================
--- sys/compat/linuxkpi/common/src/linux_compat.c
+++ sys/compat/linuxkpi/common/src/linux_compat.c
@@ -2005,40 +2005,52 @@
typedef const struct { uint32_t value; } __packed *print_32p_t;
typedef const struct { uint16_t value; } __packed *print_16p_t;
const void *buf_old = buf;
- int row;
+ int row, linelen;
while (len > 0) {
+ linelen = 0;
if (level != NULL)
- _fpf(arg1, "%s", level);
+ linelen += _fpf(arg1, "%s", level);
if (prefix_str != NULL)
- _fpf(arg1, "%s ", prefix_str);
+ linelen += _fpf(
+ arg1, "%s%s", linelen ? " " : "", prefix_str);
switch (prefix_type) {
case DUMP_PREFIX_ADDRESS:
- _fpf(arg1, "[%p] ", buf);
+ linelen += _fpf(
+ arg1, "%s[%p]", linelen ? " " : "", buf);
break;
case DUMP_PREFIX_OFFSET:
- _fpf(arg1, "[%#tx] ", ((const char *)buf -
- (const char *)buf_old));
+ linelen += _fpf(
+ arg1, "%s[%#tx]", linelen ? " " : "",
+ ((const char *)buf - (const char *)buf_old));
break;
default:
break;
}
for (row = 0; row != rowsize; row++) {
if (groupsize == 8 && len > 7) {
- _fpf(arg1, "%016llx ", ((print_64p_t)buf)->value);
+ linelen += _fpf(
+ arg1, "%s%016llx", linelen ? " " : "",
+ ((print_64p_t)buf)->value);
buf = (const uint8_t *)buf + 8;
len -= 8;
} else if (groupsize == 4 && len > 3) {
- _fpf(arg1, "%08x ", ((print_32p_t)buf)->value);
+ linelen += _fpf(
+ arg1, "%s%08x", linelen ? " " : "",
+ ((print_32p_t)buf)->value);
buf = (const uint8_t *)buf + 4;
len -= 4;
} else if (groupsize == 2 && len > 1) {
- _fpf(arg1, "%04x ", ((print_16p_t)buf)->value);
+ linelen += _fpf(
+ arg1, "%s%04x", linelen ? " " : "",
+ ((print_16p_t)buf)->value);
buf = (const uint8_t *)buf + 2;
len -= 2;
} else if (len > 0) {
- _fpf(arg1, "%02x ", *(const uint8_t *)buf);
+ linelen += _fpf(
+ arg1, "%s%02x", linelen ? " " : "",
+ *(const uint8_t *)buf);
buf = (const uint8_t *)buf + 1;
len--;
} else {

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 11, 10:47 PM (3 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25182970
Default Alt Text
D51558.id159187.diff (2 KB)

Event Timeline