diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-09-20 07:57:01 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-11-13 13:22:36 +0100 |
commit | afaeccc05a556f6aa25ba044a7e49d6aa634a59e (patch) | |
tree | 09021686e43641fe7f2ec89996a808a5ca3f06e4 /freebsd/sbin/nvmecontrol/ns.c | |
parent | NVMECONTROL(8): Add to build (diff) | |
download | rtems-libbsd-afaeccc05a556f6aa25ba044a7e49d6aa634a59e.tar.bz2 |
NVMECONTROL(8): Port to RTEMS
Update #3821.
Diffstat (limited to 'freebsd/sbin/nvmecontrol/ns.c')
-rw-r--r-- | freebsd/sbin/nvmecontrol/ns.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/freebsd/sbin/nvmecontrol/ns.c b/freebsd/sbin/nvmecontrol/ns.c index bb9b0011..841c1a87 100644 --- a/freebsd/sbin/nvmecontrol/ns.c +++ b/freebsd/sbin/nvmecontrol/ns.c @@ -28,6 +28,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef __rtems__ +#include <machine/rtems-bsd-program.h> +#endif /* __rtems__ */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -368,7 +371,7 @@ struct ns_result_str { const char * str; }; -static struct ns_result_str ns_result[] = { +static const struct ns_result_str ns_result[] = { { 0x2, "Invalid Field"}, { 0xa, "Invalid Format"}, { 0xb, "Invalid Namespace or format"}, @@ -387,7 +390,7 @@ static struct ns_result_str ns_result[] = { static const char * get_res_str(uint16_t res) { - struct ns_result_str *t = ns_result; + const struct ns_result_str *t = ns_result; while (t->res != 0xFFFF) { if (t->res == res) |