Commit Graph

160779 Commits

Author SHA1 Message Date
blymn f8e74d7a72 Redraw an item when the value is changed as the mark/unmark status (if
applicable) may have changed.
2007-07-23 12:12:19 +00:00
pooka 606670f3e8 Initialize size and/or writesize when creating a vnode. 2007-07-23 11:27:45 +00:00
pooka 9f125ab035 Also set writesize when creating node.
noticed by Markus W Kilbinger
2007-07-23 11:05:47 +00:00
lukem f21ab048da Rename cred_t to ftpd_cred_t; the former causes a nameclash on Solaris. 2007-07-23 10:41:05 +00:00
ad f92f123709 Workaround the ufs_haslock/ufs_ihash_lock deadlock. From a patch
posted by Blair Sadewitz.
2007-07-23 09:05:02 +00:00
pooka 11c7e45cc2 Rearrange previous to make it work by other than chance.
noticed by xtraeme's gcc flags
2007-07-23 08:52:47 +00:00
xtraeme 079deb4a40 - sysmon_envsys_createplist: do not return the error of sme->sme_gtredata
in all cases to the caller, just continue and show a debug printf if it
  fails, because it's not a critical error.

- Improve some debugging printfs.

Fixes another part of yamt@'s PR kern/36673, that I forgot to commit
yesterday.
2007-07-23 08:45:51 +00:00
pooka ae519de8f0 Set union vnode size when creating a vnode.
fixes kern/36679 by Geoff C. Wing
2007-07-23 08:21:50 +00:00
kiyohara 83f023eb3d Remove printf for debugging. 2007-07-23 03:45:27 +00:00
macallan f6e06b3004 sprinkle (vaddr_t) to deal with sizeof(paddr_t) != sizeof(void *)
Now the loader should build again.
2007-07-23 00:45:52 +00:00
mjf a1e23633a9 Remove newline from format string of aprint_normal.
Thanks to pooka@ for pointing it out.
2007-07-22 23:45:50 +00:00
pooka 4aa4a0d0ae regen: assert that vnode creating operations set the size 2007-07-22 21:27:49 +00:00
pooka f5ba107ccd Introduce WILLMAKE for vnode operations which create a new vnode.
Insert a KASSERT along the return path of such operations to check
that the operation set the vnode size.
2007-07-22 21:26:53 +00:00
rumble 17b8c7717a Add missing RCSID. 2007-07-22 21:12:27 +00:00
he e7a46bb8e3 When _KERNEL is defined, we have now grown a dependency on
<sys/proc.h>, since one of the inline functions now refer to curlwp.
Fix this by including <sys/proc.h> when _KERNEL is defined.
2007-07-22 21:07:47 +00:00
he ef2c9ff103 Explicitly include <sys/proc.h> for tsleep() prototype. 2007-07-22 20:39:22 +00:00
he 41b06f79ca Explicitly include <sys/proc.h> for tsleep() declaration. 2007-07-22 20:36:13 +00:00
pooka 05ce20f4a0 Retire uvn_attach() - it abuses VXLOCK and its functionality,
setting vnode sizes, is handled elsewhere: file system vnode creation
or spec_open() for regular files or block special files, respectively.

Add a call to VOP_MMAP() to the pagedvn exec path, since the vnode
is being memory mapped.

reviewed by tech-kern & wrstuden
2007-07-22 19:16:04 +00:00
pooka 8565af3eda use NULL, not 0, to pass a pointer 2007-07-22 18:59:00 +00:00
xtraeme f2ddd114e5 Update to catch some problems that I just fixed in the framework. The
following test cases were fixed if a driver tries to register a driver
with sysmon_envsys_register() and the following items appear:

- Sensor with empty description.
- Sensor with state that doesn't match any of ENVSYS_SFOO.
- Sensor with units type that doesn't match any of ENVSYS_FOO.
2007-07-22 18:24:48 +00:00
pooka 9a0aaa5422 Keep track of the maximum size we have supplied the file server (or
it has supplied us).  If we fault pages which are at offset >= server
size, but less than the in-kernel vnode size, inform the file server
of the latest developments in file size before issueing the fault.
The avoids confusion with files which are not written start to finish.

fixes kern/36429 by yamt
2007-07-22 18:22:49 +00:00
xtraeme 666d15456c Fix the last point reported by yamt in PR kern/36673:
- There must be three mandatory objects in a sensor to be valid and be
  enabled on its dictionary: units, state and desc. If any of these
  objects fails for some reason, its dictionary won't created in the
  array and sensor will be marked with ENVSYS_FNOTVALID in edata->flags.

  That means there won't never be a partial dictionary.

- Mark all invalid sensors and sensors with duplicate description with
  ENVSYS_FNOTVALID and remove ENVSYS_FDUPDESC. The former is the generic
  way to say that a sensor does not obey the rules and must be not
  created.

- sysmon_envsys_createplist: if the array does not contain any object,
  release the array and return the error.

And with all that stuff I can go to holidays and be happy.
2007-07-22 18:17:02 +00:00
christos 8c26d38e7b WARNS=4, pass lint 2007-07-22 17:03:13 +00:00
pooka 0921857772 Don't allow getcwd() on procfs vnodes and provide "/" as the path
instead of the result from getcwd().  The works around locking
panics caused by namei calling VOP_READLINK while holding on to a
directory lock and getcwd() trying to acquire that lock.  The real
fix would be to get rid of getcwd() calls within VOPs (not locking
safe), but that's not a viable option in the netbsd-4 timeframe.

