diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-09-20 14:58:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-09-20 14:58:13 +0000 |
commit | f2b7b5f2a213854221814c0276708a24c4bbf6d9 (patch) | |
tree | 1536a2306de4213bb44691a4dcd7a707d8c78acd /usr.bin/tmux | |
parent | 32ba233eaebf817813a3465b47b2223804f40e6c (diff) |
Regularise some fatal messages.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/client.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/names.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/paste.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/server-fn.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/server.c | 10 | ||||
-rw-r--r-- | usr.bin/tmux/session.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/status.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/tty-keys.c | 6 | ||||
-rw-r--r-- | usr.bin/tmux/window.c | 4 |
9 files changed, 25 insertions, 25 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index c578c2c8791..de6a69716ff 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.17 2009/09/02 23:49:25 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.18 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -74,7 +74,7 @@ client_init(char *path, struct client_ctx *cctx, int cmdflags, int flags) } if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) - fatal("socket"); + fatal("socket failed"); if (connect(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) { if (errno == ECONNREFUSED) { diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c index 33892d336ca..1cc4c759cb6 100644 --- a/usr.bin/tmux/names.c +++ b/usr.bin/tmux/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.6 2009/09/01 13:09:49 nicm Exp $ */ +/* $OpenBSD: names.c,v 1.7 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -36,7 +36,7 @@ set_window_names(void) struct timeval tv, tv2; if (gettimeofday(&tv, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); for (i = 0; i < ARRAY_LENGTH(&windows); i++) { w = ARRAY_ITEM(&windows, i); diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c index e995a1f4869..a00c876e74f 100644 --- a/usr.bin/tmux/paste.c +++ b/usr.bin/tmux/paste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paste.c,v 1.4 2009/09/07 18:50:45 nicm Exp $ */ +/* $OpenBSD: paste.c,v 1.5 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -117,7 +117,7 @@ paste_add(struct paste_stack *ps, u_char *data, size_t size, u_int limit) pb->data = data; pb->size = size; if (gettimeofday(&pb->tv, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); } int @@ -134,7 +134,7 @@ paste_replace(struct paste_stack *ps, u_int idx, u_char *data, size_t size) pb->data = data; pb->size = size; if (gettimeofday(&pb->tv, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); return (0); } diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index 549f2512aed..8a811020b95 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.19 2009/09/12 13:01:19 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.20 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -315,7 +315,7 @@ server_set_identify(struct client *c) tv.tv_usec = (delay % 1000) * 1000L; if (gettimeofday(&c->identify_timer, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); timeradd(&c->identify_timer, &tv, &c->identify_timer); c->flags |= CLIENT_IDENTIFY; diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 46bc2442ea6..de6a5e257ef 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.38 2009/09/18 15:19:27 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.39 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -435,7 +435,7 @@ server_child_signal(void) case -1: if (errno == ECHILD) return; - fatal("waitpid"); + fatal("waitpid failed"); case 0: return; } @@ -637,7 +637,7 @@ server_check_timers(struct client *c) s = c->session; if (gettimeofday(&tv, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); if (c->flags & CLIENT_IDENTIFY && timercmp(&tv, &c->identify_timer, >)) server_clear_identify(c); @@ -805,7 +805,7 @@ server_handle_client(struct client *c) xtimeout = options_get_number(&c->session->options, "repeat-time"); if (xtimeout != 0 && c->flags & CLIENT_REPEAT) { if (gettimeofday(&tv, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); if (timercmp(&tv, &c->repeat_timer, >)) c->flags &= ~(CLIENT_PREFIX|CLIENT_REPEAT); } @@ -889,7 +889,7 @@ server_handle_client(struct client *c) tv.tv_sec = xtimeout / 1000; tv.tv_usec = (xtimeout % 1000) * 1000L; if (gettimeofday(&c->repeat_timer, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); timeradd(&c->repeat_timer, &tv, &c->repeat_timer); } diff --git a/usr.bin/tmux/session.c b/usr.bin/tmux/session.c index e4ba1a38167..0da2c013a55 100644 --- a/usr.bin/tmux/session.c +++ b/usr.bin/tmux/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.8 2009/09/16 12:35:04 nicm Exp $ */ +/* $OpenBSD: session.c,v 1.9 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -126,7 +126,7 @@ session_create(const char *name, const char *cmd, const char *cwd, s->flags = 0; if (gettimeofday(&s->tv, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); s->curw = NULL; SLIST_INIT(&s->lastw); diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 0bae3f40e77..3fefa2b1c23 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.33 2009/09/10 17:16:24 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.34 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -64,7 +64,7 @@ status_redraw(struct client *c) screen_init(&c->status, c->tty.sx, 1, 0); if (gettimeofday(&c->status_timer, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); memcpy(&stdgc, &grid_default_cell, sizeof gc); colour_set_fg(&stdgc, options_get_number(&s->options, "status-fg")); colour_set_bg(&stdgc, options_get_number(&s->options, "status-bg")); @@ -361,7 +361,7 @@ status_replace(struct session *s, const char *fmt, time_t t) case 'H': if (ptr == NULL) { if (gethostname(tmp, sizeof tmp) != 0) - fatal("gethostname"); + fatal("gethostname failed"); ptr = tmp; } /* FALLTHROUGH */ @@ -565,7 +565,7 @@ status_message_set(struct client *c, const char *fmt, ...) tv.tv_usec = (delay % 1000) * 1000L; if (gettimeofday(&c->message_timer, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); timeradd(&c->message_timer, &tv, &c->message_timer); c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE); diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c index a559a3fd4ca..4e2e13f3668 100644 --- a/usr.bin/tmux/tty-keys.c +++ b/usr.bin/tmux/tty-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-keys.c,v 1.3 2009/07/26 21:42:08 nicm Exp $ */ +/* $OpenBSD: tty-keys.c,v 1.4 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -287,7 +287,7 @@ tty_keys_next(struct tty *tty, int *key, u_char *mouse) tv.tv_sec = 0; tv.tv_usec = ESCAPE_PERIOD * 1000L; if (gettimeofday(&tty->key_timer, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); timeradd(&tty->key_timer, &tv, &tty->key_timer); tty->flags |= TTY_ESCAPE; @@ -317,7 +317,7 @@ tty_keys_next(struct tty *tty, int *key, u_char *mouse) /* If the timer hasn't expired, keep waiting. */ if (gettimeofday(&tv, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); if (timercmp(&tty->key_timer, &tv, >)) return (1); diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index ecc4646d321..07396c8d7c2 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.25 2009/09/16 12:35:04 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.26 2009/09/20 14:58:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -480,7 +480,7 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell, ws.ws_row = screen_size_y(&wp->base); if (gettimeofday(&wp->window->name_timer, NULL) != 0) - fatal("gettimeofday"); + fatal("gettimeofday failed"); tv.tv_sec = 0; tv.tv_usec = NAME_INTERVAL * 1000L; timeradd(&wp->window->name_timer, &tv, &wp->window->name_timer); |