summaryrefslogtreecommitdiffstats
path: root/src/mount
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-11-13 18:38:09 +0100
committerGitHub <noreply@github.com>2023-11-13 18:38:09 +0100
commit4e2df3082d30e65e62c1a3b8599d952cf3d288c7 (patch)
tree71d2925f641b5321f98044cb01404d62abede8b8 /src/mount
parentMerge pull request #30003 from poettering/vendor-model-unify (diff)
parentmount-tool: make internal and external column name match (diff)
downloadsystemd-4e2df3082d30e65e62c1a3b8599d952cf3d288c7.tar.xz
systemd-4e2df3082d30e65e62c1a3b8599d952cf3d288c7.zip
Merge pull request #30010 from poettering/mount-tool-tweakles
mount-tool: trivial tweaklets
Diffstat (limited to 'src/mount')
-rw-r--r--src/mount/mount-tool.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c
index 55d3149ea3..5876e2ddb4 100644
--- a/src/mount/mount-tool.c
+++ b/src/mount/mount-tool.c
@@ -1397,18 +1397,18 @@ static int discover_device(void) {
return 0;
}
-enum {
- COLUMN_NODE,
- COLUMN_PATH,
- COLUMN_MODEL,
- COLUMN_WWN,
- COLUMN_FSTYPE,
- COLUMN_LABEL,
- COLUMN_UUID,
- _COLUMN_MAX,
-};
-
static int list_devices(void) {
+ enum {
+ COLUMN_NODE,
+ COLUMN_PATH,
+ COLUMN_MODEL,
+ COLUMN_WWN,
+ COLUMN_FSTYPE,
+ COLUMN_LABEL,
+ COLUMN_UUID,
+ _COLUMN_MAX,
+ };
+
_cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
_cleanup_(table_unrefp) Table *table = NULL;
int r;
@@ -1425,7 +1425,7 @@ static int list_devices(void) {
if (r < 0)
return log_error_errno(r, "Failed to add property match: %m");
- table = table_new("NODE", "PATH", "MODEL", "WWN", "TYPE", "LABEL", "UUID");
+ table = table_new("NODE", "PATH", "MODEL", "WWN", "FSTYPE", "LABEL", "UUID");
if (!table)
return log_oom();
@@ -1437,6 +1437,7 @@ static int list_devices(void) {
return log_error_errno(r, "Failed to set sort index: %m");
table_set_header(table, arg_legend);
+ table_set_ersatz_string(table, TABLE_ERSATZ_DASH);
FOREACH_DEVICE(e, d) {
for (unsigned c = 0; c < _COLUMN_MAX; c++) {
@@ -1473,7 +1474,7 @@ static int list_devices(void) {
break;
}
- r = table_add_cell(table, NULL, c == COLUMN_NODE ? TABLE_PATH : TABLE_STRING, strna(x));
+ r = table_add_cell(table, NULL, c == COLUMN_NODE ? TABLE_PATH : TABLE_STRING, x);
if (r < 0)
return table_log_add_error(r);
}