Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2a16fc74
Commit
2a16fc74
authored
Feb 27, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CompositeStorage: add method GetMount()
parent
f6525468
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
CompositeStorage.cxx
src/storage/CompositeStorage.cxx
+13
-0
CompositeStorage.hxx
src/storage/CompositeStorage.hxx
+11
-0
No files found.
src/storage/CompositeStorage.cxx
View file @
2a16fc74
...
@@ -210,6 +210,19 @@ CompositeStorage::~CompositeStorage()
...
@@ -210,6 +210,19 @@ CompositeStorage::~CompositeStorage()
{
{
}
}
Storage
*
CompositeStorage
::
GetMount
(
const
char
*
uri
)
{
const
ScopeLock
protect
(
mutex
);
auto
result
=
FindStorage
(
uri
);
if
(
*
result
.
uri
!=
0
)
/* not a mount point */
return
nullptr
;
return
result
.
directory
->
storage
;
}
void
void
CompositeStorage
::
Mount
(
const
char
*
uri
,
Storage
*
storage
)
CompositeStorage
::
Mount
(
const
char
*
uri
,
Storage
*
storage
)
{
{
...
...
src/storage/CompositeStorage.hxx
View file @
2a16fc74
...
@@ -96,6 +96,17 @@ public:
...
@@ -96,6 +96,17 @@ public:
virtual
~
CompositeStorage
();
virtual
~
CompositeStorage
();
/**
/**
* Get the #Storage at the specified mount point. Returns
* nullptr if the given URI is not a mount point.
*
* The returned pointer is unprotected. No other thread is
* allowed to unmount the given mount point while the return
* value is being used.
*/
gcc_pure
gcc_nonnull_all
Storage
*
GetMount
(
const
char
*
uri
);
/**
* Call the given function for each mounted storage, including
* Call the given function for each mounted storage, including
* the root storage. Passes mount point URI and the a const
* the root storage. Passes mount point URI and the a const
* Storage reference to the function.
* Storage reference to the function.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment