]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/configs: add head parameter to configs_refer_filename()
authorKarel Zak <kzak@redhat.com>
Wed, 15 Oct 2025 13:11:25 +0000 (15:11 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 15 Oct 2025 13:11:25 +0000 (15:11 +0200)
commit06805e9ec8db3cffeead4c64a211fd6692cd6cab
tree58861398b05dd9fcbea0c22584aa4397f6e36c66
parentbd34d1c085cdd0ed56718638d02f86c9d356e05e
lib/configs: add head parameter to configs_refer_filename()

Allow configs_refer_filename() to add entries at either the head
or tail of the list by adding a 'head' parameter. This simplifies
the code for adding the main config file, eliminating the need to
add to the tail and then move to the head.

When head=1, use list_add() to prepend to the list.
When head=0, use list_add_tail() to append to the list.

Signed-off-by: Karel Zak <kzak@redhat.com>
lib/configs.c