diff options
author | Jonathan Adams <Jonathan.Adams@Sun.COM> | 2010-01-12 17:06:34 -0800 |
---|---|---|
committer | Jonathan Adams <Jonathan.Adams@Sun.COM> | 2010-01-12 17:06:34 -0800 |
commit | 56f33205c9ed776c3c909e07d52e94610a675740 (patch) | |
tree | 7a0c9fb16d059f20cdf267568985fb237e43c9bf /usr/src/psm | |
parent | 9217f8fd97307134fc9a37e74da9fc2dd246e58a (diff) | |
download | illumos-gate-56f33205c9ed776c3c909e07d52e94610a675740.tar.gz |
4517853 debug.h should include macros to assert implication and equivalence
6915090 struct memlist should have ml_ member prefixes
Diffstat (limited to 'usr/src/psm')
-rw-r--r-- | usr/src/psm/stand/boot/sparc/common/bootprop.c | 18 | ||||
-rw-r--r-- | usr/src/psm/stand/boot/sparc/common/sun4u_memlist.c | 21 |
2 files changed, 17 insertions, 22 deletions
diff --git a/usr/src/psm/stand/boot/sparc/common/bootprop.c b/usr/src/psm/stand/boot/sparc/common/bootprop.c index 695c40a5c9..c551051c37 100644 --- a/usr/src/psm/stand/boot/sparc/common/bootprop.c +++ b/usr/src/psm/stand/boot/sparc/common/bootprop.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/promif.h> #include <sys/bootconf.h> @@ -135,8 +133,8 @@ bgetproplen(struct bootops *bop, char *name) strequal(name, p->name))) { for (ml = *((struct memlist **)p->val); - ml != NIL; - ml = ml->next) + ml != NIL; + ml = ml->ml_next) /* * subtract out the ptrs for our local @@ -144,7 +142,7 @@ bgetproplen(struct bootops *bop, char *name) * only see an array. */ size += (int)(sizeof (struct memlist) - - 2*sizeof (struct memlist *)); + 2*sizeof (struct memlist *)); return (size); } else if (strequal(name, p->name)) { @@ -209,12 +207,12 @@ bgetprop(struct bootops *bop, char *name, void *buf) u_longlong_t *t = buf; for (ml = *((struct memlist **)p->val); - ml != NIL; - ml = ml->next) { + ml != NIL; + ml = ml->ml_next) { /* copy out into an array */ - *t++ = ml->address; - *t++ = ml->size; + *t++ = ml->ml_address; + *t++ = ml->ml_size; } return (BOOT_SUCCESS); } else if (strequal(name, p->name)) { diff --git a/usr/src/psm/stand/boot/sparc/common/sun4u_memlist.c b/usr/src/psm/stand/boot/sparc/common/sun4u_memlist.c index aca63e393e..e9426fd50d 100644 --- a/usr/src/psm/stand/boot/sparc/common/sun4u_memlist.c +++ b/usr/src/psm/stand/boot/sparc/common/sun4u_memlist.c @@ -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,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/param.h> #include <sys/promif.h> @@ -114,7 +111,7 @@ fill_memlists(char *name, char *prop, struct memlist *old) prom_panic("Cannot get list.\n"); if (links > sizeof (scratch_memlist)) { prom_printf("%s list <%s> exceeds boot capabilities\n", - name, prop); + name, prop); prom_panic("fill_memlists - memlist size"); } links = links / sizeof (struct sun4u_prom_memlist); @@ -203,10 +200,10 @@ reg_to_list(struct sun4u_prom_memlist *ar, size_t n, struct memlist *old) if (!head) head = ptr; if (last) - last->next = ptr; - ptr->address = flag ? addr : start1; - ptr->size = size ? size : ar[i].size; - ptr->prev = last; + last->ml_next = ptr; + ptr->ml_address = flag ? addr : start1; + ptr->ml_size = size ? size : ar[i].size; + ptr->ml_prev = last; last = ptr; size = 0; @@ -214,6 +211,6 @@ reg_to_list(struct sun4u_prom_memlist *ar, size_t n, struct memlist *old) addr = 0; } - last->next = NULL; + last->ml_next = NULL; return (head); } |