Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst use current values for start/size/bsiz...



details:   https://anonhg.NetBSD.org/src/rev/deb0ca642159
branches:  trunk
changeset: 535210:deb0ca642159
user:      grant <grant%NetBSD.org@localhost>
date:      Mon Aug 12 02:45:17 2002 +0000

description:
use current values for start/size/bsize/fsize as defaults when editing
disklabel partitions.

diffstat:

 distrib/utils/sysinst/menus.mi.en |  16 +++++++++++-----
 distrib/utils/sysinst/menus.mi.fr |  16 +++++++++++-----
 distrib/utils/sysinst/menus.mi.pl |  16 +++++++++++-----
 3 files changed, 33 insertions(+), 15 deletions(-)

diffs (117 lines):

diff -r 3129983185fd -r deb0ca642159 distrib/utils/sysinst/menus.mi.en
--- a/distrib/utils/sysinst/menus.mi.en Mon Aug 12 02:40:20 2002 +0000
+++ b/distrib/utils/sysinst/menus.mi.en Mon Aug 12 02:45:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.mi.en,v 1.60 2002/08/12 02:22:52 grant Exp $     */
+/*     $NetBSD: menus.mi.en,v 1.61 2002/08/12 02:45:17 grant Exp $     */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -155,8 +155,10 @@
        option "Start/size", action  
                {       int start, size;
                        msg_display_add(MSG_defaultunit, multname);
-                       start = getpartoff(MSG_start, 0);
-                       size = getpartsize(MSG_size, start, 0);
+                       start = getpartoff(MSG_start,
+                               bsdlabel[editpart].pi_offset);
+                       size = getpartsize(MSG_size, start,
+                               bsdlabel[editpart].pi_size);
                        if (size == -1)
                                size = dlsize - start;
                        bsdlabel[editpart].pi_offset = start;
@@ -170,10 +172,14 @@
                                process_menu (MENU_ok);
                                return FALSE;
                        }
-                       msg_prompt_add (MSG_bsize, NULL, buf, 40);
+                       snprintf(buf, sizeof(buf), "%d",
+                               bsdlabel[editpart].pi_bsize);
+                       msg_prompt_add (MSG_bsize, buf, buf, 40);
                        i = atoi(buf);
                        bsdlabel[editpart].pi_bsize = i;
-                       msg_prompt_add (MSG_fsize, NULL, buf, 40);
+                       snprintf(buf, sizeof(buf), "%d",
+                               bsdlabel[editpart].pi_fsize);
+                       msg_prompt_add (MSG_fsize, buf, buf, 40);
                        i = atoi(buf);
                        bsdlabel[editpart].pi_fsize = i;
                };
diff -r 3129983185fd -r deb0ca642159 distrib/utils/sysinst/menus.mi.fr
--- a/distrib/utils/sysinst/menus.mi.fr Mon Aug 12 02:40:20 2002 +0000
+++ b/distrib/utils/sysinst/menus.mi.fr Mon Aug 12 02:45:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.mi.fr,v 1.40 2002/08/12 02:22:52 grant Exp $     */
+/*     $NetBSD: menus.mi.fr,v 1.41 2002/08/12 02:45:18 grant Exp $     */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -145,8 +145,10 @@
        option "Offset/taille", action  
                {       int start, size;
                        msg_display_add(MSG_defaultunit, multname);
-                       start = getpartoff(MSG_start, 0);
-                       size = getpartsize(MSG_size, start, 0);
+                       start = getpartoff(MSG_start,
+                               bsdlabel[editpart].pi_offset);
+                       size = getpartsize(MSG_size, start,
+                               bsdlabel[editpart].pi_size);
                        if (size == -1)
                                size = dlsize - start;
                        bsdlabel[editpart].pi_offset = start;
@@ -160,10 +162,14 @@
                                process_menu (MENU_ok);
                                return FALSE;
                        }
-                       msg_prompt_add (MSG_bsize, NULL, buf, 40);
+                       snprintf(buf, sizeof(buf), "%d",
+                               bsdlabel[editpart].pi_bsize);
+                       msg_prompt_add (MSG_bsize, buf, buf, 40);
                        i = atoi(buf);
                        bsdlabel[editpart].pi_bsize = i;
-                       msg_prompt_add (MSG_fsize, NULL, buf, 40);
+                       snprintf(buf, sizeof(buf), "%d",
+                               bsdlabel[editpart].pi_fsize);
+                       msg_prompt_add (MSG_fsize, buf, buf, 40);
                        i = atoi(buf);
                        bsdlabel[editpart].pi_fsize = i;
                };
diff -r 3129983185fd -r deb0ca642159 distrib/utils/sysinst/menus.mi.pl
--- a/distrib/utils/sysinst/menus.mi.pl Mon Aug 12 02:40:20 2002 +0000
+++ b/distrib/utils/sysinst/menus.mi.pl Mon Aug 12 02:45:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.mi.pl,v 1.11 2002/08/12 02:22:52 grant Exp $     */
+/*     $NetBSD: menus.mi.pl,v 1.12 2002/08/12 02:45:18 grant Exp $     */
 /*     Based on english version: */
 /*     NetBSD: menus.mi.en,v 1.49 2002/04/04 14:26:44 ad Exp   */
 
@@ -157,8 +157,10 @@
        option "Przesuniecie/rozmiar", action  
                {       int start, size;
                        msg_display_add(MSG_defaultunit, multname);
-                       start = getpartoff(MSG_start, 0);
-                       size = getpartsize(MSG_size, start, 0);
+                       start = getpartoff(MSG_start,
+                               bsdlabel[editpart].pi_offset);
+                       size = getpartsize(MSG_size, start,
+                               bsdlabel[editpart].pi_size);
                        if (size == -1)
                                size = dlsize - start;
                        bsdlabel[editpart].pi_offset = start;
@@ -172,10 +174,14 @@
                                process_menu (MENU_ok);
                                return FALSE;
                        }
-                       msg_prompt_add (MSG_bsize, NULL, buf, 40);
+                       snprintf(buf, sizeof(buf), "%d",
+                               bsdlabel[editpart].pi_bsize);
+                       msg_prompt_add (MSG_bsize, buf, buf, 40);
                        i = atoi(buf);
                        bsdlabel[editpart].pi_bsize = i;
-                       msg_prompt_add (MSG_fsize, NULL, buf, 40);
+                       snprintf(buf, sizeof(buf), "%d",
+                               bsdlabel[editpart].pi_fsize);
+                       msg_prompt_add (MSG_fsize, buf, buf, 40);
                        i = atoi(buf);
                        bsdlabel[editpart].pi_fsize = i;
                };



Home | Main Index | Thread Index | Old Index