smbmsg.c (129353) | smbmsg.c (129779) |
---|---|
1/*- 2 * Copyright (C) 2004 Joerg Wunsch 3 * All Rights Reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (C) 2004 Joerg Wunsch 3 * All Rights Reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/usr.sbin/smbmsg/smbmsg.c 129353 2004-05-17 19:19:08Z joerg $ | 26 * $FreeBSD: head/usr.sbin/smbmsg/smbmsg.c 129779 2004-05-27 13:31:16Z joerg $ |
27 */ 28 29/* 30 * Send or receive messages over an SMBus. 31 */ 32 33#include <err.h> 34#include <errno.h> --- 209 unchanged lines hidden (view full) --- 244 245 case 'f': 246 dev = optarg; 247 break; 248 249 case 'i': 250 if ((iflag = getnum(optarg)) == -1) 251 errx(EX_USAGE, "Invalid number: %s", optarg); | 27 */ 28 29/* 30 * Send or receive messages over an SMBus. 31 */ 32 33#include <err.h> 34#include <errno.h> --- 209 unchanged lines hidden (view full) --- 244 245 case 'f': 246 dev = optarg; 247 break; 248 249 case 'i': 250 if ((iflag = getnum(optarg)) == -1) 251 errx(EX_USAGE, "Invalid number: %s", optarg); |
252 if (iflag < 0 || iflag >= SMB_MAXBLOCKSIZE) | 252 if (iflag < 0 || iflag > SMB_MAXBLOCKSIZE) |
253 errx(EX_USAGE, 254 "# input bytes out of range: %d", 255 iflag); 256 break; 257 258 case 'o': 259 if ((oflag = getnum(optarg)) == -1) 260 errx(EX_USAGE, "Invalid number: %s", optarg); | 253 errx(EX_USAGE, 254 "# input bytes out of range: %d", 255 iflag); 256 break; 257 258 case 'o': 259 if ((oflag = getnum(optarg)) == -1) 260 errx(EX_USAGE, "Invalid number: %s", optarg); |
261 if (oflag < 0 || oflag >= SMB_MAXBLOCKSIZE) | 261 if (oflag < 0 || oflag > SMB_MAXBLOCKSIZE) |
262 errx(EX_USAGE, 263 "# output bytes out of range: %d", 264 oflag); 265 break; 266 267 case 'p': 268 pflag = 1; 269 break; --- 75 unchanged lines hidden --- | 262 errx(EX_USAGE, 263 "# output bytes out of range: %d", 264 oflag); 265 break; 266 267 case 'p': 268 pflag = 1; 269 break; --- 75 unchanged lines hidden --- |