Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
6ff0edad
Commit
6ff0edad
authored
Apr 11, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
img: Open images "at" functionality
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
82ac1ae3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
image.c
image.c
+8
-4
crtools.h
include/crtools.h
+3
-1
No files found.
image.c
View file @
6ff0edad
...
...
@@ -264,9 +264,8 @@ struct cr_fdset *cr_glob_fdset_open(int mode)
return
cr_fdset_open
(
-
1
/* ignored */
,
_CR_FD_GLOB_FROM
,
_CR_FD_GLOB_TO
,
mode
);
}
int
open_image
(
int
type
,
unsigned
long
flags
,
...)
int
open_image
_at
(
int
dfd
,
int
type
,
unsigned
long
flags
,
...)
{
int
dfd
=
get_service_fd
(
IMG_FD_OFF
);
char
path
[
PATH_MAX
];
va_list
args
;
int
ret
;
...
...
@@ -350,7 +349,7 @@ void up_page_ids_base(void)
page_ids
+=
0x10000
;
}
int
open_pages_image
(
unsigned
long
flags
,
int
pm_fd
)
int
open_pages_image
_at
(
int
dfd
,
unsigned
long
flags
,
int
pm_fd
)
{
unsigned
id
;
...
...
@@ -367,5 +366,10 @@ int open_pages_image(unsigned long flags, int pm_fd)
return
-
1
;
}
return
open_image
(
CR_FD_PAGES
,
flags
,
id
);
return
open_image_at
(
dfd
,
CR_FD_PAGES
,
flags
,
id
);
}
int
open_pages_image
(
unsigned
long
flags
,
int
pm_fd
)
{
return
open_pages_image_at
(
get_service_fd
(
IMG_FD_OFF
),
flags
,
pm_fd
);
}
include/crtools.h
View file @
6ff0edad
...
...
@@ -188,8 +188,10 @@ extern struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX];
extern
int
open_image_dir
(
void
);
extern
void
close_image_dir
(
void
);
int
open_image
(
int
type
,
unsigned
long
flags
,
...);
int
open_image_at
(
int
dfd
,
int
type
,
unsigned
long
flags
,
...);
#define open_image(typ, flags, ...) open_image_at(get_service_fd(IMG_FD_OFF), typ, flags, ##__VA_ARGS__)
int
open_pages_image
(
unsigned
long
flags
,
int
pm_fd
);
int
open_pages_image_at
(
int
dfd
,
unsigned
long
flags
,
int
pm_fd
);
void
up_page_ids_base
(
void
);
#define LAST_PID_PATH "/proc/sys/kernel/ns_last_pid"
...
...
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