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
cf8b39d4
Commit
cf8b39d4
authored
Feb 15, 2012
by
Cyrill Gorcunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util: Drop jerr macros
Signed-off-by:
Cyrill Gorcunov
<
gorcunov@openvz.org
>
parent
dcb1cbfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
29 deletions
+13
-29
cr-dump.c
cr-dump.c
+13
-4
util.h
include/util.h
+0
-25
No files found.
cr-dump.c
View file @
cf8b39d4
...
@@ -578,8 +578,15 @@ static int get_task_regs(pid_t pid, struct core_entry *core)
...
@@ -578,8 +578,15 @@ static int get_task_regs(pid_t pid, struct core_entry *core)
user_regs_struct_t
regs
=
{
-
1
};
user_regs_struct_t
regs
=
{
-
1
};
int
ret
=
-
1
;
int
ret
=
-
1
;
jerr
(
ptrace
(
PTRACE_GETREGS
,
pid
,
NULL
,
&
regs
),
err
);
if
(
ptrace
(
PTRACE_GETREGS
,
pid
,
NULL
,
&
regs
))
{
jerr
(
ptrace
(
PTRACE_GETFPREGS
,
pid
,
NULL
,
&
fpregs
),
err
);
pr_err
(
"Can't obtain GP registers for %d
\n
"
,
pid
);
goto
err
;
}
if
(
ptrace
(
PTRACE_GETFPREGS
,
pid
,
NULL
,
&
fpregs
))
{
pr_err
(
"Can't obtain FPU registers for %d
\n
"
,
pid
);
goto
err
;
}
/* Did we come from a system call? */
/* Did we come from a system call? */
if
((
int
)
regs
.
orig_ax
>=
0
)
{
if
((
int
)
regs
.
orig_ax
>=
0
)
{
...
@@ -1085,8 +1092,10 @@ static int dump_task_thread(pid_t pid, struct cr_fdset *cr_fdset)
...
@@ -1085,8 +1092,10 @@ static int dump_task_thread(pid_t pid, struct cr_fdset *cr_fdset)
ret
=
get_task_regs
(
pid
,
core
);
ret
=
get_task_regs
(
pid
,
core
);
if
(
ret
)
if
(
ret
)
goto
err_free
;
goto
err_free
;
jerr
(
ptrace
(
PTRACE_GET_TID_ADDRESS
,
pid
,
NULL
,
if
(
ptrace
(
PTRACE_GET_TID_ADDRESS
,
pid
,
NULL
,
&
core
->
clear_tid_address
))
{
&
core
->
clear_tid_address
),
err_free
);
pr_err
(
"Can't get TID address for %d
\n
"
,
pid
);
goto
err_free
;
}
pr_info
(
"OK
\n
"
);
pr_info
(
"OK
\n
"
);
core
->
tc
.
task_state
=
TASK_ALIVE
;
core
->
tc
.
task_state
=
TASK_ALIVE
;
...
...
include/util.h
View file @
cf8b39d4
...
@@ -37,31 +37,6 @@ extern void printk(const char *format, ...)
...
@@ -37,31 +37,6 @@ extern void printk(const char *format, ...)
#define pr_panic(fmt, ...) printk("PANIC (%s:%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define pr_panic(fmt, ...) printk("PANIC (%s:%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define pr_warning(fmt, ...) printk("Warning (%s:%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define pr_warning(fmt, ...) printk("Warning (%s:%d): " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
#define pr_err_jmp(label) \
do { \
printk("EJMP: %s:%d\n", __FILE__, __LINE__); \
goto label; \
} while (0)
#define jerr(code, label) \
do { \
if ((code)) \
pr_err_jmp(label); \
} while (0)
#define jerr_cond(code, cond, label) \
do { \
if ((code) cond) \
pr_err_jmp(label); \
} while (0)
#define jerr_rc(code, rc, label) \
do { \
rc = (code); \
if (rc) \
pr_err_jmp(label); \
} while (0)
#ifdef CR_DEBUG
#ifdef CR_DEBUG
#define pr_debug(fmt, ...) \
#define pr_debug(fmt, ...) \
do { \
do { \
...
...
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