diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2019-01-21 11:17:44 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2019-01-22 15:15:14 +0000 |
commit | 29c3b54f0c8ec7e3aeed8971d24f939bc4bfab04 (patch) | |
tree | ffb46b0079ab5c862731b080755e0dfa554a4c03 | |
parent | f10f1b8bb157973053aecc3176d089aae6e276fa (diff) |
libcamera: camera_manager: Return EBUSY if enumerator exists
In the case that someone calls CameraManager::start() and it has already
started/enumerated, instead of returning -ENODEV, return -EBUSY.
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | src/libcamera/camera_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 372b5a59..37ccbd53 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -78,7 +78,7 @@ CameraManager::~CameraManager() int CameraManager::start() { if (enumerator_) - return -ENODEV; + return -EBUSY; enumerator_ = DeviceEnumerator::create(); if (enumerator_->enumerate()) |