static bool arg_value = false;
static const char *arg_export_prefix = NULL;
static usec_t arg_wait_for_initialization_timeout = 0;
+PagerFlags arg_pager_flags = 0;
/* Put a limit on --tree descent level to not exhaust our stack */
#define TREE_DEPTH_MAX 64
" -e --export-db Export the content of the udev database\n"
" -c --cleanup-db Clean up the udev database\n"
" -w --wait-for-initialization[=SECONDS]\n"
- " Wait for device to be initialized\n",
+ " Wait for device to be initialized\n"
+ " --no-pager Do not pipe output into a pager\n",
program_invocation_short_name);
return 0;
enum {
ARG_PROPERTY = 0x100,
ARG_VALUE,
+ ARG_NO_PAGER,
};
static const struct option options[] = {
{ "value", no_argument, NULL, ARG_VALUE },
{ "version", no_argument, NULL, 'V' },
{ "wait-for-initialization", optional_argument, NULL, 'w' },
+ { "no-pager", no_argument, NULL, ARG_NO_PAGER },
{}
};
return print_version();
case 'h':
return help();
+ case ARG_NO_PAGER:
+ arg_pager_flags |= PAGER_DISABLE;
+ break;
case '?':
return -EINVAL;
default:
if (strv_isempty(devices)) {
assert(action == ACTION_TREE);
- pager_open(0);
+ pager_open(arg_pager_flags);
return print_tree(NULL);
}