Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst When asked to create a whole-disk partition...



details:   https://anonhg.NetBSD.org/src/rev/da183b05e320
branches:  trunk
changeset: 1006323:da183b05e320
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jan 10 12:55:14 2020 +0000

description:
When asked to create a whole-disk partition for unknown usage, do not only
assert(false), but actually return an error (in case "assert" is a nop).

diffstat:

 usr.sbin/sysinst/partman.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 89e3094784b7 -r da183b05e320 usr.sbin/sysinst/partman.c
--- a/usr.sbin/sysinst/partman.c        Fri Jan 10 12:33:28 2020 +0000
+++ b/usr.sbin/sysinst/partman.c        Fri Jan 10 12:55:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: partman.c,v 1.46 2020/01/09 13:22:30 martin Exp $ */
+/*     $NetBSD: partman.c,v 1.47 2020/01/10 12:55:14 martin Exp $ */
 
 /*
  * Copyright 2012 Eugene Lozovoy
@@ -3299,6 +3299,7 @@
                break;
        default:
                assert(false); 
+               return NO_PART;
        }
        info.nat_type = parts->pscheme->get_fs_part_type(PT_root, fst, 0);
        if (info.nat_type != NULL && parts->pscheme->get_default_fstype != NULL)



Home | Main Index | Thread Index | Old Index