Skip to content

Commit 78a97a7

Browse files
committed
Fix parsing of AFU names to allow for hex number in PCI domain
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
1 parent e9e3247 commit 78a97a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/afu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ static bool populate_metadata(dev_t dev, ocxl_afu *afu)
343343
}
344344

345345
physical_function++;
346-
uint16_t domain;
346+
uint32_t domain;
347347
uint8_t bus, device, function;
348-
int found = sscanf(physical_function, "%hu:%hhu:%hhu.%hhu.%hhu",
348+
int found = sscanf(physical_function, "%x:%hhu:%hhu.%hhu.%hhu",
349349
&domain, &bus, &device, &function, &afu->identifier.afu_index);
350350

351351
if (found != 5) {

0 commit comments

Comments
 (0)