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
17809bcf
Unverified
Commit
17809bcf
authored
Dec 07, 2019
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands: replace logging helpers
s/error_log_errno(/log_error_errno(-1, /g s/minus_one_set_errno(/ret_set_errno(-1, /g Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
ad9fbcc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
commands.c
src/lxc/commands.c
+7
-7
No files found.
src/lxc/commands.c
View file @
17809bcf
...
@@ -913,16 +913,16 @@ int lxc_cmd_add_bpf_device_cgroup(const char *name, const char *lxcpath,
...
@@ -913,16 +913,16 @@ int lxc_cmd_add_bpf_device_cgroup(const char *name, const char *lxcpath,
int
ret
;
int
ret
;
if
(
strlen
(
device
->
access
)
>
STRLITERALLEN
(
"rwm"
))
if
(
strlen
(
device
->
access
)
>
STRLITERALLEN
(
"rwm"
))
return
error_log_errno
(
EINVAL
,
"Invalid access mode specified %s"
,
return
log_error_errno
(
-
1
,
EINVAL
,
"Invalid access mode specified %s"
,
device
->
access
);
device
->
access
);
ret
=
lxc_cmd
(
name
,
&
cmd
,
&
stopped
,
lxcpath
,
NULL
);
ret
=
lxc_cmd
(
name
,
&
cmd
,
&
stopped
,
lxcpath
,
NULL
);
if
(
ret
<
0
||
cmd
.
rsp
.
ret
<
0
)
if
(
ret
<
0
||
cmd
.
rsp
.
ret
<
0
)
return
error_log_errno
(
errno
,
"Failed to add new bpf device cgroup rule"
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to add new bpf device cgroup rule"
);
return
0
;
return
0
;
#else
#else
return
minus_one_set_errno
(
ENOSYS
);
return
ret_set_errno
(
-
1
,
ENOSYS
);
#endif
#endif
}
}
...
@@ -1006,7 +1006,7 @@ reap_client_fd:
...
@@ -1006,7 +1006,7 @@ reap_client_fd:
*/
*/
return
1
;
return
1
;
#else
#else
return
minus_one_set_errno
(
ENOSYS
);
return
ret_set_errno
(
-
1
,
ENOSYS
);
#endif
#endif
}
}
...
@@ -1137,7 +1137,7 @@ int lxc_cmd_seccomp_notify_add_listener(const char *name, const char *lxcpath,
...
@@ -1137,7 +1137,7 @@ int lxc_cmd_seccomp_notify_add_listener(const char *name, const char *lxcpath,
/* unused */
unsigned
int
command
,
/* unused */
unsigned
int
command
,
/* unused */
unsigned
int
flags
)
/* unused */
unsigned
int
flags
)
{
{
return
minus_one_set_errno
(
ENOSYS
);
return
ret_set_errno
(
-
1
,
ENOSYS
);
}
}
static
int
lxc_cmd_seccomp_notify_add_listener_callback
(
int
fd
,
static
int
lxc_cmd_seccomp_notify_add_listener_callback
(
int
fd
,
...
@@ -1175,7 +1175,7 @@ int lxc_cmd_freeze(const char *name, const char *lxcpath, int timeout)
...
@@ -1175,7 +1175,7 @@ int lxc_cmd_freeze(const char *name, const char *lxcpath, int timeout)
ret
=
lxc_cmd
(
name
,
&
cmd
,
&
stopped
,
lxcpath
,
NULL
);
ret
=
lxc_cmd
(
name
,
&
cmd
,
&
stopped
,
lxcpath
,
NULL
);
if
(
ret
<=
0
||
cmd
.
rsp
.
ret
<
0
)
if
(
ret
<=
0
||
cmd
.
rsp
.
ret
<
0
)
return
error_log_errno
(
errno
,
"Failed to freeze container"
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to freeze container"
);
return
cmd
.
rsp
.
ret
;
return
cmd
.
rsp
.
ret
;
}
}
...
@@ -1208,7 +1208,7 @@ int lxc_cmd_unfreeze(const char *name, const char *lxcpath, int timeout)
...
@@ -1208,7 +1208,7 @@ int lxc_cmd_unfreeze(const char *name, const char *lxcpath, int timeout)
ret
=
lxc_cmd
(
name
,
&
cmd
,
&
stopped
,
lxcpath
,
NULL
);
ret
=
lxc_cmd
(
name
,
&
cmd
,
&
stopped
,
lxcpath
,
NULL
);
if
(
ret
<=
0
||
cmd
.
rsp
.
ret
<
0
)
if
(
ret
<=
0
||
cmd
.
rsp
.
ret
<
0
)
return
error_log_errno
(
errno
,
"Failed to unfreeze container"
);
return
log_error_errno
(
-
1
,
errno
,
"Failed to unfreeze container"
);
return
cmd
.
rsp
.
ret
;
return
cmd
.
rsp
.
ret
;
}
}
...
...
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