Commit graph

66226 commits

Author SHA1 Message Date
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
Dag-Erling Smørgrav 9ca45e813c Add a P_INEXEC flag that indicates that the process has called execve() and
it has not yet returned.  Use this flag to deny debugging requests while
the process is execve()ing, and close once and for all any race conditions
that might occur between execve() and various debugging interfaces.

Reviewed by:	jhb, rwatson
2001-10-27 11:11:25 +00:00
Peter Wemm c91cd68318 Add missing crti.S and crtn.S files. I have tested these with -static
linking only.  They may require some gp relative tweaks for dynamic use.
2001-10-27 10:10:45 +00:00
David E. O'Brien 60ed6ae069 Sync with other platforms. 2001-10-27 08:32:07 +00:00
David E. O'Brien 41513796e8 minor style updating 2001-10-27 08:30:36 +00:00
David E. O'Brien 255cdd9376 Update for reality and syncing with other FreeBSD platforms. 2001-10-27 08:29:03 +00:00
David E. O'Brien 9ac8182513 Feh, it helps to include a file other than yourself... wonder how
GCC cpp liked that.

Properly include the branding info.
2001-10-27 08:25:32 +00:00
David E. O'Brien 7561b6ddef Tell how the import was done. 2001-10-27 08:11:44 +00:00
David E. O'Brien 62179fa259 This commit was generated by cvs2svn to compensate for changes in r85587,
which included commits to RCS files with non-trunk default branches.
2001-10-27 08:07:37 +00:00
David E. O'Brien 2a55deb138 Import the One True AWK, in the form of bwk's AWK Nov 15, 2000 release. 2001-10-27 08:07:37 +00:00
Jake Burkholder 06c4f91f00 Implement elf_reloc. This makes klds work.
Obtained from:	netbsd
2001-10-27 07:09:40 +00:00
Jake Burkholder e754f9c7ef Handle instruction access mmu miss faults in kernel mode. These can only
be generated by non-preloaded klds.
2001-10-27 07:06:15 +00:00
Robert Watson 3f755714ce o Modify copyright date format for improved consistency: use '-' for
year ranges, rather than a comma-delimited list of years.
2001-10-27 05:47:47 +00:00
Robert Watson 48be932ac0 o Update copyright dates.
Obtained from:	TrustedBSD Project
2001-10-27 05:46:43 +00:00
Robert Watson fdba6d3a1e o Improve style(9) compliance following KSE modifications. In particular,
strip the space from '( struct thread *...', wrap long lines.
o Remove an unneeded comment on the topic of no lock being required as
  part of the NDINIT() in __acl_get_file(), as it's really not required
  there.

Obtained from:	TrustedBSD Project
2001-10-27 05:45:42 +00:00
Robert Watson b6e0472987 o Althought this is not specified in POSIX.1e, the UFS ACL implementation
coerces the deletion of a default ACL on a directory when no default
  ACL EA is present to success.  Because the UFS EA implementation doesn't
  disinguish the EA failure modes "that EA name has not been
  administratively enabled" from "that EA name has no defined data",
  there's a potential conflict in error return values.  Normally, the
  lack of administratively configured EA support is coerced to
  EOPNOTSUPP to indicate that ACLs are not available; in this case,
  it is possible to get a successful return, even if ACLs are not
  available because EA support for them has not been enabled.

  Expand the comment in ufs_setacl() to identify this case.

Obtained from:	TrustedBSD Project
2001-10-27 05:39:17 +00:00
Robert Watson ac8b3dd7dc o Clarify a comment about the locking condition of the vnode upon exit
from ufs_extattr_enable_with_open().
o Print auto-start notifications if (bootverbose).  This was previously
  commented out since it didn't know how to check for bootverbose.
o Drop in comments throughout indicating where ENOENT should be replaced
  with ENOATTR once that is available.

Obtained from:	TrustedBSD Project
2001-10-27 05:19:14 +00:00
Robert Watson 29543004bd o The comment about ordering the destruction of the lock and the removal of
the flag indicating that the structure was initialized didn't need
  an XXX, since it didn't need fixing.

Obtained from:	TrustedBSD Project
2001-10-27 05:05:39 +00:00
Robert Watson 9444746795 o Wrap a number of long lines of code, many of which were introduced
due to KSE-related (p) expansions.

Obtained from:	TrustedBSD Project
2001-10-27 05:03:05 +00:00