Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target offset display issue for given above 4G offset. (Large BAR) #17

Open
sjrom opened this issue Sep 24, 2024 · 0 comments
Open

Target offset display issue for given above 4G offset. (Large BAR) #17

sjrom opened this issue Sep 24, 2024 · 0 comments

Comments

@sjrom
Copy link

sjrom commented Sep 24, 2024

The given offset target(off_t) might be cut by (int)cast.
Thus the cast would display wrong offset value out.
Ex.
pcimem /sys/bus/pci/xxx/resource4 0x105867000 w
Output
Target offset is 0x5867000, page size is 4096

Appreciated to fix the cast value output.
Ex.
-printf("Target offset is 0x%x, page size is %ld\n", (int) target, sysconf(_SC_PAGE_SIZE));
+printf("Target offset is 0x%lx, page size is %ld\n", target, sysconf(_SC_PAGE_SIZE));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant