e2fsprogs/include
Eric Biggers 4d890149b9 misc/mk_hugefiles: simplify get_partition_start()
search_sysfs_block() is causing -Wformat-truncation warnings.  These
could be fixed by checking the return value of snprintf(), instead of
doing buggy checks like 'strlen(p_de->d_name) > SYSFS_PATH_LEN -
strlen(path) - 32', which has an integer underflow bug.

However, the only purpose of search_sysfs_block() is to find the sysfs
directory for a block device by device number.  That can trivially be
done using /sys/dev/block/$major:$minor.  So just do that instead.  Also
make get_partition_start() explicitly Linux-only, as it has never worked
anywhere else.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2023-01-27 12:38:31 -05:00
..
mingw misc/mk_hugefiles: simplify get_partition_start() 2023-01-27 12:38:31 -05:00
nonunix e2fsprogs: fix Free Software Foundation address 2018-04-19 11:39:09 -04:00