freebsd-nq/sys
Nate Lawson 9aa72f7404 Cleanups and support code for importing smart battery support.
* Use ACPI_BATT_UNKNOWN instead of constants
* Use maxunit instead of a count of devices since we may have sparse
  battery devices in the future.  Only userland should be using unit
  numbers anyway, so provide a translation function.  (Kernel use of
  batteries should be restricted to looking up a device_t and calling
  methods directly.
* Don't check acpi_BatteryIsPresent() in acpi_battery.  Leave it up to
  the hardware-specific driver (i.e. cmbat) since smart batteries seem
  to not report the "battery present" flag.
* Convert mA to mW if the battery uses those units.  CM-batteries only
  used mW so this deficiency went unnoticed.
* Clean strings reported in the battery info from any control chars.
* Only dereference the unit from ioctl_arg if the full struct is present.
  Unit wouldn't have been used later if it wasn't present but this is
  cleaner.  Translate the unit if it's not ACPI_BATTERY_ALL_UNITS.
* bzero structs before returning them to usermode for future compat.

Most of this work was submitted by Hans Petter Selasky and then majorly
reworked by myself.

Submitted by:	Hans Petter Selasky <hselasky / c2i.net>
2005-10-23 00:16:41 +00:00
..
alpha Specifically panic() in the case where pmap_insert_entry() fails to 2005-10-21 19:42:43 +00:00
amd64 Specifically panic() in the case where pmap_insert_entry() fails to 2005-10-21 19:42:43 +00:00
arm Cleanup. 2005-10-20 20:30:51 +00:00
boot Use an ihandle_t to store the instance handle of an opened device 2005-10-20 11:14:34 +00:00
bsm For consistency with more system include files, add a trailing '_' to 2005-05-29 16:11:34 +00:00
cam Make the exploring of all luns supported by an HBA more of a 2005-09-16 01:26:17 +00:00
coda Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
compat Make the multiple DPC threads an option, and create only one by default. 2005-10-22 05:15:20 +00:00
conf Remove duplicate entry. 2005-10-20 20:51:30 +00:00
contrib In detach method, move if_free() after bus_teardown_intr(). 2005-10-13 21:11:20 +00:00
crypto Add VIA/ACE "PadLock" support as a crypto(9) driver. 2005-08-18 00:30:22 +00:00
ddb - Call db_setup_paging() for traceall. 2005-10-02 22:57:31 +00:00
dev Cleanups and support code for importing smart battery support. 2005-10-23 00:16:41 +00:00
doc
fs Use correct cirteria for determining which directory entries we can 2005-10-18 20:21:25 +00:00
gdb check return value of gdb_rx_varhex 2005-03-28 18:31:18 +00:00
geom Rough implementation of the create and add verbs. The verbs cause 2005-10-09 17:10:35 +00:00
gnu Apply the same fix to a potential race in the ISDOTDOT code 2005-10-21 09:15:26 +00:00
i4b Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
i386 Specifically panic() in the case where pmap_insert_entry() fails to 2005-10-21 19:42:43 +00:00
ia64 Specifically panic() in the case where pmap_insert_entry() fails to 2005-10-21 19:42:43 +00:00
isa Fix an endianness issue in pnp_eisaformat(). This corrects printing PnP IDs 2005-09-28 15:01:58 +00:00
isofs/cd9660 Implement the full range of ISO9660 number conversion routines in iso.h. 2005-10-18 13:35:08 +00:00
kern Verify that access to the given address is allowed from user-space. 2005-10-22 20:02:59 +00:00
libkern Backout strtok() addition to libkern, strsep() is enough and strtok() 2005-10-06 19:06:07 +00:00
modules In this case, disable wrapping of fake opt_*.h targets in 2005-10-18 07:54:02 +00:00
net Use new (inline) functions for calls into driver. 2005-10-16 20:44:18 +00:00
net80211 Properly set ic_curchan before calling back to device driver to do channel 2005-08-30 14:27:47 +00:00
netatalk Forward declare atalkdomain with static linkage, not extern, since 2005-09-11 16:04:56 +00:00
netatm Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
netgraph Use new (inline) functions for calls into driver. 2005-10-16 20:44:18 +00:00
netinet Fix build after in6_joingroup change. It remains unclear if DAD breaks CARP 2005-10-22 14:54:02 +00:00
netinet6 fixed a compilation failure on amd64/sparc64/ia64 2005-10-22 05:07:16 +00:00
netipsec Replace custom mbuf writeability test with generic M_WRITABLE() test 2005-09-26 20:35:45 +00:00
netipx Forward declaring static variables as extern is invalid ISO-C. Now that 2005-09-07 10:06:14 +00:00
netkey SADB_UPDATE did not return an error when key length is invalid. 2005-08-22 07:05:14 +00:00
netnatm Forward declaring static variables as extern is invalid ISO-C. Now that 2005-09-07 10:06:14 +00:00
netncp Change API of mb_copy_t in libmchain so that netsmb can handle 2005-07-29 13:22:37 +00:00
netsmb Allow user to override default port numbers used by communication 2005-10-02 08:32:49 +00:00
nfs Fixes for NFS crashes on architectures that require strict alignment. 2005-07-14 20:08:27 +00:00
nfs4client - We want if (mrep != NULL) not if (m_freem != NULL). m_freem will never 2005-04-25 05:11:19 +00:00
nfsclient - Use strsep() instead of strtok(). 2005-10-06 19:04:08 +00:00
nfsserver Use the refcount API to manage the reference count for user credentials 2005-09-27 18:09:42 +00:00
opencrypto Fix bogus check. It was possible to panic the kernel by giving 0 length. 2005-08-18 11:58:03 +00:00
pc98 Eliminate two unused arguments to ttycreate(). 2005-10-16 20:22:56 +00:00
pccard Remove the kernel portion of OLDCARD. I'm working on a replacement 2005-09-25 21:29:32 +00:00
pci Replace FreeBSD 3.x syntax (controller miibus0) with 4.x syntax 2005-10-22 05:06:55 +00:00
posix4 Const-qualify ksem_timedwait's parameter abstime as it's only passed in. 2005-10-18 11:46:24 +00:00
powerpc 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
rpc Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
security Lock object while we iterate through it's backing objects. 2005-10-09 02:37:27 +00:00
sparc64 Fix compiling. 2005-10-15 02:09:43 +00:00
sys Regenerate. 2005-10-18 11:49:14 +00:00
tools Add convenience macros for bus_space usage that doesn't require specification 2005-09-24 20:11:07 +00:00
ufs Adjust maxfilesize for UFS1 and old 4.4 FFS. For UFS1, increase the limit 2005-10-21 01:54:00 +00:00
vm Use of the ZERO_COPY_SOCKETS options can result in an unusual state that 2005-10-22 18:46:38 +00:00
Makefile When building cscopnamefile, default architecture to ${MACHINE}, not i386. 2005-03-08 00:09:41 +00:00