diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-06-15 02:38:02 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-06-15 02:38:02 +0000 |
commit | 438b565ea3de27ef63ce73e7ab36db18a0ce951c (patch) | |
tree | 82826b5afcf51f1806624f5736ba477957aa30d1 /sys/dev/atapi/acd.c | |
parent | 4737ac8bc4eb7f2caf41ae04bd512988c4d42094 (diff) |
Automatically decide whether or not to disable door locks. Idea from provos.
Diffstat (limited to 'sys/dev/atapi/acd.c')
-rw-r--r-- | sys/dev/atapi/acd.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/atapi/acd.c b/sys/dev/atapi/acd.c index ce446843837..7e959c7444b 100644 --- a/sys/dev/atapi/acd.c +++ b/sys/dev/atapi/acd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acd.c,v 1.23 1997/03/26 01:53:49 deraadt Exp $ */ +/* $OpenBSD: acd.c,v 1.24 1997/06/15 02:37:59 downsj Exp $ */ /* * Copyright (c) 1996 Manuel Bouyer. All rights reserved. @@ -243,6 +243,15 @@ acdattach(parent, self, aux) printf (", %d volume levels", cap->max_vol_levels); printf ("\n"); } + + /* We can autoprobe AQUIRK_NODOORLOCK */ + if (!(acd->ad_link->quirks & AQUIRK_NODOORLOCK)) { + if (atapi_prevent(acd->ad_link, PR_PREVENT)) { + acd->ad_link->quirks |= AQUIRK_NODOORLOCK; + printf ("%s: disabling door locks.\n", self->dv_xname); + } else + atapi_prevent(acd->ad_link, PR_ALLOW); + } } /* |