New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemctl: hide the 'glyph' column when --no-legend is requested #15081
Merged
anitazha
merged 2 commits into
systemd:master
from
mrc0mmand:systemctl-hide-glyph-column
Mar 11, 2020
Merged
systemctl: hide the 'glyph' column when --no-legend is requested #15081
anitazha
merged 2 commits into
systemd:master
from
mrc0mmand:systemctl-hide-glyph-column
Mar 11, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keszybz
reviewed
Mar 11, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is OK. It doesn't have to be the most efficient code. Clarity is more important.
But I think it'd help to do the move suggested below. Less chance of forgetting to do the initialization later on.
keszybz
reviewed
Mar 11, 2020
mrc0mmand
force-pushed
the
systemctl-hide-glyph-column
branch
2 times, most recently
from
March 11, 2020 13:28
e17264d
to
c751794
Compare
keszybz
requested changes
Mar 11, 2020
keszybz
added
the
reviewed/needs-rework 🔨
PR has been reviewed and needs another round of reworks
label
Mar 11, 2020
mrc0mmand
force-pushed
the
systemctl-hide-glyph-column
branch
from
March 11, 2020 13:34
c751794
to
8d84ba5
Compare
mrc0mmand
removed
the
reviewed/needs-rework 🔨
PR has been reviewed and needs another round of reworks
label
Mar 11, 2020
keszybz
added
the
reviewed/needs-rework 🔨
PR has been reviewed and needs another round of reworks
label
Mar 11, 2020
without having to specify the whole display map
mrc0mmand
force-pushed
the
systemctl-hide-glyph-column
branch
from
March 11, 2020 13:44
8d84ba5
to
d171e67
Compare
keszybz
added
good-to-merge/waiting-for-ci 👍
PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed
and removed
reviewed/needs-rework 🔨
PR has been reviewed and needs another round of reworks
labels
Mar 11, 2020
dgdavid
added a commit
to yast/yast-storage-ng
that referenced
this pull request
Oct 14, 2021
Needed to avoid getting the `glyph` column which is causing the issue reported at https://bugzilla.suse.com/show_bug.cgi?id=1191347 about not unmasking systemd mount and swap units when leaving the partitioner. At some point --no-legend systemd flag was enough but it is not the case anymore. See systemd/systemd#15081.
dgdavid
added a commit
to yast/yast-storage-ng
that referenced
this pull request
Oct 14, 2021
Needed to avoid getting the `glyph` column which is causing the issue reported at https://bugzilla.suse.com/show_bug.cgi?id=1191347 about not unmasking systemd mount and swap units when leaving the partitioner. At some point --no-legend systemd flag was enough but it is not the case anymore. See systemd/systemd#15081.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good-to-merge/waiting-for-ci 👍
PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed
systemctl
util-lib
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The former implementation of
systemctl list-units
andmachinectl list
hid the glyph column when called with--no-legend
. This somehow got lost during the conversion to theformat-table.[ch]
stuff.Fixes: #15077
As the formatting stuff doesn't allow hiding a specific column without giving the
table_set_display()
function the whole display map except the columns we want to hide, I wrote a simple function just for that, otherwise the code would get really ugly (insystemctl list-units
we want to hide column 0 when--no-legend
is specified and column 5 when the job list is empty). However, as the table formatting mechanism allows specifying columns to show/hide only when the display map is set, the function depends just on that, which feels... wrong, thus any comments are definitely welcome.@poettering, @keszybz PTAL.