diff options
author | maja <maja@openbsd.org> | 2006-11-10 23:02:08 +0000 |
---|---|---|
committer | maja <maja@openbsd.org> | 2006-11-10 23:02:08 +0000 |
commit | eebea325b766e395456ba8701ccc44304d9d5c71 (patch) | |
tree | ba901b10437db7f48392e54b628e1d73b5a0ab7f /usr.sbin/mopd | |
parent | Fix DMA firmware command interface (poll for command response), and get the (diff) | |
download | wireguard-openbsd-eebea325b766e395456ba8701ccc44304d9d5c71.tar.xz wireguard-openbsd-eebea325b766e395456ba8701ccc44304d9d5c71.zip |
Check the correct bits in the control byte.
Found by Alexey Dobriyan (adobriyan at gmail dot com) -moj
Diffstat (limited to 'usr.sbin/mopd')
-rw-r--r-- | usr.sbin/mopd/common/rc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/mopd/common/rc.c b/usr.sbin/mopd/common/rc.c index 6c4af909d35..e390d10f718 100644 --- a/usr.sbin/mopd/common/rc.c +++ b/usr.sbin/mopd/common/rc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rc.c,v 1.6 2006/04/17 13:17:07 maja Exp $ */ +/* $OpenBSD: rc.c,v 1.7 2006/11/10 23:02:08 maja Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] = - "$OpenBSD: rc.c,v 1.6 2006/04/17 13:17:07 maja Exp $"; + "$OpenBSD: rc.c,v 1.7 2006/11/10 23:02:08 maja Exp $"; #endif #include "os.h" @@ -81,17 +81,17 @@ mopDumpRC(FILE *fd, u_char *pkt, int trans) control = mopGetChar(pkt, &idx); /* Control */ fprintf(fd, "Control : %02x ", control); - if ((control & (1>>MOP_K_BOT_CNTL_SERVER))) + if ((control & (1<<MOP_K_BOT_CNTL_SERVER))) fprintf(fd, "Bootserver Requesting system "); else fprintf(fd, "Bootserver System default "); - if ((control & (1>>MOP_K_BOT_CNTL_DEVICE))) + if ((control & (1<<MOP_K_BOT_CNTL_DEVICE))) fprintf(fd, "Bootdevice Specified device"); else fprintf(fd, "Bootdevice System default"); fprintf(fd, "\n"); - if ((control & (1>>MOP_K_BOT_CNTL_DEVICE))) { + if ((control & (1<<MOP_K_BOT_CNTL_DEVICE))) { tmpc = mopGetChar(pkt, &idx);/* Device ID */ fprintf(fd, "Device ID : %02x '", tmpc); for (i = 0; i < ((int) tmpc); i++) |