diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-09-11 07:22:06 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-09-11 07:22:06 +0000 |
commit | d1fba2275a85904b21b255bc2d12f21b528e0425 (patch) | |
tree | c0f984feb6e8d276252888ffc1f7a7037c3dd1e9 /sys/dev/atapi/acd.c | |
parent | 5af517d895cf10921679112ec35befe68ed3bafe (diff) |
Remove unneeded quirk, and only print drive capabilities if it appears the
device actually filled in the information.
Diffstat (limited to 'sys/dev/atapi/acd.c')
-rw-r--r-- | sys/dev/atapi/acd.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/sys/dev/atapi/acd.c b/sys/dev/atapi/acd.c index f650440807f..b90efd991aa 100644 --- a/sys/dev/atapi/acd.c +++ b/sys/dev/atapi/acd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acd.c,v 1.12 1996/09/04 22:13:45 niklas Exp $ */ +/* $OpenBSD: acd.c,v 1.13 1996/09/11 07:22:03 downsj Exp $ */ /* * Copyright (c) 1996 Manuel Bouyer. All rights reserved. @@ -219,17 +219,20 @@ acdattach(parent, self, aux) */ cap = &acd->mode_page.page_cap; - printf ("%s: ", self->dv_xname); - if (cap->cur_speed != cap->max_speed) - printf ("%d/", cap->cur_speed * 1000 / 1024); - printf ("%dKb/sec", cap->max_speed * 1000 / 1024); - if (cap->buf_size) - printf (", %dKb cache", cap->buf_size); - if (cap->format_cap & FORMAT_AUDIO_PLAY) - printf (", audio play"); - if (cap->max_vol_levels) - printf (", %d volume levels", cap->max_vol_levels); - printf ("\n"); + /* Don't print anything unless it looks valid. */ + if (cap->cur_speed > 0) { + printf ("%s: ", self->dv_xname); + if (cap->cur_speed != cap->max_speed) + printf ("%d/", cap->cur_speed * 1000 / 1024); + printf ("%dKb/sec", cap->max_speed * 1000 / 1024); + if (cap->buf_size) + printf (", %dKb cache", cap->buf_size); + if (cap->format_cap & FORMAT_AUDIO_PLAY) + printf (", audio play"); + if (cap->max_vol_levels) + printf (", %d volume levels", cap->max_vol_levels); + printf ("\n"); + } } /* |