*/
#include <config.h>
-
-#if defined(CONFIG_API)
-
#include <command.h>
#include <common.h>
#include <malloc.h>
+#include <environment.h>
#include <linux/types.h>
#include <api_public.h>
/* U-Boot routines needed */
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-extern uchar (*env_get_char)(int);
-extern uchar *env_get_addr(int);
/*****************************************************************************
*
/* start over - clean up enumeration */
dev_enum_reset(); /* XXX shouldn't the name contain 'stor'? */
debugf("RESTART ENUM\n");
-
+
/* net device enumeration first */
if (dev_enum_net(di))
return 0;
return API_EINVAL;
if (di->type & DEV_TYP_STOR)
- /*
+ /*
* write to storage is currently not supported by U-Boot:
* no storage device implements block_write() method
*/
char *last, **next;
last = (char *)va_arg(ap, u_int32_t);
-
+
if ((next = (char **)va_arg(ap, u_int32_t)) == NULL)
return API_EINVAL;
for (i = 0; env_get_char(i) != '\0'; i = n + 1) {
for (n = i; env_get_char(n) != '\0'; ++n) {
- if (n >= CFG_ENV_SIZE) {
+ if (n >= CONFIG_ENV_SIZE) {
/* XXX shouldn't we set *next = NULL?? */
return 0;
}
}
-
+
if (envmatch((uchar *)last, i) < 0)
continue;
* serviced until finished.
*
* e.g. syscall(1, int *, u_int32_t, u_int32_t, u_int32_t, u_int32_t);
- *
+ *
* call: syscall number
*
* retval: points to the return value placeholder, this is the place the
va_list ap;
int rv;
- if (call < 0 || call >= calls_no || calls_table[call] == NULL) {
+ if (call < 0 || call >= calls_no) {
debugf("invalid call #%d\n", call);
return 0;
}
if (!si->mr || !size || (flags == 0))
return;
-
+
/* find free slot */
for (i = 0; i < si->mr_no; i++)
if (si->mr[i].flags == 0) {
return;
}
}
-
-#endif /* CONFIG_API */