dragonfly.git
15 years agoRemoved period from end of sentence, to reduce diffs between FreeBSD us from
Max Okumoto [Fri, 11 Feb 2005 22:34:02 +0000 (22:34 +0000)]
Removed period from end of sentence, to reduce diffs between FreeBSD us from
getting too large.

15 years agoAdd ALTQ support to pfctl(8). Fix a small bug introduced earlier
Joerg Sonnenberger [Fri, 11 Feb 2005 22:31:45 +0000 (22:31 +0000)]
Add ALTQ support to pfctl(8). Fix a small bug introduced earlier
in the HTONL --> htonl conversion.

15 years agoImport ALTQ support from KAME. This is based on the FreeBSD 4 snapshot.
Joerg Sonnenberger [Fri, 11 Feb 2005 22:26:35 +0000 (22:26 +0000)]
Import ALTQ support from KAME. This is based on the FreeBSD 4 snapshot.
This includes neither the ALTQ3 compat code nor the !DragonFly defines.
The macros have been replaced with inline functions in net/ifq_var.h.

This also renames pkthdr.pf_flags as it is intended as general flag bit.
Currently supported are ppp(4), sppp(4), tun(4) and wi(4), more drivers
are coming later.

Reviewed-by: corecode, dillon, hsu
Comments-from: hmp

15 years agoRemove unused variable.
Joerg Sonnenberger [Fri, 11 Feb 2005 22:07:32 +0000 (22:07 +0000)]
Remove unused variable.

15 years agoReduced diff between FreeBSD.
Max Okumoto [Fri, 11 Feb 2005 20:14:53 +0000 (20:14 +0000)]
Reduced diff between FreeBSD.

15 years ago- Fix some spelling mistakes.
Liam J. Foy [Fri, 11 Feb 2005 17:28:10 +0000 (17:28 +0000)]
- Fix some spelling mistakes.

Submitted by: Jonathon McKitrick <jcm@freebsd-uk.eu.org>

15 years ago- Improve the debugging functionality in battd.
Liam J. Foy [Fri, 11 Feb 2005 16:22:33 +0000 (16:22 +0000)]
- Improve the debugging functionality in battd.
- In the last commit, I removed a check on the percentage. This
  was wrong since we need to test whether the default can be
  supported also (most likely is).
- Make sure we check whether time is supported by /dev/apm when
  using the -T option.

15 years agoRenamed variable 'l' to 'ln'
Max Okumoto [Fri, 11 Feb 2005 01:09:48 +0000 (01:09 +0000)]
Renamed variable 'l' to 'ln'

15 years agoLst_Append returns void, so the other case of the ? statement
Max Okumoto [Fri, 11 Feb 2005 01:07:09 +0000 (01:07 +0000)]
Lst_Append returns void, so the other case of the ? statement
should also be void.

Author: harti
Taken-from: FreeBSD

15 years agoInitialise the status variable. W_SETTERMSIG uses its value.
Max Okumoto [Fri, 11 Feb 2005 01:04:41 +0000 (01:04 +0000)]
Initialise the status variable. W_SETTERMSIG uses its value.
Author: harti
Taken-from: FreeBSD

15 years agoMore cleaning:
Liam J. Foy [Thu, 10 Feb 2005 21:06:36 +0000 (21:06 +0000)]
More cleaning:

- Remove unnecessary header

15 years agoAdd the 'All rights reserved.'. It's not entirely clear if this is still
Joerg Sonnenberger [Thu, 10 Feb 2005 14:28:54 +0000 (14:28 +0000)]
Add the 'All rights reserved.'. It's not entirely clear if this is still
necessary by Law or not.

15 years agoTemporarily create new scope and reindent section which should
Max Okumoto [Thu, 10 Feb 2005 11:33:37 +0000 (11:33 +0000)]
Temporarily create new scope and reindent section which should
become its own function.

15 years agoFix comment indention.
Max Okumoto [Thu, 10 Feb 2005 10:45:59 +0000 (10:45 +0000)]
Fix comment indention.

15 years agoMove assignment of variables {freePtr, dynamic, start} closer to
Max Okumoto [Thu, 10 Feb 2005 07:42:17 +0000 (07:42 +0000)]
Move assignment of variables {freePtr, dynamic, start} closer to
return statements.  This helps clarify what variables are used to
communicate between largely seperated code.

