Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/sysinst Changed returncodes to -1 of mount_dis...



details:   https://anonhg.NetBSD.org/src/rev/5aabde3a64e9
branches:  trunk
changeset: 779351:5aabde3a64e9
user:      jdf <jdf%NetBSD.org@localhost>
date:      Mon May 21 22:38:25 2012 +0000

description:
Changed returncodes to -1 of mount_disks in case of error (before, they were
inverted).
Add message mount_failed to be displayed when a mount fails, offering the
opportunity to go on anyway (fix for PR install/12020).

diffstat:

 distrib/utils/sysinst/disks.c   |  20 +++++++++++++-------
 distrib/utils/sysinst/msg.mi.de |   9 ++++++---
 distrib/utils/sysinst/msg.mi.en |   7 +++++--
 distrib/utils/sysinst/msg.mi.es |   7 +++++--
 distrib/utils/sysinst/msg.mi.fr |  10 +++++++---
 distrib/utils/sysinst/msg.mi.pl |  10 +++++++++-
 6 files changed, 45 insertions(+), 18 deletions(-)

diffs (212 lines):

diff -r 1afa028c4992 -r 5aabde3a64e9 distrib/utils/sysinst/disks.c
--- a/distrib/utils/sysinst/disks.c     Mon May 21 21:34:16 2012 +0000
+++ b/distrib/utils/sysinst/disks.c     Mon May 21 22:38:25 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disks.c,v 1.123 2012/01/09 01:51:47 riz Exp $ */
+/*     $NetBSD: disks.c,v 1.124 2012/05/21 22:38:26 jdf Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -805,8 +805,12 @@
                return error;
 
        error = target_mount("", list[0].u.s_val, ' '-'a', list[1].u.s_val);
-       if (error != 0)
-               return error;
+       if (error != 0) {
+               msg_display(MSG_mount_failed, list[0].u.s_val);
+               process_menu(MENU_noyes, NULL);
+               if (!yesno)
+                       return error;
+       }
        return 0;
 }
 
@@ -854,7 +858,9 @@
        free(prog);
        if (error != 0) {
                msg_display(MSG_badfs, disk, ptn, error);
-               process_menu(MENU_ok, NULL);
+               process_menu(MENU_noyes, NULL);
+               if (yesno)
+                       error = 0;
                /* XXX at this point maybe we should run a full fsck? */
        }
        return error;
@@ -966,7 +972,7 @@
        else {
                error = mount_root();
                if (error != 0 && error != EBUSY)
-                       return 0;
+                       return -1;
        }
 
        /* Check the target /etc/fstab exists before trying to parse it. */
@@ -974,7 +980,7 @@
            target_file_exists_p("/etc/fstab") == 0) {
                msg_display(MSG_noetcfstab, diskdev);
                process_menu(MENU_ok, NULL);
-               return 0;
+               return -1;
        }
 
 
@@ -984,7 +990,7 @@
                /* error ! */
                msg_display(MSG_badetcfstab, diskdev);
                process_menu(MENU_ok, NULL);
-               return 0;
+               return -1;
        }
        error = walk(fstab, (size_t)fstabsize, fstabbuf, numfstabbuf);
        free(fstab);
