specialfile = find_unused_loop_device();
if (specialfile == NULL) {
- error_msg_and_die("Could not find a spare loop device\n");
+ error_msg_and_die("Could not find a spare loop device");
}
if (set_loop(specialfile, lofile, 0, &loro)) {
- error_msg_and_die("Could not setup loop device\n");
+ error_msg_and_die("Could not setup loop device");
}
if (!(flags & MS_RDONLY) && loro) { /* loop is ro, but wanted rw */
- error_msg("WARNING: loop device is read-only\n");
+ error_msg("WARNING: loop device is read-only");
flags &= ~MS_RDONLY;
}
}
#endif
status = mount(specialfile, dir, filesystemtype, flags, string_flags);
if (errno == EROFS) {
- error_msg("%s is write-protected, mounting read-only\n", specialfile);
+ error_msg("%s is write-protected, mounting read-only", specialfile);
status = mount(specialfile, dir, filesystemtype, flags |= MS_RDONLY, string_flags);
}
}
#endif
if (errno == EPERM) {
- error_msg_and_die("permission denied. Are you root?\n");
+ error_msg_and_die("permission denied. Are you root?");
}
return (FALSE);
{
int status = 0;
-#if defined BB_FEATURE_USE_PROCFS
char buf[255];
if (strcmp(filesystemType, "auto") == 0) {
- FILE *f = fopen("/proc/filesystems", "r");
-
- if (f == NULL)
- return (FALSE);
+ FILE *f = xfopen("/proc/filesystems", "r");
while (fgets(buf, sizeof(buf), f) != NULL) {
filesystemType = buf;
}
fclose(f);
} else
-#endif
#if defined BB_FEATURE_USE_DEVPS_PATCH
if (strcmp(filesystemType, "auto") == 0) {
int fd, i, numfilesystems;