History log of /freebsd-14.2/lib/libutil/libutil.h (Results 1 – 25 of 94)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# b3e76948 16-Aug-2023 Warner Losh <[email protected]>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 04eeb364 01-Jun-2023 Baptiste Daroussin <[email protected]>

cpuset(3): Move cpuset's parselist function into libutil

In order to allow to add cpuset(2) functionality to more utilities than just
cpuset(1) move the parselist code into libutil

While here, mak

cpuset(3): Move cpuset's parselist function into libutil

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

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 287451fd 11-Mar-2022 Mateusz Guzik <[email protected]>

pidfile: add pidfile_signal

Differential Revision: https://reviews.freebsd.org/D34681


Revision tags: release/12.3.0
# f2069331 26-Oct-2021 Konstantin Belousov <[email protected]>

libutil: add kinfo_getswapvmobject(3)

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
Differenti

libutil: add kinfo_getswapvmobject(3)

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

show more ...


Revision tags: release/13.0.0
# 30d21d27 18-Nov-2020 Stefan Eßer <[email protected]>

Add function getlocalbase() to libutil.

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

Add function getlocalbase() to libutil.

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

show more ...


# 8e103108 15-Nov-2020 Scott Long <[email protected]>

Revert the whole getlocalbase() set of changes while a different design is
hashed out.


# bcf9ae27 14-Nov-2020 Scott Long <[email protected]>

Fix a problem with r367686 related to the use of ssize_t. Not sure how this
escaped prior testing, but it should be better now.

Reported by: lots


# 98b76d22 14-Nov-2020 Scott Long <[email protected]>

Add the library function getlocalbase and its manual page. This helps to
unify the retrieval of the various ways that the local software base directory,
typically "/usr/local", is expressed in the s

Add the library function getlocalbase and its manual page. This helps to
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

show more ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0
# 34e9190d 26-Jul-2018 Ian Lepore <[email protected]>

Make pw_scan(3) more compatible with getpwent(3) et. al. when processing
data from /etc/passwd rather than /etc/master.passwd.

The libc getpwent(3) and related functions automatically read master.pa

Make pw_scan(3) more compatible with getpwent(3) et. al. when processing
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.

show more ...


Revision tags: release/11.2.0
# 5e53a4f9 26-Nov-2017 Pedro F. Giffuni <[email protected]>

lib: further adoption of SPDX licensing ID tags.

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
pr

lib: further adoption of SPDX licensing ID tags.

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.

show more ...


Revision tags: release/10.4.0
# 73979478 04-Aug-2017 Mariusz Zaborski <[email protected]>

Introduce the flopenat(3) function.

Reviewed by: des, emaste
Differential Revision: https://reviews.freebsd.org/D11690


Revision tags: release/11.1.0, release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0
# c24c3080 04-Jun-2015 Baptiste Daroussin <[email protected]>

revert r283969,283970 not needed anymore after r283981


# 972cf03e 03-Jun-2015 Baptiste Daroussin <[email protected]>

Add a pw_mkdb2(3) function which does the same thing as pw_mkdb(3) except
it takes a new argument allowing to specify the endianness of the database
to generate

Differential Revision: https://review

Add a pw_mkdb2(3) function which does the same thing as pw_mkdb(3) except
it takes a new argument allowing to specify the endianness of the database
to generate

Differential Revision: https://reviews.freebsd.org/D2730
Reviewed by: ian

show more ...


# ff87ae35 27-May-2015 John Baldwin <[email protected]>

Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'. It can be used to determine which files are
using physical pages of memory and how much each is usi

Export a list of VM objects in the system via a sysctl. The list can be
examined via 'vmstat -o'. It can be used to determine which files are
using physical pages of memory and how much each is using.

Differential Revision: https://reviews.freebsd.org/D2277
Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: Norse Corp, Inc. (forward porting to HEAD/10)

show more ...


Revision tags: release/10.1.0, release/9.3.0, release/10.0.0, release/9.2.0, release/8.4.0
# 86e2f99d 07-Mar-2013 Diane Bruce <[email protected]>

Cleanup gr_add() so it does not leak mem
This is part of ongoing work on sbin/pw

M libutil.h
M gr_util.c

Approved by: theraven


# 2bfeb4fe 27-Dec-2012 Baptiste Daroussin <[email protected]>

- Clean up previous gr_add use malloc instead of calloc
- Fix tinderbox error

Submitted by: db


# be49c830 27-Dec-2012 Baptiste Daroussin <[email protected]>

New gr_add function to provide a clean and safe method to append a new member
into an existing group.

Submitted by: db


Revision tags: release/9.1.0, release/8.3.0_cvs, release/8.3.0
# 0e4b06c8 26-Jan-2012 Guy Helmer <[email protected]>

Consensus between bde and pjd seemed to be that if the function names
are lined up, then any * after a long type should appear after the
type instead of being in front of the function name on the fol

Consensus between bde and pjd seemed to be that if the function names
are lined up, then any * after a long type should appear after the
type instead of being in front of the function name on the following
line.

show more ...


# 56db7574 26-Jan-2012 Guy Helmer <[email protected]>

Make the comments consistent (capitalization, punctuation, and
format).

Requested by bde


# edd38b51 26-Jan-2012 Guy Helmer <[email protected]>

Restore the parenthesis that are necessary around the constant values.

Requested by bde.


# 34775f89 16-Jan-2012 Guy Helmer <[email protected]>

Fix more disorder in prototypes and constants.
Fix header comments for each section of constants.
Fix whitespace in #define lines.
Fix unnecessary parenthesis in constants.


# 47b3924b 12-Jan-2012 Guy Helmer <[email protected]>

Move struct pidfh definition into pidfile.c, and leave a forward declaration
for pidfh in libutil.h in its place.
This allows us to hide the contents of the pidfh structure, and also
allowed removal

Move struct pidfh definition into pidfile.c, and leave a forward declaration
for pidfh in libutil.h in its place.
This allows us to hide the contents of the pidfh structure, and also
allowed removal of the "#ifdef _SYS_PARAM_H" guard from around the
pidfile_* function prototypes.

Suggested by pjd.

show more ...


# 8afc5005 12-Jan-2012 Guy Helmer <[email protected]>

More prototype formatting fixes, struct member formatting fixes,
and namespace fix for property_find() prototype.

Provided by bde.


# 744c4157 11-Jan-2012 Guy Helmer <[email protected]>

Fix prototype formatting (indentation, long lines, and continued lines).

Requested by bde.


# a8cada54 11-Jan-2012 Guy Helmer <[email protected]>

Fix namespace issues with prototype parameter names.
Add missing prototype parameter names.

Requested by bde.


1234