]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: (functions.sh) add a helper funcion making a device number from given major...
authorMasatake YAMATO <yamato@redhat.com>
Wed, 10 Apr 2024 09:36:47 +0000 (18:36 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Mon, 15 Apr 2024 09:17:09 +0000 (18:17 +0900)
commitd4dea14933bc3ee750d6762a6f615d2a4fe24c34
tree01bf2f11dcaa1a1b03554a58b16b158addfc0552
parent1dca39791c0cd7c2f7886e970d7c5e00e5f72ece
tests: (functions.sh) add a helper funcion making a device number from given major and minor nums

Fixes #2919.
Suggested by Karel Zak <kzak@redhat.com>.

The original code used an obsolete formula to make a device number from
given major and minor numbers.

ts_device_make is a new helper function based on the formula of
__SYSMACROS_DEFINE_MAKEDEV macro defined in
/usr/include/bits/sysmacros.h of GNU libc.

Suggested by Karel Zak <kzak@redhat.com> in #2919.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/functions.sh
tests/ts/lsfd/lsfd-functions.bash