ratbagd: provide a decent error message when the bus name is taken
sd-bus returns EEXISTS which is "File exists" and way too confusing. Let's
print out a decent error message for that case.
Relater
@@ -568,8 +568,12 @@ exit:
ratbagd_free(ctx);
if (r < 0) {
+ if (r == -EEXIST) {
+ log_error("Bus name is taken, another instance of ratbagd is already running.\n");
+ } else {
errno = -r;
log_error("Failed to start ratbagd: %m\n");
+ }
return EXIT_FAILURE;
}
