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
d56e2236
Commit
d56e2236
authored
Nov 19, 2013
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxc_user_nic: report strerror(errno)
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
95dfc8bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lxc_user_nic.c
src/lxc/lxc_user_nic.c
+2
-2
No files found.
src/lxc/lxc_user_nic.c
View file @
d56e2236
...
@@ -633,7 +633,7 @@ bool cull_entries(int fd, char *me, char *t, char *br)
...
@@ -633,7 +633,7 @@ bool cull_entries(int fd, char *me, char *t, char *br)
return
true
;
return
true
;
buf
=
mmap
(
NULL
,
len
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
buf
=
mmap
(
NULL
,
len
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
if
(
buf
==
MAP_FAILED
)
{
if
(
buf
==
MAP_FAILED
)
{
fprintf
(
stderr
,
"Failed to create mapping:
error %d
\n
"
,
errno
);
fprintf
(
stderr
,
"Failed to create mapping:
%s
\n
"
,
strerror
(
errno
)
);
return
false
;
return
false
;
}
}
...
@@ -718,7 +718,7 @@ bool get_nic_if_avail(int fd, char *me, int pid, char *intype, char *br, int all
...
@@ -718,7 +718,7 @@ bool get_nic_if_avail(int fd, char *me, int pid, char *intype, char *br, int all
fprintf
(
stderr
,
"Failed to set new file size
\n
"
);
fprintf
(
stderr
,
"Failed to set new file size
\n
"
);
buf
=
mmap
(
NULL
,
len
+
slen
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
buf
=
mmap
(
NULL
,
len
+
slen
,
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
fd
,
0
);
if
(
buf
==
MAP_FAILED
)
{
if
(
buf
==
MAP_FAILED
)
{
fprintf
(
stderr
,
"Failed to create mapping after extending:
error %d
\n
"
,
errno
);
fprintf
(
stderr
,
"Failed to create mapping after extending:
%s
\n
"
,
strerror
(
errno
)
);
if
(
lxc_netdev_delete_by_name
(
*
nicname
)
!=
0
)
if
(
lxc_netdev_delete_by_name
(
*
nicname
)
!=
0
)
fprintf
(
stderr
,
"Error unlinking %s!
\n
"
,
*
nicname
);
fprintf
(
stderr
,
"Error unlinking %s!
\n
"
,
*
nicname
);
return
false
;
return
false
;
...
...
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