+ chmod(ofilename, ofilemode);
+ /*
+ * We have to insure that the last block of the data segment
+ * is allocated a full BLKSIZE block. If the underlying
+ * file system allocates frags that are smaller than BLKSIZE,
+ * a full zero filled BLKSIZE block needs to be allocated so
+ * that when it is demand paged, the paged in block will be
+ * appropriately filled with zeros.
+ */
+ fstat(biofd, &stbuf);
+ size = round(stbuf.st_size, BLKSIZE);
+ if (!rflag && size > stbuf.st_size) {
+ lseek(biofd, size - 1, 0);
+ write(biofd, &c, 1);
+ }