Round VID_OSL to be a multiple of 32 * 256byte blocks.

This commit is contained in:
scw 2002-03-24 18:15:03 +00:00
parent 422c178bc7
commit 7ce75221c2
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wrtvid.c,v 1.5 2002/01/23 21:06:28 scw Exp $ */
/* $NetBSD: wrtvid.c,v 1.6 2002/03/24 18:15:03 scw Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -141,6 +141,12 @@ usage:
/* How many 256-byte logical blocks (rounded up) */
len = (u_int16_t) ((st.st_size + 255) / 256);
/* For tapes, round up to 8k */
if (is_disk == 0) {
len += (8192 / 256) - 1;
len &= ~((8192 / 256) -1);
}
if ((vid = malloc(SIZEOF_VID)) == NULL) {
perror(argv[0]);
exit(1);