From b05f661edbf00ab81ef8d387f801f2c80c93b21f Mon Sep 17 00:00:00 2001 From: Christian Goeschel Ndjomouo Date: Sat, 30 Aug 2025 02:07:48 -0400 Subject: [PATCH] lslocks: add support for LSLOCKS_COLUMNS environmental variable This provides an alternate way to specify output columns similar to the --output option. Addresses: #2816 Signed-off-by: Christian Goeschel Ndjomouo --- misc-utils/lslocks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc-utils/lslocks.c b/misc-utils/lslocks.c index 4ed3a3716..ad8da240b 100644 --- a/misc-utils/lslocks.c +++ b/misc-utils/lslocks.c @@ -952,6 +952,8 @@ int main(int argc, char *argv[]) columns[ncolumns++] = COL_PATH; } + if (!outarg) + outarg = getenv("LSLOCKS_COLUMNS"); if (outarg && string_add_to_idarray(outarg, columns, ARRAY_SIZE(columns), &ncolumns, column_name_to_id) < 0) return EXIT_FAILURE; -- 2.47.3