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:04:09 +0100 |
commit | e6acc15bc94ea35f40e50b42692584c456ba9722 (patch) | |
tree | a42ff1052af35a2aadf9d5cb46f400127b07a500 /freebsd/sbin/nvmecontrol/ns.c | |
parent | NVMECONTROL(8): Add to build (diff) | |
download | rtems-libbsd-e6acc15bc94ea35f40e50b42692584c456ba9722.tar.bz2 |
NVMECONTROL(8): Port to RTEMS
Update #3821.
Diffstat (limited to '')
-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 9705706b..f01d3213 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) |