mfi_show.c (260324) | mfi_show.c (266400) |
---|---|
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: stable/10/usr.sbin/mfiutil/mfi_show.c 260324 2014-01-05 17:29:53Z sbruno $ | 29 * $FreeBSD: stable/10/usr.sbin/mfiutil/mfi_show.c 266400 2014-05-18 15:28:25Z jhb $ |
30 */ 31 32#include <sys/types.h> 33#include <sys/errno.h> 34#include <err.h> 35#include <fcntl.h> 36#include <libutil.h> 37#include <stdio.h> --- 723 unchanged lines hidden (view full) --- 761 mfi_display_progress("Patrol Read", 762 &pinfo.prog_info.patrol); 763 busy = 1; 764 } 765 if (pinfo.prog_info.active & MFI_PD_PROGRESS_CLEAR) { 766 printf("drive %s ", mfi_drive_name(NULL, device_id, 767 MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); 768 mfi_display_progress("Clear", &pinfo.prog_info.clear); | 30 */ 31 32#include <sys/types.h> 33#include <sys/errno.h> 34#include <err.h> 35#include <fcntl.h> 36#include <libutil.h> 37#include <stdio.h> --- 723 unchanged lines hidden (view full) --- 761 mfi_display_progress("Patrol Read", 762 &pinfo.prog_info.patrol); 763 busy = 1; 764 } 765 if (pinfo.prog_info.active & MFI_PD_PROGRESS_CLEAR) { 766 printf("drive %s ", mfi_drive_name(NULL, device_id, 767 MFI_DNAME_DEVICE_ID|MFI_DNAME_HONOR_OPTS)); 768 mfi_display_progress("Clear", &pinfo.prog_info.clear); |
769 | 769 busy = 1; |
770 } 771 } 772 773 free(plist); 774 close(fd); 775 776 if (!busy) 777 printf("No activity in progress for adapter mfi%d\n", mfi_unit); 778 779 return (0); 780} 781MFI_COMMAND(show, progress, show_progress); 782 783static int 784show_foreign(int ac, char **av) 785{ 786 return(display_format(ac, av, 0/*normal display*/, MFI_DCMD_CFG_FOREIGN_DISPLAY)); 787} 788MFI_COMMAND(show, foreign, show_foreign); | 770 } 771 } 772 773 free(plist); 774 close(fd); 775 776 if (!busy) 777 printf("No activity in progress for adapter mfi%d\n", mfi_unit); 778 779 return (0); 780} 781MFI_COMMAND(show, progress, show_progress); 782 783static int 784show_foreign(int ac, char **av) 785{ 786 return(display_format(ac, av, 0/*normal display*/, MFI_DCMD_CFG_FOREIGN_DISPLAY)); 787} 788MFI_COMMAND(show, foreign, show_foreign); |