mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
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 #535
This commit is contained in:
committed by
Filipe Laíns
parent
acc0066f08
commit
a3de0e1ff7
@@ -568,8 +568,12 @@ exit:
|
||||
ratbagd_free(ctx);
|
||||
|
||||
if (r < 0) {
|
||||
errno = -r;
|
||||
log_error("Failed to start ratbagd: %m\n");
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user