mirror of
https://github.com/systemd/systemd
synced 2025-10-08 13:14:45 +02:00
Compare commits
No commits in common. "ba814583501b652ad974aef0b05056c85ad6a613" and "4e6c50a5d4d471425eb393e828da90b1e558f893" have entirely different histories.
ba81458350
...
4e6c50a5d4
@ -115,7 +115,7 @@
|
|||||||
__attribute__((cleanup(sd_login_monitor_unrefp))) sd_login_monitor *m = NULL;
|
__attribute__((cleanup(sd_login_monitor_unrefp))) sd_login_monitor *m = NULL;
|
||||||
int r;
|
int r;
|
||||||
…
|
…
|
||||||
r = sd_login_monitor_new(NULL, &m);
|
r = sd_login_monitor_default(&m);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
fprintf(stderr, "Failed to allocate login monitor object: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to allocate login monitor object: %s\n", strerror(-r));
|
||||||
…
|
…
|
||||||
|
@ -110,7 +110,7 @@ int sd_peer_get_machine_name(int fd, char **machine);
|
|||||||
|
|
||||||
/* Similar to sd_pid_get_cgroup(), but retrieves data about the peer
|
/* Similar to sd_pid_get_cgroup(), but retrieves data about the peer
|
||||||
* of a connected AF_UNIX socket. */
|
* of a connected AF_UNIX socket. */
|
||||||
int sd_peer_get_cgroup(int fd, char **cgroup);
|
int sd_peer_get_cgroup(pid_t pid, char **cgroup);
|
||||||
|
|
||||||
/* Get state from UID. Possible states: offline, lingering, online, active, closing */
|
/* Get state from UID. Possible states: offline, lingering, online, active, closing */
|
||||||
int sd_uid_get_state(uid_t uid, char **state);
|
int sd_uid_get_state(uid_t uid, char **state);
|
||||||
|
@ -310,14 +310,14 @@ static int cd_media_compat(Context *c) {
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_debug_errno(errno, "ioctl(CDROM_DRIVE_STATUS) failed: %m");
|
return log_debug_errno(errno, "ioctl(CDROM_DRIVE_STATUS) failed: %m");
|
||||||
if (r != CDS_DISC_OK)
|
if (r != CDS_DISC_OK)
|
||||||
return log_debug_errno(SYNTHETIC_ERRNO(ENOMEDIUM),
|
log_debug_errno(SYNTHETIC_ERRNO(ENOMEDIUM),
|
||||||
"ioctl(CDROM_DRIVE_STATUS) → %d (%s), ignoring.",
|
"ioctl(CDROM_DRIVE_STATUS) → %d (%s), ignoring.",
|
||||||
r,
|
r,
|
||||||
r == CDS_NO_INFO ? "no info" :
|
r == CDS_NO_INFO ? "no info" :
|
||||||
r == CDS_NO_DISC ? "no disc" :
|
r == CDS_NO_DISC ? "no disc" :
|
||||||
r == CDS_TRAY_OPEN ? "tray open" :
|
r == CDS_TRAY_OPEN ? "tray open" :
|
||||||
r == CDS_DRIVE_NOT_READY ? "drive not ready" :
|
r == CDS_DRIVE_NOT_READY ? "drive not ready" :
|
||||||
"unknown status");
|
"unkown status");
|
||||||
|
|
||||||
c->has_media = true;
|
c->has_media = true;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user