Max Okumoto [Thu, 28 Apr 2005 18:52:00 +0000 (18:52 +0000)]
Move code between goto do_compare and label, above the goto and remove
the goto.
Max Okumoto [Thu, 28 Apr 2005 18:51:48 +0000 (18:51 +0000)]
Pass CondToken() through indent to cleanup indention.
Max Okumoto [Thu, 28 Apr 2005 18:51:31 +0000 (18:51 +0000)]
Negate if-statement and swap code sections in CondToken()
Max Okumoto [Thu, 28 Apr 2005 18:50:57 +0000 (18:50 +0000)]
Cleanup suff.c:SuffFindArchiveDeps() this removes two more warnings.
Max Okumoto [Thu, 28 Apr 2005 18:50:35 +0000 (18:50 +0000)]
The first element of the array return by brk_string(), is never
used so we can remove the Var_Value() call. This is good since
that code hasn't worked for a while.
Max Okumoto [Thu, 28 Apr 2005 18:50:08 +0000 (18:50 +0000)]
Clean up main.c
o Moved initialization of progam globals and file globals
to top of main().
o Grouped file and program globals defintions.
o made chdir_verify_path() static since it is only used in main.c
Max Okumoto [Thu, 28 Apr 2005 18:49:40 +0000 (18:49 +0000)]
Reduce the use of global variables by creating Var_SetGlobal() and
replacing Var_Set(name, val, VAR_GLOBAL).
Max Okumoto [Thu, 28 Apr 2005 18:49:18 +0000 (18:49 +0000)]
Cleanup main()
o Moved setting signal handler for SIGCHLD into job.c
o Moved unsetenv("ENV") into job.c where it belongs.
o Moved setting machine, machine_arch, machine_cpu close to its usage.
o Invert negative logic.
Max Okumoto [Thu, 28 Apr 2005 18:48:52 +0000 (18:48 +0000)]
Remove prototype for usage(), and move the definition above its use.
Max Okumoto [Thu, 28 Apr 2005 18:48:31 +0000 (18:48 +0000)]
remove prototype for Compat_RunCommand() and make it static.
Max Okumoto [Thu, 28 Apr 2005 18:48:15 +0000 (18:48 +0000)]
Move printing of variables into var.c
Max Okumoto [Thu, 28 Apr 2005 18:47:52 +0000 (18:47 +0000)]
Move some variables into the correct files.
Max Okumoto [Thu, 28 Apr 2005 18:47:27 +0000 (18:47 +0000)]
cleanup middle part of JobFinish()
Max Okumoto [Thu, 28 Apr 2005 18:47:09 +0000 (18:47 +0000)]
Cleanup code near the top part of JobFinish()
Max Okumoto [Thu, 28 Apr 2005 18:46:26 +0000 (18:46 +0000)]
Move comments to the proper section, and removed some unnessisary
gcc magic.
Max Okumoto [Thu, 28 Apr 2005 18:45:57 +0000 (18:45 +0000)]
Convert Compat_RunCommand() to use ProcWait()
Joerg Sonnenberger [Thu, 28 Apr 2005 18:29:54 +0000 (18:29 +0000)]
Always allocate static TLS space.
Joerg Sonnenberger [Thu, 28 Apr 2005 18:26:03 +0000 (18:26 +0000)]
Forced commit to correct imporant spelling error:
DragonFly has decided to depend on char being *unsigned*.
Joerg Sonnenberger [Thu, 28 Apr 2005 18:24:10 +0000 (18:24 +0000)]
Slight correction for the last commit, thread TCB == NULL as error
condition and return it. This could happen in case of memory shortage.
Joerg Sonnenberger [Thu, 28 Apr 2005 18:22:13 +0000 (18:22 +0000)]
For the initial thread, rtld has already created the TCB and TLS storage.
Use this. For all other threads allocate it. The TCB itself must not be
NULL, so we don't have to check for it.
Joerg Sonnenberger [Thu, 28 Apr 2005 18:16:47 +0000 (18:16 +0000)]
Add support for TLS.
Joerg Sonnenberger [Thu, 28 Apr 2005 18:09:03 +0000 (18:09 +0000)]
Always setup the initial TCB correctly. This saves us from having to
check for special cases in the thread initialisation code.
Joerg Sonnenberger [Thu, 28 Apr 2005 13:51:55 +0000 (13:51 +0000)]
Declare environ on file scope. Don't declare __findenv as inline,
in C99 this means static too. GCC doesn't implement this correctly,
but that's no excuse. Fix type issues. ANSIfy. Remove useless casts.
Joerg Sonnenberger [Thu, 28 Apr 2005 13:47:43 +0000 (13:47 +0000)]
Fix warnings.
Joerg Sonnenberger [Thu, 28 Apr 2005 13:47:15 +0000 (13:47 +0000)]
Rename symlink to my_symlink to avoid global shadowing.
Joerg Sonnenberger [Thu, 28 Apr 2005 13:45:42 +0000 (13:45 +0000)]
Fix the sign issue by reordering the operations. Use memcpy instead
of strncpy since we know that no '\0' can occur in the string. We have
also checked the size of the string already.
Joerg Sonnenberger [Thu, 28 Apr 2005 13:41:46 +0000 (13:41 +0000)]
Use __DECONST for interface const violation.
Joerg Sonnenberger [Thu, 28 Apr 2005 13:38:06 +0000 (13:38 +0000)]
Declare __system first. ANSIfy.
Joerg Sonnenberger [Thu, 28 Apr 2005 13:25:12 +0000 (13:25 +0000)]
DragonFly has decided to depend on char being signed, use it.
Use __DECONST for the interface const violations, those are intended.
Ansify.
YONETANI Tomokazu [Thu, 28 Apr 2005 01:43:53 +0000 (01:43 +0000)]
Backout part of the change in 1.4; copy directory part of the path,
rather than the whole path. This is something not doable with strlcpy()
alone, unless source buffer can be writable.
Jeroen Ruigrok/asmodai [Wed, 27 Apr 2005 19:00:46 +0000 (19:00 +0000)]
Remove dllockinit.3 from the Makefile.
Joerg Sonnenberger [Wed, 27 Apr 2005 16:46:12 +0000 (16:46 +0000)]
Remove unused local functions. Const correctness. Sign correctness.
Add a default case _dns_ghbyname to handle possible remaining cases.
Don't use the deprecated BIND4 interface, use NS_GET16 instead.
Joerg Sonnenberger [Wed, 27 Apr 2005 16:38:40 +0000 (16:38 +0000)]
Use const for internal casts to not conflict with const pointers.
Hiten Pandya [Wed, 27 Apr 2005 16:16:30 +0000 (16:16 +0000)]
KINFO library cleanups:
(a) stop including <sys/param.h> from kinfo_pcpu.h and kinfo.h
(b) remove useless include guards
(c) use _DIAGASSERT for enforcing interface requirements
(d) substitute use of relloc(3) with reallocf(3) to guard from
memory leaks.
Requested-by: Joerg Sonnenberger <joerg@britannica.bec.de>
Joerg Sonnenberger [Wed, 27 Apr 2005 15:24:43 +0000 (15:24 +0000)]
Include string.h, use strlcpy.
Joerg Sonnenberger [Wed, 27 Apr 2005 15:21:31 +0000 (15:21 +0000)]
When bitwise iterating over in_addr_t, use it for the loop variable too.
Hiten Pandya [Wed, 27 Apr 2005 15:13:35 +0000 (15:13 +0000)]
Adapt the KINFO library to aggregate per-cpu cputime statistics.
(a) add a framework for aggregating per-cpu structures, of variant
field types; this interface will undergo change once it is
formalised upon, kinfo_pcpu.[ch].
(b) minor style(9) cleanups while I am around these ends.
(c) adjust libkcore, this might not be fully correct but it fetches
the right symbol at the least, it is not so easy to collect
per-cpu statistics from core files without doing magic with the
CPU privatespace like how we do in GDB debug scripts.
(d) kinfo_get_sched_cputime(3) is fetching aggregate statistics to
retain behavior, most programs do not care about per-cpu stats
without getting really mucky anyway; (discussed with joerg)
Hiten Pandya [Wed, 27 Apr 2005 14:31:19 +0000 (14:31 +0000)]
Change CPU time statistics (cputime) to be accounted on a per-CPU basis.
(a) remove struct cp_time, it was redundant since kinfo_cputime has
been introduced; kinfo_get_sched_cputime(3) function makes use
of the latter struct.
(b) change global definition from cp_time into cpu_time, it's now a
#define that hides the ugliness of percpu array indexing.
(c) minor style(9) cleanups in nearby code.
Reviewed-by/discussed-with: Matthew Dillon <dillon@backplane.com>
Joerg Sonnenberger [Wed, 27 Apr 2005 12:44:29 +0000 (12:44 +0000)]
Fix warnings, use strlcpy instead of strcpy + manual check.
Joerg Sonnenberger [Wed, 27 Apr 2005 12:42:12 +0000 (12:42 +0000)]
Use size_t for the number of elements, use sysctlbyname instead of
hardwired OIDs.
Joerg Sonnenberger [Wed, 27 Apr 2005 12:37:43 +0000 (12:37 +0000)]
Fix warnings.
Joerg Sonnenberger [Wed, 27 Apr 2005 12:36:31 +0000 (12:36 +0000)]
ANSIfy, use strlcpy from strncpy, fix most warnings.
Joerg Sonnenberger [Wed, 27 Apr 2005 12:26:59 +0000 (12:26 +0000)]
Use size_t for length, not int.
Joerg Sonnenberger [Wed, 27 Apr 2005 12:10:24 +0000 (12:10 +0000)]
Fix warnings.
Joerg Sonnenberger [Wed, 27 Apr 2005 11:59:11 +0000 (11:59 +0000)]
Remove dllockinit.
Joerg Sonnenberger [Wed, 27 Apr 2005 11:57:57 +0000 (11:57 +0000)]
Remove dllockinit, it's been deprecated and is a NOP anyway.
Fix warnings.
Joerg Sonnenberger [Wed, 27 Apr 2005 11:50:50 +0000 (11:50 +0000)]
Always use strlcpy, in the last case of possible truncation also check
the return value and return NULL if necesary.
Joerg Sonnenberger [Wed, 27 Apr 2005 11:37:50 +0000 (11:37 +0000)]
ANSIfy, fix warnings.
Joerg Sonnenberger [Wed, 27 Apr 2005 11:26:18 +0000 (11:26 +0000)]
Mark name as const char *, not char *.
Matthew Dillon [Wed, 27 Apr 2005 00:59:51 +0000 (00:59 +0000)]
Clean up the manual page, correct spelling, add additional information.
Matthew Dillon [Wed, 27 Apr 2005 00:42:13 +0000 (00:42 +0000)]
Add a manual page, clean up the options display, and link dntpd into the
build.
Matthew Dillon [Tue, 26 Apr 2005 23:50:23 +0000 (23:50 +0000)]
Implement -s/-S (do quick course adjustment on startup).
Matthew Dillon [Tue, 26 Apr 2005 22:35:32 +0000 (22:35 +0000)]
Correct a bug in the last two commits. The time_second global was not
being properly updated after the re-org, causing various weirdness to occur
in the system (such as ARP not retrying after a failure).
Sascha Wildner [Tue, 26 Apr 2005 21:23:50 +0000 (21:23 +0000)]
Remove unused clear() function from the console renderer interface.
Joerg Sonnenberger [Tue, 26 Apr 2005 18:53:17 +0000 (18:53 +0000)]
const correctness
Joerg Sonnenberger [Tue, 26 Apr 2005 18:51:44 +0000 (18:51 +0000)]
const / sign correctnes
Joerg Sonnenberger [Tue, 26 Apr 2005 17:56:43 +0000 (17:56 +0000)]
Remove unionfs hack. DTF_NODUP is now a NOP.
Go-on: dillon
Simon Schubert [Tue, 26 Apr 2005 16:59:59 +0000 (16:59 +0000)]
Fix ICMP problems in rc.firewall:
When your trusted_net, like in the default config, was a net that
is not routed then even the allowed ICMP types were dropped.
Install rc.firewall mode +x.
Submitted-by: Andreas Hauser <andy@splashground.de>
Joerg Sonnenberger [Tue, 26 Apr 2005 16:59:56 +0000 (16:59 +0000)]
Remove dead code. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 16:58:23 +0000 (16:58 +0000)]
Correct types for devname[_r].
Joerg Sonnenberger [Tue, 26 Apr 2005 15:57:39 +0000 (15:57 +0000)]
ANSIfy, no (void) before functions, include stdlib.h for prototype.
Joerg Sonnenberger [Tue, 26 Apr 2005 15:54:03 +0000 (15:54 +0000)]
It's dead, Jim.
Stopping faking DES, it doesn't make the world better.
Joerg Sonnenberger [Tue, 26 Apr 2005 15:04:59 +0000 (15:04 +0000)]
Remove useless void * before free. Remove local prototype of
_reclaim_telldir. No need to include sys/types.h.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:27:13 +0000 (14:27 +0000)]
Always use strlcpy, in the last case also check the return value to
detect truncation.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:21:22 +0000 (14:21 +0000)]
Fix warning.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:13:50 +0000 (14:13 +0000)]
Explicitly initialize e. The code flow looks safe, but having
two interwoven goto flows mixed makes it a bit hard to be sure.
Joerg Sonnenberger [Tue, 26 Apr 2005 14:03:57 +0000 (14:03 +0000)]
Work around restrict.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:41:57 +0000 (10:41 +0000)]
Correct and improve __diagassert.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:26:41 +0000 (10:26 +0000)]
Fix warnings. Use sysctlbyname.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:25:55 +0000 (10:25 +0000)]
Add prototype for __creat.
Max Okumoto [Tue, 26 Apr 2005 10:22:28 +0000 (10:22 +0000)]
Create ProcWait(), like ProcExec() this is a wraper for wait().
Max Okumoto [Tue, 26 Apr 2005 10:22:09 +0000 (10:22 +0000)]
Set close-on-exec on output side of pipe.
Max Okumoto [Tue, 26 Apr 2005 10:21:48 +0000 (10:21 +0000)]
inline shellneed()
Max Okumoto [Tue, 26 Apr 2005 10:21:24 +0000 (10:21 +0000)]
Allocate space for arguments, and free them after vfork().
Max Okumoto [Tue, 26 Apr 2005 10:20:39 +0000 (10:20 +0000)]
Move initilization of ProcStuff before vfork().
Max Okumoto [Tue, 26 Apr 2005 10:20:20 +0000 (10:20 +0000)]
Pass argv using ProcStuff.
Max Okumoto [Tue, 26 Apr 2005 10:19:55 +0000 (10:19 +0000)]
Doc struct ProStuff fields.
Max Okumoto [Tue, 26 Apr 2005 10:19:07 +0000 (10:19 +0000)]
Move redirection of stderr into ProcExec().
Joerg Sonnenberger [Tue, 26 Apr 2005 10:16:16 +0000 (10:16 +0000)]
Change arc4random_addrandom to pass the more natural uint8_t * and
size_t as arguments. ANSIfy.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:08:41 +0000 (10:08 +0000)]
Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 10:05:08 +0000 (10:05 +0000)]
Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 09:42:56 +0000 (09:42 +0000)]
Really include patches, don't let them catch dust.
Noticed-by: Mitja Horvat <Mitja.Horvat@klub-ksok.si>
Joerg Sonnenberger [Tue, 26 Apr 2005 09:40:58 +0000 (09:40 +0000)]
Fix warnings. Use sysctlbyname.
Joerg Sonnenberger [Tue, 26 Apr 2005 09:26:07 +0000 (09:26 +0000)]
Include guard.
Joerg Sonnenberger [Tue, 26 Apr 2005 09:08:38 +0000 (09:08 +0000)]
Include sys/types.h to get uid_t and gid_t.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:54:59 +0000 (08:54 +0000)]
Ensure that the directory fits into memory. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:48:19 +0000 (08:48 +0000)]
ANSIfy. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:46:54 +0000 (08:46 +0000)]
Use namespace mangler.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:45:19 +0000 (08:45 +0000)]
use uid_t / gid_t for prototype in stdlib.h, ANSIfy.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:41:44 +0000 (08:41 +0000)]
Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:37:24 +0000 (08:37 +0000)]
vfork can clobber the local stack frame, use fork(). We might also
want to remove the support for '+'. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:29:52 +0000 (08:29 +0000)]
Fix warning.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:27:44 +0000 (08:27 +0000)]
Fix warnings, ANSIfy.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:21:34 +0000 (08:21 +0000)]
ANSIfy. Fix warnings.
Joerg Sonnenberger [Tue, 26 Apr 2005 08:07:58 +0000 (08:07 +0000)]
Fix warnings. Sprinkle const. Use size_t in some places.
Matthew Dillon [Tue, 26 Apr 2005 07:01:43 +0000 (07:01 +0000)]
Do not try to collect offset data if a prior offset correction is still
in progress. Since we do not compensate for the prior offset correction,
any corrections based on data accumulated while the prior correction is
active will overshoot or undershoot.
Offset calculations are based on compensated real time rather then
uncompensated real time, which is why this is a problem. Frequency
corrections are based on uncompensated real time and do not have any
similar issue. It would be even better, but more difficult, to adapt
the offset correction code to use uncompensated real time and then take
the compensation into account, but this is a considerably more complex
equation to get right.
There is still another problem and that is the offset error will continue
to build when the frequency is not corrected, potentially resulting in a
longer sync-up time. On the positive side, the offset correction is based
on a standard deviation that only requires a minimum of 4 samples.
Correct a minor compiler warning.
YONETANI Tomokazu [Tue, 26 Apr 2005 06:30:52 +0000 (06:30 +0000)]
yp_maplist is one of those undocumented functions, resurrect and prototype it.
Taken-from: FreeBSD include/rpcsvc/ypclnt.h,1.15
Joerg Sonnenberger [Tue, 26 Apr 2005 06:16:29 +0000 (06:16 +0000)]
Fix warnings, remove unused headers. Remove additional { }.
Joerg Sonnenberger [Tue, 26 Apr 2005 06:08:42 +0000 (06:08 +0000)]
Remove more __NETBSD_SYSCALLS.
Joerg Sonnenberger [Tue, 26 Apr 2005 06:04:56 +0000 (06:04 +0000)]
Remove compat junk, __getcwd always exists on DragonFly.