Skip to content

use uint64_t for blkdev sizes - #4644

Open
karelzak wants to merge 4 commits into
util-linux:masterfrom
karelzak:PR/blkdev-size
Open

karelzak wants to merge 4 commits into
util-linux:masterfrom
karelzak:PR/blkdev-size

Conversation

@karelzak

Copy link
Copy Markdown
Collaborator

No description provided.

Leefancy and others added 4 commits September 21, 2026 10:45
Signed-off-by: Leefancy <lijian01@kylinos.cn>
* 'branch-02' of https://github.com/Leefancy/util-linux:
  blkdev: check blkdev_find_size return value in blkdev_get_size
Signed-off-by: Karel Zak <kzak@redhat.com>
For blkdev_get_size() and blkdev_get_sectors(), use uint64_t instead of
"unsigned long long", and use matching variable types at the call sites
rather than casting the pointer argument.

While on it:

* handle fstat() failure in blkdev_get_size(); the following S_ISBLK()
  check read uninitialized memory when fstat() failed

* use %ju and uintmax_t in the mkfs.minix and swapon messages; xgettext
  does not expand PRIu64, so the extracted msgid would never match the
  string looked up by gettext() at run time

Signed-off-by: Karel Zak <kzak@redhat.com>
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

Successfully merging this pull request may close these issues.

1 participant