vt_core.c (274860) | vt_core.c (274861) |
---|---|
1/*- 2 * Copyright (c) 2009, 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Ed Schouten under sponsorship from the 6 * FreeBSD Foundation. 7 * 8 * Portions of this software were developed by Oleksandr Rybalko --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009, 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Ed Schouten under sponsorship from the 6 * FreeBSD Foundation. 7 * 8 * Portions of this software were developed by Oleksandr Rybalko --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: stable/10/sys/dev/vt/vt_core.c 274860 2014-11-22 16:55:55Z dumbbell $"); | 34__FBSDID("$FreeBSD: stable/10/sys/dev/vt/vt_core.c 274861 2014-11-22 17:10:57Z dumbbell $"); |
35 36#include "opt_compat.h" 37 38#include <sys/param.h> 39#include <sys/consio.h> 40#include <sys/eventhandler.h> 41#include <sys/fbio.h> 42#include <sys/kbio.h> --- 817 unchanged lines hidden (view full) --- 860static int 861vt_allocate_keyboard(struct vt_device *vd) 862{ 863 int idx0, idx; 864 keyboard_t *k0, *k; 865 keyboard_info_t ki; 866 867 idx0 = kbd_allocate("kbdmux", -1, vd, vt_kbdevent, vd); | 35 36#include "opt_compat.h" 37 38#include <sys/param.h> 39#include <sys/consio.h> 40#include <sys/eventhandler.h> 41#include <sys/fbio.h> 42#include <sys/kbio.h> --- 817 unchanged lines hidden (view full) --- 860static int 861vt_allocate_keyboard(struct vt_device *vd) 862{ 863 int idx0, idx; 864 keyboard_t *k0, *k; 865 keyboard_info_t ki; 866 867 idx0 = kbd_allocate("kbdmux", -1, vd, vt_kbdevent, vd); |
868 vd->vd_keyboard = idx0; | |
869 if (idx0 >= 0) { 870 DPRINTF(20, "%s: kbdmux allocated, idx = %d\n", __func__, idx0); 871 k0 = kbd_get_keyboard(idx0); 872 873 for (idx = kbd_find_keyboard2("*", -1, 0); 874 idx != -1; 875 idx = kbd_find_keyboard2("*", -1, idx + 1)) { 876 k = kbd_get_keyboard(idx); --- 11 unchanged lines hidden (view full) --- 888 } else { 889 DPRINTF(20, "%s: no kbdmux allocated\n", __func__); 890 idx0 = kbd_allocate("*", -1, vd, vt_kbdevent, vd); 891 if (idx0 < 0) { 892 DPRINTF(10, "%s: No keyboard found.\n", __func__); 893 return (-1); 894 } 895 } | 868 if (idx0 >= 0) { 869 DPRINTF(20, "%s: kbdmux allocated, idx = %d\n", __func__, idx0); 870 k0 = kbd_get_keyboard(idx0); 871 872 for (idx = kbd_find_keyboard2("*", -1, 0); 873 idx != -1; 874 idx = kbd_find_keyboard2("*", -1, idx + 1)) { 875 k = kbd_get_keyboard(idx); --- 11 unchanged lines hidden (view full) --- 887 } else { 888 DPRINTF(20, "%s: no kbdmux allocated\n", __func__); 889 idx0 = kbd_allocate("*", -1, vd, vt_kbdevent, vd); 890 if (idx0 < 0) { 891 DPRINTF(10, "%s: No keyboard found.\n", __func__); 892 return (-1); 893 } 894 } |
895 vd->vd_keyboard = idx0; |
|
896 DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard); 897 898 return (idx0); 899} 900 901static void 902vtterm_bell(struct terminal *tm) 903{ --- 1759 unchanged lines hidden --- | 896 DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard); 897 898 return (idx0); 899} 900 901static void 902vtterm_bell(struct terminal *tm) 903{ --- 1759 unchanged lines hidden --- |