mfi_patrol.c (237259) | mfi_patrol.c (237260) |
---|---|
1/*- 2 * Copyright (c) 2008, 2009 Yahoo!, Inc. 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 --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2008, 2009 Yahoo!, Inc. 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 --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/usr.sbin/mfiutil/mfi_patrol.c 237259 2012-06-19 06:18:37Z eadler $ | 29 * $FreeBSD: head/usr.sbin/mfiutil/mfi_patrol.c 237260 2012-06-19 06:18:42Z eadler $ |
30 */ 31 32#include <sys/types.h> 33#include <sys/errno.h> 34#include <err.h> 35#include <fcntl.h> 36#include <stdio.h> 37#include <stdlib.h> --- 32 unchanged lines hidden (view full) --- 70 error = errno; 71 warn("Failed to get patrol read properties"); 72 return (error); 73 } 74 return (0); 75} 76 77static int | 30 */ 31 32#include <sys/types.h> 33#include <sys/errno.h> 34#include <err.h> 35#include <fcntl.h> 36#include <stdio.h> 37#include <stdlib.h> --- 32 unchanged lines hidden (view full) --- 70 error = errno; 71 warn("Failed to get patrol read properties"); 72 return (error); 73 } 74 return (0); 75} 76 77static int |
78show_patrol(int ac, char **av) | 78show_patrol(int ac __unused, char **av __unused) |
79{ 80 struct mfi_pr_properties prop; 81 struct mfi_pr_status status; 82 struct mfi_pd_list *list; 83 struct mfi_pd_info info; 84 char label[24]; 85 time_t now; 86 uint32_t at; --- 101 unchanged lines hidden (view full) --- 188 189 close(fd); 190 191 return (0); 192} 193MFI_COMMAND(show, patrol, show_patrol); 194 195static int | 79{ 80 struct mfi_pr_properties prop; 81 struct mfi_pr_status status; 82 struct mfi_pd_list *list; 83 struct mfi_pd_info info; 84 char label[24]; 85 time_t now; 86 uint32_t at; --- 101 unchanged lines hidden (view full) --- 188 189 close(fd); 190 191 return (0); 192} 193MFI_COMMAND(show, patrol, show_patrol); 194 195static int |
196start_patrol(int ac, char **av) | 196start_patrol(int ac __unused, char **av __unused) |
197{ 198 int error, fd; 199 200 fd = mfi_open(mfi_unit, O_RDWR); 201 if (fd < 0) { 202 error = errno; 203 warn("mfi_open"); 204 return (error); --- 9 unchanged lines hidden (view full) --- 214 215 close(fd); 216 217 return (0); 218} 219MFI_COMMAND(start, patrol, start_patrol); 220 221static int | 197{ 198 int error, fd; 199 200 fd = mfi_open(mfi_unit, O_RDWR); 201 if (fd < 0) { 202 error = errno; 203 warn("mfi_open"); 204 return (error); --- 9 unchanged lines hidden (view full) --- 214 215 close(fd); 216 217 return (0); 218} 219MFI_COMMAND(start, patrol, start_patrol); 220 221static int |
222stop_patrol(int ac, char **av) | 222stop_patrol(int ac __unused, char **av __unused) |
223{ 224 int error, fd; 225 226 fd = mfi_open(mfi_unit, O_RDWR); 227 if (fd < 0) { 228 error = errno; 229 warn("mfi_open"); 230 return (error); --- 106 unchanged lines hidden --- | 223{ 224 int error, fd; 225 226 fd = mfi_open(mfi_unit, O_RDWR); 227 if (fd < 0) { 228 error = errno; 229 warn("mfi_open"); 230 return (error); --- 106 unchanged lines hidden --- |