Check that the device is not a pseudo-device in deldev(), too (as in

deldevi()).

PR#34111 by jmmv@.
This commit is contained in:
cube 2006-08-07 12:03:32 +00:00
parent bb041282a1
commit 71af9028c9

View File

@ -1,4 +1,4 @@
/* $NetBSD: sem.c,v 1.22 2006/03/29 09:16:36 cube Exp $ */ /* $NetBSD: sem.c,v 1.23 2006/08/07 12:03:32 cube Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -1369,6 +1369,12 @@ deldev(const char *name)
error("unknown device %s", name); error("unknown device %s", name);
return; return;
} }
if (d->d_ispseudo) {
error("%s is a pseudo-device; "
"use \"no pseudo-device %s\" instead", name,
name);
return;
}
for (firsti = d->d_ihead; firsti != NULL; for (firsti = d->d_ihead; firsti != NULL;
firsti = firsti->i_bsame) firsti = firsti->i_bsame)