Use poll()

Still very rough.

Signed-off-by: Andy Grover <agrover@redhat.com>
Remove cb_func

Don't need it, can give genl_handle_msg as callback ptr directly.

Signed-off-by: Andy Grover <agrover@redhat.com>
Use scandir to find uio tcm-user devices

Not yet mmaping them.

Signed-off-by: Andy Grover <agrover@redhat.com>
Add darray.h from CCAN

Signed-off-by: Andy Grover <agrover@redhat.com>
Change code to use darray for devices

Use a darray of struct tcmu_device to keep track of info in devices.

Call mmap(), but mmap size detection not implemented yet.

Put netlink FD at the end off poll array instead of the beginning.

Signed-off-by: Andy Grover <agrover@redhat.com>
Refactor open_device out of open_devices

Signed-off-by: Andy Grover <agrover@redhat.com>
Add darray_remove

We need to be able to remove elements from the array, but it's ok if
the performance is poor.

Signed-off-by: Andy Grover <agrover@redhat.com>