This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] Write to /dev/null rather than /dev/zero
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: <elfutils-devel at sourceware dot org>
- Date: Thu, 4 May 2017 17:27:47 +0200
- Subject: [PATCH] Write to /dev/null rather than /dev/zero
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9JUX4lBV5/JPk/x+T0UHc73hjSu/4Wfbmv0pqEegeXM=; b=jmPJMWW7xGahlDSQ07shadv2OaaVGIIf+IXVGm1mUzlghhJYdCn3vADwI/ZiPvLp+wG+63Ndc+cR6BKlGUqz2CEWn3TfOQ6XO24yIwtFRUHVy+3hhbAPCM551eGrS3AMEO7KKSaQWLz3qkG8lEp8UDWMVKhFwrUhV1YTSZASS2k=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
/dev/zero is meant for reading zeroes. /dev/null is for writing into
nirvana.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
tests/ChangeLog | 4 ++++
tests/elfshphehdr.c | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index b8de138..fef6f55 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
2017-05-04 Ulf Hermann <ulf.hermann@qt.io>
+ * elfshphehdr.c: For writing, use /dev/null rather than /dev/zero.
+
+2017-05-04 Ulf Hermann <ulf.hermann@qt.io>
+
* newfile.c: Close the file when we're done and unlink it afterwards.
* newscn.c: Likewise.
* update1.c: Likewise.
diff --git a/tests/elfshphehdr.c b/tests/elfshphehdr.c
index d1ab633..e0f0712 100644
--- a/tests/elfshphehdr.c
+++ b/tests/elfshphehdr.c
@@ -152,7 +152,7 @@ main (int argc __attribute__ ((unused)), char **argv __attribute ((unused)))
{
elf_version (EV_CURRENT);
- int fd = fd = open("/dev/zero", O_WRONLY | O_BINARY);
+ int fd = fd = open("/dev/null", O_WRONLY | O_BINARY);
check ("open", fd >= 0);
Elf *elf;
--
2.1.4