summaryrefslogtreecommitdiff
path: root/sbin/pdisk/file_media.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/pdisk/file_media.c')
-rw-r--r--sbin/pdisk/file_media.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/pdisk/file_media.c b/sbin/pdisk/file_media.c
index c51c234a2a6..4fa85ab9e73 100644
--- a/sbin/pdisk/file_media.c
+++ b/sbin/pdisk/file_media.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file_media.c,v 1.38 2016/01/22 12:31:04 krw Exp $ */
+/* $OpenBSD: file_media.c,v 1.39 2016/01/23 03:46:18 krw Exp $ */
/*
* file_media.c -
@@ -36,11 +36,11 @@
#include "file_media.h"
int
-read_block(int fd, off_t offset, void *address)
+read_block(int fd, uint64_t sector, void *address)
{
ssize_t off;
- off = pread(fd, address, DEV_BSIZE, offset);
+ off = pread(fd, address, DEV_BSIZE, sector * DEV_BSIZE);
if (off == DEV_BSIZE)
return (1);
@@ -55,11 +55,11 @@ read_block(int fd, off_t offset, void *address)
}
int
-write_block(int fd, off_t offset, void *address)
+write_block(int fd, uint64_t sector, void *address)
{
ssize_t off;
- off = pwrite(fd, address, DEV_BSIZE, offset);
+ off = pwrite(fd, address, DEV_BSIZE, sector * DEV_BSIZE);
if (off == DEV_BSIZE)
return (1);