diff options
| author | Wim Van Sebroeck <wim@iguana.be> | 2007-05-11 19:03:13 +0000 | 
|---|---|---|
| committer | Wim Van Sebroeck <wim@iguana.be> | 2007-05-11 19:03:13 +0000 | 
| commit | 5c34202b8bf942da411b6599668a76b07449bbfd (patch) | |
| tree | 5719c361321eaddc8e4f1b0c8a7994f0e9a6fdd3 /arch/um/drivers/daemon_user.c | |
| parent | 0d4804b31f91cfbcff6d62af0bc09a893a1c8ae0 (diff) | |
| parent | 1f8a6b658a943b4f04a1fc7b3a420360202c86cd (diff) | |
Merge /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/um/drivers/daemon_user.c')
| -rw-r--r-- | arch/um/drivers/daemon_user.c | 31 | 
1 files changed, 11 insertions, 20 deletions
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c index 021b82c7a75..b869e389968 100644 --- a/arch/um/drivers/daemon_user.c +++ b/arch/um/drivers/daemon_user.c @@ -14,7 +14,6 @@  #include "net_user.h"  #include "daemon.h"  #include "kern_util.h" -#include "user_util.h"  #include "user.h"  #include "os.h"  #include "um_malloc.h" @@ -39,11 +38,11 @@ static struct sockaddr_un *new_addr(void *name, int len)  	sun = um_kmalloc(sizeof(struct sockaddr_un));  	if(sun == NULL){  		printk("new_addr: allocation of sockaddr_un failed\n"); -		return(NULL); +		return NULL;  	}  	sun->sun_family = AF_UNIX;  	memcpy(sun->sun_path, name, len); -	return(sun); +	return sun;  }  static int connect_to_switch(struct daemon_data *pri) @@ -112,7 +111,7 @@ static int connect_to_switch(struct daemon_data *pri)  	}  	pri->data_addr = sun; -	return(fd); +	return fd;   out_free:  	kfree(sun); @@ -120,10 +119,10 @@ static int connect_to_switch(struct daemon_data *pri)  	os_close_file(fd);   out:  	os_close_file(pri->control); -	return(err); +	return err;  } -static void daemon_user_init(void *data, void *dev) +static int daemon_user_init(void *data, void *dev)  {  	struct daemon_data *pri = data;  	struct timeval tv; @@ -146,13 +145,16 @@ static void daemon_user_init(void *data, void *dev)  	if(pri->fd < 0){  		kfree(pri->local_addr);  		pri->local_addr = NULL; +		return pri->fd;  	} + +	return 0;  }  static int daemon_open(void *data)  {  	struct daemon_data *pri = data; -	return(pri->fd); +	return pri->fd;  }  static void daemon_remove(void *data) @@ -176,12 +178,12 @@ int daemon_user_write(int fd, void *buf, int len, struct daemon_data *pri)  {  	struct sockaddr_un *data_addr = pri->data_addr; -	return(net_sendto(fd, buf, len, data_addr, sizeof(*data_addr))); +	return net_sendto(fd, buf, len, data_addr, sizeof(*data_addr));  }  static int daemon_set_mtu(int mtu, void *data)  { -	return(mtu); +	return mtu;  }  const struct net_user_info daemon_user_info = { @@ -194,14 +196,3 @@ const struct net_user_info daemon_user_info = {  	.delete_address = NULL,  	.max_packet	= MAX_PACKET - ETH_HEADER_OTHER  }; - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only.  This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */  | 
