It is needed to prevent errors in udev from going unnoticed (e.g.
when udevd is not running).
break;
if (option > 255) {
- fprintf(stderr, "udevadm control expects commands without underscore, "
- "this will stop working in a future release\n");
err(udev, "udevadm control expects commands without underscore, "
"this will stop working in a future release\n");
}
if (argv[optind] != NULL) {
const char *arg = argv[optind];
- fprintf(stderr, "udevadm control commands requires the --<command> format, "
- "this will stop working in a future release\n");
err(udev, "udevadm control commands requires the --<command> format, "
"this will stop working in a future release\n");
}
if (rc != 0) {
- fprintf(stderr, "unrecognized command\n");
err(udev, "unrecognized command\n");
}
exit:
if (start > end) {
err(udev, "seq-start larger than seq-end, ignoring\n");
- fprintf(stderr, "seq-start larger than seq-end, ignoring\n");
start = 0;
end = 0;
}
if (start > kernel_seq || end > kernel_seq) {
err(udev, "seq-start or seq-end larger than current kernel value, ignoring\n");
- fprintf(stderr, "seq-start or seq-end larger than current kernel value, ignoring\n");
start = 0;
end = 0;
}
} else {
if (end > 0) {
err(udev, "seq-end needs seq-start parameter, ignoring\n");
- fprintf(stderr, "seq-end needs seq-start parameter, ignoring\n");
end = 0;
}
}
} else if (strcmp(optarg, "failed") == 0) {
device_type = TYPE_FAILED;
} else {
- fprintf(stderr, "unknown type --type=%s\n", optarg);
err(udev, "unknown type --type=%s\n", optarg);
rc = 2;
goto exit;
fprintf(stderr, "%s: ", fn);
vfprintf(stderr, format, args);
} else {
+ if (priority <= LOG_ERR)
+ vfprintf(stderr, format, args);
vsyslog(priority, format, args);
}
}