lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Mar 2010 13:22:37 +0100
From:	Giel van Schijndel <me@...tis.eu>
To:	Wim Van Sebroeck <wim@...ana.be>
Cc:	Randy Dunlap <rdunlap@...otime.net>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, Giel van Schijndel <me@...tis.eu>
Subject: [PATCH] doc: watchdog simple example: don't fail on fsync()

Don't terminate the watchdog daemon when fsync() fails because no
watchdog driver actually implements the fsync() syscall.
---
 Documentation/watchdog/src/watchdog-simple.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c
index 4cf72f3..cd6d0dd 100644
--- a/Documentation/watchdog/src/watchdog-simple.c
+++ b/Documentation/watchdog/src/watchdog-simple.c
@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -18,7 +19,9 @@ int main(void)
 			break;
 		}
 		ret = fsync(fd);
-		if (ret)
+		if (ret
+		 && errno != EINVAL
+		 && errno != ENOSYS)
 			break;
 		sleep(10);
 	}
-- 
1.6.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