chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shutdown: drop redundant read_only bool var
[elogind.git]
/
src
/
umount.c
diff --git
a/src/umount.c
b/src/umount.c
index 4842d403aeac8eea11b363c75eb185144f1d9c2c..cdc42ed8f1cac80894a4bed2009f9ade9f508871 100644
(file)
--- a/
src/umount.c
+++ b/
src/umount.c
@@
-35,7
+35,6
@@
typedef struct MountPoint {
char *path;
typedef struct MountPoint {
char *path;
- bool read_only;
LIST_FIELDS (struct MountPoint, mount_point);
} MountPoint;
LIST_FIELDS (struct MountPoint, mount_point);
} MountPoint;
@@
-46,8
+45,6
@@
static MountPoint *mount_point_alloc(char *path) {
return NULL;
mp->path = path;
return NULL;
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);
r = errno;
ioctl(fd, LOOP_CLR_FD, 0);
r = errno;
- close_nointr(fd);
+ close_nointr
_nofail
(fd);
if (r == ENXIO) /* not bound, so no error */
r = 0;
if (r == ENXIO) /* not bound, so no error */
r = 0;
@@
-307,10
+304,9
@@
static int mount_points_list_remount_read_only(MountPoint **mount_point_list_hea
continue;
/* Trying to remount read-only */
continue;
/* Trying to remount read-only */
- if (mount(NULL, mp->path, NULL, MS_MGC_VAL|MS_REMOUNT|MS_RDONLY, NULL) == 0) {
- mp->read_only = true;
+ if (mount(NULL, mp->path, NULL, MS_MGC_VAL|MS_REMOUNT|MS_RDONLY, NULL) == 0)
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);
failed++;
}
log_debug("Could not remount as read-only %s: %m", mp->path);
failed++;
}