From 557b41f4e9ce086047aaffd2325d860ef65cd318 Mon Sep 17 00:00:00 2001 From: alfred Date: Tue, 20 Feb 2001 22:07:36 +0000 Subject: Fix vinum for both devfs and non-devfs systems. userland tool: Use the vfs.devfs.generation sysctl to test for devfs presense (thanks phk!) when devfs is active it will not try to create the device nodes in /dev and therefore will not complain about the failure to do so. Revert the change in the #define for VINUM_DIR in the kernel header so that vinum can find its device nodes. Replace perror() with vinum_perror() to print file/line when DEVBUG is defined (not defined by default). kernel: Don't use the #define names for the "superdev" creation since they will be prepended by "/dev/" (based on VINUM_DIR), instead use string constants. Create both debug and non-debug "superdev" nodes in the devfs. Problem noticed and fix tested by: Martin Blapp --- sbin/vinum/vext.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sbin/vinum/vext.h') diff --git a/sbin/vinum/vext.h b/sbin/vinum/vext.h index fa57832..d136b0f 100644 --- a/sbin/vinum/vext.h +++ b/sbin/vinum/vext.h @@ -35,7 +35,7 @@ */ /* - * $Id: vext.h,v 1.17 2000/05/07 04:17:12 grog Exp grog $ + * $Id: vext.h,v 1.18 2000/06/02 03:55:01 grog Exp $ * $FreeBSD$ */ @@ -176,3 +176,14 @@ extern int file_line; /* and line in input file (yes, this is tacky) */ extern char buffer[]; /* buffer to read in to */ #define min(a, b) a < b? a: b + +#ifdef DEVBUG +#define vinum_perror(str) \ + do { \ + fprintf(stderr, "%s:%d> ", __FILE__, __LINE__); \ + perror(str); \ + } while (0) +#else +#define vinum_perror(str) perror(str) +#endif + -- cgit v1.1