Commit Graph

160081 Commits

Author SHA1 Message Date
martin a698ff2d49 A few nits for 32bit SMP kernels, noticed by mrg.
While there, simplify the fpstate IPIs a bit.
2007-07-06 07:36:46 +00:00
xtraeme 4108f3ed3a SENSOR_UPTYPE: accept values of 0 for any object, so that the value is
showed in its dictionary.
2007-07-05 23:48:22 +00:00
pooka 1451f0dabb document PUFFS_KFLAG_LOOKUP_FULLPNBUF 2007-07-05 22:42:14 +00:00
pooka b710306f2c apply ketchup to recent source changes in libpuffs 2007-07-05 22:37:52 +00:00
jklos eddc22c9b4 These files (cxgb*) are for the Chelsio T3 10 gigabit ethernet card from
the FreeBSD driver by Kip Macy (kmacy@FreeBSD.org).
2007-07-05 22:23:18 +00:00
jklos 0bdffa7573 Updates of working copies (there will be many). 2007-07-05 22:21:37 +00:00
bouyer 2d9d4664a8 readat() expects the offset in DEV_BSIZE units. This made resize_ffs find the
filesystem on a vnd partition for me. It did grow the filesystem, and after
a fsck -f on the partition to fix a few superblock inconsistencies, all
looks good.
2007-07-05 21:38:20 +00:00
dsl 4c11bfb2e9 Preserve the mbr 'driver serial number' when copying in the netbsd
mbr code.  Should leave windows vista bootable.
Print the dsn from the mbr, not each pbr.
2007-07-05 20:30:29 +00:00
martin 43ebaf27df sparc64_ipi_save_fpstate is not a leaf function - create a full grown
stack frame.
2007-07-05 20:21:11 +00:00
xtraeme ec5dc77a7c tyop 2007-07-05 20:17:43 +00:00
dsl c8ad8ea05b Add code that should preserve the 'drive serial number' field of the mbr.
Ought to stop the installer from stopping windows vista from being bootable.
2007-07-05 20:03:00 +00:00
dsl 0c7234ef6a Note here that -e can be used on the pxeboot_ia32.bin file.
(It is already mentioned on the pxeboot(8) page.)
2007-07-05 19:49:53 +00:00
christos f3df14f9e8 From FreeBSD:
Fix a bug in sblock() that has existed since revision 1.1 from BSD:
  correctly return an error if M_NOWAIT is passed to sblock() and the
  operation might block.  This remarkably subtle macro bug appears to
  be responsible for quite a few undiagnosed socket buffer corruption
  and mbuf-related kernel panics.
2007-07-05 19:45:54 +00:00
agc ca741c4a3f Fix minor grammar nit. 2007-07-05 19:44:02 +00:00
dsl 1f7faf40a2 Change the entry for ptmx to use the netbsd ptm driver.
Delete the entries for pts/nnn and add a note at the tope (next to the
ptmx info) about using ptyfs for the pts devices.
2007-07-05 19:34:36 +00:00
dsl 1cb4e9208d Rip out the support for /dev/ptmx, the netbsd ptm driver will now DTRT.
It probably ought to have minor 2 (ie do the chown/chmod/revoke on open)
because the SVR4 programs dont know anything about revoke.
2007-07-05 19:19:24 +00:00
ginsbach 15b661abe9 Fix several end cases:
o If a long option looks like an ambiguous abbreviation of two or more long
  options, but all the possible interpretations would return the same
  value, then just return that value without complaining that it's
  ambiguous.

o If a long option could be interpreted either as an exact match for one
  long option, or as an abbreviation for one or more other long options,
  then treat it as the exact match.

These changes align NetBSD's getopt_long(3) with the current behavior of
GNU getopt_long(3), the de facto standard, and FreeBSD's getopt_long(3).
2007-07-05 16:05:40 +00:00
xtraeme 8a70d87249 Sync with reality. 2007-07-05 16:00:39 +00:00
xtraeme 9f0e4ef0f4 Some changes:
- Add support for the IT8716F chip, patch from FUKUMOTO Atsushi via
  PR port-i386/35796.
