tree-wide: use new RET_NERRNO() helper at various places

This commit is contained in:
Lennart Poettering
2021-11-16 08:04:09 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent ef470ffa23
commit 7c248223eb
51 changed files with 151 additions and 469 deletions
+3 -9
View File
@@ -472,7 +472,7 @@ static int delete_dm(MountPoint *m) {
if (r < 0)
log_debug_errno(r, "Failed to sync DM block device %s, ignoring: %m", m->path);
if (ioctl(fd, DM_DEV_REMOVE, &(struct dm_ioctl) {
return RET_NERRNO(ioctl(fd, DM_DEV_REMOVE, &(struct dm_ioctl) {
.version = {
DM_VERSION_MAJOR,
DM_VERSION_MINOR,
@@ -480,10 +480,7 @@ static int delete_dm(MountPoint *m) {
},
.data_size = sizeof(struct dm_ioctl),
.dev = m->devnum,
}) < 0)
return -errno;
return 0;
}));
}
static int delete_md(MountPoint *m) {
@@ -500,10 +497,7 @@ static int delete_md(MountPoint *m) {
if (fsync(fd) < 0)
log_debug_errno(errno, "Failed to sync MD block device %s, ignoring: %m", m->path);
if (ioctl(fd, STOP_ARRAY, NULL) < 0)
return -errno;
return 0;
return RET_NERRNO(ioctl(fd, STOP_ARRAY, NULL));
}
static bool nonunmountable_path(const char *path) {