]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/nl.c
lxc: remove perror call in nl.c (V2)
[mirror_lxc.git] / src / lxc / nl.c
index b5d3dd0f46b6bf0e68249f61d2904c7f2a11e85f..fdaf07e66597800799521db389891b0e20bdb79d 100644 (file)
@@ -195,7 +195,6 @@ extern int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg)
 extern int netlink_transaction(struct nl_handler *handler, 
                               struct nlmsg *request, struct nlmsg *answer)
 {
-
        int ret;
 
        ret = netlink_send(handler, request);
@@ -208,10 +207,7 @@ extern int netlink_transaction(struct nl_handler *handler,
 
        if (answer->nlmsghdr.nlmsg_type == NLMSG_ERROR) {
                struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(answer);
-               errno = -err->error;
-               if (errno)
-                       perror("Error configuring kernel");
-               return -errno;
+               return err->error;
        }
        
        return 0;