Commit Graph

66194 Commits

Author SHA1 Message Date
Matthew Dillon
59ea846905 promote tv_sec in printf to make it type agnostic 2001-10-29 02:17:41 +00:00
Marcel Moolenaar
229778f87e o Do not parse the MADT as a side-effect in AcpiOsGetRootPointer,
do it as a side-effect of probing for MP hardware. This allows
   us to scan for local SAPICs early (especially before MBUF
   initialization).
o  Fix the Local SAPIC structure so that matches the Local SAPIC
   table entry. Now that the Local SAPIC info is the same as the
   Local APIC info, stop dumping the Local APIC entries.
o  For every Local SAPIC entry in the MADT that's not disabled,
   let the SMP code know about it. They represent actual CPUs.
o  Register the OS_BOOT_RENDEZ entry point and provide a (bogus)
   implementation for the entry point.
o  Provide a mapping for internal IPI numbers to ExtINT vectors.
o  In a MP system, announce the CPUs and start them by sending
   IPI_AP_WAKEUP to each of them. Not that it makes a difference
   at this time :-)
o  Miscellaneous style fixes and other adjustments.
2001-10-29 02:16:02 +00:00
Matthew Dillon
434d21ccbf Make ttyprintf() of tv_sec value type agnostic. 2001-10-29 01:23:28 +00:00
Matthew Dillon
f4481658ec cast dev_t to int in printf to fix warning. 2001-10-29 01:22:15 +00:00
Marcel Moolenaar
997313be99 Set RB_MULTIPLE (multiple console support) if the kernel is booted
with the -D flag.
2001-10-29 01:11:40 +00:00
Matthew Dillon
5e8a6141be Fix ctime(&int) due to change to lastlog->ll_time 2001-10-29 00:40:05 +00:00
Josef Karthauser
a87d240115 Remove training white spaces, and some other style violations. 2001-10-29 00:37:24 +00:00
Matthew Dillon
2064ef1c81 localtime() was being called with an int-pointer due to recent utmp
fixes.
2001-10-29 00:36:01 +00:00
Matthew Dillon
5fb4dbe1a0 localtime() was being called on an int pointer (due to recent
utmp-related commits).  fixed.
2001-10-29 00:34:20 +00:00
Matthew Dillon
54109b3e31 Fix long format mismatch with int arg 2001-10-29 00:32:58 +00:00
Andrey A. Chernov
e9c044bd9e 1) In devclass_alloc_unit(), skip duplicated wired devices (i.e. with fixed
number) instead of allocating next free unit for them.  If someone needs
fixed place, he must specify it correctly. "Allocating next" is especially bad
because leads to double device detection and to "repeat make_dev panic" as
result.  This can happens if the same devices present somewhere on PCI bus,
hints and  ACPI.  Making them present in one place only not always
possible, "sc" f.e.  can't be removed from hints, it results to no console at
all.

2) In make_device(), detect when devclass_add_device() fails, free dev and
return. I.e. add missing error checking. This part needed to finish fix in 1),
but must be done this way in anycase, with old variant too.
2001-10-28 23:32:35 +00:00
Robert Watson
0cd9461353 o Restore previous inconsistent style to login_fbtab.c, following its
modification to add glob support.  The submitted patch used a degraded
  form of KNF.

