diff options
| author | Chris Lumens <clumens@redhat.com> | 2008-02-28 17:06:04 -0500 |
|---|---|---|
| committer | Chris Lumens <clumens@redhat.com> | 2008-03-04 13:00:21 -0500 |
| commit | cd8a7a03397f431649f113936ffee6025dc90c33 (patch) | |
| tree | 4fc7539eba30ffda131eae9b1d014e076307ffb8 /loader2/method.c | |
| parent | f8ea24298943144b763268f64e5a34fb7e945f9d (diff) | |
mountStage2 now needs to take an extra argument for where updates are.
Diffstat (limited to 'loader2/method.c')
| -rw-r--r-- | loader2/method.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/loader2/method.c b/loader2/method.c index 1da97a7d9..5dbac12d7 100644 --- a/loader2/method.c +++ b/loader2/method.c @@ -564,12 +564,15 @@ 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) { - if (access(path, R_OK)) { +int mountStage2(char *stage2path, char *imageDir) { + char *buf; + int rc; + + if (access(stage2path, R_OK)) { return 1; } - if (mountLoopback(path, "/mnt/runtime", "/dev/loop0")) { + if (mountLoopback(stage2path, "/mnt/runtime", "/dev/loop0")) { return 1; } @@ -579,10 +582,14 @@ int mountStage2(char * path) { } /* JKFIXME: this is kind of silly.. /mnt/source is hardcoded :/ */ - copyUpdatesImg("/mnt/source/images/updates.img"); + rc = asprintf(&buf, "%s/updates.img", imageDir); + copyUpdatesImg(buf); + free(buf); /* more hard coding */ - copyProductImg("/mnt/source/images/product.img"); + rc = asprintf(&buf, "%s/product.img", imageDir); + copyProductImg(buf); + free(buf); return 0; } |
