1/* 2 * Copyright (c) 1998 Kenneth D. Merry. 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 --- 46 unchanged lines hidden (view full) --- 55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * SUCH DAMAGE. 59 */ 60 61#include <sys/cdefs.h> 62 |
63__FBSDID("$FreeBSD: head/usr.bin/systat/devs.c 175387 2008-01-16 19:27:43Z delphij $"); |
64 65#ifdef lint 66static const char sccsid[] = "@(#)disks.c 8.1 (Berkeley) 6/6/93"; 67#endif 68 69#include <sys/types.h> 70#include <sys/devicestat.h> 71#include <sys/resource.h> --- 96 unchanged lines hidden (view full) --- 168 DS_SELECT_ADDONLY, maxshowdevs, 0); 169 if (retval == -1) { 170 warnx("%s", devstat_errbuf); 171 return(0); 172 } else if (retval == 1) 173 return(2); 174 } 175 if (prefix(cmd, "drives")) { |
176 int i; |
177 move(CMDLINE, 0); 178 clrtoeol(); 179 for (i = 0; i < num_devices; i++) { 180 printw("%s%d ", s1->dinfo->devices[i].device_name, 181 s1->dinfo->devices[i].unit_number); 182 } 183 return(1); 184 } --- 141 unchanged lines hidden --- |