]> git.ipfire.org Git - thirdparty/systemd.git/commit
mount-util: drop exponential buffer growing in name_to_handle_at_loop()
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Nov 2017 11:42:24 +0000 (12:42 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Nov 2017 12:28:06 +0000 (13:28 +0100)
commitfc010b01e7a2d02130269add7c0a0ebbc7171d30
tree488e7a056a84a8745206af9e52919d6696fe99a8
parent71050acb68d2a86c823d561f83683c063b1a99a3
mount-util: drop exponential buffer growing in name_to_handle_at_loop()

So, it appears name_to_handle_at() always returns the right buffer size
on EOVERFLOW, when it's returned due to a too small buffer. Let's rely
on that exclusively for sizing the buffer, and let's drop the
exponential buffer growing.

The new logic is now: if we see EOVERFLOW and the returned size has
increased, resize our buffer and try again. But if it didn't increase,
then propagate the EOVERFLOW as it likely has other causes.
src/basic/mount-util.c