[PATCH v2 0/6] tools/nolibc: make dev_t 64 bits wide

Thomas Weißschuh posted 6 patches 2 months, 1 week ago
tools/include/nolibc/std.h                   |  2 +-
tools/include/nolibc/sys/stat.h              |  9 +++------
tools/include/nolibc/sys/sysmacros.h         | 25 +++++++++++++++++++++----
tools/testing/selftests/nolibc/nolibc-test.c |  7 +++++++
4 files changed, 32 insertions(+), 11 deletions(-)
[PATCH v2 0/6] tools/nolibc: make dev_t 64 bits wide
Posted by Thomas Weißschuh 2 months, 1 week ago
Handle all possible values of minor and major numbers.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v2:
- Stay compatible with applications expecting makedev(), major() or
  minor() to be macros.
- Link to v1: https://patch.msgid.link/20260331-nolibc-makedev-v1-0-ee79ee31e4d6@weissschuh.net

---
Thomas Weißschuh (6):
      selftests/nolibc: add some tests for makedev() and friends
      selftests/nolibc: add a test for stat().st_rdev
      tools/nolibc: move the logic of makedev() and friends into functions
      tools/nolibc: make dev_t 64 bits wide
      tools/nolibc: handle all major and minor numbers in makedev() and friends
      tools/nolibc: use makedev() in fstatat()

 tools/include/nolibc/std.h                   |  2 +-
 tools/include/nolibc/sys/stat.h              |  9 +++------
 tools/include/nolibc/sys/sysmacros.h         | 25 +++++++++++++++++++++----
 tools/testing/selftests/nolibc/nolibc-test.c |  7 +++++++
 4 files changed, 32 insertions(+), 11 deletions(-)
---
base-commit: 3b6f598c904f5f18506383ca279896d84a5d4f00
change-id: 20260331-nolibc-makedev-a002250090bd

Best regards,
--  
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH v2 0/6] tools/nolibc: make dev_t 64 bits wide
Posted by Willy Tarreau 2 months, 1 week ago
Hi Thomas,

On Sat, Apr 04, 2026 at 10:08:17AM +0200, Thomas Weißschuh wrote:
> Handle all possible values of minor and major numbers.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> Changes in v2:
> - Stay compatible with applications expecting makedev(), major() or
>   minor() to be macros.
> - Link to v1: https://patch.msgid.link/20260331-nolibc-makedev-v1-0-ee79ee31e4d6@weissschuh.net

Thanks for this. Your series looks good to me. I was also initially
concerned by the loss of macros but you addressed it in this series
so everything's fine from my perspective.

Acked-by: Willy Tarreau <w@1wt.eu>

Thanks,
willy