Commit Graph

8388 Commits

Author SHA1 Message Date
tls
6c2ee7b76e Describe libpthread dependency correctly and put bind libs in list of
dependent libs after .WAIT barrier in lib/Makefile.  Fixed build lossage
pointed out by smb.
2007-11-05 04:58:52 +00:00
tls
b21c402a7b Remove MKPRIVATELIB from BIND libraries; move library reachover
directories and Makefiles from src/usr.sbin/bind to src/lib; make
BIND libraries build shared.  Saves about 1MB-1.5MB per installed
executable, about 5MB for a base+etc minimal installation of NetBSD.
2007-11-04 23:28:16 +00:00
christos
ceaa3a4f21 - pass lint (not completely)
- KNF
- ansify
- use %m instead of "%s, strerror(errno)" in syslog messages
2007-11-04 23:12:50 +00:00
tron
e6cd63ecaf Fix off-by-one error accessing "clnt_cache_addr" array which causes heap
corruption. This will hopefully fix PR bin/37236.
2007-11-04 19:59:54 +00:00
xtraeme
4e10a84855 - Rename ENVSYS_BATTERY_STATE units to ENVSYS_BATTERY_CAPACITY and
introduce ENVSYS_BATTERY_CHARGE, which is the same than an Indicator and
  it's used to know if the battery is currently charging or discharging.

- Require two sensors at least for SME_CLASS_BATTERY to make the low-power
  condition work: a ENVSYS_BATTERY_CAPACITY plus ENVSYS_BATTERY_CHARGE.

- Simplify sme_event_check_lowpower() and make it check the required
  sensors in the SME_CLASS_ACADAPTER and SME_CLASS_BATTERY classes.
  If the acadapter is not ready, trust the state returned by the battery
  device.

Based on suggestion from joerg@.
2007-11-03 23:05:21 +00:00
martin
cabebfa313 Remove -or0s argument - cron should not pretend to be smarter than the
local mail admin. Should fix PR bin/37226.
2007-11-02 14:31:27 +00:00
xtraeme
b1afa665db Mention coretemp(4). 2007-10-29 01:00:52 +00:00
plunky
60822ed9d3 When no estimate of battery minutes_left can be made, apm should
return a value of 0.
2007-10-27 19:51:29 +00:00
christos
5f2b082001 PR/37236: Matthias Scheler: Mac OS X NFS client frequently crashes rpc.lockd(8)
on NetBSD. Use calloc to allocate the lock as suggested in the PR.
2007-10-27 18:41:54 +00:00
agc
cfd783f213 -D_FILE_OFFSET_BITS=64 is not needed on NetBSD.
Install the test harness into the correct location.
2007-10-26 19:04:21 +00:00
pavel
d35530e427 now when trap 0 is not used, we need to remove the temporary directiry
at the end. PR bin/37223.
2007-10-26 17:26:25 +00:00
wiz
c06a095415 Various improvements: typo fixes, wording, formatting. 2007-10-25 23:14:41 +00:00
pooka
afe4c2ed02 Use puffs_cc_schedule() (which is an exported interface) instead of
plugging directly to puffs_goto().
2007-10-21 19:27:12 +00:00
pooka
8543b6baeb Add option -r to specify maximum number of active read requests
for each node.  Setting this to a small number can be used to
improve interactive performance on low-bandwidth links when performing
bulk data reads.  Of course I could also open separate pipes for
bulk and other, but this was quicker and less intrusive and doesn't
require authenticating twice.
2007-10-20 19:14:27 +00:00
briggs
644890e99d If we're printing totals, don't do all the work of allocating and
copying down the vnodes.
2007-10-20 01:38:45 +00:00
christos
50295fe38d cast to long explicitly for the compat build 2007-10-18 02:28:22 +00:00
pooka
8215b8c2bc Close file handles if opencount drops to zero instead of closing
them if it does not drop to zero, i.e. fix a pretty obvious bug.
2007-10-16 10:53:02 +00:00
tls
215e50961e Add httpd to the build. Add _httpd to passwd and groups and postinstall.
Add /var/www to mtree, add example line to inetd.conf.
2007-10-16 02:47:12 +00:00
pooka
1b050f3a07 update usage to match reality. caught by jmcneill 2007-10-15 17:28:13 +00:00
pooka
6360ca31ab Execute getattr in lookup to get file size. The kernel doesn't
anymore do this if we fail to set size.

The whole lookup procedure should be done in a smarter fashion,
but this is the quickie fix to get things working again.
2007-10-13 17:21:39 +00:00
christos
019362ec2a - unlink the warmstart file first and then open it exclusively.
(From Brian Ginsbach)
- ifdef the whole file #ifdef WARMSTART to save space.
2007-10-12 21:24:01 +00:00
xtraeme
a1def00d93 Document the 'low-power' event in the sensor_battery script. 2007-10-10 23:46:01 +00:00
ad
7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
xtraeme
2e75cc0f7b - Do not allow a 'critical-{max,min}' property in battery
sensors (those that contain the 'want-percentage' object on its
  dictionary), the 'critical-capacity' prop must be used instead.

- When setting a 'critical-{max,min}' property check if the value is
  higher than the 'max-value' or lower than the 'min-value' on its
  dictionary, raise an error if it's true.
