aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/db_input.c
Commit message (Collapse)AuthorAgeFilesLines
* ddb: de-registerPedro F. Giffuni2015-05-231-3/+3
| | | | Notes: svn path=/head/; revision=283315
* ddb: stop boolean screaming.Pedro F. Giffuni2015-05-181-1/+1
| | | | | | | | | | TRUE --> true FALSE--> false Hinted by: NetBSD Notes: svn path=/head/; revision=283088
* ddb: ANSI-fy function declarations.Pedro F. Giffuni2014-10-121-1/+1
| | | | | | | MFC after: 5 days Notes: svn path=/head/; revision=273006
* Use strchr() and strrchr().Ed Schouten2012-01-021-1/+1
| | | | | | | | | | | It seems strchr() and strrchr() are used more often than index() and rindex(). Therefore, simply migrate all kernel code to use it. For the XFS code, remove an empty line to make the code identical to the code in the Linux kernel. Notes: svn path=/head/; revision=229272
* Reserve two bytes at the end of the DDB input line in db_readline() toRobert Watson2008-03-071-1/+4
| | | | | | | | | | | | | hold the newline and nul terminator. Otherwise, there are cases where garbage may end up in the command history due to a lack of a nul terminator, or input may end up without room for a newline. MFC after: 3 days PR: 119079 Submitted by: Michael Plass <mfp49_freebsd@plass-family.net> Notes: svn path=/head/; revision=176895
* When redrawing an input line, count backspaces to get to the beginning ofRobert Watson2008-03-061-1/+1
| | | | | | | | | | | | | | the input field from the current cursor location, rather than the end of the input line, as the cursor may not be at the end of the line. Otherwise, we may overshoot, overwriting a bit of the previous line and failing to fully overwrite the current line. MFC after: 3 days PR: 119079 Submitted by: Michael Plass <mfp49_freebsd@plass-family.net> Notes: svn path=/head/; revision=176870
* Add a new DDB(4) facility, output capture. Input and output from DDB may beRobert Watson2007-12-251-0/+1
| | | | | | | | | | | | | | | | captured to a memory buffer for later inspection using sysctl(8), or in the future, to a textdump. A new DDB command, "capture", is added, which accepts arguments "on", "off", "reset", and "status". A new DDB sysctl tree, debug.ddb.capture, is added, which can be used to resize the capture buffer and extract buffer contents. MFC after: 3 months Notes: svn path=/head/; revision=174910
* Start each of the license/copyright comments with /*-Warner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139747
* Use __FBSDID().David E. O'Brien2003-06-101-3/+3
| | | | Notes: svn path=/head/; revision=116176
* Add /* FALLTHROUGH */Poul-Henning Kamp2003-05-311-0/+1
| | | | | | | Found by: FlexeLint Notes: svn path=/head/; revision=115495
* The kernel bcopy() is safe for overlapping regions (and always has), soDag-Erling Smørgrav2003-04-041-2/+2
| | | | | | | there is no use for a separate ovbcopy(). Notes: svn path=/head/; revision=113071
* Be consistent about "static" functions: if the function is markedPoul-Henning Kamp2002-09-281-5/+5
| | | | | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512 Notes: svn path=/head/; revision=104094
* Remove __P.Alfred Perlstein2002-03-201-5/+5
| | | | Notes: svn path=/head/; revision=92756
* ^U kills an entire input line in most applications,Yaroslav Tykhiy2002-02-121-5/+6
| | | | | | | | | | including the default terminal canonical mode. So let ddb(4) be no exception from this rule. Pointed out by: Mark Peek <mark@peek.org> Notes: svn path=/head/; revision=90591
* Teach ddb(4) to delete to the beginning of its command line on ^U.Yaroslav Tykhiy2002-02-111-0/+5
| | | | | | | | PR: kern/28976 Submitted by: Nickolai Zeldovich <kolya@orbit.zepa.net> Notes: svn path=/head/; revision=90528
* Add a new mechanism, cndbctl(), to tell the console driver thatKazutaka YOKOTA2000-01-111-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | ddb is entered. Don't refer to `in_Debugger' to see if we are in the debugger. (The variable used to be static in Debugger() and wasn't updated if ddb is entered via traps and panic anyway.) - Don't refer to `in_Debugger'. - Add `db_active' to i386/i386/db_interface.d (as in alpha/alpha/db_interface.c). - Remove cnpollc() stub from ddb/db_input.c. - Add the dbctl function to syscons, pcvt, and sio. (The function for pcvt and sio is noop at the moment.) Jointly developed by: bde and me (The final version was tweaked by me and not reviewed by bde. Thus, if there is any error in this commit, that is entirely of mine, not his.) Some changes were obtained from: NetBSD Notes: svn path=/head/; revision=55823
* Remove unused macro definition.Archie Cobbs1999-11-021-1/+0
| | | | Notes: svn path=/head/; revision=52812
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Merge the cons.c and cons.h to the best of my ability. alpha may orPoul-Henning Kamp1999-08-091-3/+2
| | | | | | | may not compile, I can't test it. Notes: svn path=/head/; revision=49558
* The following patch will remove a hack introduced inKazutaka YOKOTA1999-07-141-13/+1
| | | | | | | | | | /sys/ddb/db_input.c rev 1.19 to recognize syscons's cursor keycodes. It is unnecessary now that scgetc() in syscons returns the escape sequence for the cursor keys rather than their raw, internal key codes. Notes: svn path=/head/; revision=48810
* Some fixes from John Hood:John Dyson1997-12-051-2/+1
| | | | | | | | | | | 1) Fix the initialization of malloc structure that changed due to perf opt. 2) Remove unneeded include. 3) An initialization assert added to malloc. Submitted by: John Hood <cgull@smoke.marlboro.vt.us> Notes: svn path=/head/; revision=31549
* Cleaned up revs.1.19-1.21:Bruce Evans1997-11-201-17/+14
| | | | Notes: svn path=/head/; revision=31314
* A better fix for the ddb command history buffer problem; use a staticMike Smith1997-11-091-9/+9
| | | | | | | | buffer instead of trying to use malloc() in the input routine. Submitted by: john hood <cgull@smoke.marlboro.vt.us> Notes: svn path=/head/; revision=31062
* Don't try to do anything with the input history if MALLOC() for the bufferMike Smith1997-11-071-2/+2
| | | | | | | | | failed. This broke early debugging. Notes: svn path=/head/; revision=31005
* Minor hack to also allow for syscons's "interesting" arrow keys.Joerg Wunsch1997-08-171-1/+13
| | | | | | | | I'm using "#if __i386__ && __FreeBSD__" to check for a ``potentially syscons-relevant environment''. Hope that's ok... Notes: svn path=/head/; revision=28330
* Everyone's favorite, i think: make DDB understand the arrow keys for theJoerg Wunsch1997-04-121-1/+38
| | | | | | | | basic cursor movements. Assumes ANSI/DEC tty, but you can still resort to plain emacs ^p/^n etc anyway. Notes: svn path=/head/; revision=24840
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* if there is no console, cngetc should act like getc and return -1Julian Elischer1996-10-301-1/+8
| | | | | | | make callers aware of this in those cases where it can occur. Notes: svn path=/head/; revision=19268
* Finally implement a simple commandline history in DDB.Joerg Wunsch1996-08-101-2/+71
| | | | | | | | | | | Emacs-style line editing has already been there (did anybody ever notice this? :), so i `only' had to add ^P and ^N. The approach is fairly minimalistic, with the advantage of keeping the bloat as small as 864 bytes of .text and 16 bytes of .bss, plus 10*120 bytes malloc'ed history buffer at the first use. Notes: svn path=/head/; revision=17495
* Clean up various compiler warnings. Most (if not all) were benignGary Palmer1996-05-081-2/+2
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=15680
* Reduced and cleaned up #includes.Bruce Evans1995-12-101-4/+4
| | | | Notes: svn path=/head/; revision=12734
* Staticize and cleanup.Poul-Henning Kamp1995-12-101-5/+5
| | | | Notes: svn path=/head/; revision=12720
* Untangled the vm.h include file spaghetti.David Greenman1995-12-071-1/+2
| | | | Notes: svn path=/head/; revision=12662
* Staticized and '#ifdef notused' stuff we don't use.Poul-Henning Kamp1995-11-291-6/+6
| | | | Notes: svn path=/head/; revision=12515
* Completed function declarations and/or added prototypes and/or #includesBruce Evans1995-11-241-2/+8
| | | | | | | | | | | | | to get the prototypes. Changed some `int's to `boolean_t's. boolean_t's are ints so they are hard to distinguish from ints. Converted function headers to old-style. ddb is written in K&R1 C except where we broke it. Notes: svn path=/head/; revision=12473
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-9/+9
| | | | Notes: svn path=/head/; revision=8876
* Fix up some sloppy coding practices:Garrett Wollman1994-08-181-7/+7
| | | | | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter. Notes: svn path=/head/; revision=2112
* Change all #includes to follow the current Berkeley style. Some of theseGarrett Wollman1994-08-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make Notes: svn path=/head/; revision=2056
* Make everything compile with -Wtraditional. Make it easier to distributeGarrett Wollman1993-12-191-2/+3
| | | | | | | | | | | | | | a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks. Notes: svn path=/head/; revision=879
* Make the LINT kernel compile with -W -Wreturn-type -Wcomment -Werror, andGarrett Wollman1993-11-251-2/+7
| | | | | | | add same (sans -Werror) to Makefile for future compilations. Notes: svn path=/head/; revision=798
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, someRodney W. Grimes1993-10-161-20/+2
| | | | | | | minor cleanup. Added $Id$ to files that did not have any version info, etc Notes: svn path=/head/; revision=623
* Initial import, 0.1 + pk 0.2.4-B1Rodney W. Grimes1993-06-121-0/+268
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=4