diff options
author | dfr <dfr@FreeBSD.org> | 1998-09-26 10:48:50 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-09-26 10:48:50 +0000 |
commit | 236ad5eb3ca90664e90a383de91faa975d35b8fc (patch) | |
tree | 989ae7fd62fa828548abf140a14e99223404b32b /lib/libstand/stand.h | |
parent | 3833ff5964a8f10b3b3cf9cf15c3c52481429c9a (diff) | |
download | FreeBSD-src-236ad5eb3ca90664e90a383de91faa975d35b8fc.zip FreeBSD-src-236ad5eb3ca90664e90a383de91faa975d35b8fc.tar.gz |
* Enable old UFS compatibility code for booting from Digital Unix formatted
disks.
* Fix a whole raft of warnings, printf and otherwise.
* Make zalloc work for alpha (just a case of using the right typedef).
* Add some (disabled) malloc debug printing to stand.h.
Diffstat (limited to 'lib/libstand/stand.h')
-rw-r--r-- | lib/libstand/stand.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index fb9ce4a..f4940f0 100644 --- a/lib/libstand/stand.h +++ b/lib/libstand/stand.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: stand.h,v 1.4 1998/09/18 23:00:57 msmith Exp $ + * $Id: stand.h,v 1.5 1998/09/26 01:42:39 msmith Exp $ * From $NetBSD: stand.h,v 1.22 1997/06/26 19:17:40 drochner Exp $ */ @@ -215,6 +215,7 @@ extern u_long random(void); /* imports from stdlib, locally modified */ extern long strtol(const char *, char **, int); +extern char * strerror(int err); extern char *optarg; /* getopt(3) external variables */ extern int optind, opterr, optopt; extern int getopt(int, char * const [], const char *); @@ -303,9 +304,32 @@ extern int null_stat(struct open_file *f, struct stat *sb); extern int getchar(void); extern int ischar(void); extern void putchar(int); -extern int devopen(struct open_file *, const char *, char **); +extern int devopen(struct open_file *, const char *, const char **); extern int devclose(struct open_file *f); extern void panic(const char *, ...) __dead2; extern struct fs_ops *file_system[]; extern struct devsw *devsw[]; +#if 0 + +static inline void * +malloc_debug(size_t size, const char *file, int line) +{ + void *p; + printf("%s:%d malloc(%ld)", file, line, size); + p = malloc(size); + printf("=%p\n", p); + return p; +} + +static inline void +free_debug(void *p, const char *file, int line) +{ + printf("%s:%d free(%p)\n", file, line, p); + free(p); +} + +#define malloc(x) malloc_debug(x, __FILE__, __LINE__) +#define free(x) free_debug(x, __FILE__, __LINE__) + +#endif |