printf("%s\n", udev_list_entry_get_name(entry));
if (dry_run)
continue;
- util_strlcpy(filename, udev_list_entry_get_name(entry), sizeof(filename));
- util_strlcat(filename, "/uevent", sizeof(filename));
+ util_strscpyl(filename, sizeof(filename), udev_list_entry_get_name(entry), "/uevent", NULL);
fd = open(filename, O_WRONLY);
if (fd < 0) {
dbg(udev, "error on opening %s: %m\n", filename);
udev_enumerate_add_nomatch_subsystem(udev_enumerate, optarg);
break;
case 'a':
- util_strlcpy(attr, optarg, sizeof(attr));
+ util_strscpy(attr, sizeof(attr), optarg);
val = strchr(attr, '=');
if (val != NULL) {
val[0] = 0;
udev_enumerate_add_match_sysattr(udev_enumerate, attr, val);
break;
case 'A':
- util_strlcpy(attr, optarg, sizeof(attr));
+ util_strscpy(attr, sizeof(attr), optarg);
val = strchr(attr, '=');
if (val != NULL) {
val[0] = 0;
" --verbose print the list of devices while running\n"
" --dry-run do not actually trigger the events\n"
" --type= type of events to trigger\n"
- " devices sys devices\n"
+ " devices sys devices (default)\n"
" subsystems sys subsystems and drivers\n"
" failed trigger only the events which have been\n"
" marked as failed during a previous run\n"
+ " --action=<action> event action value, default is \"add\"\n"
" --subsystem-match=<subsystem> trigger devices from a matching subystem\n"
" --subsystem-nomatch=<subsystem> exclude devices from a matching subystem\n"
" --attr-match=<file[=<value>]> trigger devices with a matching attribute\n"
" --attr-nomatch=<file[=<value>]> exclude devices with a matching attribute\n"
- " --help print this text\n"
- "\n");
+ " --help\n\n");
goto exit;
default:
goto exit;