Reviewed by:	bde
2001-10-28 22:54:16 +00:00
Matthew Dillon
0e9fe2127c Adjust printfs to be time_t agnostic. 2001-10-28 22:53:45 +00:00
Matthew Dillon
1482b97ae3 Do not assume that sizeof(tv_sec) is sizeof(time_t) - it will be, but
it isn't yet because our tv_sec is currently a long (so 64 bit architectures
are already broken to a degree).
2001-10-28 20:53:17 +00:00
Matthew Dillon
aa3e4732e7 Fix int vs time_t, convert int to time_t 2001-10-28 20:40:58 +00:00
Matthew Dillon
d4474241c6 Convert time_t to/from 32 bit representations for transmission over
a network and storage.
2001-10-28 20:33:07 +00:00
Matthew Dillon
46ca39e2ba Fix time_t == int assumption, convert protocol int to time_t. 2001-10-28 20:26:54 +00:00
Matthew Dillon
91d37f1692 Fix time_t == int assumption, properly convert protocol int to time_t. 2001-10-28 20:24:51 +00:00
Matthew Dillon
9ef76b94a7 Properly convert long to time_t 2001-10-28 20:19:14 +00:00
Matthew Dillon
e8627df69d Add time_to_int(), int_to_time(), time_to_long(), long_to_time(). 2001-10-28 20:13:16 +00:00
Matthew Dillon
5b3817c60b Make the protocol/dumprestore.h header match restore's idea of the dump
header for the case where sizeof(time_t) != sizeof(int).  dumprestore.h
was embedding time_t when it should have been embedding int32_t.

Use time_to_time32() and time32_to_time() to convert between the
protocoll/file-format time and time_t.
2001-10-28 20:01:38 +00:00
Matthew Dillon
237c4e3a9e Add routines to convert time_t to/from fixed-bit fields. These routines
serve two purposes: (1) so we can maintain backwards compatibility with
protocols (rwhod, dump, etc...) that either assume time_t is 32 bits or
assume sizeof(time_t) == sizeof(int), or make other similar assumptions.
(2) To tag such routines (by the presence of these calls) for future
cleanup/extension work.