2007-10-09 08:00:46 +00:00
xtraeme
eed1cc9bc8 Fix a typo that prevented a 'critical-capacity' property to
be added.
2007-10-09 02:29:37 +00:00
xtraeme
032cb27052 Another comment that is no more thanks to the new configuration file. 2007-10-07 18:22:37 +00:00
xtraeme
0d2161c8c4 Modify a comment that is not valid anymore. 2007-10-07 18:14:20 +00:00
xtraeme
12b91c398d If a critical-capacity property is found, make sure that the
'monitoring-supported' object is true.
2007-10-07 16:22:37 +00:00
xtraeme
1e1df7f7b4 Provide a more complete syntax example. 2007-10-07 15:37:30 +00:00
xtraeme
71045d13c0 Explain some more about the events that will send to powerd(8)
(if running) in the critical-{capacity,max,min} properties when the
limit has been reached.
2007-10-07 15:23:41 +00:00
xtraeme
2839febced Use two global dictionaries rather than only one:
- use one for temporary sensor dictionaries.
- use one as the dictionary that will be returned to send_dictionary().

This fixes multiple settings in multiple devices.
2007-10-07 13:48:03 +00:00
xtraeme
8259fb204b Use another main rule to avoid a conflict in the grammar.
Suggestion from martin@.
2007-10-07 13:46:22 +00:00
xtraeme
7447ac47db Xref envsys.conf(5) 2007-10-07 12:43:19 +00:00
xtraeme
bca7b7f673 Pass -I${.CURDIR} -I. like others do. 2007-10-07 12:19:37 +00:00
taca
a3cbbf6d39 Remove an unused variable at previous commit in listdir(). 2007-10-07 05:25:19 +00:00
xtraeme
b0a8720beb Accept '+' or '-' characters at the start of SP_STRING. 2007-10-07 05:11:08 +00:00
xtraeme
f2803256d9 New configuration file format for the envsys framework:
foo0 {
	#
	# CPU Temperature
	#
	sensor0 {
		critical-max = 70C;
		critical-min = 20C;
	}
	...
}
...

Removed the -m flag that was previously used to set properties for
sensors. Now the -c flag will process all properties specified in
the file (accepted as argument).

To remove all properties that were set, the new -S flag can be used.
This will restore default values for all devices.
2007-10-07 04:16:47 +00:00
xtraeme
cfba73e2fb Remove an extra prop_object_release(). 2007-10-06 22:12:04 +00:00
christos
9f1fcc0d86 portability fixes from joerg. 2007-10-06 20:19:52 +00:00
pavel
eb9220515b Add a check for obsolete sendmail in /etc/mailer.conf, installs a
fresh copy of the file if invoked as "fix". Not enabled by default.
2007-10-05 10:28:45 +00:00
pavel
6590c89893 Return exit status 1 for failed chacks/fixes, 2 for errors. Suggested
by hubertf. Use exit status 3 for internal errors (misuse of internal
functions).
2007-10-05 10:17:13 +00:00
pavel
e9045950d7 do not use trap 0, it clobbers the exit status. Instead remove the
scratch directory in err(). Use err() instead of exit in one place to
ensure that the temporary directory is removed.
2007-10-05 10:06:49 +00:00
christos
03687f1fb0 remove null test; it is not necessary as we always look at the next element.
from Anon Ymous
2007-10-03 19:07:43 +00:00
christos
0bfe3e6189 - int -> size_t
- off by one in \n printing [Anon Ymous]
- return when the end of the array is reached.
2007-10-03 17:45:47 +00:00
kiyohara
c9c6f7ff7e Support type bcsp. 2007-09-30 04:11:02 +00:00
xtraeme
6d61a6b51b Duh! add missing free(3) in previous. 2007-09-27 18:11:05 +00:00
xtraeme
6c73c21f44 In debug mode, don't forget to free the buffer returned by
prop_dictionary_externalize().
2007-09-27 18:08:32 +00:00
xtraeme
ccaf6fc177 - Simplify find_sensors().
- Remove a block that is not used anymore in check_sensors().
2007-09-25 15:09:32 +00:00
xtraeme
9df195ed98 Merge a patch from Iain Hibbert (plunky@):
- some unclear language cleaned up
- inconsistent usage of 'device' and 'driver' to refer to the same thing
- difficult error handling

And print the device name if -d flag is not specified for any driver
registered, e.g:

$ envstat
[aiboost0]
  CPU Temperature:     36.000 degC  max:   70.000 degC  min:   15.000 degC
   MB Temperature:     38.000 degC  max:   50.000 degC  min:   15.000 degC
    Vcore Voltage:      1.232 V     max:    1.350 V     min:    1.150 V
     +3.3 Voltage:      3.264 V     max:    3.500 V     min:    3.000 V
       +5 Voltage:      5.017 V     max:    5.600 V     min:    4.500 V
      +12 Voltage:     11.932 V     max:   13.500 V     min:   11.200 V
    CPU FAN Speed:       1268 RPM
$
2007-09-25 14:20:48 +00:00
plunky
3b0395d28d replace inadvertently removed N 2007-09-20 19:48:26 +00:00