From: Giel van Schijndel <me@mortis.eu>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Giel van Schijndel <me@mortis.eu>
Subject: [PATCH] doc: watchdog simple example: don't fail on fsync()
Date: Mon, 22 Mar 2010 13:22:37 +0100 [thread overview]
Message-ID: <1269260557-18150-1-git-send-email-me@mortis.eu> (raw)
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
next reply other threads:[~2010-03-22 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 12:22 Giel van Schijndel [this message]
2010-03-24 9:04 ` Giel van Schijndel
2010-03-29 18:40 ` Wim Van Sebroeck
2010-03-29 19:12 ` Giel van Schijndel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269260557-18150-1-git-send-email-me@mortis.eu \
--to=me@mortis.eu \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®