mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests 285: Fix indentation of do_pwrite
Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
+11
-11
@@ -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;
|
||||
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;
|
||||
}
|
||||
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;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define do_close(x) do { if ((x) > -1) close(x); } while(0);
|
||||
|
||||
Reference in New Issue
Block a user