summaryrefslogtreecommitdiffstats
path: root/usr.sbin/fdformat
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2006-04-02 00:48:33 +0000
committerderaadt <deraadt@openbsd.org>2006-04-02 00:48:33 +0000
commit85c482d69067218833925405774a91c4580a968d (patch)
tree62589bef44ecebd12692819da6ac7d90c41f7933 /usr.sbin/fdformat
parentsprinkle a socklen_t (diff)
downloadwireguard-openbsd-85c482d69067218833925405774a91c4580a968d.tar.xz
wireguard-openbsd-85c482d69067218833925405774a91c4580a968d.zip
use SEEK_* for lseek()
Diffstat (limited to 'usr.sbin/fdformat')
-rw-r--r--usr.sbin/fdformat/fdformat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/fdformat/fdformat.c b/usr.sbin/fdformat/fdformat.c
index c1ba5328c85..748b21d4a39 100644
--- a/usr.sbin/fdformat/fdformat.c
+++ b/usr.sbin/fdformat/fdformat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fdformat.c,v 1.13 2006/03/12 02:45:45 deraadt Exp $ */
+/* $OpenBSD: fdformat.c,v 1.14 2006/04/02 00:50:42 deraadt Exp $ */
/*
* Copyright (C) 1992-1994 by Joerg Wunsch, Dresden
@@ -118,7 +118,7 @@ verify_track(int fd, int track, int tracksize)
fprintf (stderr, "\nfdformat: out of memory\n");
exit (2);
}
- if (lseek (fd, (off_t) track*tracksize, 0) < 0)
+ if (lseek (fd, (off_t) track*tracksize, SEEK_SET) < 0)
rv = -1;
/* try twice reading it, without using the normal retrier */
else if (read (fd, buf, tracksize) != tracksize