summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-02-18 00:45:54 +0000
committerJeremy Katz <katzj@redhat.com>2003-02-18 00:45:54 +0000
commit0c8eba97b35d7503336bc7b2ea154ce98aebaaf2 (patch)
tree7f8da4dbbf3dde47de40ba8eea7a6b583b10e15e /loader2
parent9a5589e67a1862f7e49e62d2b65e54db54b7c787 (diff)
support bind mounts for upgrade/rescue mode.
basically, create a new filesystem type and device which get used and add a keyword parameter for mounting the diff looks large, but most of it is adjusting callers of doPwMount in the loader
Diffstat (limited to 'loader2')
-rw-r--r--loader2/cdinstall.c4
-rw-r--r--loader2/driverdisk.c14
-rw-r--r--loader2/hdinstall.c2
-rw-r--r--loader2/kickstart.c6
-rw-r--r--loader2/loader.c8
-rw-r--r--loader2/method.c8
-rw-r--r--loader2/nfsinstall.c4
-rw-r--r--loader2/usb.c2
8 files changed, 24 insertions, 24 deletions
diff --git a/loader2/cdinstall.c b/loader2/cdinstall.c
index 2e44b6cbc..f9366f660 100644
--- a/loader2/cdinstall.c
+++ b/loader2/cdinstall.c
@@ -158,7 +158,7 @@ static void mountCdromStage2(char *cddev) {
do {
do {
if (doPwMount("/tmp/cdrom", "/mnt/source",
- "iso9660", 1, 0, NULL, NULL)) {
+ "iso9660", 1, 0, NULL, NULL, 0)) {
ejectCdrom();
wrongCDMessage();
} else {
@@ -317,7 +317,7 @@ char * setupCdrom(char * location,
logMessage("trying to mount device %s", kd->known[i].name);
devMakeInode(kd->known[i].name, "/tmp/cdrom");
if (!doPwMount("/tmp/cdrom", "/mnt/source", "iso9660", 1, 0,
- NULL, NULL)) {
+ NULL, NULL, 0)) {
if (!access("/mnt/source/RedHat/base/stage2.img", R_OK) &&
(FL_RESCUE(flags) || !access("/mnt/source/.discinfo", R_OK))) {
rc = mountStage2("/mnt/source/RedHat/base/stage2.img");
diff --git a/loader2/driverdisk.c b/loader2/driverdisk.c
index 18386aa1f..3a0ca7b02 100644
--- a/loader2/driverdisk.c
+++ b/loader2/driverdisk.c
@@ -224,9 +224,9 @@ int loadDriverFromMedia(int class, moduleList modLoaded,
devMakeInode(device, "/tmp/dddev");
logMessage("trying to mount %s", device);
- if (doPwMount("/tmp/dddev", "/tmp/drivers", "vfat", 1, 0, NULL, NULL)) {
- if (doPwMount("/tmp/dddev", "/tmp/drivers", "ext2", 1, 0, NULL, NULL)) {
- if (doPwMount("/tmp/dddev", "/tmp/drivers", "iso9660", 1, 0, NULL, NULL)) {
+ if (doPwMount("/tmp/dddev", "/tmp/drivers", "vfat", 1, 0, NULL, NULL, 0)) {
+ if (doPwMount("/tmp/dddev", "/tmp/drivers", "ext2", 1, 0, NULL, NULL, 0)) {
+ if (doPwMount("/tmp/dddev", "/tmp/drivers", "iso9660", 1, 0, NULL, NULL, 0)) {
newtWinMessage(_("Error"), _("OK"),
_("Failed to mount driver disk."));
stage = DEV_INSERT;
@@ -394,15 +394,15 @@ void useKickstartDD(struct loaderData_s * loaderData, int argc,
devMakeInode(dev, "/tmp/dddev");
if (fstype) {
if (!doPwMount("/tmp/dddev", "/tmp/drivers", fstype, 1, 0,
- NULL, NULL)) {
+ NULL, NULL, 0)) {
logMessage("unable to mount %s as %s", dev, fstype);
return;
}
}
- if (doPwMount("/tmp/dddev", "/tmp/drivers", "vfat", 1, 0, NULL, NULL)) {
- if (doPwMount("/tmp/dddev", "/tmp/drivers", "ext2", 1, 0, NULL, NULL)) {
- if (doPwMount("/tmp/dddev", "/tmp/drivers", "iso9660", 1, 0, NULL, NULL)) {
+ if (doPwMount("/tmp/dddev", "/tmp/drivers", "vfat", 1, 0, NULL, NULL, 0)) {
+ if (doPwMount("/tmp/dddev", "/tmp/drivers", "ext2", 1, 0, NULL, NULL, 0)) {
+ if (doPwMount("/tmp/dddev", "/tmp/drivers", "iso9660", 1, 0, NULL, NULL, 0)) {
logMessage("unable to mount driver disk %s", dev);
return;
}
diff --git a/loader2/hdinstall.c b/loader2/hdinstall.c
index f68414dd6..ffde08708 100644
--- a/loader2/hdinstall.c
+++ b/loader2/hdinstall.c
@@ -229,7 +229,7 @@ static char * setupIsoImages(char * device, char * dirName, int flags) {
/* XXX try to mount as ext2 and then vfat */
for (type=typetry; *type; type++) {
- if (!doPwMount("/tmp/hddev", "/tmp/hdimage", *type, 1, 0, NULL, NULL))
+ if (!doPwMount("/tmp/hddev", "/tmp/hdimage", *type, 1, 0, NULL, NULL, 0))
break;
}
diff --git a/loader2/kickstart.c b/loader2/kickstart.c
index 73ce0c8f2..2cad63fcc 100644
--- a/loader2/kickstart.c
+++ b/loader2/kickstart.c
@@ -276,9 +276,9 @@ int getKickstartFromBlockDevice(char *device, char *path) {
if (devMakeInode(device, "/tmp/kssrcdev"))
return 1;
- if ((doPwMount("/tmp/kssrcdev", "/tmp/ks", "vfat", 1, 0, NULL, NULL)) &&
- doPwMount("/tmp/kssrcdev", "/tmp/ks", "ext2", 1, 0, NULL, NULL) &&
- doPwMount("/tmp/kssrcdev", "/tmp/ks", "iso9660", 1, 0, NULL, NULL)) {
+ if ((doPwMount("/tmp/kssrcdev", "/tmp/ks", "vfat", 1, 0, NULL, NULL, 0)) &&
+ doPwMount("/tmp/kssrcdev", "/tmp/ks", "ext2", 1, 0, NULL, NULL, 0) &&
+ doPwMount("/tmp/kssrcdev", "/tmp/ks", "iso9660", 1, 0, NULL, NULL, 0)) {
logMessage("failed to mount /dev/%s: %s", device, strerror(errno));
return 2;
}
diff --git a/loader2/loader.c b/loader2/loader.c
index 76aff1dcb..c9c0069c0 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -143,7 +143,7 @@ int setupRamdisk(void) {
gunzip_close(f);
}
- if (doPwMount(RAMDISK_DEVICE, "/tmp/ramfs", "ext2", 0, 0, NULL, NULL))
+ if (doPwMount(RAMDISK_DEVICE, "/tmp/ramfs", "ext2", 0, 0, NULL, NULL, 0))
logMessage("failed to mount ramfs image");
return 0;
@@ -152,7 +152,7 @@ int setupRamdisk(void) {
void setupRamfs(void) {
mkdirChain("/tmp/ramfs");
- doPwMount("none", "/tmp/ramfs", "ramfs", 0, 0, NULL, NULL);
+ doPwMount("none", "/tmp/ramfs", "ramfs", 0, 0, NULL, NULL, 0);
}
@@ -314,9 +314,9 @@ void loadUpdates(struct knownDevices *kd, int flags) {
devMakeInode(device, "/tmp/upd.disk");
if (doPwMount("/tmp/upd.disk", "/tmp/update-disk", "ext2", 1, 0,
- NULL, NULL) &&
+ NULL, NULL, 0) &&
doPwMount("/tmp/upd.disk", "/tmp/update-disk", "iso9660", 1, 0,
- NULL, NULL)) {
+ NULL, NULL, 0)) {
newtWinMessage(_("Error"), _("OK"),
_("Failed to mount updates disk"));
} else {
diff --git a/loader2/method.c b/loader2/method.c
index 6cef9be5f..b2a4ecc5f 100644
--- a/loader2/method.c
+++ b/loader2/method.c
@@ -134,11 +134,11 @@ int mountLoopback(char * fsystem, char * mntpoint, char * device) {
close(loopfd);
if (doPwMount(filename, mntpoint, "iso9660", 1,
- 0, NULL, NULL)) {
+ 0, NULL, NULL, 0)) {
if (doPwMount(filename, mntpoint, "ext2", 1,
- 0, NULL, NULL)) {
+ 0, NULL, NULL, 0)) {
if (doPwMount(filename, mntpoint, "cramfs", 1,
- 0, NULL, NULL)) {
+ 0, NULL, NULL, 0)) {
logMessage("failed to mount loop: %s",
strerror(errno));
@@ -213,7 +213,7 @@ int readStampFileFromIso(char *file, char **timestamp, char **releasedescr) {
if (S_ISBLK(sb.st_mode)) {
filetype = 1;
if (doPwMount(file, "/tmp/testmnt",
- "iso9660", 1, 0, NULL, NULL)) {
+ "iso9660", 1, 0, NULL, NULL, 0)) {
logMessage("Failed to mount device %s to get description", file);
return -1;
}
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index 17605469a..e08339551 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -169,7 +169,7 @@ char * mountNfsImage(struct installMethod * method,
stage = NFS_STAGE_NFS;
- if (!doPwMount(fullPath, "/mnt/source", "nfs", 1, 0, NULL, NULL)) {
+ if (!doPwMount(fullPath, "/mnt/source", "nfs", 1, 0, NULL, NULL, 0)) {
logMessage("mounted %s on /mnt/source", fullPath);
if (!access("/mnt/source/RedHat/base/stage2.img", R_OK)) {
logMessage("can access stage2.img");
@@ -329,7 +329,7 @@ int kickstartFromNfs(char * url, struct knownDevices * kd,
logMessage("ks location: nfs://%s/%s", host, file);
- if (!doPwMount(host, "/tmp/ks", "nfs", 1, 0, NULL, NULL)) {
+ if (!doPwMount(host, "/tmp/ks", "nfs", 1, 0, NULL, NULL, 0)) {
char * buf;
buf = alloca(strlen(file) + 10);
diff --git a/loader2/usb.c b/loader2/usb.c
index ac847cfc1..028559ebe 100644
--- a/loader2/usb.c
+++ b/loader2/usb.c
@@ -96,7 +96,7 @@ int usbInitialize(moduleList modLoaded, moduleDeps modDeps,
if (FL_TESTING(flags)) return 0;
if (doPwMount("/proc/bus/usb", "/proc/bus/usb", "usbdevfs", 0, 0,
- NULL, NULL))
+ NULL, NULL, 0))
logMessage("failed to mount device usbdevfs: %s", strerror(errno));
/* sleep so we make sure usb devices get properly enumerated.