6 |
|
|
7 |
|
#include "Unmounter.hpp" |
8 |
|
|
9 |
< |
int Unmounter::work(const Share& share) |
9 |
> |
void Unmounter::operator()() |
10 |
|
{ |
11 |
< |
api::Cout << "STUB: unmount " << share << ios::NewLine; |
11 |
> |
_L<ext::String> args(1, "-f"); |
12 |
|
|
13 |
< |
::sleep(5); |
13 |
> |
#ifndef __FreeBSD__ |
14 |
> |
args[0].InsertAllLast("l"); |
15 |
> |
#endif |
16 |
> |
args.InsertLast(share.getMount()); |
17 |
|
|
18 |
< |
return 0; |
18 |
> |
_S<api::Process> umount(Spectre2::umount, args); |
19 |
> |
|
20 |
> |
if (Spectre2::debug) |
21 |
> |
ios::ReadToWrite(*umount.GetReader(), api::Cout); |
22 |
> |
else |
23 |
> |
ios::Discard(*umount.GetReader()); |
24 |
|
} |