allow configuration without swap.

This commit is contained in:
yamt 2005-07-30 06:40:30 +00:00
parent 8609a4e161
commit 19ff568b84
1 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkdevsw.c,v 1.1 2005/06/05 18:19:53 thorpej Exp $ */ /* $NetBSD: mkdevsw.c,v 1.2 2005/07/30 06:40:30 yamt Exp $ */
/* /*
* Copyright (c) 2002 The NetBSD Foundation, Inc. * Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -217,11 +217,11 @@ emitdev(FILE *fp)
return (1); return (1);
(void)strlcpy(mstr, "swap", sizeof(mstr)); (void)strlcpy(mstr, "swap", sizeof(mstr));
if ((dm = ht_lookup(bdevmtab, intern(mstr))) == NULL) if ((dm = ht_lookup(bdevmtab, intern(mstr))) != NULL) {
panic("swap device is not configured"); if (fprintf(fp, "const dev_t swapdev = makedev(%d, 0);\n",
if (fprintf(fp, "const dev_t swapdev = makedev(%d, 0);\n", dm->dm_bmajor) < 0)
dm->dm_bmajor) < 0) return (1);
return (1); }
(void)strlcpy(mstr, "mem", sizeof(mstr)); (void)strlcpy(mstr, "mem", sizeof(mstr));
if ((dm = ht_lookup(cdevmtab, intern(mstr))) == NULL) if ((dm = ht_lookup(cdevmtab, intern(mstr))) == NULL)