X Tutup
Skip to content

Commit f4bab16

Browse files
committed
coredump: coredumpctl is so useful now, make it a first-class citizen
Drop the "systemd-" prefix, renaming it from "systemd-coredumpctl" to "coredumpctl".
1 parent 92788e4 commit f4bab16

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
/busctl
2626
/cdrom_id
2727
/collect
28+
/coredumpctl
2829
/coverage/
2930
/defined
3031
/exported
@@ -56,7 +57,6 @@
5657
/systemd-cgroups-agent
5758
/systemd-cgtop
5859
/systemd-coredump
59-
/systemd-coredumpctl
6060
/systemd-cryptsetup
6161
/systemd-cryptsetup-generator
6262
/systemd-dbus1-generator

Makefile-man.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ endif
658658

659659
if ENABLE_COREDUMP
660660
MANPAGES += \
661-
man/systemd-coredumpctl.1
661+
man/coredumpctl.1
662662
MANPAGES_ALIAS += \
663663
#
664664

@@ -1477,6 +1477,7 @@ EXTRA_DIST += \
14771477
man/bootctl.xml \
14781478
man/bootup.xml \
14791479
man/busctl.xml \
1480+
man/coredumpctl.xml \
14801481
man/crypttab.xml \
14811482
man/daemon.xml \
14821483
man/halt.xml \
@@ -1569,7 +1570,6 @@ EXTRA_DIST += \
15691570
man/systemd-cat.xml \
15701571
man/systemd-cgls.xml \
15711572
man/systemd-cgtop.xml \
1572-
man/systemd-coredumpctl.xml \
15731573
man/systemd-cryptsetup-generator.xml \
15741574
man/systemd-cryptsetup@.service.xml \
15751575
man/systemd-delta.xml \

Makefile.am

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3706,22 +3706,22 @@ systemd_coredump_LDADD += \
37063706
libsystemd-acl.la
37073707
endif
37083708

3709-
systemd_coredumpctl_SOURCES = \
3709+
coredumpctl_SOURCES = \
37103710
src/journal/coredumpctl.c
37113711

3712-
systemd_coredumpctl_LDADD = \
3712+
coredumpctl_LDADD = \
37133713
libsystemd-journal-internal.la \
37143714
libsystemd-internal.la \
37153715
libsystemd-shared.la
37163716

37173717
bin_PROGRAMS += \
3718-
systemd-coredumpctl
3718+
coredumpctl
37193719

37203720
dist_bashcompletion_DATA += \
3721-
shell-completion/bash/systemd-coredumpctl
3721+
shell-completion/bash/coredumpctl
37223722

37233723
dist_zshcompletion_DATA += \
3724-
shell-completion/zsh/_systemd-coredumpctl
3724+
shell-completion/zsh/_coredumpctl
37253725

37263726
sysctl_DATA = \
37273727
sysctl.d/50-coredump.conf
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
along with systemd; If not, see <http://www.gnu.org/licenses/>.
2222
-->
2323

24-
<refentry id="systemd-coredumpctl" conditional='ENABLE_COREDUMP'
24+
<refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
2525
xmlns:xi="http://www.w3.org/2001/XInclude">
2626

2727
<refentryinfo>
28-
<title>systemd-coredumpctl</title>
28+
<title>coredumpctl</title>
2929
<productname>systemd</productname>
3030

3131
<authorgroup>
@@ -39,18 +39,18 @@
3939
</refentryinfo>
4040

4141
<refmeta>
42-
<refentrytitle>systemd-coredumpctl</refentrytitle>
42+
<refentrytitle>coredumpctl</refentrytitle>
4343
<manvolnum>1</manvolnum>
4444
</refmeta>
4545

4646
<refnamediv>
47-
<refname>systemd-coredumpctl</refname>
47+
<refname>coredumpctl</refname>
4848
<refpurpose>Retrieve coredumps from the journal</refpurpose>
4949
</refnamediv>
5050

5151
<refsynopsisdiv>
5252
<cmdsynopsis>
53-
<command>systemd-coredumpctl</command>
53+
<command>coredumpctl</command>
5454
<arg choice="opt" rep="repeat">OPTIONS</arg>
5555
<arg choice="req">COMMAND</arg>
5656
<arg choice="opt" rep="repeat">PID|COMM|EXE|MATCH</arg>
@@ -60,7 +60,7 @@
6060
<refsect1>
6161
<title>Description</title>
6262