15 years agoMove some variables at top of Var_Parse() into local scope.
Max Okumoto [Thu, 10 Feb 2005 07:39:38 +0000 (07:39 +0000)]
Move some variables at top of Var_Parse() into local scope.
Makes the code more clean, and in prep for splitting up this
900 line function.

15 years agoRemove stale local variable ifq.
Joerg Sonnenberger [Thu, 10 Feb 2005 00:20:09 +0000 (00:20 +0000)]
Remove stale local variable ifq.

15 years agoUse ifp->if_snd directly. Use IFQ_SET_MAXLEN.
Joerg Sonnenberger [Thu, 10 Feb 2005 00:09:17 +0000 (00:09 +0000)]
Use ifp->if_snd directly. Use IFQ_SET_MAXLEN.

15 years agoDon't assign &ifp->if_snd to a temporary variable, it's type will change
Joerg Sonnenberger [Thu, 10 Feb 2005 00:08:38 +0000 (00:08 +0000)]
Don't assign &ifp->if_snd to a temporary variable, it's type will change
soon. Use ifp directly for BPF_MTAP.

15 years agoDirectly use ifp->if_snd, it's type will change soon.
Joerg Sonnenberger [Thu, 10 Feb 2005 00:07:23 +0000 (00:07 +0000)]
Directly use ifp->if_snd, it's type will change soon.

15 years agoAdd -DIN_TARGET_LIB to prevent libobjc from depending on in-tree GCC code.
Joerg Sonnenberger [Wed, 9 Feb 2005 22:46:58 +0000 (22:46 +0000)]
Add -DIN_TARGET_LIB to prevent libobjc from depending on in-tree GCC code.
This removes the undefined x86_field_alignment from the DSO.

Noticed-by: eirikn
15 years agoCleanup white space (removed spc between tabs)
Max Okumoto [Wed, 9 Feb 2005 22:10:08 +0000 (22:10 +0000)]
Cleanup white space (removed spc between tabs)

15 years agoConnect our 1:1 threading library to the build.
David Rhodus [Wed, 9 Feb 2005 21:01:50 +0000 (21:01 +0000)]
Connect our 1:1 threading library to the build.

15 years agoChanged renamed macros *_BRACKET to *_BRACE.
Max Okumoto [Wed, 9 Feb 2005 20:55:15 +0000 (20:55 +0000)]
Changed renamed macros *_BRACKET to *_BRACE.

15 years agoUntangle VarFind and, while rewriting most of the function, fix the
Max Okumoto [Wed, 9 Feb 2005 20:40:38 +0000 (20:40 +0000)]
Untangle VarFind and, while rewriting most of the function, fix the
intendation. (A large part of the function was already at intendation 8).
Cool! much cleaner.

Taken-from: FreeBSD
Author: harti

15 years agoMove VarCreate() and VarDestroy() close to top of file, and add white
Max Okumoto [Wed, 9 Feb 2005 20:26:53 +0000 (20:26 +0000)]
Move VarCreate() and VarDestroy() close to top of file, and add white
space at begining of some functions.

15 years agoRemoved uneeded white space.
Max Okumoto [Wed, 9 Feb 2005 11:52:18 +0000 (11:52 +0000)]
Removed uneeded white space.

15 years ago- Move Error case to top of elseif chain.
Max Okumoto [Wed, 9 Feb 2005 06:05:41 +0000 (06:05 +0000)]
- Move Error case to top of elseif chain.

- Do not initialize startc, at top of function, but where a know
  valid value can be assigned.

15 years ago- Split out error case where input to Var_Parse() is "$", only a
Max Okumoto [Wed, 9 Feb 2005 06:03:05 +0000 (06:03 +0000)]
- Split out error case where input to Var_Parse() is "$", only a
  dollar sign.
- Make default case an explicit error instead of falling out of the
  switch statment into another error case.

15 years agoFix a case that can prevent the vnlru_proc vnode recycler from operating.
Matthew Dillon [Wed, 9 Feb 2005 02:51:04 +0000 (02:51 +0000)]
Fix a case that can prevent the vnlru_proc vnode recycler from operating.
The vnode recycler is not allowed to recycle 'internal' directory nodes
in the namecache topology.  i.e. if the path A/B/C/D is cached, then the
recycler is not allowed to remove A, B, or C.  The recycler checks
this condition by checking the vnode's v_holdcnt.  The recycler also tries
to recycle vnodes with little or no cached data rather then the vnodes
with a great deal of cached data.

