Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/ps2mouse.c
| Show All 26 Lines | |||||
| * SUCH DAMAGE. | * SUCH DAMAGE. | ||||
| */ | */ | ||||
| #include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
| __FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
| #include <sys/types.h> | #include <sys/types.h> | ||||
| #include <machine/vmm_snapshot.h> | |||||
| #include <assert.h> | #include <assert.h> | ||||
| #include <stdbool.h> | #include <stdbool.h> | ||||
| #include <stdio.h> | #include <stdio.h> | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include <string.h> | |||||
| #include <strings.h> | #include <strings.h> | ||||
| #include <pthread.h> | #include <pthread.h> | ||||
| #include <pthread_np.h> | #include <pthread_np.h> | ||||
| #include "atkbdc.h" | #include "atkbdc.h" | ||||
| #include "debug.h" | #include "debug.h" | ||||
| #include "console.h" | #include "console.h" | ||||
| ▲ Show 20 Lines • Show All 364 Lines • ▼ Show 20 Lines | ps2mouse_init(struct atkbdc_softc *atkbdc_sc) | ||||
| ps2mouse_reset(sc); | ps2mouse_reset(sc); | ||||
| pthread_mutex_unlock(&sc->mtx); | pthread_mutex_unlock(&sc->mtx); | ||||
| console_ptr_register(ps2mouse_event, sc, 1); | console_ptr_register(ps2mouse_event, sc, 1); | ||||
| return (sc); | return (sc); | ||||
| } | } | ||||
| #ifdef BHYVE_SNAPSHOT | |||||
| int | |||||
| ps2mouse_snapshot(struct ps2mouse_softc *sc, struct vm_snapshot_meta *meta) | |||||
| { | |||||
| int ret; | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->status, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->resolution, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->sampling_rate, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->ctrlenable, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->curcmd, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->cur_x, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->cur_y, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->delta_x, meta, ret, done); | |||||
| SNAPSHOT_VAR_OR_LEAVE(sc->delta_y, meta, ret, done); | |||||
| done: | |||||
| return (ret); | |||||
| } | |||||
| #endif | |||||