shutdown: drop redundant read_only bool var

This commit is contained in:
Lennart Poettering 2010-10-07 20:46:35 +02:00
parent ef9ffbd806
commit 143b4e9b8d

View file

@ -35,7 +35,6 @@
typedef struct MountPoint { typedef struct MountPoint {
char *path; char *path;
bool read_only;
LIST_FIELDS (struct MountPoint, mount_point); LIST_FIELDS (struct MountPoint, mount_point);
} MountPoint; } MountPoint;
@ -46,8 +45,6 @@ static MountPoint *mount_point_alloc(char *path) {
return NULL; return NULL;
mp->path = path; mp->path = path;
mp->read_only = false;
return mp; return mp;
} }
@ -270,7 +267,7 @@ static int delete_loopback(const char *device) {
ioctl(fd, LOOP_CLR_FD, 0); ioctl(fd, LOOP_CLR_FD, 0);
r = errno; r = errno;
close_nointr(fd); close_nointr_nofail(fd);
if (r == ENXIO) /* not bound, so no error */ if (r == ENXIO) /* not bound, so no error */
r = 0; r = 0;
@ -307,10 +304,9 @@ static int mount_points_list_remount_read_only(MountPoint **mount_point_list_hea
continue; continue;
/* Trying to remount read-only */ /* Trying to remount read-only */
if (mount(NULL, mp->path, NULL, MS_MGC_VAL|MS_REMOUNT|MS_RDONLY, NULL) == 0) { if (mount(NULL, mp->path, NULL, MS_MGC_VAL|MS_REMOUNT|MS_RDONLY, NULL) == 0)
mp->read_only = true;
mount_point_remove_and_free(mp, mount_point_list_head); mount_point_remove_and_free(mp, mount_point_list_head);
} else { else {
log_debug("Could not remount as read-only %s: %m", mp->path); log_debug("Could not remount as read-only %s: %m", mp->path);
failed++; failed++;
} }