summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_device.c
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-05 23:38:41 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-07-05 23:38:41 +0000
commit74342aaaa7bf55eddd07f19453f8b75902c07aa1 (patch)
treee3e9b680244cbbd1cc7f2a451028c602e08d79d4 /mixlib/mix_device.c
parent6ea6bdd894fd0c00e781360d6dfc6dea1a36f5c6 (diff)
downloadmdk-74342aaaa7bf55eddd07f19453f8b75902c07aa1.tar.gz
mdk-74342aaaa7bf55eddd07f19453f8b75902c07aa1.tar.bz2
externally provided device files directory
Diffstat (limited to 'mixlib/mix_device.c')
-rw-r--r--mixlib/mix_device.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/mixlib/mix_device.c b/mixlib/mix_device.c
index 2f3f702..d40ea98 100644
--- a/mixlib/mix_device.c
+++ b/mixlib/mix_device.c
@@ -19,10 +19,27 @@
*
*/
-
#include "mix_file.h"
#include "xmix_device.h"
+/*
+ Set the directory for mix device files (by default, it's ".")
+ If the dir does not exist, it is created.
+*/
+gboolean
+mix_device_set_dir (const gchar *dirname)
+{
+ if (mix_stat_dir (dirname, "devices"))
+ {
+ if (DEV_DIR_) g_free (DEV_DIR_);
+ DEV_DIR_ = g_strdup (dirname);
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
+
mix_device_t *
mix_device_new (mix_device_type_t type)
{