Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/sysinst/arch/ofppc Unmounting /targetroot in m...



details:   https://anonhg.NetBSD.org/src/rev/9cd9ed11c58b
branches:  trunk
changeset: 768583:9cd9ed11c58b
user:      phx <phx%NetBSD.org@localhost>
date:      Sun Aug 21 13:40:08 2011 +0000

description:
Unmounting /targetroot in md_post_newfs() is not needed.
Use target_prefix() instead of /mnt2 in md_post_extract().

diffstat:

 distrib/utils/sysinst/arch/ofppc/md.c |  30 ++++++++++--------------------
 1 files changed, 10 insertions(+), 20 deletions(-)

diffs (53 lines):

diff -r 95983cd89a86 -r 9cd9ed11c58b distrib/utils/sysinst/arch/ofppc/md.c
--- a/distrib/utils/sysinst/arch/ofppc/md.c     Sun Aug 21 13:27:45 2011 +0000
+++ b/distrib/utils/sysinst/arch/ofppc/md.c     Sun Aug 21 13:40:08 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.8 2011/04/04 08:30:39 mbalmer Exp $   */
+/*     $NetBSD: md.c,v 1.9 2011/08/21 13:40:08 phx Exp $       */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -297,8 +297,7 @@
 md_post_newfs(void)
 {
 
-       /* just in case */
-       run_program(RUN_DISPLAY, "/sbin/umount /targetroot/boot");
+       /* No bootblock. We use ofwboot from a partition visiable by OFW. */
        return 0;
 }
 
@@ -316,25 +315,16 @@
            "/tmp/bootinfo.txt", version, bootinfo_mbr);
 
        if (!nobootfix) {
-               snprintf(bootdev, sizeof bootdev, "/dev/r%s%c", diskdev,
-                   'a'+bootpart_fat12);
-               snprintf(bootbdev, sizeof bootbdev, "/dev/%s%c", diskdev,
-                   'a'+bootpart_fat12);
-
-               if (nonewfsmsdos == 0)
-                       run_program(RUN_DISPLAY, "/sbin/newfs_msdos %s",
-                           bootdev);
-               run_program(RUN_DISPLAY, "/sbin/mount_msdos %s /mnt2",
-                   bootbdev);
-               run_program(RUN_DISPLAY, "/bin/mkdir -p /mnt2/ppc");
-               run_program(RUN_DISPLAY, "/bin/mkdir -p /mnt2/netbsd");
+               run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/ppc",
+                   target_prefix());
+               run_program(RUN_DISPLAY, "/bin/mkdir -p /%s/boot/netbsd",
+                   target_prefix());
                run_program(RUN_DISPLAY, "/bin/cp /usr/mdec/ofwboot "
-                   "/mnt2/netbsd");
+                   "/%s/boot/netbsd", target_prefix());
                run_program(RUN_DISPLAY, "/bin/cp /tmp/bootinfo.txt "
-                   "/mnt2/ppc");
-               run_program(RUN_DISPLAY,
-                   "/bin/cp /usr/mdec/ofwboot /mnt2/ofwboot");
-               run_program(RUN_DISPLAY, "/sbin/umount /mnt2");
+                   "/%s/boot/ppc", target_prefix());
+               run_program(RUN_DISPLAY, "/bin/cp /usr/mdec/ofwboot "
+                   "/%s/boot/ofwboot", target_prefix());
        }
 
        if (!noprepfix) {



Home | Main Index | Thread Index | Old Index