From: Avi Kivity <avi@redhat.com>
To: quintela@redhat.com, Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/2] memory: introduce memory_region_name()
Date: Tue, 20 Dec 2011 16:05:13 +0200 [thread overview]
Message-ID: <1324389914-12246-2-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1324389914-12246-1-git-send-email-avi@redhat.com>
Trivial accessor for the name attribute.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
memory.c | 5 +++++
memory.h | 9 +++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/memory.c b/memory.c
index a90eefd..93f9569 100644
--- a/memory.c
+++ b/memory.c
@@ -1108,6 +1108,11 @@ uint64_t memory_region_size(MemoryRegion *mr)
return int128_get64(mr->size);
}
+const char *memory_region_name(MemoryRegion *mr)
+{
+ return mr->name;
+}
+
bool memory_region_is_ram(MemoryRegion *mr)
{
return mr->ram;
diff --git a/memory.h b/memory.h
index a82226a..55e7830 100644
--- a/memory.h
+++ b/memory.h
@@ -316,6 +316,15 @@ uint64_t memory_region_size(MemoryRegion *mr);
bool memory_region_is_ram(MemoryRegion *mr);
/**
+ * memory_region_name: get a memory region's name
+ *
+ * Returns the string that was used to initialize the memory region.
+ *
+ * @mr: the memory region being queried
+ */
+const char *memory_region_name(MemoryRegion *mr);
+
+/**
* memory_region_is_logging: return whether a memory region is logging writes
*
* Returns %true if the memory region is logging writes
--
1.7.7.1
next prev parent reply other threads:[~2011-12-20 14:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 14:05 [Qemu-devel] [PATCH 0/2] Decouple vmstate from memory API Avi Kivity
2011-12-20 14:05 ` Avi Kivity [this message]
2011-12-20 14:05 ` [Qemu-devel] [PATCH 2/2] vmstate, memory: decouple " Avi Kivity
2011-12-20 14:09 ` Anthony Liguori
2011-12-20 14:16 ` Avi Kivity
2012-01-08 5:14 ` Jordan Justen
2012-01-08 7:23 ` Stefan Weil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1324389914-12246-2-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).