-/* $OpenBSD: growfs.c,v 1.35 2014/05/05 15:04:05 krw Exp $ */
+/* $OpenBSD: growfs.c,v 1.36 2014/05/15 19:18:23 chl Exp $ */
/*
* Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
* Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
/*
* Copy the block back immediately.
*
- * XXX If src is is from an indirect block we have
+ * XXX If src is from an indirect block we have
* to implement copy on write here in case of
* active snapshots.
*/
sizeof(struct gfs_bpp));
if (bp == NULL)
errx(1, "calloc failed");
- memset((char *)bp, 0, ((dupper-odupper) / sblock.fs_frag + 2) *
- sizeof(struct gfs_bpp));
/*
* Lock all new frags needed for the cylinder group summary. This is
DBG_FUNC("rdfs")
ssize_t n;
+ DBG_ENTER;
if (bno < 0) {
err(32, "rdfs: attempting to read negative block number");
}
- if (lseek(fsi, (off_t)bno * DEV_BSIZE, 0) < 0) {
+ if (lseek(fsi, (off_t)bno * DEV_BSIZE, SEEK_SET) < 0) {
err(33, "rdfs: seek error: %jd", (intmax_t)bno);
}
n = read(fsi, bf, size);