Fixes for #defines growing a _

This commit is contained in:
Ben Gras 2006-01-06 16:49:58 +00:00
parent ebca3a434c
commit d9827f56ba
5 changed files with 6 additions and 6 deletions

View File

@ -244,7 +244,7 @@ typedef struct de_state /* State of disk ed. */
zone_t block; /* Current block (1K) */ zone_t block; /* Current block (1K) */
unsigned offset; /* Offset within block */ unsigned offset; /* Offset within block */
char buffer[ MAX_BLOCK_SIZE ]; char buffer[ _MAX_BLOCK_SIZE ];
/* Display state */ /* Display state */

View File

@ -135,14 +135,14 @@ void Read_Super_Block( s )
s->zone_num_size = V1_ZONE_NUM_SIZE; s->zone_num_size = V1_ZONE_NUM_SIZE;
s->zones = super->s_nzones; s->zones = super->s_nzones;
s->ndzones = V1_NR_DZONES; s->ndzones = V1_NR_DZONES;
s->block_size = STATIC_BLOCK_SIZE; s->block_size = _STATIC_BLOCK_SIZE;
} }
else if ( s->magic == SUPER_V2 || s->magic == SUPER_V3) else if ( s->magic == SUPER_V2 || s->magic == SUPER_V3)
{ {
if(s->magic == SUPER_V3) if(s->magic == SUPER_V3)
s->block_size = super->s_block_size; s->block_size = super->s_block_size;
else else
s->block_size = STATIC_BLOCK_SIZE; s->block_size = _STATIC_BLOCK_SIZE;
s->is_fs = TRUE; s->is_fs = TRUE;
s->v1 = FALSE; s->v1 = FALSE;
s->inode_size = V2_INODE_SIZE; s->inode_size = V2_INODE_SIZE;

View File

@ -453,7 +453,7 @@ int Indirect( s, block, file_size, dblind )
union union
{ {
zone1_t ind1[ V1_INDIRECTS ]; zone1_t ind1[ V1_INDIRECTS ];
zone_t ind2[ V2_INDIRECTS(MAX_BLOCK_SIZE) ]; zone_t ind2[ V2_INDIRECTS(_MAX_BLOCK_SIZE) ];
} indirect; } indirect;
int i; int i;
zone_t zone; zone_t zone;

View File

@ -1691,7 +1691,7 @@ ssize_t boot_readwrite(int rw)
if (ioctl(device, DIOCGETP, &geom0) < 0) return -1; if (ioctl(device, DIOCGETP, &geom0) < 0) return -1;
geom_seek.base = add64(geom0.base, off64); geom_seek.base = add64(geom0.base, off64);
geom_seek.size = cvu64(cmp64(add64u(off64, SECTOR_SIZE), geom_seek.size = cvu64(cmp64(add64u(off64, SECTOR_SIZE),
geom0.size) <= 0 ? STATIC_BLOCK_SIZE : 0); geom0.size) <= 0 ? _STATIC_BLOCK_SIZE : 0);
sync(); sync();
if (ioctl(device, DIOCSETP, &geom_seek) < 0) return -1; if (ioctl(device, DIOCSETP, &geom_seek) < 0) return -1;
if (lseek(device, (off_t) 0, SEEK_SET) == -1) return -1; if (lseek(device, (off_t) 0, SEEK_SET) == -1) return -1;

View File

@ -1622,7 +1622,7 @@ ssize_t boot_readwrite(int rw)
if (ioctl(device, DIOCGETP, &geom0) < 0) return -1; if (ioctl(device, DIOCGETP, &geom0) < 0) return -1;
geom_seek.base = add64(geom0.base, off64); geom_seek.base = add64(geom0.base, off64);
geom_seek.size = cvu64(cmp64(add64u(off64, SECTOR_SIZE), geom_seek.size = cvu64(cmp64(add64u(off64, SECTOR_SIZE),
geom0.size) <= 0 ? STATIC_BLOCK_SIZE : 0); geom0.size) <= 0 ? _STATIC_BLOCK_SIZE : 0);
sync(); sync();
if (ioctl(device, DIOCSETP, &geom_seek) < 0) return -1; if (ioctl(device, DIOCSETP, &geom_seek) < 0) return -1;
if (lseek(device, (off_t) 0, SEEK_SET) == -1) return -1; if (lseek(device, (off_t) 0, SEEK_SET) == -1) return -1;