- Enable the flag ENVSYS_FCHANGERFACT in voltage sensors, to be able to
  increment the value returned by the driver via envstat(8).
- Update VBAT sensor reading every time we read it, otherwise it will
  always report the power on value.
- Enable all sensors that were missing before: 3 Temp + 3 Fan + 9 Voltage.
- Add new registers to set high/low limits in temperature/voltage sensors
  (still unused).
- Disable some sensors if they are reporting bogus data or simply they are
  not connected.

Tested by wiz.
2007-07-05 15:20:30 +00:00
xtraeme 8957a299a2 - Adapt to envsys2.
- Use one Indicator sensor for battery charge and set it to 1 or 0
  accordingly.
2007-07-05 14:49:59 +00:00
xtraeme 2ce86bd863 Align drive state string like other sensor types. 2007-07-05 14:11:08 +00:00
xtraeme 84b0b63b4c Before checking sensor type:
- check if if its state is invalid
- print the 'N/A' string and continue

This avoids code duplication.
2007-07-05 14:08:37 +00:00
xtraeme 5310357612 Adapt to the recent changes to the acpiacad(4) and acpibat(4) drivers. 2007-07-05 13:53:21 +00:00
isaki 265ca0b1f3 Add cache information of, at least, Celeron M (no processor number).
Reviewed by tsutsui@ on port-i386.
2007-07-05 13:51:37 +00:00
xtraeme 7233bc845c Print invalid state with 'N/A' for Indicators, like any other sensors.
We follow the following scheme now:

value_cur set => ON
value_cur not set => OFF
invalid state => N/A
2007-07-05 13:51:28 +00:00
xtraeme 65811978f4 Final round, after more comments from yamt and cube:
For indicators, if sensor is valid but it should report that it is
in disabled state (OFF), just set value_cur to 0 without changing its
state.
2007-07-05 13:47:46 +00:00
pooka 0e40108103 * reorder calls to get results processed even if our I/O descriptors
go back to zero
* don't give up on the read-side of an fd if there is still unreceived data
2007-07-05 12:27:39 +00:00
xtraeme 615572e484 acpibat_print_stat(): in the 'charging' indicator sensor, check its state
to select the correct string rather than using value_cur.
2007-07-05 12:14:18 +00:00
xtraeme ada961ab89 Print 'N/A' for invalid sensors rather than an asterisk, with the
exception of Indicator sensors.

Indicator sensors now will print "ON" if they are in valid state, or
"OFF" if they are in invalid state.
2007-07-05 12:11:05 +00:00
xtraeme 194be74536 Use only one Indicator sensor when the battery is connected/disconnected
and another one only for charging/discharging.
2007-07-05 12:08:45 +00:00
xtraeme 61142f7829 Use only one sensor to report if the AC Adapter is connected or not,
rather than using two: one when is connected and another one is
disconnected.
2007-07-05 12:07:40 +00:00
dsieger 8ffca41e9b Fix two typos. Reported by Ray Phillips via NetBSD WWW feedback form. 2007-07-05 08:25:04 +00:00
pooka c22b16280d wsize is size_t = unsigned and should be printed with %zu instead
of %zd.  cosmetics for PR 36591 by khorben.
2007-07-04 23:18:49 +00:00
dsl 513b927545 It seems that min(16,16) isn't a compile time constant.
So don't bother limiting the local arrays to NGROUPS, just use 16.
2007-07-04 21:59:16 +00:00
rumble 0bbb4e920d Clamp down tigher on the bound around 'numextents'. Add a few comments
to make it clearer what we're tracking.
2007-07-04 20:20:30 +00:00
xtraeme 96deb6cebd By popular demand, do not skip sensors with invalid state. Print them
with an asterisk, as was suggested by Greg. A. Woods.

