summaryrefslogtreecommitdiffstats
path: root/loader2/method.c
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-01-22 16:50:08 -0500
committerChris Lumens <clumens@redhat.com>2008-02-11 10:44:54 -0500
commitcc92e5a32bb9ac4e11a965e276e9535fb76a4371 (patch)
treee4d8eb9a64f1e7533aa3d2b71b497c8078a825da /loader2/method.c
parentb97a8e70331e71559e08a684195904c5cb824408 (diff)
Use the mount program instead of our own code.
Also change isys's mount function to take its arguments as a string like would be passed to the mount program, instead of a handful of flags.
Diffstat (limited to 'loader2/method.c')
-rw-r--r--loader2/method.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/loader2/method.c b/loader2/method.c
index 26e6e426f..c23479de6 100644
--- a/loader2/method.c
+++ b/loader2/method.c
@@ -127,11 +127,11 @@ int mountLoopback(char * fsystem, char * mntpoint, char * device) {
/* FIXME: really, mountLoopback() should take a list of "valid"
* filesystems for the specific type of image being mounted */
- if (doPwMount(device, mntpoint, "iso9660", IMOUNT_RDONLY, NULL)) {
- if (doPwMount(device, mntpoint, "ext2", IMOUNT_RDONLY, NULL)) {
- if (doPwMount(device, mntpoint, "squashfs", IMOUNT_RDONLY, NULL)) {
- if (doPwMount(device, mntpoint, "cramfs", IMOUNT_RDONLY, NULL)) {
- if (doPwMount(device, mntpoint, "vfat", IMOUNT_RDONLY, NULL)) {
+ if (doPwMount(device, mntpoint, "iso9660", "ro")) {
+ if (doPwMount(device, mntpoint, "ext2", "ro")) {
+ if (doPwMount(device, mntpoint, "squashfs", "ro")) {
+ if (doPwMount(device, mntpoint, "cramfs", "ro")) {
+ if (doPwMount(device, mntpoint, "vfat", "ro")) {
logMessage(ERROR, "failed to mount loop: %s", strerror(errno));
loopfd = open(device, O_RDONLY);
ioctl(loopfd, LOOP_CLR_FD, 0);
@@ -219,7 +219,7 @@ int readStampFileFromIso(char *file, char **timestamp, char **releasedescr) {
lstat(file, &sb);
if (S_ISBLK(sb.st_mode)) {
filetype = 1;
- if (doPwMount(file, "/tmp/testmnt", "iso9660", IMOUNT_RDONLY, NULL)) {
+ if (doPwMount(file, "/tmp/testmnt", "iso9660", "ro")) {
logMessage(ERROR, "Failed to mount device %s to get description",
file);
return -1;
@@ -628,9 +628,9 @@ int getFileFromBlockDevice(char *device, char *path, char * dest) {
logMessage(INFO, "getFileFromBlockDevice(%s, %s)", device, path);
- if (doPwMount(device, "/tmp/mnt", "vfat", IMOUNT_RDONLY, NULL) &&
- doPwMount(device, "/tmp/mnt", "ext2", IMOUNT_RDONLY, NULL) &&
- doPwMount(device, "/tmp/mnt", "iso9660", IMOUNT_RDONLY, NULL)) {
+ if (doPwMount(device, "/tmp/mnt", "vfat", "ro") &&
+ doPwMount(device, "/tmp/mnt", "ext2", "ro") &&
+ doPwMount(device, "/tmp/mnt", "iso9660", "ro")) {
logMessage(ERROR, "failed to mount /dev/%s: %s", device,
strerror(errno));
return 2;