Commit Graph

541 Commits

Author SHA1 Message Date
wiz cd42b3989a Fix typo. Sort errors. 2016-06-07 11:20:45 +00:00
christos 395941f2ce PR/51216: Instead of trying to open files in the current working
directory first for paths that don't contain "/", first try the
/dev paths to avoid confusion with files in the working directory
that happen to match disk names.
2016-06-06 17:50:19 +00:00
christos f32209ed0d Use NULL instead of 0. 2016-06-01 22:58:52 +00:00
kre 3060c9b9b9 Make relative date changes ("+ 2 months") etc, work a little more sanely.
OK christos@
2016-05-03 18:14:54 +00:00
roy 67f77b27fc Removed botched debug left over. 2016-04-12 20:40:43 +00:00
roy 4b95ed965b Fix pidfile location path rules to match prior version. 2016-04-12 20:36:35 +00:00
wiz 16a8980036 Add serial commas. Fix minus. Sort SEE ALSO. Fix xref. 2016-04-11 08:49:57 +00:00
roy aae35f25ba Bump libutil for new pidfile functions. 2016-04-11 08:44:40 +00:00
roy 6b9006e83c Implement pidfile_lock, pidfile_read and pidfile_clean.
Discussed on tech-net@, ok core@.
2016-04-10 19:05:50 +00:00
christos ee5f11c12c pretty-print link addresses. 2016-04-06 18:04:58 +00:00
christos e447d67050 prefer <sys/cpu.h> instead of <machine/cpu.h> 2016-01-25 18:14:04 +00:00
wiz 48a57620e7 unsigned -> unsigned int 2016-01-23 07:21:18 +00:00
dholland 65f8003146 Update synopses to match u_int/u_long/etc. changes. Do not bump date as
it's not a substantive change.
2016-01-23 00:43:42 +00:00
dholland 4f3e8539c0 When computing relative months, use mktime() directly and don't call
our Convert(). And check it for failure. This fixes three sets of
problems:

  (1) depending on the passed-in value of Timezone it might
      disassemble the time in one timezone and reassemble it in
      another, causing mysterious offsets of a few hours;

  (2) with the previous set of changes to this file, Convert() fails
      if it ends up normalizing a date, so e.g. going three months
      forward from March 31 would fail;

  (3) previously if Convert() failed we passed -1 on to DSTcorrect(),
      which made a mess.

PR 50574.
2015-12-31 10:52:06 +00:00
dholland 2213a9c409 Always use localtime_r; I don't think any of this code is tripping
itself up, but it's still good practice for library functions to not
trash static libc state. Might be relevant to PR 50574.
2015-12-31 10:31:07 +00:00
dholland 4c7b8eec63 Reformat grammar part according to my standards for yacc grammars. 2015-12-31 09:12:57 +00:00
wiz f36df50d9f Markup improvements. 2015-12-10 21:32:35 +00:00
christos a40b6ba18c more changes I forgot to commit 2015-12-08 12:51:21 +00:00
christos 5fd02f85b5 preserve a copy of the tm so we can check later. 2015-12-08 12:51:04 +00:00
christos 5e2a9cf1aa - Add support for "midnight" "noon", dawn etc.
- Add validation to date/time strings by checking that mktime did not change
  the fields of struct tm from the ones requested
- Allow the format "year monthname day".
From kre
2015-12-07 20:55:49 +00:00
christos 640422f86c Fix west australia offset, from kre 2015-12-06 14:43:59 +00:00
wiz a1d408828c Sort sections. Mark up NULL. End Bl with El. 2015-11-26 09:48:21 +00:00
christos 55be0c146d Fix documentation inconsistencies, and add some clarifications (from kre) 2015-11-26 01:00:54 +00:00
christos 51dbeaccf4 Patch from kre:
- fix missing/inconsistent abbreviations
- set dst only if we are using localtime.
- properly check for errors where there were missing checks
- handle errno properly including saving and restoring.
2015-11-26 01:00:02 +00:00
kamil ed6e96ca70 Correct typos in comments
Pointed out by Edgar Fuss and J. Lewis Muir.
2015-10-29 20:29:24 +00:00
christos c9b640c057 need uvm_param.h now. 2015-09-26 20:28:55 +00:00
christos 85dc0057a4 Hello lint. 2015-09-24 15:30:39 +00:00
christos 80a7733395 Add kinfo_getvmmap from FreeBSD 2015-09-24 14:39:20 +00:00
kamil 01f63c44fd Bump date for recent changes 2015-07-26 17:37:38 +00:00
kamil 28de1b8a34 Sync parameter name with efun.c
This change is non-functional.
2015-07-26 17:36:38 +00:00
kamil 382f8944d9 Bump shlib minor for new function: ereallocarr(3)
Noted by <mrg>
2015-07-26 15:15:31 +00:00
kamil 2cf5f6af2b Add ereallocarr(3) to libutil
ereallocarr(3) wraps reallocarr(3) and embeds return status validation.

