summaryrefslogtreecommitdiffstats
path: root/src/tsnifd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tsnifd.c')
-rw-r--r--src/tsnifd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tsnifd.c b/src/tsnifd.c
index 22b6da5..8a6c8eb 100644
--- a/src/tsnifd.c
+++ b/src/tsnifd.c
@@ -16,10 +16,9 @@
#include "intf.h"
#include "storage.h"
#include "misc.h"
+#include "debug.h"
-extern int tsnif_debug;
-
static struct tsnif_storage_opts init_storage_opts = {
.flags = TSNIF_STORAGE_OPT_WRITE,
.size_max = 1024*1024,
@@ -130,7 +129,7 @@ static int file_put(char *name)
sprintf(p, "%s", ".tsnif");
- TSNIF_DEBUG("putting to %s\n", new);
+ TSNIF_DEBUG(APP, "putting to %s\n", new);
err = rename(name, new);
free(new);
@@ -143,7 +142,7 @@ static int terminal_add(struct tsnif_term *term)
int err;
char *file;
- TSNIF_DEBUG("type %d, idx %d\n", term->type, term->idx);
+ TSNIF_DEBUG(APP, "type %d, idx %d\n", term->type, term->idx);
/* XXX debug gets only PTY XXX */
if (tsnif_debug) {
@@ -170,7 +169,7 @@ static int terminal_add(struct tsnif_term *term)
return -1;
}
- TSNIF_DEBUG("storing to %s\n", file);
+ TSNIF_DEBUG(APP, "storing to %s\n", file);
t->file = strdup(file);
t->storage_opts = init_storage_opts;
@@ -185,7 +184,7 @@ static int terminal_del(struct tsnif_term *term)
{
struct terminal *t;
- TSNIF_DEBUG("type %d, idx %d\n", term->type, term->idx);
+ TSNIF_DEBUG(APP, "type %d, idx %d\n", term->type, term->idx);
tsnif_term_del(&handle, term);