However, the buffer cache now uses v_holdcnt as well.  If the buffer cache
is large enough and maxvnodes is small enough the recycler can wind up not
finding any vnodes to recycle.

The fix is clean out the buffers with the candidate vnode and then make a
final v_holdcnt check.

Reported-by: Gary Allan <dragonfly@gallan.plus.com>
15 years agoEliminate conditional check for initialized 'fp' on error in kern_sendfile().
Jeffrey Hsu [Tue, 8 Feb 2005 23:00:33 +0000 (23:00 +0000)]
Eliminate conditional check for initialized 'fp' on error in kern_sendfile().

15 years agoNow that 'so_pcb' is properly declared as a 'void *', remove a layer of
Jeffrey Hsu [Tue, 8 Feb 2005 22:56:19 +0000 (22:56 +0000)]
Now that 'so_pcb' is properly declared as a 'void *', remove a layer of
indirection and directly use 'so->so_pcb' in place of 'sotoinpcb(so)'.

15 years agoSet so->so_pcb directly to NULL to avoid lvalue cast.
Joerg Sonnenberger [Tue, 8 Feb 2005 15:54:01 +0000 (15:54 +0000)]
Set so->so_pcb directly to NULL to avoid lvalue cast.

15 years agoInclude pci_private.h to get pci_class_to_string.
Joerg Sonnenberger [Tue, 8 Feb 2005 15:51:24 +0000 (15:51 +0000)]
Include pci_private.h to get pci_class_to_string.

15 years ago- convert to bus_space macros
Joerg Sonnenberger [Tue, 8 Feb 2005 14:31:16 +0000 (14:31 +0000)]
- convert to bus_space macros
- netgraph cleanup
- bus_alloc_resource_any
- if_printf insteed of printf("%s...", ifp_if_xname);
- use M_WAITOK in arc_init, it's called only from arc_attach

Mostly-obtained-from: FreeBSD

15 years agoRemove call to readdir() that was missed durning the libc namespace
David Rhodus [Tue, 8 Feb 2005 04:07:57 +0000 (04:07 +0000)]
Remove call to readdir() that was missed durning the libc namespace
cleanup.  We now make use of _readidir_unlocked().

First reported by : Joerg Anslik <joerg@anslik.de>
Bug hunter and fix provided by : YONETANI Tomokazu <qhwt+dfly@les.ath.cx>

15 years ago- Removed declaration of VarModify() since it is defined before it is used.
Max Okumoto [Tue, 8 Feb 2005 02:13:13 +0000 (02:13 +0000)]
- Removed declaration of VarModify() since it is defined before it is used.
  Done to sync with FreeBSD.

15 years agoChange whitespace to match with FreeBSD. But to reduce diffs, but
Max Okumoto [Tue, 8 Feb 2005 02:11:28 +0000 (02:11 +0000)]
Change whitespace to match with FreeBSD.  But to reduce diffs, but
we really need to do a complete file sweep and clean them all up.

15 years ago- Add brace around switch statement.
Max Okumoto [Tue, 8 Feb 2005 02:07:03 +0000 (02:07 +0000)]
- Add brace around switch statement.
- Cleanup white space in var.h

15 years agoUp the initial interrupt configuration hook delay to 20 seconds before
Matthew Dillon [Mon, 7 Feb 2005 23:32:26 +0000 (23:32 +0000)]
Up the initial interrupt configuration hook delay to 20 seconds before
reporting a potential problem.

15 years agoAdd support for pure kernel thread stack frames. Pure kernel threads do not
Matthew Dillon [Mon, 7 Feb 2005 21:33:36 +0000 (21:33 +0000)]
Add support for pure kernel thread stack frames.  Pure kernel threads do not
have a PCB, they simply push the register state (depending on the situation)
onto the stack and save the stack pointer.

15 years agoMore white space diff reduction with FreeBSD.
Max Okumoto [Mon, 7 Feb 2005 20:46:19 +0000 (20:46 +0000)]
More white space diff reduction with FreeBSD.

