From: Jan Kara <jack@suse.cz>
To: xfs@oss.sgi.com
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH 2/3 v2] 285: Fix indentation of do_pwrite
Date: Thu, 30 May 2013 23:21:44 +0200 [thread overview]
Message-ID: <1369948905-6693-2-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1369948905-6693-1-git-send-email-jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
---
src/seek_sanity_test.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/seek_sanity_test.c b/src/seek_sanity_test.c
index eec6903..748eec2 100644
--- a/src/seek_sanity_test.c
+++ b/src/seek_sanity_test.c
@@ -120,19 +120,19 @@ static int do_sync_dirty_pages(int fd, off64_t offset, off64_t nbytes)
static ssize_t do_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
- ssize_t ret, written = 0;
-
- while (count > written) {
- ret = pwrite(fd, buf + written, count - written, offset + written);
- if (ret < 0) {
- fprintf(stderr, " ERROR %d: Failed to write %ld "
- "bytes\n", errno, (long)count);
- return ret;
- }
- written += ret;
- }
-
- return 0;
+ ssize_t ret, written = 0;
+
+ while (count > written) {
+ ret = pwrite(fd, buf + written, count - written, offset + written);
+ if (ret < 0) {
+ fprintf(stderr, " ERROR %d: Failed to write %ld "
+ "bytes\n", errno, (long)count);
+ return ret;
+ }
+ written += ret;
+ }
+
+ return 0;
}
#define do_close(x) do { if ((x) > -1) close(x); } while(0);
--
1.8.1.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-05-30 21:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 21:21 [PATCH 1/3 v2] 285: Fix test for ext4 in some configurations Jan Kara
2013-05-30 21:21 ` Jan Kara [this message]
2013-05-30 21:25 ` [PATCH 2/3 v2] 285: Fix indentation of do_pwrite Eric Sandeen
2013-05-31 12:30 ` Rich Johnston
2013-05-30 21:21 ` [PATCH 3/3 v2] 285: Test offsets over 4GB Jan Kara
2013-05-31 15:41 ` Eric Sandeen
2013-06-03 19:10 ` Rich Johnston
2013-06-03 19:08 ` [PATCH 1/3 v2] 285: Fix test for ext4 in some configurations Rich Johnston
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=1369948905-6693-2-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=xfs@oss.sgi.com \
/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;
as well as URLs for NNTP newsgroup(s).