<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libutil/libutil.h, branch releng/14.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F14.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2023-08-16T17:54:16Z</updated>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:16Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b3e7694832e81d7a904a10f525f8797b753bf0d3'/>
<id>urn:sha1:b3e7694832e81d7a904a10f525f8797b753bf0d3</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
</entry>
<entry>
<title>cpuset(3): Move cpuset's parselist function into libutil</title>
<updated>2023-06-01T21:16:01Z</updated>
<author>
<name>Baptiste Daroussin</name>
<email>bapt@FreeBSD.org</email>
</author>
<published>2023-06-01T21:16:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=04eeb364d439bec0931f7e73627f59a88bb474f3'/>
<id>urn:sha1:04eeb364d439bec0931f7e73627f59a88bb474f3</id>
<content type='text'>
In order to allow to add cpuset(2) functionality to more utilities than just
 cpuset(1) move the parselist code into libutil

While here, make the code a little more "library" friendly, by returning a range
of various errors so that the consumer can check for them and report appropriate
error message to the users

(One of the planed usage is the jail(8) utility)

Reviewed by:	jilles
Differential Revision:	https://reviews.freebsd.org/D12873
</content>
</entry>
<entry>
<title>pidfile: add pidfile_signal</title>
<updated>2022-04-09T15:59:43Z</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2022-03-11T11:01:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=287451fd019299b138bab2ee99cdf0f3be495439'/>
<id>urn:sha1:287451fd019299b138bab2ee99cdf0f3be495439</id>
<content type='text'>
Differential Revision:	https://reviews.freebsd.org/D34681
</content>
</entry>
<entry>
<title>libutil: add kinfo_getswapvmobject(3)</title>
<updated>2021-10-26T12:50:29Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2021-10-26T08:40:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f2069331e5821f4c2b65d82af2809946a34158d2'/>
<id>urn:sha1:f2069331e5821f4c2b65d82af2809946a34158d2</id>
<content type='text'>
which is the wrapper around the vm.swap_objects sysctl, same as
kinfo_getvmobject(3) wraps vm.objects.

Submitted by:	Yoshihiro Ota
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D29754
</content>
</entry>
<entry>
<title>Add function getlocalbase() to libutil.</title>
<updated>2020-11-18T19:44:30Z</updated>
<author>
<name>Stefan Eßer</name>
<email>se@FreeBSD.org</email>
</author>
<published>2020-11-18T19:44:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=30d21d279537e46629a697908d2d207c06bc310e'/>
<id>urn:sha1:30d21d279537e46629a697908d2d207c06bc310e</id>
<content type='text'>
This function returns the path to the local software base directory, by
default "/usr/local" (or the value of _PATH_LOCALBASE in include/paths.h
when building the world).

The value returned can be overridden by 2 methods:

- the LOCALBASE environment variable (ignored by SUID programs)
- else a non-default user.localbase sysctl value

Reviewed by:	hps (earlier version)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D27236
</content>
</entry>
<entry>
<title>Revert the whole getlocalbase() set of changes while a different design is</title>
<updated>2020-11-15T20:24:59Z</updated>
<author>
<name>Scott Long</name>
<email>scottl@FreeBSD.org</email>
</author>
<published>2020-11-15T20:24:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8e1031086d40b9bd3fa255d92cc45573e3afed16'/>
<id>urn:sha1:8e1031086d40b9bd3fa255d92cc45573e3afed16</id>
<content type='text'>
hashed out.
</content>
</entry>
<entry>
<title>Fix a problem with r367686 related to the use of ssize_t.  Not sure how this</title>
<updated>2020-11-14T19:04:36Z</updated>
<author>
<name>Scott Long</name>
<email>scottl@FreeBSD.org</email>
</author>
<published>2020-11-14T19:04:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bcf9ae275153c1013b88e1332446474242607a80'/>
<id>urn:sha1:bcf9ae275153c1013b88e1332446474242607a80</id>
<content type='text'>
escaped prior testing, but it should be better now.

Reported by:	lots
</content>
</entry>
<entry>
<title>Add the library function getlocalbase and its manual page.  This helps to</title>
<updated>2020-11-14T17:57:50Z</updated>
<author>
<name>Scott Long</name>
<email>scottl@FreeBSD.org</email>
</author>
<published>2020-11-14T17:57:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=98b76d2227cb9b951cc6f006e2c78f243344f1bc'/>
<id>urn:sha1:98b76d2227cb9b951cc6f006e2c78f243344f1bc</id>
<content type='text'>
unify the retrieval of the various ways that the local software base directory,
typically "/usr/local", is expressed in the system.

Reviewed by:	se
Differential Revision:	https://reviews.freebsd.org/D27022
</content>
</entry>
<entry>
<title>Make pw_scan(3) more compatible with getpwent(3) et. al. when processing</title>
<updated>2018-07-26T18:34:38Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2018-07-26T18:34:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=34e9190d82ac021bae00937cc1a663920aa19309'/>
<id>urn:sha1:34e9190d82ac021bae00937cc1a663920aa19309</id>
<content type='text'>
data from /etc/passwd rather than /etc/master.passwd.

The libc getpwent(3) and related functions automatically read master.passwd
when run by root, or passwd when run by a non-root user.  When run by non-
root, getpwent() copes with the missing data by setting the corresponding
fields in the passwd struct to known values (zeroes for numbers, or a
pointer to an empty string for literals).  When libutil's pw_scan(3) was
used to parse a line without the root-accessible data, it was leaving
garbage in the corresponding fields.

These changes rename the static pw_init() function used by getpwent() and
friends to __pw_initpwd(), and move it into pw_scan.c so that common init
code can be shared between libc and libutil.  pw_scan(3) now calls
__pw_initpwd() before __pw_scan(), just like the getpwent() family does, so
that reading an arbitrary passwd file in either format and parsing it with
pw_scan(3) returns the same results as getpwent(3) would.

This also adds a new pw_initpwd(3) function to libutil, so that code which
creates passwd structs from scratch in some manner that doesn't involve
pw_scan() can initialize the struct to the values expected by lots of
existing code, which doesn't expect to encounter NULL pointers or garbage
values in some fields.
</content>
</entry>
<entry>
<title>lib: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-26T02:00:33Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-26T02:00:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5e53a4f90f82c4345f277dd87cc9292f26e04a29'/>
<id>urn:sha1:5e53a4f90f82c4345f277dd87cc9292f26e04a29</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
</entry>
</feed>