15 years agogdb-6 uses /dev/kmem exclusively for kernel addresses when gdb'ing a live
Matthew Dillon [Mon, 7 Feb 2005 20:39:01 +0000 (20:39 +0000)]
gdb-6 uses /dev/kmem exclusively for kernel addresses when gdb'ing a live
kernel, but the globaldata mapping is outside the bounds of kernel_map.
Make sure that the globaldata mapping is visible to it.

15 years ago- Reduce white space diffs with FreeBSD.
Max Okumoto [Mon, 7 Feb 2005 20:11:54 +0000 (20:11 +0000)]
- Reduce white space diffs with FreeBSD.

15 years ago- Reduce white space diffs after harti commited my change to FreeBSD.
Max Okumoto [Mon, 7 Feb 2005 20:09:45 +0000 (20:09 +0000)]
- Reduce white space diffs after harti commited my change to FreeBSD.
- Removed extra scope.

15 years ago- Remove two unnecessary headers
Liam J. Foy [Mon, 7 Feb 2005 18:00:46 +0000 (18:00 +0000)]
- Remove two unnecessary headers

15 years ago- Use a temp variable to simplify long condition in if-statement.
Max Okumoto [Sun, 6 Feb 2005 23:58:23 +0000 (23:58 +0000)]
- Use a temp variable to simplify long condition in if-statement.

15 years ago- Eliminate duplicate code.
Max Okumoto [Sun, 6 Feb 2005 23:56:21 +0000 (23:56 +0000)]
- Eliminate duplicate code.

15 years ago- cleanup Var_Parse() by removing negtive logic in if statement.
Max Okumoto [Sun, 6 Feb 2005 23:54:55 +0000 (23:54 +0000)]
- cleanup Var_Parse() by removing negtive logic in if statement.

15 years agoDon't cast lvavalues.
Joerg Sonnenberger [Sun, 6 Feb 2005 23:26:43 +0000 (23:26 +0000)]
Don't cast lvavalues.

15 years ago- Remove redundent code. Why check for isupper before a
Max Okumoto [Sun, 6 Feb 2005 23:22:04 +0000 (23:22 +0000)]
- Remove redundent code. Why check for isupper before a
  case statement where you only have upper case values.

15 years ago- Define new typedef VarModifyProc and use it to clarify the code.
Max Okumoto [Sun, 6 Feb 2005 23:17:16 +0000 (23:17 +0000)]
- Define new typedef VarModifyProc and use it to clarify the code.

15 years agoMoved WARNS?=6 out of subdir Makefiles in to src/bin/Makefile.inc.
Max Okumoto [Sun, 6 Feb 2005 06:16:40 +0000 (06:16 +0000)]
Moved WARNS?=6 out of subdir Makefiles in to src/bin/Makefile.inc.
Subdir that need lower values should set WARNS instead.

15 years agoMove WARNS?=6 into src/bin/Makefile.inc instead of having it set
Max Okumoto [Sun, 6 Feb 2005 06:12:32 +0000 (06:12 +0000)]
Move WARNS?=6 into src/bin/Makefile.inc instead of having it set
in all the subdir Makefiles.  Subdirectories that fail WARNS=6
should have lower values to override.

15 years agoAdd missing */.
Joerg Sonnenberger [Sun, 6 Feb 2005 02:00:23 +0000 (02:00 +0000)]
Add missing */.

Noticed-by: corecode
15 years agoRemove the conditionalized FreeBSD 5 code. Keep the capability assignment,
Joerg Sonnenberger [Sat, 5 Feb 2005 23:23:25 +0000 (23:23 +0000)]
Remove the conditionalized FreeBSD 5 code. Keep the capability assignment,
even if we currently don't use it.

15 years agoDuring init time, we can savely allocate the mbuf cluster with
Joerg Sonnenberger [Sat, 5 Feb 2005 23:16:42 +0000 (23:16 +0000)]
During init time, we can savely allocate the mbuf cluster with
MB_WAIT. Pass the flag to em_get_buf to allow this.

15 years agoAdd a macro SYSCTL_SET_CHILDREN. Use it to avoid lhs cast.
Joerg Sonnenberger [Sat, 5 Feb 2005 23:04:28 +0000 (23:04 +0000)]
Add a macro SYSCTL_SET_CHILDREN. Use it to avoid lhs cast.

