Line |
Branch |
Exec |
Source |
1 |
|
|
/** |
2 |
|
|
* This file is part of the CernVM File System. |
3 |
|
|
*/ |
4 |
|
|
|
5 |
|
|
|
6 |
|
|
#include "cmd_lsof.h" |
7 |
|
|
|
8 |
|
|
#include <string> |
9 |
|
|
#include <vector> |
10 |
|
|
|
11 |
|
|
#include "util/logging.h" |
12 |
|
|
#include "util/posix.h" |
13 |
|
|
|
14 |
|
✗ |
int publish::CmdLsof::Main(const Options &options) { |
15 |
|
✗ |
std::string path = options.plain_args()[0].value_str; |
16 |
|
✗ |
std::vector<LsofEntry> entries = Lsof(path); |
17 |
|
✗ |
for (unsigned i = 0; i < entries.size(); ++i) { |
18 |
|
✗ |
LogCvmfs(kLogCvmfs, kLogStdout, "%s %s", |
19 |
|
|
entries[i].read_only ? "ro" : "rw", entries[i].path.c_str()); |
20 |
|
|
} |
21 |
|
✗ |
return 0; |
22 |
|
|
} |
23 |
|
|
|