Suggestion for workaround from David Holland.
2007-07-22 13:37:13 +00:00
pooka 27c5f7cba3 Match code with comment (can't really remember doing it often that
way around .. ) and initialize storage to zero when extending a file.
2007-07-22 13:19:38 +00:00
pooka a53b2cab5e missed one place to set dirent namelen - unmiss it 2007-07-22 12:26:58 +00:00
ad 2a051b63b4 +#include <sys/proc.h> 2007-07-22 08:50:26 +00:00
lukem 0def0e3a66 Rename HAVE_SOCKADDR_SA_LEN to HAVE_STRUCT_SOCKADDR_SA_LEN.
Use defined(HAVE_foo) instead of just testing HAVE_foo.
2007-07-22 05:06:45 +00:00
lukem 6470c9506d Replace HAVE_SOCKADDR_SA_LEN with defined(HAVE_STRUCT_SOCKADDR_SA_LEN) 2007-07-22 05:02:50 +00:00
christos 407114c830 make this compile again 2007-07-22 03:40:59 +00:00
tsutsui d99606f782 More fixes for Jensen, reported and tested by Christoph Franzen
in PR port-alpha/36628:
- make jensenio_eisa_maxslots() return 8 (instead of 16) since
  EISA config for slot 8-15 on jensen could return invalid values
- pass eisa_chipset_tag_t to eisa_init() and check eisa_maxslots()
  on probing EISA config space
- pass M_ZERO to malloc(9) and make sure malloc(9) doesn't fail
- fix typo in a debug printf, add more debug printfs, and
  use #ifdef EISA_DEBUG to enable them
- cast uint8_t value to uint32_t before shift more than 8 bits
- check buffer region on reading compressed data from EISA config space
2007-07-22 02:14:39 +00:00
xtraeme bd0460e614 <sys/proc.h> is needed to get nprocs... fixes the build on amd64. 2007-07-21 23:39:46 +00:00
xtraeme 5623c9a1de Convert sysmon_taskqueue to use mutex(9) and condvar(9) and initialize
them in init_main.c via sysmon_task_queue_preinit().

Reviewed and ok by ad@.
2007-07-21 23:15:16 +00:00
pooka a97de7b959 nuke homegrown getcwd_common() decl 2007-07-21 22:47:36 +00:00
rumble 23622f237e Ensure that the special host token '*SMBSERVER' is not automatically
hyphenated, as this can lead to some confusion (e.g.: '*SMB-SERVER' isn't
valid).

(Thanks Wiz!)
2007-07-21 22:41:09 +00:00
xtraeme e25c1ce382 - Add more sensors after the two that have duplicate descriptions, to verify
they work fine.
- Remove the workaround for sensor with index 0, it's fixed now.
2007-07-21 22:30:21 +00:00
ad e7e35c1d1d Temporarily work around an assertion from mutex_enter. 2007-07-21 22:14:42 +00:00
xtraeme 38371ef4fb - Do not touch sme_nsensors when sensors with duplicate description are
found, rather maintain a global counter for all sensors that are unique,
  and use this global to get the correct index in the array.
- Use prop_array_set() rather than prop_array_add() for adding dictionaries
  into our global array. Thanks to yamt@.
- Overwrite the sensor index in the first sensor of a device, to avoid
  a problem with LKMs where the first sensor gets the index of all edata
  structures allocated in kernel.
- Add missing proto for sme_register_sensorname().

All them fix another part of yamt@'s PR.
2007-07-21 22:11:02 +00:00
ad 9a40651fc7 VM_MAP_BUSY, VM_MAP_WANTLOCK are no more. 2007-07-21 20:54:12 +00:00
ad 6e948e8304 Fix DEBUG build. 2007-07-21 20:52:59 +00:00
ad 75c47bdc49 NetBSD 4.99.25 - struct disk changed, . 2007-07-21 19:54:03 +00:00
ad b5a9ff06f1 Replace some uses of lockmgr(). 2007-07-21 19:51:47 +00:00
matt 5aaa0be03a Don't call proc_trampoline_mp when starting a lwp. (XXX why did we do this
before?)
2007-07-21 19:26:14 +00:00
ad 54d8f5b6c1 +#include <sys/conf.h> 2007-07-21 19:23:03 +00:00
ad 4688843d2b Merge unobtrusive locking changes from the vmlocking branch. 2007-07-21 19:21:53 +00:00
ad 253ada188c Move declaration of seltrue_kqfilter() to conf.h, where it's needed. 2007-07-21 19:20:39 +00:00
matt ae0a442af3 Make MP kernels build again. Heck, if I'm lucky, maybe these changes will
even make one boot.
2007-07-21 19:12:15 +00:00
ad 744a92f0f8 Don't depend on uvm_extern.h pulling in proc.h. 2007-07-21 19:06:20 +00:00
xtraeme 82313816f8 Use the mutex that belongs to the specific task and do not mix them
blindly.

	- sme_list_mtx to access to the linked lists sme_list/sme_names_list.
	- sme_mtx to access to the data in the sysmon envsys device.
2007-07-21 17:18:00 +00:00
xtraeme 2ae3d17915 sme_update_dictionary: if there's a sensor with duplicate description,
there's no need to decrease 'i' again, just sme->sme_nsensors is enough.

Reported by yamt@.
2007-07-21 16:16:59 +00:00