15 years ago- Add support for DT_FLAGS.
Joerg Sonnenberger [Sat, 5 Feb 2005 22:54:49 +0000 (22:54 +0000)]
- Add support for DT_FLAGS.
- Define various things from the most recent ELF spec.

rtld.c, 1.83
rtld.h, 1.28
map_object.c, 1.14
sys/elf_common.h, 1.12

15 years agoDo initialise fp to NULL explicitly, the last comment wasn't enough.
Joerg Sonnenberger [Sat, 5 Feb 2005 22:20:20 +0000 (22:20 +0000)]
Do initialise fp to NULL explicitly, the last comment wasn't enough.
The first conditional can fail and the variable points to some random
place.

15 years ago- Remove mode argument from open().
Liam J. Foy [Sat, 5 Feb 2005 16:07:08 +0000 (16:07 +0000)]
- Remove mode argument from open().

15 years agoRaise WARNS to 6:
Chris Pressey [Sat, 5 Feb 2005 01:05:12 +0000 (01:05 +0000)]
Raise WARNS to 6:
- Move the print() function above the display() function so that it can
  be inlined by the compiler.
- Un-nest extern declarations; put them into the shared header file.
- Initialize some local variables.

15 years ago- Reduce diffs from FreeBSD.
Max Okumoto [Sat, 5 Feb 2005 00:58:47 +0000 (00:58 +0000)]
- Reduce diffs from FreeBSD.

15 years ago- make a temporary copy of the name because Var_Subst insists on
Max Okumoto [Fri, 4 Feb 2005 23:32:09 +0000 (23:32 +0000)]
- make a temporary copy of the name because Var_Subst insists on
  writing into the string

15 years ago- Pass NULL to brk_string() when we don't need the number
Max Okumoto [Fri, 4 Feb 2005 23:18:42 +0000 (23:18 +0000)]
- Pass NULL to brk_string() when we don't need the number
  of result strings.

15 years agoReadd the copystr for f_mntfromname of root. It wasn't meant to be
Joerg Sonnenberger [Fri, 4 Feb 2005 23:16:28 +0000 (23:16 +0000)]
Readd the copystr for f_mntfromname of root. It wasn't meant to be
deleted, but didn't change normal system behaviour. In case of an
unclean root filesystem, it prevented the remounting.

15 years ago- Fix syntax error. That I added. :-P
Max Okumoto [Fri, 4 Feb 2005 23:09:06 +0000 (23:09 +0000)]
- Fix syntax error.  That I added. :-P

15 years ago- In main.c use NULL instead of 0
Max Okumoto [Fri, 4 Feb 2005 22:35:42 +0000 (22:35 +0000)]
- In main.c use NULL instead of 0
- In str.c check if brk_string() is passed a null pointer in
  store_argc.  If so then don't return argc.

Taken-from: FreeBSD

15 years agoStop caring about GCC versions between 2.5 and 2.7, they are
Joerg Sonnenberger [Fri, 4 Feb 2005 22:28:23 +0000 (22:28 +0000)]
Stop caring about GCC versions between 2.5 and 2.7, they are
historic artefacts.
Remove a double define of __func__ from the !LINT case.
Define __func__ to NULL for GCC before 2.7 and non ISO C99 compilers.
Since all GCC versions above 2.95 support __restrict, include them
in the check too. Remove the weak defines for !__STDC__, we don't
support such a setting.
If _C99_SOURCE is set, don't include POSIX / BSD / XSI extensions.

Partly-submitted-by: Andreas Hauser <andy@splashground.de>
15 years ago- Constify Var_Delete()
Max Okumoto [Fri, 4 Feb 2005 22:06:01 +0000 (22:06 +0000)]
- Constify Var_Delete()
- And more white space work

15 years ago- Removed unneeded variable 'internal'.
Max Okumoto [Fri, 4 Feb 2005 21:53:47 +0000 (21:53 +0000)]
- Removed unneeded variable 'internal'.

15 years ago- Revert some white space changes, to keep us in sync with FreeBSD.
Max Okumoto [Fri, 4 Feb 2005 21:45:36 +0000 (21:45 +0000)]
- Revert some white space changes, to keep us in sync with FreeBSD.
- Move Buf_Clear() to end of file (why?) to keep us in sycn with FreeBSD.

