aboutsummaryrefslogtreecommitdiff
path: root/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'mount.c')
-rw-r--r--mount.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mount.c b/mount.c
index f78786ebc..b571e5035 100644
--- a/mount.c
+++ b/mount.c
@@ -132,20 +132,20 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
132 132
133 specialfile = find_unused_loop_device(); 133 specialfile = find_unused_loop_device();
134 if (specialfile == NULL) { 134 if (specialfile == NULL) {
135 error_msg_and_die("Could not find a spare loop device\n"); 135 error_msg_and_die("Could not find a spare loop device");
136 } 136 }
137 if (set_loop(specialfile, lofile, 0, &loro)) { 137 if (set_loop(specialfile, lofile, 0, &loro)) {
138 error_msg_and_die("Could not setup loop device\n"); 138 error_msg_and_die("Could not setup loop device");
139 } 139 }
140 if (!(flags & MS_RDONLY) && loro) { /* loop is ro, but wanted rw */ 140 if (!(flags & MS_RDONLY) && loro) { /* loop is ro, but wanted rw */
141 error_msg("WARNING: loop device is read-only\n"); 141 error_msg("WARNING: loop device is read-only");
142 flags &= ~MS_RDONLY; 142 flags &= ~MS_RDONLY;
143 } 143 }
144 } 144 }
145#endif 145#endif
146 status = mount(specialfile, dir, filesystemtype, flags, string_flags); 146 status = mount(specialfile, dir, filesystemtype, flags, string_flags);
147 if (errno == EROFS) { 147 if (errno == EROFS) {
148 error_msg("%s is write-protected, mounting read-only\n", specialfile); 148 error_msg("%s is write-protected, mounting read-only", specialfile);
149 status = mount(specialfile, dir, filesystemtype, flags |= MS_RDONLY, string_flags); 149 status = mount(specialfile, dir, filesystemtype, flags |= MS_RDONLY, string_flags);
150 } 150 }
151 } 151 }
@@ -171,7 +171,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
171#endif 171#endif
172 172
173 if (errno == EPERM) { 173 if (errno == EPERM) {
174 error_msg_and_die("permission denied. Are you root?\n"); 174 error_msg_and_die("permission denied. Are you root?");
175 } 175 }
176 176
177 return (FALSE); 177 return (FALSE);