summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/server.c10
-rw-r--r--usr.bin/tmux/tmux.c4
-rw-r--r--usr.bin/tmux/tmux.h7
3 files changed, 10 insertions, 11 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index c9a0604cd30..96ac0cb671d 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.109 2013/03/24 09:54:10 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.110 2013/04/24 10:01:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -169,13 +169,13 @@ server_start(int lockfd, char *lockfile)
cfg_references = 1;
ARRAY_INIT(&cfg_causes);
- if (access(SYSTEM_CFG, R_OK) == 0) {
- if (load_cfg(SYSTEM_CFG, cfg_cmd_q, &cause) == -1) {
- xasprintf(&cause, "%s: %s", SYSTEM_CFG, cause);
+ if (access(TMUX_CONF, R_OK) == 0) {
+ if (load_cfg(TMUX_CONF, cfg_cmd_q, &cause) == -1) {
+ xasprintf(&cause, "%s: %s", TMUX_CONF, cause);
ARRAY_ADD(&cfg_causes, cause);
}
} else if (errno != ENOENT) {
- xasprintf(&cause, "%s: %s", SYSTEM_CFG, strerror(errno));
+ xasprintf(&cause, "%s: %s", TMUX_CONF, strerror(errno));
ARRAY_ADD(&cfg_causes, cause);
}
if (cfg_file != NULL) {
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 8f680fadbda..7fae055b7ee 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.119 2013/04/11 21:52:18 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.120 2013/04/24 10:01:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -357,7 +357,7 @@ main(int argc, char **argv)
if (pw != NULL)
home = pw->pw_dir;
}
- xasprintf(&cfg_file, "%s/%s", home, DEFAULT_CFG);
+ xasprintf(&cfg_file, "%s/.tmux.conf", home);
if (access(cfg_file, R_OK) != 0 && errno == ENOENT) {
free(cfg_file);
cfg_file = NULL;
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index cea5e13300f..cc3c6e149da 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.408 2013/04/22 22:17:29 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.409 2013/04/24 10:01:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -43,9 +43,8 @@
extern char *__progname;
extern char **environ;
-/* Default configuration files. */
-#define DEFAULT_CFG ".tmux.conf"
-#define SYSTEM_CFG "/etc/tmux.conf"
+/* Default global configuration file. */
+#define TMUX_CONF "/etc/tmux.conf"
/* Default prompt history length. */
#define PROMPT_HISTORY 100