mfi_foreign.c (285830) | mfi_foreign.c (285953) |
---|---|
1/* 2 * Copyright (c) 2013 smh@freebsd.org 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 --- 10 unchanged lines hidden (view full) --- 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 * | 1/* 2 * Copyright (c) 2013 smh@freebsd.org 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 --- 10 unchanged lines hidden (view full) --- 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 * |
27 * $FreeBSD: releng/10.2/usr.sbin/mfiutil/mfi_foreign.c 251516 2013-06-08 02:54:59Z sbruno $ | 27 * $FreeBSD: releng/10.2/usr.sbin/mfiutil/mfi_foreign.c 285953 2015-07-28 12:52:22Z emaste $ |
28 */ 29 30#include <sys/param.h> 31#include <err.h> 32#include <errno.h> 33#include <fcntl.h> 34#include <libutil.h> 35#include <stdint.h> --- 69 unchanged lines hidden (view full) --- 105 return (0); 106} 107MFI_COMMAND(foreign, scan, foreign_scan); 108 109static int 110foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) 111{ 112 struct mfi_config_data *config; | 28 */ 29 30#include <sys/param.h> 31#include <err.h> 32#include <errno.h> 33#include <fcntl.h> 34#include <libutil.h> 35#include <stdint.h> --- 69 unchanged lines hidden (view full) --- 105 return (0); 106} 107MFI_COMMAND(foreign, scan, foreign_scan); 108 109static int 110foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) 111{ 112 struct mfi_config_data *config; |
113 char prefix[26]; | 113 char prefix[64]; |
114 int error; 115 uint8_t mbox[4]; 116 117 bzero(mbox, sizeof(mbox)); 118 mbox[0] = cfgidx; 119 if (mfi_config_read_opcode(fd, opcode, &config, mbox, sizeof(mbox)) < 0) { 120 error = errno; 121 warn("Failed to get foreign config %d", error); --- 243 unchanged lines hidden --- | 114 int error; 115 uint8_t mbox[4]; 116 117 bzero(mbox, sizeof(mbox)); 118 mbox[0] = cfgidx; 119 if (mfi_config_read_opcode(fd, opcode, &config, mbox, sizeof(mbox)) < 0) { 120 error = errno; 121 warn("Failed to get foreign config %d", error); --- 243 unchanged lines hidden --- |