Source-Changes-HG archive

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

[src/trunk]: src/sbin/gpt annotate map additions with non-allocated memory.



details:   https://anonhg.NetBSD.org/src/rev/7cb4eb350ba9
branches:  trunk
changeset: 342011:7cb4eb350ba9
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 02 20:09:33 2015 +0000

description:
annotate map additions with non-allocated memory.

diffstat:

 sbin/gpt/gpt.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 09ee842256ba -r 7cb4eb350ba9 sbin/gpt/gpt.c
--- a/sbin/gpt/gpt.c    Wed Dec 02 20:01:44 2015 +0000
+++ b/sbin/gpt/gpt.c    Wed Dec 02 20:09:33 2015 +0000
@@ -35,7 +35,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.57 2015/12/02 20:01:44 christos Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.58 2015/12/02 20:09:33 christos Exp $");
 #endif
 
 #include <sys/param.h>
@@ -340,6 +340,7 @@
                            mbr->mbr_part[i].part_typ,
                            (uintmax_t)start, (uintmax_t)size);
                if (mbr->mbr_part[i].part_typ != MBR_PTYPE_EXT_LBA) {
+                       // XXX: map add with non-allocated memory
                        m = map_add(gpt, start, size, MAP_TYPE_MBR_PART, p);
                        if (m == NULL)
                                return -1;
@@ -442,6 +443,7 @@
                            (uintmax_t)le64toh(ent->ent_lba_start),
                            (uintmax_t)size);
                }
+               // XXX: map add with not allocated memory.
                m = map_add(gpt, le64toh(ent->ent_lba_start), size,
                    MAP_TYPE_GPT_PART, ent);
                if (m == NULL)



Home | Main Index | Thread Index | Old Index