[syslinux:firmware] movebits: add an inline to test for SMT_FREE || SMT_TERMINAL

syslinux-bot for H. Peter Anvin hpa at zytor.com
Thu Jul 18 05:00:13 PDT 2013


Commit-ID:  e6451bde4b7f2936acbdfd5c4e5817b6df687a7c
Gitweb:     http://www.syslinux.org/commit/e6451bde4b7f2936acbdfd5c4e5817b6df687a7c
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Wed, 17 Jul 2013 17:12:34 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Wed, 17 Jul 2013 17:12:34 -0700

movebits: add an inline to test for SMT_FREE || SMT_TERMINAL

Introduce a predicate inline to test for a valid terminal address.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>

---
 com32/include/syslinux/movebits.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/com32/include/syslinux/movebits.h b/com32/include/syslinux/movebits.h
index d5c903a..d12fb58 100644
--- a/com32/include/syslinux/movebits.h
+++ b/com32/include/syslinux/movebits.h
@@ -44,6 +44,11 @@ struct syslinux_memmap {
     struct syslinux_memmap *next;
 };
 
+static inline bool valid_terminal_type(enum syslinux_memmap_types type)
+{
+    return (type == SMT_FREE) || (type == SMT_TERMINAL);
+}
+
 /*
  * moves is computed from "fraglist" and "memmap".  Areas that are
  * to be zeroed should be marked as such in the memmap, not in the


More information about the Syslinux-commits mailing list