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
efdb52e3
Commit
efdb52e3
authored
Oct 25, 2011
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore: Add reading core entry
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@gmail.com
>
parent
0133a23a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
restorer.c
restorer.c
+14
-6
No files found.
restorer.c
View file @
efdb52e3
...
...
@@ -41,7 +41,7 @@ static void always_inline write_string(char *str)
long
restorer
(
long
cmd
)
{
long
ret
;
long
ret
=
-
1
;
asm
volatile
(
"jmp 1f
\n\t
"
...
...
@@ -56,13 +56,11 @@ long restorer(long cmd)
case
RESTORER_CMD__PR_ARG_STRING
:
{
char
*
str
=
NULL
;
int
size
=
0
;
lea_args_off
(
str
);
while
(
str
[
size
])
size
++
;
write_string
(
str
);
sys_write
(
1
,
str
,
size
)
;
ret
=
0
;
}
break
;
...
...
@@ -90,7 +88,17 @@ long restorer(long cmd)
write_string
(
"
\n
"
);
fd_core
=
sys_open
(
core_path
,
O_RDONLY
,
CR_FD_PERM
);
return
fd_core
;
if
(
fd_core
<
0
)
return
fd_core
;
sys_lseek
(
fd_core
,
MAGIC_OFFSET
,
SEEK_SET
);
ret
=
sys_read
(
fd_core
,
&
core_entry
,
sizeof
(
core_entry
));
sys_close
(
fd_core
);
if
(
ret
!=
sizeof
(
core_entry
))
return
-
ret
;
return
ret
;
/*
* Unmap all but self, note that we reply on
...
...
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