diff options
author | Jeremy Katz <katzj@redhat.com> | 2005-09-15 22:12:39 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2005-09-15 22:12:39 +0000 |
commit | accc49c458eb7c7dc3660cbe65b3b34b340dfeef (patch) | |
tree | 4e1c594ecb74d73307820dccf1ac5bf29304456c /loader2/method.c | |
parent | 5e1e9a0619de4c5103a99379312fb71eb7de3a63 (diff) | |
download | anaconda-accc49c458eb7c7dc3660cbe65b3b34b340dfeef.tar.gz anaconda-accc49c458eb7c7dc3660cbe65b3b34b340dfeef.tar.xz anaconda-accc49c458eb7c7dc3660cbe65b3b34b340dfeef.zip |
2005-09-15 Jeremy Katz <katzj@redhat.com>
* isys/imount.c (doPwMount): Make arguments for doPwMount
simpler. Use a bitmask of flags and pass extra data like
mount(2). Use flags for nfs and pass arguments onto nfsmount().
Kill some dead code.
* isys/imount.c (doPwMount): Update prototype, add constants.
* isys/isys.c (doMount): Update for new API.
* loader2/cdinstall.c: Likewise.
* loader2/driverdisk.c: Likewise.
* loader2/hdinstall.c: Likewise.
* loader2/loader.c: Likewise.
* loader2/method.c: Likewise.
* loader2/nfsinstall.c: Likewise.
* loader2/usb.c: Likewise.
Diffstat (limited to 'loader2/method.c')
-rw-r--r-- | loader2/method.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/loader2/method.c b/loader2/method.c index f6978923c..b5154b737 100644 --- a/loader2/method.c +++ b/loader2/method.c @@ -123,14 +123,10 @@ 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(filename, mntpoint, "iso9660", 1, - 0, NULL, NULL, 0, 0)) { - if (doPwMount(filename, mntpoint, "ext2", 1, - 0, NULL, NULL, 0, 0)) { - if (doPwMount(filename, mntpoint, "cramfs", 1, - 0, NULL, NULL, 0, 0)) { - if (doPwMount(filename, mntpoint, "vfat", 1, - 0, NULL, NULL, 0, 0)) { + if (doPwMount(filename, mntpoint, "iso9660", IMOUNT_RDONLY, NULL)) { + if (doPwMount(filename, mntpoint, "ext2", IMOUNT_RDONLY, NULL)) { + if (doPwMount(filename, mntpoint, "cramfs", IMOUNT_RDONLY, NULL)) { + if (doPwMount(filename, mntpoint, "vfat", IMOUNT_RDONLY, NULL)) { logMessage(ERROR, "failed to mount loop: %s", strerror(errno)); loopfd = open(filename, O_RDONLY); ioctl(loopfd, LOOP_CLR_FD, 0); @@ -216,8 +212,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", 1, 0, NULL, NULL, 0, 0)) { + if (doPwMount(file, "/tmp/testmnt", "iso9660", IMOUNT_RDONLY, NULL)) { logMessage(ERROR, "Failed to mount device %s to get description", file); return -1; @@ -658,9 +653,9 @@ int getFileFromBlockDevice(char *device, char *path, char * dest) { if (devMakeInode(device, "/tmp/srcdev")) return 1; - if ((doPwMount("/tmp/srcdev", "/tmp/mnt", "vfat", 1, 0, NULL, NULL, 0, 0)) && - doPwMount("/tmp/srcdev", "/tmp/mnt", "ext2", 1, 0, NULL, NULL, 0, 0) && - doPwMount("/tmp/srcdev", "/tmp/mnt", "iso9660", 1, 0, NULL, NULL, 0, 0)) { + if (doPwMount("/tmp/srcdev", "/tmp/mnt", "vfat", IMOUNT_RDONLY, NULL) && + doPwMount("/tmp/srcdev", "/tmp/mnt", "ext2", IMOUNT_RDONLY, NULL) && + doPwMount("/tmp/srcdev", "/tmp/mnt", "iso9660", IMOUNT_RDONLY, NULL)) { logMessage(ERROR, "failed to mount /dev/%s: %s", device, strerror(errno)); return 2; |