The 32->64 routine, time32_to_time() (when time_t is 64 bits, that is),
is defined specifically to implement temporal locality to properly set the
msb bits of a 64 bit time_t quantity, using the 50 year rule.  The locality
code has not been implemented yet (and doesn't need to be for a while),
but that is the intent.   This will allow us to maintain backwards protocol
compatibility past 2038.

These routines are intended to be platform and time_t agnostic.

MFC after:	1 week
2001-10-28 19:54:49 +00:00
Jens Schweikhardt
7916863d82 Make this compile cleanly when warnings are enabled:
- ANSIfy function declarations
 - braces around initializers structs within structs
 - add parens in complicated expressions
 - disambiguate dangling elses
 - no more implicit int
 - make functions static where possible
 - use prototypes
 - don't use varargs hack for diag()

Requested by: joerg
MFC after:	2 weeks
2001-10-28 18:35:32 +00:00
Nick Hibma
76c83512ef Typo. 2001-10-28 16:47:06 +00:00
Nick Hibma
e2fb2db567 Add a Xref to dumpon. 2001-10-28 16:41:56 +00:00
John Baldwin
5a994091e0 Revert the reindentation of struct task's definition from rev 1.4.
Requested by:	bde
2001-10-28 16:19:34 +00:00
John Baldwin
9869fa1db8 - More whitespace and comment cleanups.
- Remove unused sw1a label.  A breakpoint can be set in choosethread() for
  the same effect.

Reviewed by:	bde
Submitted by:	bde (partly)
2001-10-28 16:18:22 +00:00
Jeroen Ruigrok van der Werven
03b7b65a08 Explain that /var/log/all.log needs to be touched and chmod'd 'ere it
can be used.

PR:		17022
Submitted by:	Niels Christian Bank-Pedersen <ncbp@bank-pedersen.dk>
MFC after:	1 week
2001-10-28 13:41:30 +00:00
Jeroen Ruigrok van der Werven
096830fe4e Correct attribution.
PR:		30500
Submitted by:	Drew Derbyshire <ahd@kew.org>
2001-10-28 13:23:39 +00:00
Poul-Henning Kamp
4e13006747 Fix a problem in the disk related hack where device nodes for a physically
non-existent disk in a legacy /dev on a DEVFS system would panic the system
if stat(2)'ed.

Do not whine about anonymous device nodes not having a si_devsw, they're
not supposed to.
2001-10-28 09:39:28 +00:00
Michael Reifenberger
491dec936c Introduce [IPC|SHM]_[INFO|STAT] to shmctl to make
`/compat/linux/usr/bin/ipcs -m` happy.
2001-10-28 09:29:10 +00:00
Matthew Dillon
788bbd2d61 deltat declared time_t, msg("") call used %d (assumed time_t == int).
Changed deltat to be an int (result of delta time calculation).

MFC after:	1 day
2001-10-28 06:13:47 +00:00
Yoshihiro Takahashi
8816d1d500 fixed to support pc98 2001-10-28 04:39:02 +00:00
Yoshihiro Takahashi
f4d25d1d62 Remove duplicate apm entry for pc98 2001-10-28 04:34:24 +00:00
Yoshihiro Takahashi
32e2324497 Removed pmc_isa_identify function. It is not needed.
Submitted by:	takawata
2001-10-28 04:16:50 +00:00
Matthew Dillon
dbd9746f71 Use a quad int conversion routine for time_t instead of ulong, capable of
decoding tar's full time buffer (12 digits).
2001-10-28 02:51:43 +00:00
Matthew Dillon
2ad45bbe3d Various string fields for certain cpio types are 11 rather then 8
characters.  Use quad conversion functions rather then long conversion
where appropriate to handle the available range.  Mainly fixes time_t
but there was also a st_size ulong conversion in there that has to be
quad or cpio cannot be used to copy files > 2G.

MFC after:	1 day
2001-10-28 02:45:04 +00:00
Matthew Dillon
6e63a1049a Remove unnecessary casts in timeval.tv_sec load from st_*time 2001-10-28 02:42:26 +00:00
Matthew Dillon
cd9c425794 Remove assumption that time_t is an int
MFC after:	1 day
2001-10-28 02:28:04 +00:00
Josef Karthauser
6e97e2e10f Remove some extraneous spaces from the usage message. 2001-10-28 02:10:40 +00:00
David E. O'Brien
db5eede7cc sparc64 verions of the crt initialization and finalization files required
by the ELF ABI.
2001-10-28 00:20:34 +00:00
Matthew Dillon
484a709abe Add missing cast for improper time_t use in computation. 2001-10-28 00:01:58 +00:00
Peter Wemm
8fcfcd18dd ll_time and ut_time are int32_t on disk and have to remain that way
unless we dont want to run 4.x binaries any more.
2001-10-27 20:40:54 +00:00
Matthew Dillon
1fc36ee6d4 sc_lasttime and sc_starttime are time_t's, not long's. 2001-10-27 20:31:24 +00:00
Mike Barcroft
cb5f460523 Only provide function information in compile environments that support
the C99 variable __func__ and never for C++.  Provide a more meaningful
example in the assert(3) manual.

Reviewed by:	asmodai, bde
2001-10-27 20:11:10 +00:00
Matthew Dillon
4ffa210b94 syncdelay, filedelay, dirdelay, metadelay are ints, not time_t's,
and can also be made static.
2001-10-27 19:58:56 +00:00
Mike Barcroft
c44a27673c Restore K&R prototype. Fix other style bugs.
Reviewed by:	asmodai, bde
2001-10-27 19:37:20 +00:00
Poul-Henning Kamp
4e4a76633b Nudge the axe a bit closer to cdevsw[]:
Make it a panic to repeat make_dev() or destroy_dev(), this check
   should maybe be neutered when -current goes -stable.

   Whine if devsw() is called on anon dev_t's in a devfs system.

   Make a hack to avoid our lazy-eval disk code triggering the above whine.

   Fix the multiple make_dev() in disk code by making ${disk}${unit}s${slice}
   an alias/symlink to ${disk}${unit}s${slice}c
2001-10-27 17:44:21 +00:00
Mark Murray
6fdd5473af Diff-reduce these two.
Really, one of them needs to disappear. I'll figure out which
later.

Reported by:	bde
2001-10-27 12:49:19 +00:00
Dag-Erling Smørgrav
a08d68de5b Eliminate the prefix parameter to linux_emul_find(), which was always
linux_emul_path anyway.  Linux_emul_find() has interesting bugs in its
prefix handling (which luckily are not currently exploitable); this
commit is preliminary to an attempt at cleaning it up.

Approved by:	marcel
2001-10-27 11:15:19 +00:00