freebsd-dev/sys
Kirk McKusick 90e29718cf 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
2022-07-16 10:26:51 -07:00
..
amd64 uart: Don't check SPCR tables if !late_console 2022-07-13 23:17:44 -07:00
arm ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
arm64 Add RK3568 SoC support to pinctrl driver. 2022-07-09 13:06:52 +00:00
bsm
cam Delay GEOM disk_create() until CAM periph probe completes. 2022-07-14 16:17:36 -04:00
cddl stand: Add blake3 support to boot loader 2022-07-08 22:57:59 -06:00
compat linux(4): Fix a typo in a source code comment 2022-07-16 13:39:17 +02:00
conf cddl/*: add a WITH(OUT)_DTRACE option 2022-07-06 14:03:48 +01:00
contrib zfs: fixup build on powerpc64le 2022-07-08 18:52:14 -03:00
crypto OpenSSL: Regen assembly file for OpenSSSL 1.1.1q 2022-07-05 12:06:50 -04:00
ddb ddb: add _FLAGS command variants 2022-07-05 11:56:42 -03:00
dev Adjust agp_find_device() definition in agp.c to avoid clang 15 warning 2022-07-16 16:46:21 +02:00
dts
fs nfsd: Fix CreateSession for an established ClientID 2022-07-13 16:28:56 -07:00
gdb ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
geom Clarify when GEOM utilities exit with success or failure. 2022-07-16 10:26:51 -07:00
gnu
i386 uart: Don't check SPCR tables if !late_console 2022-07-13 23:17:44 -07:00
isa
kern ule: unbreak UP builds 2022-07-16 12:45:09 +00:00
kgssapi
libkern
modules ice(4): Add ice_rdma.c to module Makefile 2022-07-12 18:30:19 -07:00
net IPv4: experimental changes to allow net 0/8, 240/4, part of 127/8 2022-07-13 09:46:05 -05:00
net80211 net80211 / LinuxKPI: 802.11: add Control Trigger Subframe information 2022-06-17 22:55:13 +00:00
netgraph
netinet tcp: Undo the increase in sequence number by 1 due to the FIN flag in case of a transient error. 2022-07-14 03:18:19 +02:00
netinet6 netinet6: fix interface handling for loopback traffic 2022-07-10 12:47:47 +00:00
netipsec
netpfil dummynet: check for ifp on all PROTO_LAYER2 packets 2022-07-11 22:07:11 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed sockets: use only soref()/sorele() as socket reference count 2022-07-04 12:40:51 -07:00
opencrypto crypto: Validate return values from CRYPTODEV_PROCESS() 2022-07-01 11:09:39 -04:00
powerpc eventtimer: Simplify KTR traces 2022-07-11 15:58:43 -04:00
riscv riscv: implement db_show_mdpcpu() 2022-07-05 11:51:14 -03:00
rpc
security mac_veriexec: Authorize reads of secured sysctls 2022-06-29 10:48:01 +02:00
sys ktrace: Increase precision of timestamps. 2022-07-16 12:46:12 +03:00
teken
tests
tools firmware: Map '@' in filenames to '_' in symbols. 2022-06-14 10:50:51 -07:00
ufs Another fix to build from 064e6b4. 2022-07-13 21:05:05 -07:00
vm vm_mmap: Remove obsolete code and comments from vm_mmap() 2022-07-13 09:39:26 -04:00
x86 iommu: Shrink the iommu map entry structure 2022-07-15 22:24:52 -05:00
xdr
xen
Makefile