make bootxx_msdos fit in 8k again; thanks, __internal_memset_, for spilling

registers all over the place.
This commit is contained in:
dogcow 2006-12-02 00:38:22 +00:00
parent 9be3ef677b
commit 437f8cc149

View File

@ -1,4 +1,4 @@
/* $NetBSD: dosfs.c,v 1.10 2006/01/25 18:27:23 christos Exp $ */
/* $NetBSD: dosfs.c,v 1.11 2006/12/02 00:38:22 dogcow Exp $ */
/*
* Copyright (c) 1996, 1998 Robert Nordier
@ -228,8 +228,18 @@ dosfs_open(const char *path, struct open_file *fd)
err = EINVAL;
goto out;
}
f = alloc(sizeof(DOS_FILE));
#ifdef BOOTXX
/* due to __internal_memset_ causing all sorts of register spillage
(and being completely unoptimized for zeroing small amounts of
memory), if we hand-initialize the remaining members of f to zero,
the code size drops 68 bytes. This makes no sense, admittedly. */
f->offset = 0;
f->c = 0;
#else
bzero(f, sizeof(DOS_FILE));
#endif
f->fs = fs;
fs->links++;
f->de = *de;