Commit Graph

151207 Commits

Author SHA1 Message Date
thorpej ef731d9e00 - Add a new DRVCTLCOMMAND ioctl to /dev/drvctl. This is a generic
"execute a command" ioctl that takes a dictionary as an argument
  (specifying the command and arguments) and returns a dictionary
  with the results (error code, optional error message, optional
  result data).

- Define and implement a "get-properties" command for DRVCTLCOMMAND
  that returns the properties dictionary of the specified device.

- Add a -p flag to drvctl(8) to fetch and display the properties of
  the specified device.

This is a great example of how to use prop_dictionary_sendrecv_ioctl().
2006-09-22 04:37:36 +00:00
thorpej 6cf1ffe998 Alter the protocol impemented by prop_kern to allow for bi-directional
plist-based messages and to eliminate looping previously required to
receive a plist from the kernel:

- prop_dictionary_copyin_ioctl() and prop_dictionary_copyout_ioctl()
  now take the cmd argument rather than the file open flag.  The
  read-ness or write-ness of an ioctl command is checked by these
  routines to ensure that information is being passed to/from the
  userland component properly.

- prop_dictionary_copyout_ioctl() now allocates the memory for the
  XML plist on behalf of the userland component by way of uvm_mmap().
  The XML plist is copied out to the newly-mapped anonymous region,
  and the pointer returned via the plistref.

- prop_dictionary_recv_ioctl() is responsible for munmap()'ing the
  region after parsing the XML plist into internal represenatation.

- A new prop_dictionary_sendrecv_ioctl() is added, allowing user space
  code to send a dictionary to the kernel and receive one back as a
  reply.


Update users of prop_kern for the API changes (Bluetooth).

