diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 94b3c347ed1a..12440dd5ea38 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -126,6 +126,9 @@ Spec: Config_spec: ARCH Save_id = { + if (machinename != NULL) + errx(1, "%s:%d: only one machine directive is allowed", + yyfile, yyline); machinename = $2; } | CPU Save_id