From eef92aa10f60e8d571b7150c91286922c6311287 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Tue, 25 Jan 2005 23:09:42 +0000 Subject: [PATCH] Remove the _KERNEL parts. --- sbin/vinum/vinumparser.c | 24 +----------------------- sbin/vinum/vinumutil.c | 14 +------------- 2 files changed, 2 insertions(+), 36 deletions(-) diff --git a/sbin/vinum/vinumparser.c b/sbin/vinum/vinumparser.c index 6635295674..abc9f94d73 100644 --- a/sbin/vinum/vinumparser.c +++ b/sbin/vinum/vinumparser.c @@ -35,7 +35,7 @@ * * $Id: vinumparser.c,v 1.21 2000/12/20 03:44:13 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumparser.c,v 1.20.2.5 2001/05/28 05:56:27 grog Exp $ - * $DragonFly: src/sbin/vinum/vinumparser.c,v 1.5 2005/01/24 17:57:36 dillon Exp $ + * $DragonFly: src/sbin/vinum/vinumparser.c,v 1.6 2005/01/25 23:09:42 joerg Exp $ */ /* @@ -60,27 +60,10 @@ #include #include -#ifdef _KERNEL -#include -#include -#include -/* All this mess for a single struct definition */ -#include -#include -#include -#include -#include - -#include "vinumvar.h" -#include "vinumio.h" -#include "vinumext.h" -#define iswhite(c) ((c == ' ') || (c == '\t')) /* check for white space */ -#else /* userland */ #include #include #include #define iswhite isspace /* use the ctype macro */ -#endif /* enum keyword is defined in vinumvar.h */ @@ -119,13 +102,11 @@ struct _keywords keywords[] = keypair(prefer), keypair(rename), keypair(detached), -#ifndef _KERNEL /* for vinum(8) only */ #ifdef VINUMDEBUG keypair(debug), #endif keypair(stripe), keypair(mirror), -#endif keypair(attach), keypair(detach), keypair(printconfig), @@ -167,7 +148,6 @@ struct _keywords keywords[] = }; struct keywordset keyword_set = KEYWORDSET(keywords); -#ifndef _KERNEL struct _keywords flag_keywords[] = {flagkeypair(f), flagkeypair(d), @@ -178,8 +158,6 @@ struct _keywords flag_keywords[] = }; struct keywordset flag_set = KEYWORDSET(flag_keywords); -#endif - /* * Take a blank separated list of tokens and turn it into a list of * individual nul-delimited strings. Build a list of pointers at diff --git a/sbin/vinum/vinumutil.c b/sbin/vinum/vinumutil.c index 95d5b6e6c0..112432a6d4 100644 --- a/sbin/vinum/vinumutil.c +++ b/sbin/vinum/vinumutil.c @@ -37,17 +37,15 @@ * * $Id: vinumutil.c,v 1.14 1999/12/30 07:04:02 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumutil.c,v 1.15 2000/02/29 06:16:44 grog Exp $ - * $DragonFly: src/sbin/vinum/vinumutil.c,v 1.4 2005/01/24 17:57:36 dillon Exp $ + * $DragonFly: src/sbin/vinum/vinumutil.c,v 1.5 2005/01/25 23:09:42 joerg Exp $ */ /* This file contains utility routines used both in kernel and user context */ #include #include -#ifndef _KERNEL #include extern jmp_buf command_fail; /* return on a failed command */ -#endif static char numeric_state[32]; /* temporary buffer for ASCII conversions */ #define STATECOUNT(x) (sizeof (x##statetext) / sizeof (char *)) @@ -224,21 +222,11 @@ sizespec(char *spec) return size * sign * 1024 * 1024 * 1024; } } -#ifdef _KERNEL - throw_rude_remark(EINVAL, "Invalid length specification: %s", spec); -#else fprintf(stderr, "Invalid length specification: %s", spec); longjmp(command_fail, -1); -#endif } -#ifdef _KERNEL - throw_rude_remark(EINVAL, "Missing length specification"); -#else fprintf(stderr, "Missing length specification"); longjmp(command_fail, -1); -#endif - /* NOTREACHED */ - return -1; } /* -- 2.41.0