15 years agoRaise WARNS to 6:
Chris Pressey [Fri, 4 Feb 2005 21:32:55 +0000 (21:32 +0000)]
Raise WARNS to 6:
- ANSIfy function arguments.

15 years agoRaise WARNS to 6.
Chris Pressey [Fri, 4 Feb 2005 21:30:42 +0000 (21:30 +0000)]
Raise WARNS to 6.

15 years agoMore white space insertion. Why does putting a blank line at the
Max Okumoto [Fri, 4 Feb 2005 21:24:06 +0000 (21:24 +0000)]
More white space insertion.  Why does putting a blank line at the
begining of functions without variables help readablity?

15 years agoPut back spaces at begining of functions that have no variables. Silly
Max Okumoto [Fri, 4 Feb 2005 21:16:44 +0000 (21:16 +0000)]
Put back spaces at begining of functions that have no variables. Silly
but it keeps us in sync with FreeBSD.

15 years agoRaise WARNS to 6:
Chris Pressey [Fri, 4 Feb 2005 20:00:25 +0000 (20:00 +0000)]
Raise WARNS to 6:
- Constify some function arguments and a variable.

15 years agoThe last commit was not sufficient. Rework the code a bit to make it
Matthew Dillon [Fri, 4 Feb 2005 19:16:00 +0000 (19:16 +0000)]
The last commit was not sufficient.  Rework the code a bit to make it
sufficient.

Reported-by: EM <EM1897@aol.com>
15 years agoBack out constify of Parse_File(). It is assigned to curFile.fname
Max Okumoto [Fri, 4 Feb 2005 06:45:16 +0000 (06:45 +0000)]
Back out constify of Parse_File().  It is assigned to curFile.fname
and you cannot const this because it's passed to free() later on.

15 years agoRevert the last device_print_child() change, it was too confusing to
Matthew Dillon [Fri, 4 Feb 2005 03:32:37 +0000 (03:32 +0000)]
Revert the last device_print_child() change, it was too confusing to
display the device name after the attach because recursion can insert a
lot of other messages in there.

Instead, if -v is specified, generate a line before and after the attach
suitably marked [tentative] or [attached!].  This also has the advantage
of bracketing any recursion that occurs.

Keep the bootverbose printing of the device chain but get rid of the "ATTACH "
on the front.  It's obvious what it is and the attach message follows
directly now.

15 years agos/ich_arg/ich_desc/
YONETANI Tomokazu [Fri, 4 Feb 2005 03:04:40 +0000 (03:04 +0000)]
s/ich_arg/ich_desc/

15 years agoOne of the last things the system does before it tries to mount root is
Matthew Dillon [Fri, 4 Feb 2005 02:57:20 +0000 (02:57 +0000)]
One of the last things the system does before it tries to mount root is
wait for interrupt-driven configuration hooks to finish.  This is one of
the common places where the system locks up due to e.g. blown interrupt
routing.

Wait up to 60 seconds for interrupt driven hooks to complete.  Generate
a warning every 10 seconds listing the hooks that have not yet completed.
Name all the hook structures to make the listing meaningful.  After 60
seconds, give up and continue booting.  The system might actually
be useable enough to aid in debugging depending on which device failed.

15 years agoAnnotate the class byte with a class name in the bootverbose pci "found->"
Matthew Dillon [Fri, 4 Feb 2005 02:52:18 +0000 (02:52 +0000)]
Annotate the class byte with a class name in the bootverbose pci "found->"
bus logging code.  Numbers are fine, but when there are thousands of them
on the screen you need a bit of human readable context.

15 years agoTemporarily disable non-working Path MTU discovery pending real fix.
Jeffrey Hsu [Fri, 4 Feb 2005 01:49:30 +0000 (01:49 +0000)]
Temporarily disable non-working Path MTU discovery pending real fix.

15 years agoDo not depend on existence of _end symbol in obj_from_addr, use
Joerg Sonnenberger [Fri, 4 Feb 2005 01:33:48 +0000 (01:33 +0000)]
Do not depend on existence of _end symbol in obj_from_addr, use
obj->mapbase and obj->mapsize instead.

rtld.c, 1.92
Obtained-from: FreeBSD

