History log of /freebsd-current/lib/libgeom/geom_ctl.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

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


# 90e29718 16-Jul-2022 Kirk McKusick <mckusick@FreeBSD.org>

Clarify when GEOM utilities exit with success or failure.

Historically, GEOM utilities (gpart(8), gstripe(8), gmirror(8),
etc) used the gctl_error() routine to report errors. If they called
gctl_error() they would exit with EXIT_FAILURE, otherwise they would
return with EXIT_SUCCESS. If they used gctl_error() to output an
informational message, for example when run with the -v (verbose)
option, they would mistakenly exit with EXIT_FAILURE. A further
limitation of the gctl_error() function was that it could only be
called once. Messages from any additional calls to gctl_error()
would be silently discarded.

To resolve these problems a new function, gctl_msg() has been added.
It can be called multiple times to output multiple messages. It
also has an additional errno argument which should be zero if it is
an informational message or an errno value (EINVAL, EBUSY, etc) if
it is an error. When done the gctl_post_messages() function should
be called to indicate that all messages have been posted. If any
of the messages had a non-zero errno, the utility will EXIT_FAILURE.
If only informational messages (with zero errno) were posted, the
utility will EXIT_SUCCESS.

Tested by: Peter Holm
PR: 265184
MFC after: 1 week


# 2117cdd4 07-Mar-2022 Alexander Motin <mav@FreeBSD.org>

GEOM: Introduce gctl_add_param() API.

Make gctl_add_param() API public, allowing more precise control over
parameter flags. Previously it was impossible to properly declare
write-only ASCII parameters, used for result reporting, they were
declared as read-write binary instead, that was not nice.

MFC after: 1 month


# 5e53a4f9 25-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

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.


# f06b2368 22-Apr-2017 Enji Cooper <ngie@FreeBSD.org>

Minor style(9) fixups

Delete trailing whitespace and sort headers.

Leave libgeom.h's placement alone, per reasoning in r317289.

MFC after: 5 weeks
Sponsored by: Dell EMC Isilon


# 42e2e899 21-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Remove code duplication by introducing static gctl_param_add() function which
is now used by both gctl_ro_param() and gctl_rw_param().


# 91cca30d 21-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Simplify gctl_get_handle() a bit.
- Prefer 'unsigned int' over 'u_int' in userland code.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 7b6942a1 08-Jul-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Simplify the procedure of retrieving XML-data from the kernel.
- Fix a number of potential memory leaks in libgeom related to doing realloc
without freeing old pointer if things go wrong.
- Fix a number of places in libgeom where malloc and calloc return values
were not checked.
- Check malloc return value and provide sufficient warning messages when XML
parsing fails.

PR: kern/83464
Submitted by: Dan Lukes <dan - at - obluda.cz>
Approved by: kib (mentor)


# 7e02e189 01-Jun-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Add the part of the last commit which cvs appearantly didn't like
the first time.


# 64a5766e 22-Apr-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Collapse the meta arguments into normal arguments, trying to distinguish
just makes our own life harder.


# 63728c47 27-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Run a revision on the OAM api.

Use prefix gctl_ systematically.
Add flag with access perms for each argument.
Add ro/rw versions of argument building functions.
General cleanup.


# 4b8938c1 23-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Add marshalling functions for OAM api.