6 |
|
|
7 |
|
#include "Unmounter.hpp" |
8 |
|
|
9 |
< |
Unmounter::Unmounter(const ext::String& config) : Daemon(), config(config) {} |
9 |
> |
Unmounter::Unmounter(const api::Path& config) : Daemon(), config(config) {} |
10 |
|
|
11 |
|
void Unmounter::load() |
12 |
|
{ |
13 |
– |
api::Cerr << "Unmounter::load()" << ios::NewLine; |
14 |
– |
|
13 |
|
loaded = true; |
14 |
|
} |
15 |
|
|
16 |
|
void Unmounter::run() |
17 |
|
{ |
18 |
< |
api::Cerr << "Unmounter::run()" << ios::NewLine; |
18 |
> |
ext::ThreadSet<> workers; |
19 |
> |
|
20 |
> |
_synchronized (Spectre2::sharesLock) _foreach (const ext::RedBlackSet<Share>, share, Spectre2::shares) if (share->mounted() && !share->mountable()) |
21 |
> |
{ |
22 |
> |
api::Cout << "STUB: unmount " << share << ios::NewLine; |
23 |
> |
} |
24 |
> |
|
25 |
> |
workers.Join(); |
26 |
|
|
27 |
< |
running = false; |
27 |
> |
::sleep(5); |
28 |
|
} |