summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-cp2-5422/recipes-phosphor/virtual-media/virtual-media/0010-virtual-media.3-Upd-Just-move-SmbShare-s-methods.patch
blob: 6e947c6081303c002b8b15170e2d437e04e7afa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From b3ce2fd3b4095b8232d679d48a1156aec84aa0c7 Mon Sep 17 00:00:00 2001
From: Alexandr Ilenko <AIlenko@IBS.RU>
Date: Mon, 20 Jun 2022 09:52:28 +0300
Subject: [PATCH 10/20] virtual-media.3: Upd: Just move SmbShare`s methods

---
 src/netdev.hpp | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/netdev.hpp b/src/netdev.hpp
index 9e4a2fc..064b340 100644
--- a/src/netdev.hpp
+++ b/src/netdev.hpp
@@ -13,6 +13,15 @@ namespace fs = std::filesystem;
 
 class SmbShare
 {
+  protected:
+    std::string mountDir;
+
+    /* Check if username does not contain comma (,) character */
+    bool validateUsername(const std::string& username)
+    {
+        return username.find(',') == std::string::npos;
+    }
+
   public:
     SmbShare(const fs::path& mountDir) : mountDir(mountDir)
     {
@@ -68,14 +77,6 @@ class SmbShare
     }
 
   private:
-    std::string mountDir;
-
-    /* Check if username does not contain comma (,) character */
-    bool validateUsername(const std::string& username)
-    {
-        return username.find(',') == std::string::npos;
-    }
-
     int mountWithSmbVers(const fs::path& remote, std::string options,
                          const std::string& version)
     {
-- 
2.35.1