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.
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
- 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
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.
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
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
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
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