diff options
author | Landon J. Fuller <landonf@FreeBSD.org> | 2016-08-01 16:26:08 +0000 |
---|---|---|
committer | Landon J. Fuller <landonf@FreeBSD.org> | 2016-08-01 16:26:08 +0000 |
commit | 3cbea0b15cdbb3d3ae445a47057dc4efda9af4bb (patch) | |
tree | d7321347ebb56fd5330235d337ecd8f00ea3b26a /sys/dev/cfe/cfe_api.c | |
parent | 76d0325743902bd0c23111c4927686394882daba (diff) | |
download | src-3cbea0b15cdbb3d3ae445a47057dc4efda9af4bb.tar.gz src-3cbea0b15cdbb3d3ae445a47057dc4efda9af4bb.zip |
Sync CFE interface with upstream cfe-1.4.2 release.
Approved by: adrian (mentor)
Obtained from: https://www.broadcom.com/support/communications-processors
Differential Revision: https://reviews.freebsd.org/D7375
Notes
Notes:
svn path=/head/; revision=303621
Diffstat (limited to 'sys/dev/cfe/cfe_api.c')
-rw-r--r-- | sys/dev/cfe/cfe_api.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sys/dev/cfe/cfe_api.c b/sys/dev/cfe/cfe_api.c index bf3fa66e895e..1b3610af875c 100644 --- a/sys/dev/cfe/cfe_api.c +++ b/sys/dev/cfe/cfe_api.c @@ -1,5 +1,4 @@ -/* $NetBSD: cfe_api.c,v 1.5 2005/12/11 12:18:07 christos Exp $ */ -/* from: SiByte Id: cfe_api.c,v 1.16 2002/07/09 23:29:11 cgd Exp $ */ +/* from: Broadcom Id: cfe_api.c,v 1.18 2006/08/24 02:13:56 binh Exp $ */ /*- * Copyright 2000, 2001, 2002 @@ -177,6 +176,27 @@ cfe_enumenv(int idx, char *name, int namelen, char *val, int vallen) } #endif /* CFE_API_enumenv || CFE_API_ALL */ +#if defined(CFE_API_enumdev) || defined(CFE_API_ALL) +int +cfe_enumdev(int idx, char *name, int namelen) +{ + cfe_xiocb_t xiocb; + + xiocb.xiocb_fcode = CFE_CMD_DEV_ENUM; + xiocb.xiocb_status = 0; + xiocb.xiocb_handle = 0; + xiocb.xiocb_flags = 0; + xiocb.xiocb_psize = sizeof(xiocb_envbuf_t); + xiocb.plist.xiocb_envbuf.enum_idx = idx; + xiocb.plist.xiocb_envbuf.name_ptr = XPTR_FROM_NATIVE(name); + xiocb.plist.xiocb_envbuf.name_length = namelen; + + cfe_iocb_dispatch(&xiocb); + + return xiocb.xiocb_status; +} +#endif /* CFE_API_enumdev || CFE_API_ALL */ + #if defined(CFE_API_enummem) || defined(CFE_API_ALL) int cfe_enummem(int idx, int flags, cfe_xuint_t *start, cfe_xuint_t *length, |