This constitutes an ABI / protocol change -- but this will also be put
into NetBSD 4.0 so that the first proplib release will implement the new
scheme.
2006-09-22 04:20:23 +00:00
reinoud e2c2b53a9f Add test for in-file seeking for data; it should return the passed offset. 2006-09-21 22:09:20 +00:00
uwe 7e62a1bf65 Don't truncate TEA when we call tlb_exception from sh_vector_generic. 2006-09-21 20:40:16 +00:00
dsl edb0aa98de Rename the variable 'jobs' to 'job_list' in preparation for making it an array. 2006-09-21 19:56:05 +00:00
matt 6ec9b8bc84 Define a PHYSMAP_VSID for mapping pa==va. 2006-09-21 18:43:30 +00:00
reinoud 6d14f6770d Add lseek tests for SEEK_DATA and SEEK_HOLE for a non sparse file. 2006-09-21 18:36:03 +00:00
reinoud 0b421a6019 Fix `make clean' bug... the file might not be present 2006-09-21 17:33:08 +00:00
reinoud 95e6648004 Use multiple stat() functions since their result can also be different. 2006-09-21 17:26:24 +00:00
cherry c53d4b12a7 Fix libgcc4 build for ia64
Change #if to #ifdef
XXX: Feed upstream ?
2006-09-21 15:13:02 +00:00
yamt 614b6e5a27 yamt-splraiseipl: mac68k, x68k, hpcarm, shark, acorn32,
cats, netwinder, algor, arc, ews4800mips, hpcmips, newsmips.
2006-09-21 14:33:24 +00:00
reinoud b32f83b095 Update lseek test to make it a bit more clever in printing sizes and remove
file size test.
2006-09-21 13:12:45 +00:00
kochi 2a0acb8ed8 make bootinfo extern from static.
it's declared in arch/ia64/include/bootinfo.h as extern.
2006-09-21 10:06:36 +00:00
kochi 1d1bdfa635 use an appropriate specifier for u_long (%lx) in printf 2006-09-21 09:59:45 +00:00
kochi 6fa19ae830 fix trivial typo in previous revision 2006-09-21 09:58:27 +00:00
vanhu 542839bac0 credit 2006-09-21 09:43:47 +00:00
vanhu 3c6750b831 use sysdep_sa_len to make it compile on Linux 2006-09-21 09:42:08 +00:00
jld 754d606748 Protect spec_poll from racing against revocation and thus dereferencing a
NULL v_specinfo.  Mostly copied (with understanding) from rev 1.83's fix
to spec_ioctl, and needed for the same reason (kern/vfs_subr.c r1.231).
2006-09-21 09:28:37 +00:00
reinoud d2a1b4304c Create a file to be tested; in the current directory so thats not super but
better than relying on a file that might not exist.
2006-09-21 01:54:15 +00:00
reinoud a06f598ad6 Add simple lseek() test on a standard file. Standard it runs on the
/var/log/messages file wich is most likely not interesting but the
regression test can work on every specified filingsystem by passing a file
on that filingsystem to it as argument.

It tests:
- initial position
- seeking absolute position
- seeking end
- seeking negative relative position

more can be added later.
2006-09-21 01:27:32 +00:00
jld 1b78265f0e Change ffs_mount, in MNT_UPDATE case, to check dev_t's for equality
instead of just vnode pointers.  Fixes erroneous "does not match mounted
device" errors from mount(8) in the presence of MFS /dev, init.root, &c.

No objections on tech-kern.
2006-09-21 00:11:30 +00:00
bad 4f0a5e9849 Apply changes to ffs_find_disk_blocks_ufs1() from revision 1.19
to ffs_find_disk_blocks_ufs2() too.  Except for data types the
code in the two functions is the same.

From the original commit message:
    Add support for finding files on RAID partitions.  This allows us to
    add the block list of the 2nd stage boot loader to the 1st stage boot
    loader when the partition is a RAID partition.

Briefly tested under 3.x/i386.
2006-09-20 21:49:12 +00:00
martin 8c0de790f8 Cosmetic nit - print the correct cpu number in the spin up message 2006-09-20 20:09:42 +00:00
christos 411ddc6a74 set utmp entry types to user process. 2006-09-20 19:43:33 +00:00
christos 14e0a0ccc6 unbreak the build by including the appropriate header files here. 2006-09-20 19:39:23 +00:00
kochi c811931057 add cpu_counter.h to compile a kernel 2006-09-20 13:33:04 +00:00
he 9f30ac8956 Get rid of lvalue cast by using a temporary variable of the right type. 2006-09-20 13:03:49 +00:00
yamt 7c7c48583b yamt-splraiseipl: hp700, evbppc (marvell, ibm4xx) 2006-09-20 10:31:15 +00:00
manu 876294b403 Proprely convert devices on amd64 2006-09-20 09:54:55 +00:00
tsutsui 292139732b Tweak some debug messages. 2006-09-20 09:37:28 +00:00
tsutsui c44c5152c9 - move internal function declarations from pmap_pvt.h to pmap.c itself
- make some local functions static inline
- KNF a bit
2006-09-20 09:35:57 +00:00
he c364d22b20 The recently added -ledit needs -ltermcap added as well. 2006-09-20 09:29:42 +00:00
manu a540ef296e Emulate Linux's /proc/devices 2006-09-20 08:09:05 +00:00
gdamore 7c9507a357 Get rid of annoying and useless missed frame message, no other driver
echos this "non-error" message (not even tulip.c).  Included is an
explanatory message stating that these counters should probably all be
converted to evcnt counters.
2006-09-20 05:37:22 +00:00
cube 295a511be4 Constification. 2006-09-20 05:21:37 +00:00
gdamore 281cced62d Convert mac68k to generic todr. Thanks to Robert Swindells for testing. 2006-09-20 03:40:51 +00:00
yamt 382236f83b BUFQ_PRIOCSCAN: s/experimental//
i forgot why i marked it experimental.
2006-09-20 02:15:42 +00:00
christos fccf00319f document the new options; from out anonymous user. 2006-09-20 01:25:16 +00:00
uwe 57675076eb Switch the rest of sh3 ports to todr(9)
Split code to handle on-chip rtc into a separate driver
Eliminate all todr code from clock.c
Move __HAVE_GENERIC_TODR to sh3/include/types.h
2006-09-20 00:41:11 +00:00
reinoud ce2c68fd18 Make VOP_LOOKUP's O(1) instead of O(n log(n)) giving a speedup of 7500% on
a 1400 file directory.
2006-09-19 23:59:16 +00:00
matt b62d9f714a When mapping the kernel, make to update its segment register to be valid. 2006-09-19 22:15:06 +00:00
elad 6ecd7be983 Lose (void *) casts on the machdep scope authorization wrapper. Update
documentation.
2006-09-19 22:03:10 +00:00
reinoud 4911612931 Fix serious file-corruption issue on sparable partitions. 2006-09-19 22:00:38 +00:00
elad 6a80f03f7b Default callbacks? what are those? remove unused prototypes. 2006-09-19 21:49:25 +00:00
elad 83a5239b28 Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

While here, adapt code for system scope listeners to avoid some more
casts (forgotten in previous run).

Update documentation.
2006-09-19 21:42:29 +00:00
christos cbf3acdacb Add support for the majority of the rest of the system V options, although
we don't support some of them. We might add boottime, system clock change
time, in the future, so add the code to do it.
2006-09-19 21:01:29 +00:00
elad d2a7cc99dc Oops, fix test. Pointed out by Matt Fleming, thanks! 2006-09-19 20:37:08 +00:00
plunky 4b7ccf17f9 explicitly disallow changing the config # when the device is enabled. 2006-09-19 20:34:33 +00:00
christos e7d816a1da s/ReplyFrom/ReplyAsRecipient/ from our anonymous user. 2006-09-19 20:31:49 +00:00
matt cbdd4e594a At the end of pmap_bootstrap, if PMAP_NEED_MAPKERNEL, map the kernel into
the kernel's pmap (text will be rx, data will be rw).
2006-09-19 20:19:53 +00:00