add some basic fcntl/ioctl-like functionality