diff options
author | obrien <obrien@FreeBSD.org> | 2001-03-18 21:30:11 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-03-18 21:30:11 +0000 |
commit | 981727ddcf88331bb90ab6e04eb90eb45c5f5314 (patch) | |
tree | 6f19e1a756fa276db4c8bf3e3a32f6cdd5215541 /lib/libdisk/libdisk.h | |
parent | 68ae8502935dde5a352a4351e99bb281e64be0b5 (diff) | |
download | FreeBSD-src-981727ddcf88331bb90ab6e04eb90eb45c5f5314.zip FreeBSD-src-981727ddcf88331bb90ab6e04eb90eb45c5f5314.tar.gz |
Libraries should _never_ call exit() themselves (or its alternate spelling
`err()'). libdisk does! and additionally libdisk gets confused on Alpha
disks with foreign disklabels, throws up its hands and exits. This is
the cause of the "going no where without my init" install bug on the Alpha.
So now on the Alpha, rather than call err(), we print the error string and
continue processing.
Submitted by: jkh
Diffstat (limited to 'lib/libdisk/libdisk.h')
-rw-r--r-- | lib/libdisk/libdisk.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libdisk/libdisk.h b/lib/libdisk/libdisk.h index 0a33717..bea78ec 100644 --- a/lib/libdisk/libdisk.h +++ b/lib/libdisk/libdisk.h @@ -10,6 +10,14 @@ * */ +#ifdef __i386__ +#include <err.h> +#define barfout(n, errstr) err(n, errstr) +#else +#include <stdio.h> +#define barfout(n, errstr) fprintf(stderr, "\n\n\t***[ %s ]***\t\n\n", errstr) +#endif + #define MAX_NO_DISKS 20 /* Max # of disks Disk_Names() will return */ |