15 years agoIf we change obj_rtld.path after initialising __progname, make sure we
Joerg Sonnenberger [Fri, 4 Feb 2005 01:23:16 +0000 (01:23 +0000)]
If we change obj_rtld.path after initialising __progname, make sure we
change __progname to point at the new storage otherwise it ends up
pointing at freed memory which leads to confusing garbled error messages.

rtld.c, 1.95
Obtained-from: FreeBSD

15 years agom_clalloc() was improperly assuming that an mcl malloc would always succeed
Matthew Dillon [Fri, 4 Feb 2005 01:14:27 +0000 (01:14 +0000)]
m_clalloc() was improperly assuming that an mcl malloc would always succeed
when in fact it is allowed not to (because M_NULLOK is specified).

Reported-by: EM <EM1897@aol.com>
15 years agogive out a little more information in case of a missing dependency
Joerg Sonnenberger [Fri, 4 Feb 2005 01:06:05 +0000 (01:06 +0000)]
give out a little more information in case of a missing dependency

rtld.c, 1.96
Obtained-from: FreeBSD

15 years agoRemove -DFREEBSD_ELF.
Joerg Sonnenberger [Fri, 4 Feb 2005 00:33:49 +0000 (00:33 +0000)]
Remove -DFREEBSD_ELF.

Verified-by: md5
15 years agoNo need to zero fill memory, mmapped anonymously. Kernel will
Joerg Sonnenberger [Fri, 4 Feb 2005 00:24:23 +0000 (00:24 +0000)]
No need to zero fill memory, mmapped anonymously. Kernel will
return pre-zeroed pages itself.

i386/reloc.c, 1.12
Obtained-from: FreeBSD

15 years agoGenerate more useful -v information on the console during device attach.
Matthew Dillon [Thu, 3 Feb 2005 23:54:22 +0000 (23:54 +0000)]
Generate more useful -v information on the console during device attach.
The complete device chain is output prior to each attach.

The normal device_print_child() is now moved from before the attach
to after the attach so the correct resource information gets reported,
especially the correct IRQ.

15 years agoRemove duplicate #include of <sys/sysctl.h>
Max Okumoto [Thu, 3 Feb 2005 23:41:05 +0000 (23:41 +0000)]
Remove duplicate #include of <sys/sysctl.h>

15 years agoProvide a mechanism for dumping relocation information.
Joerg Sonnenberger [Thu, 3 Feb 2005 23:28:24 +0000 (23:28 +0000)]
Provide a mechanism for dumping relocation information.

Setting the LD_DUMP_REL_PRE or LD_DUMP_REL_POST environment variables
cause rtld-elf to output a table of all relocations.

This is useful for debugging.

debug.c, 1.3
rtld.c, 1.85
rtld.h, 1.31

Obtained-from: FreeBSD

15 years agoRemove the default VINUMDEBUG option for now. I'll make most of the
Joerg Sonnenberger [Thu, 3 Feb 2005 22:10:57 +0000 (22:10 +0000)]
Remove the default VINUMDEBUG option for now. I'll make most of the
debug code available via KTR later.

15 years agoForced commit to note that I'm removing the default VINUMDEBUG for now.
Joerg Sonnenberger [Thu, 3 Feb 2005 22:07:12 +0000 (22:07 +0000)]
Forced commit to note that I'm removing the default VINUMDEBUG for now.
Most debug informations will be made available via KTR again.

15 years agostrcmp() needs string.h
Joerg Sonnenberger [Thu, 3 Feb 2005 22:05:27 +0000 (22:05 +0000)]
strcmp() needs string.h

15 years agoexit() needs stdlib.h
Joerg Sonnenberger [Thu, 3 Feb 2005 22:03:31 +0000 (22:03 +0000)]
exit() needs stdlib.h

15 years agoUse M_ZERO instead of manual bzero.
Joerg Sonnenberger [Thu, 3 Feb 2005 20:48:08 +0000 (20:48 +0000)]
Use M_ZERO instead of manual bzero.

15 years agoCleanup whitespace at end of file.
Max Okumoto [Thu, 3 Feb 2005 18:43:08 +0000 (18:43 +0000)]
Cleanup whitespace at end of file.

15 years agoCleanup some white space.
Max Okumoto [Thu, 3 Feb 2005 18:36:26 +0000 (18:36 +0000)]
Cleanup some white space.