From c9a6fe4145eec03a319a51fce60952321c6ddc36 Mon Sep 17 00:00:00 2001 From: anton Date: Wed, 26 Jul 2023 05:50:45 +0000 Subject: [PATCH] Print error messages to stderr as opposed of using syslog. --- regress/usr.sbin/vmd/diskfmt/vioscribble.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/regress/usr.sbin/vmd/diskfmt/vioscribble.c b/regress/usr.sbin/vmd/diskfmt/vioscribble.c index 606730104e0..a318935af07 100644 --- a/regress/usr.sbin/vmd/diskfmt/vioscribble.c +++ b/regress/usr.sbin/vmd/diskfmt/vioscribble.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioscribble.c,v 1.3 2021/06/13 21:43:35 dv Exp $ */ +/* $OpenBSD: vioscribble.c,v 1.4 2023/07/26 05:50:45 anton Exp $ */ /* * Copyright (c) 2018 Ori Bernstein @@ -50,6 +50,8 @@ #include #include #include +#include +#include #include "vmd.h" #include "vmm.h" @@ -57,7 +59,6 @@ #define CLUSTERSZ 65536 -int verbose; struct virtio_backing qcowfile; struct virtio_backing rawfile; @@ -81,7 +82,8 @@ main(int argc, char **argv) char buf[64*1024], cmp[64*1024]; off_t len, off, qcsz, rawsz; - verbose = !!getenv("VERBOSE"); + log_init(1, LOG_DAEMON); + qcfd = open("scribble.qcow2", O_RDWR); rawfd = open("scribble.raw", O_RDWR); if (qcfd == -1) -- 2.20.1