summaryrefslogtreecommitdiffstats
path: root/loader2/method.c
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-06-30 05:05:08 +0000
committerJeremy Katz <katzj@redhat.com>2006-06-30 05:05:08 +0000
commitd4ed4196e1bf43c7f8849183fa27c4de0f4e2b82 (patch)
tree6f7a98cbea6b093730496812ad3d6c613f308d73 /loader2/method.c
parent2a7615304f4783c095ae7fa591ea0c20bc3e1aae (diff)
2006-06-30 Jeremy Katz <katzj@redhat.com>
* scripts/mk-images: Move second stage images to images/ dir. * image.py: Adjust for stage2 in images/ * loader2/cdinstall.c: Likewise. * loader2/hdinstall.c: Likewise. * loader2/method.c: Likewise. * loader2/nfsinstall.c: Likewise. * loader2/urlinstall.c: Likewise.
Diffstat (limited to 'loader2/method.c')
-rw-r--r--loader2/method.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/loader2/method.c b/loader2/method.c
index 48bb1efa3..404bd7d0f 100644
--- a/loader2/method.c
+++ b/loader2/method.c
@@ -150,7 +150,6 @@ char * validIsoImages(char * dirName, int *foundinvalid) {
DIR * dir;
struct dirent * ent;
char isoImage[1024];
- char path[1024];
if (!(dir = opendir(dirName))) {
newtWinMessage(_("Error"), _("OK"),
@@ -175,8 +174,7 @@ char * validIsoImages(char * dirName, int *foundinvalid) {
continue;
}
- snprintf(path, sizeof(path), "/tmp/loopimage/%s/base/stage2.img", getProductPath());
- if (mountLoopback(path, "/mnt/runtime", "loop0")) {
+ if (mountLoopback("/tmp/loopimage/images/stage2.img", "/mnt/runtime", "loop0")) {
umountLoopback("/mnt/runtime", "loop0");
} else {
if (verifyStamp("/mnt/runtime")) {
@@ -589,7 +587,6 @@ void umountStage2(void) {
/* mount a second stage, verify the stamp file, copy updates
* Returns 0 on success, 1 on failure to mount, -1 on bad stamp */
int mountStage2(char * path) {
- char imgPath[1024];
if (access(path, R_OK)) {
return 1;
}
@@ -604,12 +601,10 @@ int mountStage2(char * path) {
}
/* JKFIXME: this is kind of silly.. /mnt/source is hardcoded :/ */
- snprintf(imgPath, sizeof(imgPath), "/mnt/source/%s/base/updates.img", getProductPath());
- copyUpdatesImg(imgPath);
+ copyUpdatesImg("/mnt/source/images/updates.img");
/* more hard coding */
- snprintf(imgPath, sizeof(imgPath), "/mnt/source/%s/base/product.img", getProductPath());
- copyProductImg(imgPath);
+ copyProductImg("/mnt/source/images/product.img");
return 0;
}