63-
<para><command>systemd-coredumpctl</command> may be used to
63+
<para><command>coredumpctl</command> may be used to
6464
retrieve coredumps from
6565
<citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
6666
</refsect1>

man/systemd.journal-fields.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
messages containing coredumps from
460460
system and session units.
461461
See
462-
<citerefentry><refentrytitle>systemd-coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
462+
<citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
463463
</para>
464464
</listitem>
465465
</varlistentry>
@@ -597,7 +597,7 @@
597597
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
598598
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
599599
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
600-
<citerefentry><refentrytitle>systemd-coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
600+
<citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
601601
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
602602
</para>
603603
</refsect1>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# systemd-coredumpctl(1) completion -*- shell-script -*-
1+
# coredumpctl(1) completion -*- shell-script -*-
22
#
33
# This file is part of systemd.
44
#
@@ -57,11 +57,11 @@ _coredumpctl() {
5757
COMPREPLY=( $(compgen -W '${__journal_fields[*]}' -S= -- "$cur") )
5858
return 0
5959
elif [[ $cur = *=* ]]; then
60-
mapfile -t field_vals < <(systemd-coredumpctl -F "${prev%=}" 2>/dev/null)
60+
mapfile -t field_vals < <(coredumpctl -F "${prev%=}" 2>/dev/null)
6161
COMPREPLY=( $(compgen -W '${field_vals[*]}' -- "${cur#=}") )
6262
return 0
6363
elif [[ $prev = '=' ]]; then
64-
mapfile -t field_vals < <(systemd-coredumpctl -F "${COMP_WORDS[COMP_CWORD-2]}" 2>/dev/null)
64+
mapfile -t field_vals < <(coredumpctl -F "${COMP_WORDS[COMP_CWORD-2]}" 2>/dev/null)
6565
comps=${field_vals[*]}
6666
else
6767
for ((i=0; i <= COMP_CWORD; i++)); do
@@ -82,4 +82,4 @@ _coredumpctl() {
8282
return 0
8383
}
8484

85-
complete -F _coredumpctl systemd-coredumpctl
85+
complete -F _coredumpctl coredumpctl
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
#compdef systemd-coredumpctl
1+
#compdef coredumpctl
22

3-
_systemd-coredumpctl_command(){
4-
local -a _systemd_coredumpctl_cmds
5-
_systemd_coredumpctl_cmds=(
3+
_coredumpctl_command(){
4+
local -a _coredumpctl_cmds
5+
_coredumpctl_cmds=(
66
'list:List available coredumps'
77
'dump:Print coredump to stdout'
88
'gdb:Start gdb on a coredump'
99
)
1010
if (( CURRENT == 1 )); then
11-
_describe -t commands 'systemd-coredumpctl command' _systemd_coredumpctl_cmds
11+
_describe -t commands 'coredumpctl command' _coredumpctl_cmds
1212
else
1313
local curcontext="$curcontext"
1414
local -a _dumps
15-
cmd="${${_systemd_coredumpctl_cmds[(r)$words[1]:*]%%:*}}"
15+
cmd="${${_coredumpctl_cmds[(r)$words[1]:*]%%:*}}"
1616
if (( $#cmd )); then
17-
# user can set zstyle ':completion:*:*:systemd-coredumpctl:*' sort no for coredumps to be ordered by date, otherwise they get ordered by pid
18-
_dumps=( "${(foa)$(systemd-coredumpctl list | awk 'BEGIN{OFS=":"} /^\s/ {sub(/[[ \t]+/, ""); print $5,$0}' 2>/dev/null)}" )
17+
# user can set zstyle ':completion:*:*:coredumpctl:*' sort no for coredumps to be ordered by date, otherwise they get ordered by pid
18+
_dumps=( "${(foa)$(coredumpctl list | awk 'BEGIN{OFS=":"} /^\s/ {sub(/[[ \t]+/, ""); print $5,$0}' 2>/dev/null)}" )
1919
if [[ -n "$_dumps" ]]; then
2020
_describe -t pids 'coredumps' _dumps
2121
else
@@ -33,4 +33,4 @@ _arguments \
3333
'--no-pager[Do not pipe output into a pager]' \
3434
{-h,--help}'[Show this help]' \
3535
'--version[Show package version]' \
36-
'*::systemd-coredumpctl commands:_systemd-coredumpctl_command'
36+
'*::coredumpctl commands:_coredumpctl_command'

0 commit comments

Comments
 (0)
X Tutup