From 4116c25497346b51bc632bd9917bc48a5c2159ef Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 18 Oct 2016 20:07:35 +0000 Subject: Use the files in /var/db/acpi instead of trying to run acpidump. ok brynet@ --- usr.bin/sendbug/sendbug.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'usr.bin/sendbug/sendbug.c') diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index 6ac97306d32..b06a823855b 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.76 2016/05/18 19:10:26 jca Exp $ */ +/* $OpenBSD: sendbug.c,v 1.77 2016/10/18 20:07:35 kettenis Exp $ */ /* * Written by Ray Lai . @@ -601,10 +601,6 @@ hwdump(FILE *ofp) char *cmd, *acpidir; size_t len; - if (gethostname(buf, sizeof(buf)) == -1) - err(1, "gethostname"); - buf[strcspn(buf, ".")] = '\0'; - if (asprintf(&acpidir, "%s%sp.XXXXXXXXXX", tmpdir, tmpdir[strlen(tmpdir) - 1] == '/' ? "" : "/") == -1) err(1, "asprintf"); @@ -612,9 +608,9 @@ hwdump(FILE *ofp) err(1, "mkdtemp"); if (asprintf(&cmd, "echo \"\\npcidump:\"; pcidump -xxv; " - "echo \"\\nacpidump:\"; cd %s && acpidump -o %s; " + "echo \"\\nacpidump:\"; cd %s && cp /var/db/acpi/* .; " "for i in *; do b64encode $i $i; done; rm -rf %s", - acpidir, buf, acpidir) == -1) + acpidir, acpidir) == -1) err(1, "asprintf"); if ((ifp = popen(cmd, "r")) != NULL) { -- cgit v1.2.3-59-g8ed1b