aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/um/drivers/daemon_user.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index 310af0f1e49e..021b82c7a759 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -56,30 +56,31 @@ static int connect_to_switch(struct daemon_data *pri)
56 56
57 pri->control = socket(AF_UNIX, SOCK_STREAM, 0); 57 pri->control = socket(AF_UNIX, SOCK_STREAM, 0);
58 if(pri->control < 0){ 58 if(pri->control < 0){
59 err = -errno;
59 printk("daemon_open : control socket failed, errno = %d\n", 60 printk("daemon_open : control socket failed, errno = %d\n",
60 errno); 61 -err);
61 return(-errno); 62 return err;
62 } 63 }
63 64
64 if(connect(pri->control, (struct sockaddr *) ctl_addr, 65 if(connect(pri->control, (struct sockaddr *) ctl_addr,
65 sizeof(*ctl_addr)) < 0){ 66 sizeof(*ctl_addr)) < 0){
66 printk("daemon_open : control connect failed, errno = %d\n",
67 errno);
68 err = -errno; 67 err = -errno;
68 printk("daemon_open : control connect failed, errno = %d\n",
69 -err);
69 goto out; 70 goto out;
70 } 71 }
71 72
72 fd = socket(AF_UNIX, SOCK_DGRAM, 0); 73 fd = socket(AF_UNIX, SOCK_DGRAM, 0);
73 if(fd < 0){ 74 if(fd < 0){
74 printk("daemon_open : data socket failed, errno = %d\n",
75 errno);
76 err = -errno; 75 err = -errno;
76 printk("daemon_open : data socket failed, errno = %d\n",
77 -err);
77 goto out; 78 goto out;
78 } 79 }
79 if(bind(fd, (struct sockaddr *) local_addr, sizeof(*local_addr)) < 0){ 80 if(bind(fd, (struct sockaddr *) local_addr, sizeof(*local_addr)) < 0){
80 printk("daemon_open : data bind failed, errno = %d\n",
81 errno);
82 err = -errno; 81 err = -errno;
82 printk("daemon_open : data bind failed, errno = %d\n",
83 -err);
83 goto out_close; 84 goto out_close;
84 } 85 }
85 86