Lines Matching full:devices

178 	 * Find out how many devices we have in the system.  in devstat_getnumdevs()
184 "%s: error getting number of devices\n" in devstat_getnumdevs()
324 * Get the current list of devices and statistics, and the current
359 * Get the number of devices. If it's negative, it's an in devstat_getdevs()
368 * generation number, as well as all the devices. in devstat_getdevs()
385 * Request all of the devices. We only really allow for one in devstat_getdevs()
389 * If devices are being added to the system that quickly, maybe in devstat_getdevs()
390 * the user can just wait until all devices are added. in devstat_getdevs()
402 * more devices now, so we need to allocate more in devstat_getdevs()
458 * devices is not the same as the number of devices recorded in the in devstat_getdevs()
463 * devices and reallocate the device array. If the second sysctl in devstat_getdevs()
483 dinfo->devices = (struct devstat *)(dinfo->mem_ptr + sizeof(long)); in devstat_getdevs()
491 * Devices are selected/deselected based upon the following criteria:
492 * - devices specified by the user on the command line
493 * - devices matching any device type expressions given on the command line
494 * - devices with the highest I/O, if 'top' mode is enabled
495 * - the first n unselected devices in the device list, if maxshowdevs
496 * devices haven't already been selected and if the user has not
497 * specified any devices on the command line and if we're in "add" mode.
501 * - current number of devices selected (num_selected)
502 * - total number of devices in the selection list (num_selections)
506 * - current list of devices and statistics (devices)
507 * - number of devices in the current device list (numdevs)
509 * - This is optional. If the number of devices is 0, this will be ignored.
515 * - list of devices specified on the command line by the user (dev_selections)
516 * - number of devices selected on the command line by the user
519 * - add mode. (DS_SELECT_ADD) Any devices matching devices explicitly
520 * selected by the user or devices matching a pattern given by the
521 * user will be selected in addition to devices that are already
522 * selected. Additional devices will be selected, up to maxshowdevs
523 * number of devices.
524 * - only mode. (DS_SELECT_ONLY) Only devices matching devices
525 * explicitly given by the user or devices matching a pattern
526 * given by the user will be selected. No other devices will be
529 * only. Basically, this will not de-select any devices that are
531 * gratuitously select up to maxshowdevs devices as add mode would.
532 * - remove mode. (DS_SELECT_REMOVE) Any devices matching devices
533 * explicitly selected by the user or devices matching a pattern
535 * - maximum number of devices we can select (maxshowdevs)
540 * - the number of devices selected and the total number of items in the
546 * 0 -- selected devices are unchanged
547 * 1 -- selected devices changed
552 long current_generation, struct devstat *devices, in devstat_selectdevs() argument
565 if ((dev_select == NULL) || (devices == NULL) || (numdevs < 0)) in devstat_selectdevs()
570 * entries as there are devices. in devstat_selectdevs()
573 * In this case, we haven't selected devices before. in devstat_selectdevs()
582 * In this case, we have selected devices before, but the device in devstat_selectdevs()
583 * list has changed since we last selected devices, so we need to in devstat_selectdevs()
592 * In this case, we've selected devices before, and the selection in devstat_selectdevs()
617 * In all cases, we want to back up the number of selected devices. in devstat_selectdevs()
619 * devices have changed. in devstat_selectdevs()
625 * the list of devices has changed, or if we're in performance in devstat_selectdevs()
656 devices[i].device_number; in devstat_selectdevs()
658 devices[i].device_name, in devstat_selectdevs()
661 (*dev_select)[i].unit_number = devices[i].unit_number; in devstat_selectdevs()
676 * Look through any devices the user specified on the command line in devstat_selectdevs()
677 * and see if they match known devices. If so, select them. in devstat_selectdevs()
698 * manually specified devices are the first in devstat_selectdevs()
720 * how many devices we've removed. in devstat_selectdevs()
731 * Go through the user's device type expressions and select devices in devstat_selectdevs()
732 * accordingly. We only do this if the number of devices already in devstat_selectdevs()
760 && ((devices[j].device_type & DEVSTAT_TYPE_MASK) == in devstat_selectdevs()
765 && ((devices[j].device_type & in devstat_selectdevs()
769 && ((devices[j].device_type & DEVSTAT_TYPE_IF_MASK) == in devstat_selectdevs()
774 && ((devices[j].device_type & in devstat_selectdevs()
778 && ((devices[j].device_type & DEVSTAT_TYPE_PASS) != 0) in devstat_selectdevs()
783 * to the problem that the devices in the in devstat_selectdevs()
785 * order as the devices in the selection in devstat_selectdevs()
804 devices[j].device_name, in devstat_selectdevs()
805 devices[j].unit_number); in devstat_selectdevs()
817 * devices have already been selected, and in devstat_selectdevs()
819 * matched devices. If we're in remove in devstat_selectdevs()
843 * Here we implement "top" mode. Devices are sorted in the in devstat_selectdevs()
853 * any devices or patterns. In fact, though, it won't make any in devstat_selectdevs()
856 * specified anything) the first time through no devices will be in devstat_selectdevs()
859 * all devices will be selected, so again selection won't matter. in devstat_selectdevs()
874 * the devices that were selected first. in devstat_selectdevs()
896 * selected maxshowdevs number of devices, go through the array and in devstat_selectdevs()
897 * select any unselected devices. If we're in "only" mode, we in devstat_selectdevs()
900 * idea to go through and select any more devices, since we might in devstat_selectdevs()
915 * Look at the number of devices that have been selected. If it in devstat_selectdevs()
918 * selection list to see if the selected devices have changed. in devstat_selectdevs()
1003 * sort key is whether or not one or the other of the devices in question
1006 * device. If neither device is selected, we judge the devices based upon
1654 * Now push out all the devices. in get_devstat_kvm()