Mercurial > illumos > illumos-gate
changeset 3982:531293c8439f
6543001 avoid NVRAM boot-file change during cpr reusable mode statefile creation
author | vb70745 |
---|---|
date | Fri, 06 Apr 2007 09:45:18 -0700 |
parents | 7a269fc9fc32 |
children | 5179f49636a5 |
files | usr/src/uts/sparc/os/cpr_sparc.c usr/src/uts/sun4u/os/cpr_impl.c |
diffstat | 2 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/sparc/os/cpr_sparc.c Fri Apr 06 08:29:38 2007 -0700 +++ b/usr/src/uts/sparc/os/cpr_sparc.c Fri Apr 06 09:45:18 2007 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -204,13 +203,10 @@ /* * create a new boot-file value; flags get appended when - * reusable is true or when the statefile is a block device + * not reusable and when the statefile is a block device */ (void) strcpy(bootfile, CPRBOOT); - if (cpr_reusable_mode) { - ASSERT(cpr_statefile_is_spec()); - sp = " -R -S "; - } else if (cpr_statefile_is_spec()) + if (!cpr_reusable_mode && cpr_statefile_is_spec()) sp = " -S "; else sp = NULL; @@ -236,7 +232,9 @@ file_idx = CPR_DF_IDX; } cpr_prop_update(dev_idx, bootdev); - cpr_prop_update(file_idx, bootfile); + + if (!cpr_reusable_mode) + cpr_prop_update(file_idx, bootfile); /* * check/set auto-boot?
--- a/usr/src/uts/sun4u/os/cpr_impl.c Fri Apr 06 08:29:38 2007 -0700 +++ b/usr/src/uts/sun4u/os/cpr_impl.c Fri Apr 06 09:45:18 2007 -0700 @@ -294,8 +294,7 @@ */ i_cpr_cif_setup(CIF_UNLINK); - if (!cpr_reusable_mode) - (void) i_cpr_prom_pages(CPR_PROM_RESTORE); + (void) i_cpr_prom_pages(CPR_PROM_RESTORE); /* allow setting page size codes in MMU primary context register */ kcontextreg = kctx;