Example:

$ ./envstat -dlm0 -s "CPU Fan,System Fan,Aux Fan"
     System Fan:       *
     CPU Fan:       1308 RPM
     Aux Fan:          *
$

Except Integer and Driver sensors, which shouldn't need that.
2007-07-04 19:56:02 +00:00
rumble 0aef936cbe Additional fixes/enhancements:
1) Comply with the way buffercache(9) is intended to be used. Now we
       read in single blocks of EFS_BB_SIZE, never taking in variable
       length extents with a single bread() call.

    2) Handle symlinks with more than one extent. There's no reason for
       this to ever happen, but it's handled now.

    3) Finally, add a hint to our iteration initialiser so we can start
       from the desired offset, rather than naively looping through from
       the beginning each time. Since we can binary search the correct
       location quickly, this improves large sequential reads by about
       40% with 128MB files. Improvement should increase with file size.
2007-07-04 19:24:09 +00:00
xtraeme 933c2e67b5 Set the state on sc->sc_sensor[0].state and not append it,
envsys2 doesn't use bits for the state member.
2007-07-04 19:12:42 +00:00
xtraeme 60ed581de9 There's no need to set the "envsys-description" property in the
driver's dictionary anymore, because with envsys2 you can change
descriptions.
2007-07-04 19:00:43 +00:00
xtraeme 1492e24783 There's no need to get initial sensor data before registering the driver
to the sysmon_envsys(9) framework, because at register time, the
framework will get initial data by itself.
2007-07-04 18:56:16 +00:00
rumble 1798f1d8df Fix a significant performance bug in efs_read:
When reading a file, we would erroneously iterate to the next extent
before having filled the entire uio request. This lead to unnecessary
extent iteration and excessive calls to efs_read.

Sequential read performance has doubled in the uncached case and
quadrupled when data is buffered.
2007-07-04 18:40:18 +00:00
christos d4e1d48f81 Anon Ymous says that this should fix the lwp display core-dump. 2007-07-04 18:27:46 +00:00
xtraeme a7874cd432 Remove the max limit in the refresh value for the refresh_value sysctl,
use whatever you want within the limits of an integer.

Suggested by garbled@ and freza@.
2007-07-04 17:48:16 +00:00
bouyer 7135c1aad2 Start with all sensors in ENVSYS_SINVALID state, and switch to ENVSYS_SVALID
(or other, depending on result) once the sensor has been read.
This way envstat(8) won't show sensors which have not yet their correct value.
2007-07-04 17:36:17 +00:00
xtraeme c51a1c15bf Add the CODE REFERENCES section. 2007-07-04 17:35:20 +00:00
xtraeme 501645e90d Fix the example that used -s without -d, found by hira@. 2007-07-04 17:16:15 +00:00
xtraeme 5e67825d91 Improve description about the -s flag, it must be used with -d. 2007-07-04 17:15:03 +00:00
xtraeme edbf497407 mfi_sensor_gtredata:
- There's no need to set edata->units again, it was set already before.
- Remove the last ENVSYS_SVALID assignment that overrides previous
  assignments (found by mhitch@).
2007-07-04 17:07:04 +00:00
xtraeme 68bb919d1f Fix the old ENVSYS_GTREDATA ioctl if there are sensors with invalid
state. Enable all sensors by default as valid and current valid data and
if there is one that is in invalid state, mark current data as not valid.

This matches the behaviour with the old API. Also, this fixes the problem
with ipmi(4) reporting bogus values with sensors in invalid state using
the old envstat(8).

Note that this only happened when using the old envstat(8).
2007-07-04 16:30:18 +00:00
njoly 5e14b40722 Add amd64 specific debug files.
Fix build.sh release for amd64 with MKDEBUG=yes
2007-07-04 13:23:11 +00:00