Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rogge <andreas.rogge@bareos.com>2022-10-11 10:32:34 +0300
committerAndreas Rogge <andreas.rogge@bareos.com>2022-11-07 19:38:57 +0300
commitc50a1a24568c1036083cae572718d96f9ccd6a02 (patch)
treea8cb4b3206870b6f2b66013b11e4f00e88996cbe
parent9b4883a8d2b2c2621e275bf68d102cd266a8afff (diff)
stored: disable copy/move on Device class
-rw-r--r--core/src/stored/dev.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/stored/dev.h b/core/src/stored/dev.h
index e8e8b2ed7..769420258 100644
--- a/core/src/stored/dev.h
+++ b/core/src/stored/dev.h
@@ -201,7 +201,11 @@ class Device {
public:
Device() = default;
virtual ~Device();
- Device* swap_dev{}; /**< Swap vol from this device */
+ Device(const Device&) = delete;
+ Device& operator=(const Device&) = delete;
+ Device(Device&&) = delete;
+ Device& operator=(Device&&) = delete;
+ Device* swap_dev{}; /**< Swap vol from this device */
std::vector<DeviceControlRecord*> attached_dcrs; /**< Attached DeviceControlRecords */
pthread_mutex_t mutex_ = PTHREAD_MUTEX_INITIALIZER; /**< Access control */
pthread_mutex_t spool_mutex = PTHREAD_MUTEX_INITIALIZER; /**< Mutex for updating spool_size */