From 58d2fe4440577b165ef87f7dfb04fb6cd017d249 Mon Sep 17 00:00:00 2001
From: Wim Taymans
Date: Fri, 12 Feb 2021 09:49:02 +0100
Subject: [PATCH] man: update man page
Add PIPEWIRE_CONFIG_PREFIX environment variable as well
---
man/pipewire.conf.5.xml.in | 5 +++--
src/pipewire/context.c | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/man/pipewire.conf.5.xml.in b/man/pipewire.conf.5.xml.in
index 14c2f582d..ee3a15130 100644
--- a/man/pipewire.conf.5.xml.in
+++ b/man/pipewire.conf.5.xml.in
@@ -21,8 +21,9 @@ This file is part of PipeWire.
file.
The config file in the default location is used but the
- environment variable PIPEWIRE_CONFIG_FILE can be used to specify
- an alternative config file.
+ environment variables PIPEWIRE_CONFIG_DIR, PIPEWIRE_CONFIG_PREFIX
+ and PIPEWIRE_CONFIG_NAME can be used to specify an alternative config
+ directory, subdirectory and file respectively.
diff --git a/src/pipewire/context.c b/src/pipewire/context.c
index 1f3580519..da3b29c89 100644
--- a/src/pipewire/context.c
+++ b/src/pipewire/context.c
@@ -199,7 +199,9 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
goto error_free;
}
- conf_prefix = pw_properties_get(properties, PW_KEY_CONFIG_PREFIX);
+ conf_prefix = getenv("PIPEWIRE_CONFIG_PREFIX");
+ if (conf_prefix == NULL)
+ conf_prefix = pw_properties_get(properties, PW_KEY_CONFIG_PREFIX);
conf_name = getenv("PIPEWIRE_CONFIG_NAME");
if (conf_name == NULL)