Older version reviewed by <riastradh> and <christos>
2015-07-26 02:20:30 +00:00
kamil 3867e136be Clean-up resources (sys/sys/resource.h) usage
Add vmemoryuse to login_cap(3)
Document vmemoryuse in login.conf(5)
Document proc.pid.rlimit.vmemoryuse and proc.pid.rlimit.maxlwp in sysctl(7)
Document SBSIZE, AS, VMEM and NTHR in share/doc/psd/05.sysman/1.6.t

Reviewed by <riastradh>
Approved by <pgoyette>

Tested by Dominik Bialy

Closes PR xsrc/49912
2015-07-11 09:21:22 +00:00
dholland e3df6c4c29 grammar patrol 2015-06-13 19:52:58 +00:00
christos 95130e3a90 s/basename/bname/ 2015-01-22 19:04:28 +00:00
christos 0afe4227b1 - not all asprintfs return -1 *and* set buf = NULL, check explicitly.
- don't shadow basename(3)
2015-01-22 16:19:08 +00:00
christos 57b77f77cd add estro{i,u} (Kamil Rytarowski) 2015-01-18 18:09:36 +00:00
wiz 00e22b0153 Drop trailing whitespace. 2014-10-08 22:10:04 +00:00
apb 82cbb6b06d Improved handling of local times.
* A magic value USE_LOCAL_TIME (defined as 99999) may be passed as the
  Timezone to Convert(), instructing it to use mktime() to work
  in the local time zone, instead of using mktime_z to work in UTC
  (and then adding the specified timezone offset).
* Some old code is removed now that there's no need to find the local
  timezone offset.
* Allow either one or both of the now and zone arguments to
  parsedate() to be NULL, treating them independently.  Previously,
  if either one was NULL, the other was ignored.
* If the zone argument is specified, then the current date is calculated
  in the specified zone, not in local time.

Also add some disabled debug code.

This should fix PR lib/47916.
2014-10-08 17:38:28 +00:00
apb 8afaf3e03b The tzoff argument is in minutes (behind/west of UTC), not seconds.
While here, also say that time = NULL and tzoff = NULL are independent.
The code doesn't yet implement that, but it will soon.
2014-10-08 17:06:18 +00:00
apb bb7c1cf124 Add a new non-terminal "time_numericzone" for a time with
a numeric timezone.  Move some productions from "time" to "time_numericzone".
Increment yyHaveZone when encountering one of these.

Previously, input of the form "HH:MM:SS +ZZZZ" would not have set the
yyhaveZone flag.
2014-10-08 14:43:48 +00:00
apb 7ab26473da A time like HH:MM:SS.sss says nothing about whether DST is on or off. 2014-10-08 14:32:29 +00:00
apb ba5f5ce70d Document that years in ISO 8601 dates are taken literally.
"69-09-10" is in the year 69, not 2069.
2014-10-07 22:39:32 +00:00
apb a777540768 Some years don't need the "maybe add 1900 or 2000" adjustment
that was designed for handling two-digit abbreviated years.
For example, "1/2/70" still refers to the year 1970, as before,
but "70-01-02" now refers to the year 70.

* Add a new yyHaveFullYear member to struct dateinfo, to record whether
  or not the year needs to be adjusted.
* Code that parses years sets yyHaveFullYear=1 if they know that the
  year should not be adjusted (as is the case for ISO 8601 dates), or if
  they perform their own adjustment (as is the case for CVS timestamps).
* Move the year adjustment code into a new function, AdjustYear,
  instead of inline in Convert().
* Make Convert() assume the year doesn't need to be adjusted,
  and make Convert's callers first call AdjustYear() if appropriate.
2014-10-07 22:27:14 +00:00
christos c4dd2a8529 toolify opendisk 2014-09-29 21:04:52 +00:00
christos 7447c028c2 KNF, sign cast. 2014-09-17 23:54:42 +00:00
mlelstv d144aaa341 use the passed parameter instead of PATH_MAX. Change signedness
of nlen.
2014-09-12 11:38:23 +00:00
mlelstv 26dae55653 - use a private buffer to resolve symlinks, the previous code was broken
- factored out symlink handling
- handle relative symlinks now
- handle device paths that do not contain a '/'.
2014-09-12 07:59:36 +00:00
christos f8c3486fb6 fix param name 2014-08-18 07:33:21 +00:00
christos 8eb2e794a8 In COMPAT_DKWEDGE, attempt to open the label as specified in the NAME= entry.
This works for BSD disklabels, providing full compatibility. Merge some
duplicated code. This means that at least for BSD labels, we can handle
both pre and post- autodiscover kernels with the same fstab.
2014-05-25 13:46:07 +00:00