| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
events, in order to pave the way for removing a number of the ad-hoc
implementations currently in use.
Retire the at_shutdown family of functions and replace them with
new event handler lists.
Rework kern_shutdown.c to take greater advantage of the use of event
handlers.
Reviewed by: green
|
| |
|
|
|
|
|
|
| |
order to be able to refer to it uniquely from the kernel debugger.
Approved-by: peter
|
|
|
|
|
|
| |
- One RTP_PRIO_REALTIME was meant to be RTP_PRIO_IDLE.
- RTP_PRIO_FIFO was not handled.
- Move the usual case first for setrunqueue() etc.
|
| |
|
| |
|
|
|
|
|
|
|
| |
fairly machine independent C routine. gcc actually does a pretty good
job of this.
Reviewed by: msmith (in principle)
|
|
|
|
| |
(not that anyone actually reads the created .c and .h files :)
|
|
|
|
|
|
| |
When you use pty(N) it creates pty(N+1) ready for your use in the DEVFS,
so DEVFS is not cluttered up with hundreds of ptys you are never going to
use.
|
|
|
|
|
|
|
|
|
|
| |
about a dev_t.
printf("%x", dev) now becomes printf("%s", devtoname(dev)) because
printing actual information about the device is much more useful then
printing a pointer to an address that would never help the developer debug.
Submitted by: phk, bde
|
|
|
|
|
|
|
|
|
|
| |
the attach/detach to
1) MOD_LOAD before attach
2) MOD_UNLOAD after detach
The driver specific event handler can now be used to function as
driver specific init/deinit function (compare to device specific
init/deinit functions: attach & detach).
|
|
|
|
|
|
|
| |
use pid_t and uid_t in the declaration as that is what we are passed
fix printf formatters accordingly.
Reviewed by: green
|
|
|
|
| |
ie: hides the fact that the major number is stuck in the middle.
|
|
|
|
|
|
|
|
| |
Pointed out by: green
remove redundant strlen, sprintf returns the length.
Reviewed by: peter
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.
Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.
Remove bogus and unused strategy1 routines.
Remove open/close arguments from dssize(). Pick them up from dev_t.
Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stuff: unregister_methods() is horribly broken. The idea, if I'm not mistaken,
is that the refcount on a method is decremented, and only when it reaches
zero is the method freed. However desc->method is set to NULL unconditionally
regardless of the refcount, which means the method pointer is trashed the
first time the method is deallocated. The obvious detrimental effect is
that memory is leaked. The not so obvious effect is that when you call
unregister_method() the second time on the same method, you get a NULL
pointer dereference and a panic.
Now I can successfully unload network device drivers and the miibus module
without crashing the system.
*sigh*
|
| |
|
|
|
|
|
|
| |
from UFS to the generic level. For chr/blk devices we don't care
about the blocksize of the filesystem, we want what the device
asked for.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
with a KASSERT.
Reviewed by: Eivind, Alan Cox
|
| |
|
|
|
|
|
|
|
| |
list of available types.
PR: docs/13007
Submitted by: Assar Westerlund <assar@sics.se>
|
|
|
|
| |
discovered by Bill Paul.
|
|
|
|
| |
Obtained from: NetBSD
|
|
|
|
|
|
|
|
|
| |
"the device doesn't support a dump routine"
Only print "dump succeeded" when 0 is returned, instead of when an unexpected
error number is returned, print that error number.
Reviewed by: Eivind
|
| |
|
|
|
|
| |
may not compile, I can't test it.
|
| |
|
|
|
|
|
|
| |
been registered with ttyregister().
register ptys with ttyregister().
|
|
|
|
|
|
|
|
|
| |
we create the pty on the fly when it is first opened.
If you run out of ptys now, just MAKEDEV some more.
This also demonstrate the use of dev_t->si_tty_tty and dev_t->si_drv1
in a device driver.
|
|
|
|
|
|
| |
a few lines into <sys/vnode.h>.
Add a few fields to struct specinfo, paving the way for the fun part.
|
|
|
|
|
|
|
|
|
|
| |
warnings of the following nature on reloading a kld:
WARNING: "vinum" is usurping "console"'s bmaj
This only applies to cases where "console" is mentioned.
Broken-by: grog
|
|
|
|
| |
Reviewed by: msmith
|
|
|
|
|
|
| |
this time).
Pointed out by: bde
|
|
|
|
| |
incorrect comment which led me to move it in the first place.
|
|
|
|
|
| |
and init_sysent.c are checked into CVS, I should also commit the regenerated
copies even though they're built by syscalls.master. Correct? Bruce? :)
|
|
|
|
|
|
|
|
|
|
|
|
| |
now used in f_ops in place of NULL, and modifications to the files
are more carefully ordered. f_ops should also be set to &badfileops
upon "close" of a file.
This does not fix other problems mentioned in this PR than the first
one.
PR: 11629
Reviewed by: peter
|
|
|
|
|
|
|
| |
Noticed by: Nobody!
o Add comment about why we restrict chflags to root for devices.
o nit noticed by bde wrt return values.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o use suser_xxx rather than suser to support JAIL code.
o KNF comment convention
o use vp->type rather than vaddr.type and eliminate call to
VOP_GETATTR. Bruce says that vp->type is valid at this
point.
Submitted by: bde.
Not fixed:
o return (value)
o Comment needs to be longer and more explicit. It will be after
the advisory.
|
| |
|
|
|
|
| |
Submitted by: Dan Nelson <dnelson@emsphone.com>
|
|
|
|
| |
without -O.
|
|
|
|
|
|
| |
Back out a few lines that I haven't dealt with properly yet.
Snickered at by: Mike Smith
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- device_print_child() either lets the BUS_PRINT_CHILD
method produce the entire device announcement message or
it prints "foo0: not found\n"
Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)
Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())
The BUS_PRINT_CHILD method now returns int instead of void.
Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.
- Devices are 'on' a bus, not 'at' it.
- If a custom BUS_PRINT_CHILD method does the same thing
as bus_generic_print_child(), use bus_generic_print_child()
- Use device_get_nameunit() instead of both
device_get_name() and device_get_unit()
- All BUS_PRINT_CHILD methods return the number of
characters output.
Reviewed by: dfr, peter
|
|
|
|
|
|
| |
setting for the sysctl is OFF, which is the historical operation.
Submitted by: dillon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
macros) to the signal handler, for old-style BSD signal handlers as
the second (int) argument, for SA_SIGINFO signal handlers as
siginfo_t->si_code. This is source-compatible with Solaris, except
that we have no <siginfo.h> (which isn't even mentioned in POSIX
1003.1b).
An rather complete example program is at
http://www3.cons.org/cracauer/freebsd-signal.c
This will be added to the regression tests in src/.
This commit also adds code to disable the (hardware) FPU from
userconfig, so that you can use a software FP emulator on a machine
that has hardware floating point. See LINT.
|