mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Easing in binfmt support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1892 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* nxflat/lib/nxflat_stack.c
|
||||
* binfmt/libnxflat/nxflat_verify.c
|
||||
*
|
||||
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
@@ -49,20 +49,6 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define V_MAP (load_info->vtbl->map)
|
||||
#define V_UNMAP (load_info->vtbl->unmap)
|
||||
#define V_ALLOC (load_info->vtbl->alloc)
|
||||
#define V_FREE (load_info->vtbl->free)
|
||||
#define V_OPEN (load_info->vtbl->open)
|
||||
#define V_READ (load_info->vtbl->read)
|
||||
#define V_CLOSE (load_info->vtbl->close)
|
||||
|
||||
#define XFLT_HDR_SIZE sizeof(struct nxflat_hdr_s)
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(x,y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Constant Data
|
||||
****************************************************************************/
|
||||
@@ -85,7 +71,7 @@ int nxflat_verifyheader(const struct nxflat_hdr_s *header)
|
||||
|
||||
if (!header)
|
||||
{
|
||||
dbg("NULL NXFLAT header!");
|
||||
bdbg("NULL NXFLAT header!");
|
||||
return -ENOEXEC;
|
||||
}
|
||||
|
||||
@@ -97,7 +83,7 @@ int nxflat_verifyheader(const struct nxflat_hdr_s *header)
|
||||
|
||||
if (strncmp(header->h_magic, "NXFLAT", 4) != 0)
|
||||
{
|
||||
dbg("Unrecognized magic=\"%c%c%c%c\"",
|
||||
bdbg("Unrecognized magic=\"%c%c%c%c\"",
|
||||
header->h_magic[0], header->h_magic[1],
|
||||
header->h_magic[2], header->h_magic[3]);
|
||||
return -ENOEXEC;
|
||||
@@ -108,7 +94,7 @@ int nxflat_verifyheader(const struct nxflat_hdr_s *header)
|
||||
revision = ntohs(header->h_rev);
|
||||
if (revision != NXFLAT_VERSION_CURRENT)
|
||||
{
|
||||
dbg("Unsupported NXFLAT version=%d\n", revision);
|
||||
bdbg("Unsupported NXFLAT version=%d\n", revision);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user