From: Serge Hallyn <[email protected]>
Signed-off-by: Serge Hallyn <[email protected]>
---
src/lxc/lxc_user_nic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c
index 0b82a50..4154e83 100644
--- a/src/lxc/lxc_user_nic.c
+++ b/src/lxc/lxc_user_nic.c
@@ -105,7 +105,8 @@ int open_and_lock(char *path)
fd = open(path, O_RDWR|O_CREAT, S_IWUSR | S_IRUSR);
if (fd < 0) {
- perror("open");
+ fprintf(stderr, "Failed to open %s: %s\n",
+ path, strerror(errno));
return(fd);
}
@@ -114,7 +115,8 @@ int open_and_lock(char *path)
lk.l_start = 0;
lk.l_len = 0;
if (fcntl(fd, F_SETLKW, &lk) < 0) {
- perror("fcntl lock");
+ fprintf(stderr, "Failed to lock %s: %s\n",
+ path, strerror(errno));
return -1;
}
--
1.8.3.2
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel