]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/bup.c
Move msg() to bup/io.[hc] in preparation for more sharing
[bup.git] / lib / cmd / bup.c
index 807e26009b028d9bb15f03f140a9be447f37a99e..636c017967eedd231be7b67282bf715fa392f48d 100644 (file)
 #include <sys/types.h>
 #include <unistd.h>
 
-__attribute__ ((format(printf, 2, 3)))
-static void
-die(int exit_status, const char * const msg, ...)
-{
-    if (fputs("bup: ", stderr) == EOF)
-        exit(3);
-    va_list ap;
-    va_start(ap, msg);;
-    if (vfprintf(stderr, msg, ap) < 0)
-        exit(3);
-    va_end(ap);
-    exit(exit_status);
-}
+#include "bup/io.h"
 
 static int prog_argc = 0;
 static char **prog_argv = NULL;