diff -r 1afa028c4992 -r 5aabde3a64e9 distrib/utils/sysinst/msg.mi.de
--- a/distrib/utils/sysinst/msg.mi.de   Mon May 21 21:34:16 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.de   Mon May 21 22:38:25 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.de,v 1.67 2012/04/30 19:49:26 martin Exp $      */
+/*     $NetBSD: msg.mi.de,v 1.68 2012/05/21 22:38:25 jdf Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -124,6 +124,9 @@
 überschrieben werden!)
 }
 
+message mount_failed
+{Versuch, %s zu mounten ist fehlgeschlagen. Fortfahren?
+}
 
 message nodisk
 {Ich kann keine für NetBSD nutzbaren Festplatten finden.
@@ -711,9 +714,9 @@
 
 message badfs
 {Das Dateisystem auf /dev/%s%c scheint kein BSD-Dateisystem zu sein,
-die Prüfung des Dateisystems (fsck) ist fehlgeschlagen.
+die Prüfung des Dateisystems (fsck) ist fehlgeschlagen (Fehler %d).
 
-Die Aktualisierung wird abgebrochen. (Fehlernummer %d.)
+Die Aktualisierung trotzdem fortsetzen?
 }
 
 message rootmissing
diff -r 1afa028c4992 -r 5aabde3a64e9 distrib/utils/sysinst/msg.mi.en
--- a/distrib/utils/sysinst/msg.mi.en   Mon May 21 21:34:16 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.en   Mon May 21 22:38:25 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.en,v 1.172 2012/04/06 23:48:53 riz Exp $        */
+/*     $NetBSD: msg.mi.en,v 1.173 2012/05/21 22:38:25 jdf Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -117,6 +117,9 @@
 disks.)
 }
 
+message mount_failed
+{Mounting %s failed. Continue?
+}
 
 message nodisk
 {I can not find any hard disks for use by NetBSD.  You will be
@@ -680,7 +683,7 @@
 
 message badfs
 {It appears that /dev/%s%c is not a BSD file system or the fsck was
-not successful.  The upgrade has been aborted.  (Error number %d.)
+not successful.  Try mounting it anyway?  (Error number %d.)
 }
 
 message rootmissing
diff -r 1afa028c4992 -r 5aabde3a64e9 distrib/utils/sysinst/msg.mi.es
--- a/distrib/utils/sysinst/msg.mi.es   Mon May 21 21:34:16 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.es   Mon May 21 22:38:25 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.es,v 1.43 2012/04/06 23:48:53 riz Exp $ */
+/*     $NetBSD: msg.mi.es,v 1.44 2012/05/21 22:38:25 jdf Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -124,6 +124,9 @@
 sus discos.)
 }
 
+message mount_failed
+{Mounting %s failed. Continue?
+}
 
 message nodisk
 {No se ha podido encontrar ningún disco duro para ser usado por NetBSD.
@@ -701,7 +704,7 @@
 
 message badfs
 {Parece que /dev/%s%c no es un sistema de archivos BSD o el fsck no ha sido
-correcto.  La actualización ha sido interrumpida.  (Error número %d.)
+correcto.  ¿Continuar?  (Error número %d.)
 }
 
 message rootmissing
diff -r 1afa028c4992 -r 5aabde3a64e9 distrib/utils/sysinst/msg.mi.fr
--- a/distrib/utils/sysinst/msg.mi.fr   Mon May 21 21:34:16 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.fr   Mon May 21 22:38:25 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.fr,v 1.126 2012/04/08 03:11:14 uebayasi Exp $   */
+/*     $NetBSD: msg.mi.fr,v 1.127 2012/05/21 22:38:26 jdf Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -127,6 +127,10 @@
 modifier vos disques).
 }
 
+message mount_failed
+{Le montage du système de fichiers %s a échoué.  Continuer ?
+}
+
 message nodisk
 {Aucun disque utilisable par NetBSD n'a été trouvé.
 Retour au menu précédent.
@@ -748,9 +752,9 @@
 message badfs
 {
 /dev/%s%c ne semble pas être un système de fichiers BSD, ou
-la vérification de son intégrité par fsck a échoué.
+la vérification de son intégrité par fsck a échoué, code d'erreur %d.
 
-Interruption de la procédure de mise à jour, code d'erreur %d.
+Souhaitez-vous continuer mise à jour?
 }
 
 message rootmissing
diff -r 1afa028c4992 -r 5aabde3a64e9 distrib/utils/sysinst/msg.mi.pl
--- a/distrib/utils/sysinst/msg.mi.pl   Mon May 21 21:34:16 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.pl   Mon May 21 22:38:25 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.pl,v 1.83 2012/04/06 23:48:53 riz Exp $ */
+/*     $NetBSD: msg.mi.pl,v 1.84 2012/05/21 22:38:26 jdf Exp $ */
 /*     Based on english version: */
 /*     NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp       */
 
@@ -121,6 +121,10 @@
 twoich dyskach.)
 }
 
+message mount_failed
+{Mounting %s failed. Continue?
+}
+/* XXX: Translate. */
 
 message nodisk
 {Nie moge znalezc zadnych twardych dyskow do uzycia z NetBSD. Zostaniesz
@@ -675,6 +679,10 @@
 {Tworzenie plikow urzadzen ...
 }
 
+/* XXX: Translate:
+* -not successful.  The upgrade has been aborted.  (Error number %d.)
+* +not successful (Error number %d.). Try mounting it anyway?
+*/
 message badfs
 {Wyglada na to, ze /dev/%s%c nie jest systemem plikow BSD albo nie powiodlo sie
 jego sprawdzenie. Aktualizacja zostala przerwana. (Blad numer %d.)



Home | Main Index | Thread Index | Old Index