Revert "fix ioctl warning"

This reverts commit 1e97542300ac08e9d0802aaef7919719915add99.