]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme-cli: fix ioctl argument
authorWarner Losh <imp@FreeBSD.org>
Fri, 5 Oct 2018 04:08:01 +0000 (22:08 -0600)
committerWarner Losh <imp@FreeBSD.org>
Fri, 5 Oct 2018 04:14:37 +0000 (22:14 -0600)
commitcc1efaaebb409426bb725c015b534a1959f94e29
treeb2a819c4135f29d4d60fd87dc7115ab990c16d10
parent559c0f04ba6461997bdfa1cc8eae948dd01693ed
nvme-cli: fix ioctl argument

The command argument for ioctl is unsigned long, not int. Fix all the
places that we pass cmd through to the ioctl call to handle it as an
unsigned long. This prevents a sign extension bug when IOCTL commands
encode with the top bit set.
nvme-ioctl.c
nvme-ioctl.h