acpi_cmbat.c (119974) | acpi_cmbat.c (120036) |
---|---|
1/*- 2 * Copyright (c) 2000 Munehiro Matsuda 3 * Copyright (c) 2000 Takanori Watanabe 4 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2000 Munehiro Matsuda 3 * Copyright (c) 2000 Takanori Watanabe 4 * Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 119974 2003-09-11 03:17:33Z njl $ | 28 * $FreeBSD: head/sys/dev/acpica/acpi_cmbat.c 120036 2003-09-13 20:13:01Z njl $ |
29 */ 30 31#include "opt_acpi.h" 32#include <sys/param.h> 33#include <sys/kernel.h> 34#include <sys/bus.h> 35#include <sys/ioccom.h> 36 --- 222 unchanged lines hidden (view full) --- 259 if (res == NULL || res->Type != ACPI_TYPE_PACKAGE || 260 res->Package.Count != 13) { 261 262 ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), 263 "battery info corrupted\n"); 264 goto end; 265 } 266 | 29 */ 30 31#include "opt_acpi.h" 32#include <sys/param.h> 33#include <sys/kernel.h> 34#include <sys/bus.h> 35#include <sys/ioccom.h> 36 --- 222 unchanged lines hidden (view full) --- 259 if (res == NULL || res->Type != ACPI_TYPE_PACKAGE || 260 res->Package.Count != 13) { 261 262 ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), 263 "battery info corrupted\n"); 264 goto end; 265 } 266 |
267 PKG_GETINT(res, tmp, 0, sc->bif.unit, end); | 267 PKG_GETINT(res, tmp, 0, sc->bif.units, end); |
268 PKG_GETINT(res, tmp, 1, sc->bif.dcap, end); 269 PKG_GETINT(res, tmp, 2, sc->bif.lfcap, end); 270 PKG_GETINT(res, tmp, 3, sc->bif.btech, end); 271 PKG_GETINT(res, tmp, 4, sc->bif.dvol, end); 272 PKG_GETINT(res, tmp, 5, sc->bif.wcap, end); 273 PKG_GETINT(res, tmp, 6, sc->bif.lcap, end); 274 PKG_GETINT(res, tmp, 7, sc->bif.gra1, end); 275 PKG_GETINT(res, tmp, 8, sc->bif.gra2, end); --- 123 unchanged lines hidden (view full) --- 399 /* 400 * No security check required: information retrieval only. If 401 * new functions are added here, a check might be required. 402 */ 403 switch (cmd) { 404 case ACPIIO_CMBAT_GET_BIF: 405 acpi_cmbat_get_bif(dev); 406 bifp = &ioctl_arg->bif; | 268 PKG_GETINT(res, tmp, 1, sc->bif.dcap, end); 269 PKG_GETINT(res, tmp, 2, sc->bif.lfcap, end); 270 PKG_GETINT(res, tmp, 3, sc->bif.btech, end); 271 PKG_GETINT(res, tmp, 4, sc->bif.dvol, end); 272 PKG_GETINT(res, tmp, 5, sc->bif.wcap, end); 273 PKG_GETINT(res, tmp, 6, sc->bif.lcap, end); 274 PKG_GETINT(res, tmp, 7, sc->bif.gra1, end); 275 PKG_GETINT(res, tmp, 8, sc->bif.gra2, end); --- 123 unchanged lines hidden (view full) --- 399 /* 400 * No security check required: information retrieval only. If 401 * new functions are added here, a check might be required. 402 */ 403 switch (cmd) { 404 case ACPIIO_CMBAT_GET_BIF: 405 acpi_cmbat_get_bif(dev); 406 bifp = &ioctl_arg->bif; |
407 bifp->unit = sc->bif.unit; | 407 bifp->units = sc->bif.units; |
408 bifp->dcap = sc->bif.dcap; 409 bifp->lfcap = sc->bif.lfcap; 410 bifp->btech = sc->bif.btech; 411 bifp->dvol = sc->bif.dvol; 412 bifp->wcap = sc->bif.wcap; 413 bifp->lcap = sc->bif.lcap; 414 bifp->gra1 = sc->bif.gra1; 415 bifp->gra2 = sc->bif.gra2; --- 270 unchanged lines hidden --- | 408 bifp->dcap = sc->bif.dcap; 409 bifp->lfcap = sc->bif.lfcap; 410 bifp->btech = sc->bif.btech; 411 bifp->dvol = sc->bif.dvol; 412 bifp->wcap = sc->bif.wcap; 413 bifp->lcap = sc->bif.lcap; 414 bifp->gra1 = sc->bif.gra1; 415 bifp->gra2 = sc->bif.gra2; --- 270 unchanged lines hidden --- |