Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
ef72d7d6
Unverified
Commit
ef72d7d6
authored
Jul 01, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: add lxc_storage_get_path()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
187439b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
bdev.c
src/lxc/bdev/bdev.c
+11
-0
bdev.h
src/lxc/bdev/bdev.h
+1
-0
No files found.
src/lxc/bdev/bdev.c
View file @
ef72d7d6
...
...
@@ -609,3 +609,14 @@ bool rootfs_is_blockdev(struct lxc_conf *conf)
return
false
;
}
char
*
lxc_storage_get_path
(
char
*
src
,
const
char
*
prefix
)
{
size_t
prefix_len
;
prefix_len
=
strlen
(
prefix
);
if
(
!
strncmp
(
src
,
prefix
,
prefix_len
)
&&
(
*
(
src
+
prefix_len
)
==
':'
))
return
(
src
+
prefix_len
+
1
);
return
src
;
}
src/lxc/bdev/bdev.h
View file @
ef72d7d6
...
...
@@ -125,5 +125,6 @@ bool bdev_destroy(struct lxc_conf *conf);
/* callback function to be used with userns_exec_1() */
int
bdev_destroy_wrapper
(
void
*
data
);
extern
bool
rootfs_is_blockdev
(
struct
lxc_conf
*
conf
);
extern
char
*
lxc_storage_get_path
(
char
*
src
,
const
char
*
prefix
);
#endif // __LXC_BDEV_H
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