status.c (121054) | status.c (128079) |
---|---|
1/* 2 * status.c 3 * 4 * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $Id: status.c,v 1.2 2003/05/21 22:40:30 max Exp $ | 1/* 2 * status.c 3 * 4 * Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $Id: status.c,v 1.2 2003/05/21 22:40:30 max Exp $ |
29 * $FreeBSD: head/usr.sbin/bluetooth/hccontrol/status.c 121054 2003-10-12 22:04:24Z emax $ | 29 * $FreeBSD: head/usr.sbin/bluetooth/hccontrol/status.c 128079 2004-04-09 23:58:53Z emax $ |
30 */ 31 32#include <sys/types.h> 33#include <sys/endian.h> 34#include <errno.h> 35#include <netgraph/bluetooth/include/ng_hci.h> 36#include <stdio.h> 37#include "hccontrol.h" --- 7 unchanged lines hidden (view full) --- 45 int n; 46 47 switch (argc) { 48 case 1: 49 /* connection handle */ 50 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 51 return (USAGE); 52 | 30 */ 31 32#include <sys/types.h> 33#include <sys/endian.h> 34#include <errno.h> 35#include <netgraph/bluetooth/include/ng_hci.h> 36#include <stdio.h> 37#include "hccontrol.h" --- 7 unchanged lines hidden (view full) --- 45 int n; 46 47 switch (argc) { 48 case 1: 49 /* connection handle */ 50 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 51 return (USAGE); 52 |
53 cp.con_handle = (u_int16_t) (n & 0x0fff); | 53 cp.con_handle = (uint16_t) (n & 0x0fff); |
54 cp.con_handle = htole16(cp.con_handle); 55 break; 56 57 default: 58 return (USAGE); 59 } 60 61 /* send command */ --- 25 unchanged lines hidden (view full) --- 87 int n; 88 89 switch (argc) { 90 case 1: 91 /* connection handle */ 92 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 93 return (USAGE); 94 | 54 cp.con_handle = htole16(cp.con_handle); 55 break; 56 57 default: 58 return (USAGE); 59 } 60 61 /* send command */ --- 25 unchanged lines hidden (view full) --- 87 int n; 88 89 switch (argc) { 90 case 1: 91 /* connection handle */ 92 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 93 return (USAGE); 94 |
95 cp.con_handle = (u_int16_t) (n & 0x0fff); | 95 cp.con_handle = (uint16_t) (n & 0x0fff); |
96 cp.con_handle = htole16(cp.con_handle); 97 break; 98 99 default: 100 return (USAGE); 101 } 102 103 /* send command */ --- 22 unchanged lines hidden (view full) --- 126 int n; 127 128 switch (argc) { 129 case 1: 130 /* connection handle */ 131 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 132 return (USAGE); 133 | 96 cp.con_handle = htole16(cp.con_handle); 97 break; 98 99 default: 100 return (USAGE); 101 } 102 103 /* send command */ --- 22 unchanged lines hidden (view full) --- 126 int n; 127 128 switch (argc) { 129 case 1: 130 /* connection handle */ 131 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 132 return (USAGE); 133 |
134 cp.con_handle = (u_int16_t) (n & 0x0fff); | 134 cp.con_handle = (uint16_t) (n & 0x0fff); |
135 cp.con_handle = htole16(cp.con_handle); 136 break; 137 138 default: 139 return (USAGE); 140 } 141 142 /* send command */ --- 25 unchanged lines hidden (view full) --- 168 int n; 169 170 switch (argc) { 171 case 1: 172 /* connection handle */ 173 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 174 return (USAGE); 175 | 135 cp.con_handle = htole16(cp.con_handle); 136 break; 137 138 default: 139 return (USAGE); 140 } 141 142 /* send command */ --- 25 unchanged lines hidden (view full) --- 168 int n; 169 170 switch (argc) { 171 case 1: 172 /* connection handle */ 173 if (sscanf(argv[0], "%d", &n) != 1 || n <= 0 || n > 0x0eff) 174 return (USAGE); 175 |
176 cp.con_handle = (u_int16_t) (n & 0x0fff); | 176 cp.con_handle = (uint16_t) (n & 0x0fff); |
177 cp.con_handle = htole16(cp.con_handle); 178 break; 179 180 default: 181 return (USAGE); 182 } 183 184 /* send command */ --- 61 unchanged lines hidden --- | 177 cp.con_handle = htole16(cp.con_handle); 178 break; 179 180 default: 181 return (USAGE); 182 } 183 184 /* send command */ --- 61 unchanged lines hidden --- |