[INFO_STANDALONE]='-r --root -a --attribute-walk -x --export -e --export-db -c --cleanup-db
-w --wait-for-initialization'
[INFO_ARG]='-q --query -p --path -n --name -P --export-prefix -d --device-id-of-file'
- [TRIGGER_STANDALONE]='-v --verbose -n --dry-run -w --settle --wait-daemon'
+ [TRIGGER_STANDALONE]='-v --verbose -n --dry-run -q --quiet -w --settle --wait-daemon'
[TRIGGER_ARG]='-t --type -c --action -s --subsystem-match -S --subsystem-nomatch
-a --attr-match -A --attr-nomatch -p --property-match
-g --tag-match -y --sysname-match --name-match -b --parent-match'
static bool arg_verbose = false;
static bool arg_dry_run = false;
+static bool arg_quiet = false;
static int exec_list(sd_device_enumerator *e, sd_device_action_t action, Set **settle_set) {
const char *action_str;
bool ignore = IN_SET(r, -ENOENT, -ENODEV);
int level =
+ arg_quiet ? LOG_DEBUG :
r == -ENOENT ? LOG_DEBUG :
r == -ENODEV ? LOG_WARNING : LOG_ERR;
" -V --version Show package version\n"
" -v --verbose Print the list of devices while running\n"
" -n --dry-run Do not actually trigger the events\n"
+ " -q --quiet Suppress error logging in triggering events\n"
" -t --type= Type of events to trigger\n"
" devices sysfs devices (default)\n"
" subsystems sysfs subsystems and drivers\n"
static const struct option options[] = {
{ "verbose", no_argument, NULL, 'v' },
{ "dry-run", no_argument, NULL, 'n' },
+ { "quiet", no_argument, NULL, 'q' },
{ "type", required_argument, NULL, 't' },
{ "action", required_argument, NULL, 'c' },
{ "subsystem-match", required_argument, NULL, 's' },
if (r < 0)
return r;
- while ((c = getopt_long(argc, argv, "vnt:c:s:S:a:A:p:g:y:b:wVh", options, NULL)) >= 0) {
+ while ((c = getopt_long(argc, argv, "vnqt:c:s:S:a:A:p:g:y:b:wVh", options, NULL)) >= 0) {
_cleanup_free_ char *buf = NULL;
const char *key, *val;
case 'n':
arg_dry_run = true;
break;
+ case 'q':
+ arg_quiet = true;
+ break;
case 't':
if (streq(optarg, "devices"))
device_type = TYPE_DEVICES;