summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prf.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not fault if curproc is null.peter2000-04-291-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Merge the cons.c and cons.h to the best of my ability. alpha may orphk1999-08-091-2/+2
| | | | may not compile, I can't test it.
* Make long longs ("%ll" format) work.green1999-08-071-2/+6
| | | | Reviewed by: msmith
* This makes the in kernel printf routines conform to the documenteddfr1999-07-241-13/+24
| | | | | | behavior of their userland counterparts with respect to return values. Submitted by: Matthew N. Dodd <winter@jurai.net>
* Oops, missed out one chunk of the last patch. (*blush*)peter1999-07-141-2/+2
| | | | | Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> Submitted by: "Matthew N. Dodd" <winter@jurai.net>
* Fixes for a couple of problems in last commit:peter1999-07-101-8/+8
| | | | | | | | | | | | | | | | | 1. Printing large quads in small bases overflowed the buffer if sizeof(u_quad_t) > sizeof(u_long). 2. The sharpflag checks had operator precedence bugs due to excessive parentheses in all the wrong places. 3. The explicit 0L was bogus in the quad_t comparison and useless in the long comparision. 4. There was some more bitrot in the comment about ksprintn(). Our ksprintn() handles bases up to 36 as well as down to 2. Bruce has other complaints about using %q in kernel and would rather we went towards using the C9X style %ll and/or %j. (I agree for that matter, as long as gcc/egcs know how to deal with that.) Submitted by: bde
* Implement the %q prefix for the integer types. Note that egcs on thepeter1999-07-091-17/+81
| | | | | | | Alpha believes that %q is for long long, whereas our quad_t and int64_t is only just a plain long. long long on the alpha is the same size (64 bit) as a long. It was requested, but I have not implemented yet, support for C9X style %lld - it should be pretty easy though.
* ksprintn() may be called with base=2, so redefine MAXNBUF accordingly.archie1999-06-071-18/+19
| | | | | | Other brucification tweaks. Obtained from: bde@freebsd.org
* The function ksprintn(), which is used to convert numbers to ASCII, is notarchie1999-06-061-8/+14
| | | | | reentrant because it returns a static buffer. This results in a race condition when/if an interrupt handler calls log(), printf() etc. Fix this.
* Unifdef VM86.jlemon1999-06-011-1/+18
| | | | Reviewed by: silence on on -current
* Add snprintf(3) and vsnprintf(3) capability to the kernel.archie1998-12-031-2/+55
| | | | Reviewed by: bde
* Store formatted panic string in static buffer to make it available laterache1998-09-061-1/+14
| | | | | for savecore. Previous code give only panic format to savecore
* Fixed the formatting of some tables (mainly the one produced by psbde1998-08-101-2/+2
| | | | | | | | | | in ddb) which I broke by changing %8[l]x to %8p. Hacked the central printf routine to not add an "0x" prefix for %p formats if the field width is nonzero. The tables are still horribly misformatted on 64-bit machines. Use %p instead of %8p to print pointers when the field width isn't important.
* Cast pointers to uintptr_t/intptr_t instead of to u_long/long,bde1998-07-151-2/+2
| | | | | | | respectively. Most of the longs should probably have been u_longs, but this changes is just to prevent warnings about casts between pointers and integers of different sizes, not to fix poorly chosen types.
* Fixed (un)sign extension bugs in %+n format. -4 becamebde1998-07-081-7/+16
| | | | | | | | | | | | | | | (long)(u_long)(u_int)-4 = 0x00000000fffffffc on machines with 32-bit ints and 64-bit longs. Restored %z format for printing signed hex. %+x shouldn't have been used since it is an error in userland. Prepared to nuke %n format by cloning it to %r. %n shouldn't have been used because it means something completely different in userland. Now %+r is equivalent to ddb's original %r, and %r is equivalent to ddb's original %n. Ignore '+' flag in combination with unsigned formats %{o,p,u,x}.
* Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.phk1998-05-281-4/+45
| | | | | | | | | | | | | | | | | | | | Clean up (or if antipodic: down) some of the msgbuf stuff. Use an inline function rather than a macro for timecounter delta. Maintain process "on-cpu" time as 64 bits of microseconds to avoid needless second rollover overhead. Avoid calling microuptime the second time in mi_switch() if we do not pass through _idle in cpu_switch() This should reduce our context-switch overhead a bit, in particular on pre-P5 and SMP systems. WARNING: Programs which muck about with struct proc in userland will have to be fixed. Reviewed, but found imperfect by: bde
* Make the size of the msgbuf (dmesg) a "normal" option.phk1998-05-191-10/+6
|
* Handle "%...p" as "%#...x" instead of "0x%...x". This is a quick fixbde1997-12-281-3/+2
| | | | | | for field widths being 2 larger than specified for "%<number>p". Only printing of null pointers is "wrong" now (it is actually "right", but inconsistent with printf(3)).
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-2/+2
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Removed unused #includes.bde1997-09-021-3/+1
|
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fixed the easy cases of const poisoning in the kernel. Cosmetic.bde1996-08-311-3/+3
|
* Collect all the functioons concerned with rebooting into one placejulian1996-08-191-56/+1
| | | | | also add the at_shutdown callout list, and change the one user of the present (broken) method (the vn driver) to use the new scheme.
* Correct a comment. There is no fn `kprintf'gpalmer1996-05-091-2/+2
|
* Clean up various compiler warnings. Most (if not all) were benigngpalmer1996-05-081-3/+5
| | | | Reviewed by: bde
* KGDB is dead. It may come back one day if somebody does it.phk1996-05-021-10/+4
|
* Bill Fenner <fenner@parc.xerox.com> comes up with a better fix to thejkh1996-03-251-4/+5
| | | | debugger_on_panic stuff.
* Ok, now this is correct (even simple fixes sometimes ain't so simple :)jkh1996-03-231-3/+4
|
* Fix bogus last commit - debugger_on_panic was referenced even whenjkh1996-03-231-2/+2
| | | | not defined. Another change clearly committed without testing! :-(
* Remove all traces of KADBphk1996-03-231-11/+15
| | | | | | | | add sysctl debug.debugger_on_panic: 1 if DDB or KGDB is defined. Requested by: davidg
* Add a new option: DDB_UNATTENDED. Stops machine dropping into DDBgpalmer1996-02-281-1/+3
| | | | | when it panics, but leaving activation of DDB from the console unaffected.
* Kernel printf now returns int.gibbs1996-01-291-3/+5
|
* Restored newline at the end of panic messages.bde1996-01-251-2/+3
|
* Remove %r hack, we have vprintf() now.phk1996-01-241-26/+22
| | | | | Add %D for "dumping" data. Good for ethernet/MAC addresses and such. Handle 1 < radix < 37.
* bounds check the radix, just in case.phk1996-01-221-1/+5
|
* Imake %.*s really work. :-(phk1996-01-191-5/+9
|
* Make result of sprintf zero terminated. Fix %r for sprintf case.phk1996-01-191-6/+10
|
* Make %.*s work.phk1996-01-181-16/+21
|
* Add support for %.{int|*}sphk1996-01-161-4/+13
|
* Get rid of two and a half printf in the kernel.phk1996-01-151-223/+231
| | | | | | | | | | | | | | | | | | | | Add more features to the one remaining to handle the job: + signed quantity. # alternate format - left padding * read width as next arg. n numeric in (argument specified) default radix. Fix the DDB debugger to use these. Use vprintf in debug routine in pcvt. The warnings from gcc may become more wrong and intolerable because of this. Warning: I have not checked the entire source for unsupported or changed constructs, but generally belive that there are only a few. Suggested by: bde
* Convert DDB to new-style option.wollman1996-01-041-1/+3
|
* A Major staticize sweep. Generates a couple of warnings that I'll dealphk1995-12-141-5/+5
| | | | | | with later. A number of unused vars removed. A number of unused procs removed or #ifdefed.
* Killed some gratuitous #include's.dg1995-08-241-5/+1
|
* Woops, I committed the wrong version of the diff in the last rev.dg1995-08-071-2/+2
|
* Made msgbuf range checking more robust and clean.dg1995-08-071-3/+5
|
* Restore check for msg_bufx being negative. Changed if() expression to bedg1995-08-061-4/+4
| | | | in Lite2 style.
* Convert %p to 0x%x instead of to 0x%8x. The latter gives blank paddingbde1995-06-141-8/+13
| | | | | | | | | | in the wrong place. Blank padding in the right place or zero padding would be inconsistent with user mode. Put case 'p' in alphabetical order. Implement %p in sprintf() too. I'd like only a single, more complete printf() core, perhaps one based on vsnprintf().
* Implement a simple hook (or hack?) to allow graphics device consolejoerg1995-04-081-3/+4
| | | | | | | | | | | | | drivers to protect DDB from being invoked while the console is in process-controlled (i.e., graphics) mode. Implement the logic to use this hook from within pcvt. (I'm sure Søren will do the syscons part RSN). I've still got one occasion where the system stalled, but my attempts to trigger the situation artificially resulted int the expected behaviour. It's hard to track bugs without the console and DDB available. :-/
OpenPOWER on IntegriCloud