1
0
mirror of https://github.com/systemd/systemd synced 2025-10-08 13:14:45 +02:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Luca Boccassi
ba81458350
Merge pull request #19356 from zxzax/sd-login-typos
Fix some typos in sd-login header, docs
2021-04-19 22:26:36 +01:00
Zbigniew Jędrzejewski-Szmek
05e13b3558 udev/cdrom_id: add forgotten return and fix typo
Fixup for 092c05717c.
2021-04-19 18:25:17 +01:00
Jason Francis
941c5275ea
sd-login: fix wrong constructor used in sd_login_monitor manpage example 2021-04-19 12:20:29 -04:00
Jason Francis
a8310e39e9
sd-login: correct prototype of sd_peer_get_cgroup 2021-04-19 12:13:03 -04:00
3 changed files with 10 additions and 10 deletions

View File

@ -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_default(&m); r = sd_login_monitor_new(NULL, &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));

View File

@ -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(pid_t pid, char **cgroup); int sd_peer_get_cgroup(int fd, 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);

View File

@ -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)
log_debug_errno(SYNTHETIC_ERRNO(ENOMEDIUM), return 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" :
"unkown status"); "unknown status");
c->has_media = true; c->has_media = true;
return 0; return 0;