Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sbin/disklabel Pull up 1.64->1.65: If we didn't write t...



details:   https://anonhg.NetBSD.org/src/rev/b8eb1a42895f
branches:  netbsd-1-4
changeset: 468138:b8eb1a42895f
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Apr 09 15:58:09 1999 +0000

description:
Pull up 1.64->1.65: If we didn't write the label because checklabel() failed,
exit with a non-zero status.

diffstat:

 sbin/disklabel/disklabel.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 8eb53ce60b9e -r b8eb1a42895f sbin/disklabel/disklabel.c
--- a/sbin/disklabel/disklabel.c        Fri Apr 09 14:41:36 1999 +0000
+++ b/sbin/disklabel/disklabel.c        Fri Apr 09 15:58:09 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disklabel.c,v 1.63 1999/01/27 22:04:51 thorpej Exp $   */
+/*     $NetBSD: disklabel.c,v 1.63.2.1 1999/04/09 15:58:09 bouyer Exp $        */
 
 /*
  * Copyright (c) 1987, 1993
@@ -47,7 +47,7 @@
 static char sccsid[] = "@(#)disklabel.c        8.4 (Berkeley) 5/4/95";
 /* from static char sccsid[] = "@(#)disklabel.c        1.2 (Symmetric) 11/28/85"; */
 #else
-__RCSID("$NetBSD: disklabel.c,v 1.63 1999/01/27 22:04:51 thorpej Exp $");
+__RCSID("$NetBSD: disklabel.c,v 1.63.2.1 1999/04/09 15:58:09 bouyer Exp $");
 #endif
 #endif /* not lint */
 
@@ -353,6 +353,8 @@
                *lp = lab;
                if (checklabel(lp) == 0)
                        error = writelabel(f, bootarea, lp);
+               else
+                       error = 1;
                break;
 
        case WRITEBOOT:
@@ -368,13 +370,15 @@
                *lp = tlab;
                if (checklabel(lp) == 0)
                        error = writelabel(f, bootarea, lp);
+               else
+                       error = 1;
                break;
        }
 #endif
        case UNSPEC:
                usage();
        }
-       return error;
+       exit(error);
 }
 
 /*



Home | Main Index | Thread Index | Old Index