Refactor UsbCameraProperty.

This commit is contained in:
Peter Johnson
2016-12-22 22:08:08 -08:00
parent d6ef2c04a5
commit 5e38d8f28a
6 changed files with 406 additions and 343 deletions

View File

@@ -16,6 +16,17 @@ namespace cs {
llvm::StringRef GetUsbNameFromId(int vendor, int product,
llvm::SmallVectorImpl<char>& buf);
#ifdef __linux__
int CheckedIoctl(int fd, unsigned long req, void* data, const char* name,
const char* file, int line, bool quiet);
#define DoIoctl(fd, req, data) \
CheckedIoctl(fd, req, data, #req, __FILE__, __LINE__, false)
#define TryIoctl(fd, req, data) \
CheckedIoctl(fd, req, data, #req, __FILE__, __LINE__, true)
#endif // __linux__
} // namespace cs
#endif // CS_USBUTIL_H_