mirror of
https://github.com/systemd/systemd.git
synced 2025-09-16 17:45:36 +03:00
udevadm info: use pager for all output types
Before we used the pager for --tree, but not e.g. for --export-db. I don't see any particular reason to limit this.
This commit is contained in:
@@ -295,6 +295,8 @@ static int export_devices(void) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to scan devices: %m");
|
return log_error_errno(r, "Failed to scan devices: %m");
|
||||||
|
|
||||||
|
pager_open(arg_pager_flags);
|
||||||
|
|
||||||
FOREACH_DEVICE_AND_SUBSYSTEM(e, d)
|
FOREACH_DEVICE_AND_SUBSYSTEM(e, d)
|
||||||
(void) print_record(d, NULL);
|
(void) print_record(d, NULL);
|
||||||
|
|
||||||
@@ -815,9 +817,10 @@ int info_main(int argc, char *argv[], void *userdata) {
|
|||||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||||
"-x/--export or -P/--export-prefix cannot be used with --value");
|
"-x/--export or -P/--export-prefix cannot be used with --value");
|
||||||
|
|
||||||
|
pager_open(arg_pager_flags);
|
||||||
|
|
||||||
if (strv_isempty(devices)) {
|
if (strv_isempty(devices)) {
|
||||||
assert(action == ACTION_TREE);
|
assert(action == ACTION_TREE);
|
||||||
pager_open(arg_pager_flags);
|
|
||||||
return print_tree(NULL);
|
return print_tree(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user