Skip to contentSkip to conversation

UML - Network formatting

PATCH In review Jeff Dike 1 participant 1 message Sep 26, 2007 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 1/3 UML - Network formatting

Style and other non-functional changes in the UML networking code, including
include tidying
style violations
copyright updates
printks getting severities
userspace code calling libc directly rather than using the os_*
wrappers

There's also a exit path cleanup in the pcap driver.

---
 arch/um/drivers/daemon.h                 |   20 +--
 arch/um/drivers/daemon_kern.c            |   31 ++--
 arch/um/drivers/daemon_user.c            |   81 ++++++------
 arch/um/drivers/mcast.h                  |   16 --
 arch/um/drivers/mcast_kern.c             |   55 +++-----
 arch/um/drivers/mcast_user.c             |   62 ++++-----
 arch/um/drivers/net_kern.c               |  197 +++++++++++++++----------------
 arch/um/drivers/net_user.c               |  126 ++++++++++---------
 arch/um/drivers/pcap_kern.c              |   27 ++--
 arch/um/drivers/pcap_user.c              |   49 ++++---
 arch/um/drivers/slip_kern.c              |   34 ++---
 arch/um/drivers/slip_user.c              |  122 ++++++++++---------
 arch/um/drivers/slirp_kern.c             |   55 ++++----
 arch/um/drivers/slirp_user.c             |   67 +++++-----
 arch/um/drivers/vde_kern.c               |    8 -
 arch/um/drivers/vde_user.c               |    8 -
 arch/um/os-Linux/drivers/etap.h          |   16 --
 arch/um/os-Linux/drivers/ethertap_kern.c |   36 ++---
 arch/um/os-Linux/drivers/ethertap_user.c |   86 ++++++-------
 arch/um/os-Linux/drivers/tuntap.h        |   13 --
 arch/um/os-Linux/drivers/tuntap_kern.c   |   34 ++---
 arch/um/os-Linux/drivers/tuntap_user.c   |   75 +++++------
 22 files changed, 602 insertions(+), 616 deletions(-)
arch/um/drivers/daemon_user.c +42 -39
Index: linux-2.6.20/arch/um/drivers/daemon_user.c
===================================================================
@@ -1,22 +1,23 @@
 /*
- * Copyright (C) 2001 Lennert Buytenhek ([email protected]) and 
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
+ * Copyright (C) 2001 Lennert Buytenhek ([email protected]) and
  * James Leu ([email protected]).
  * Copyright (C) 2001 by various other people who didn't put their name here.
  * Licensed under the GPL.
  */
 
-#include <errno.h>
-#include <unistd.h>
 #include <stdint.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/un.h>
 #include <sys/time.h>
-#include "net_user.h"
+#include <sys/un.h>
 #include "daemon.h"
-#include "kern_util.h"
-#include "user.h"
+#include "net_user.h"
 #include "os.h"
 #include "um_malloc.h"
+#include "user.h"
 
 #define MAX_PACKET (ETH_MAX_PACKET + ETH_HEADER_OTHER)
 
@@ -36,8 +37,9 @@ static struct sockaddr_un *new_addr(void
 	struct sockaddr_un *sun;
 
 	sun = kmalloc(sizeof(struct sockaddr_un), UM_GFP_KERNEL);
-	if(sun == NULL){
-		printk("new_addr: allocation of sockaddr_un failed\n");
+	if (sun == NULL) {
+		printk(UM_KERN_ERR "new_addr: allocation of sockaddr_un "
+		       "failed\n");
 		return NULL;
 	}
 	sun->sun_family = AF_UNIX;
@@ -54,38 +56,39 @@ static int connect_to_switch(struct daem
 	int fd, n, err;
 
 	pri->control = socket(AF_UNIX, SOCK_STREAM, 0);
-	if(pri->control < 0){
+	if (pri->control < 0) {
 		err = -errno;
-		printk("daemon_open : control socket failed, errno = %d\n", 
-		       -err);
+		printk(UM_KERN_ERR "daemon_open : control socket failed, "
+		       "errno = %d\n", -err);
 		return err;
 	}
 
-	if(connect(pri->control, (struct sockaddr *) ctl_addr, 
-		   sizeof(*ctl_addr)) < 0){
+	if (connect(pri->control, (struct sockaddr *) ctl_addr,
+		   sizeof(*ctl_addr)) < 0) {
 		err = -errno;
-		printk("daemon_open : control connect failed, errno = %d\n",
-		       -err);
+		printk(UM_KERN_ERR "daemon_open : control connect failed, "
+		       "errno = %d\n", -err);
 		goto out;
 	}
 
 	fd = socket(AF_UNIX, SOCK_DGRAM, 0);
-	if(fd < 0){
+	if (fd < 0) {
 		err = -errno;
-		printk("daemon_open : data socket failed, errno = %d\n",
-		       -err);
+		printk(UM_KERN_ERR "daemon_open : data socket failed, "
+		       "errno = %d\n", -err);
 		goto out;
 	}
-	if(bind(fd, (struct sockaddr *) local_addr, sizeof(*local_addr)) < 0){
+	if (bind(fd, (struct sockaddr *) local_addr, sizeof(*local_addr)) < 0) {
 		err = -errno;
-		printk("daemon_open : data bind failed, errno = %d\n",
-		       -err);
+		printk(UM_KERN_ERR "daemon_open : data bind failed, "
+		       "errno = %d\n", -err);
 		goto out_close;
 	}
 
 	sun = kmalloc(sizeof(struct sockaddr_un), UM_GFP_KERNEL);
-	if(sun == NULL){
-		printk("new_addr: allocation of sockaddr_un failed\n");
+	if (sun == NULL) {
+		printk(UM_KERN_ERR "new_addr: allocation of sockaddr_un "
+		       "failed\n");
 		err = -ENOMEM;
 		goto out_close;
 	}
@@ -94,18 +97,18 @@ static int connect_to_switch(struct daem
 	req.version = SWITCH_VERSION;
 	req.type = REQ_NEW_CONTROL;
 	req.sock = *local_addr;
-	n = os_write_file(pri->control, &req, sizeof(req));
-	if(n != sizeof(req)){
-		printk("daemon_open : control setup request failed, err = %d\n",
-		       -n);
+	n = write(pri->control, &req, sizeof(req));
+	if (n != sizeof(req)) {
+		printk(UM_KERN_ERR "daemon_open : control setup request "
+		       "failed, err = %d\n", -errno);
 		err = -ENOTCONN;
 		goto out_free;
 	}
 
-	n = os_read_file(pri->control, sun, sizeof(*sun));
-	if(n != sizeof(*sun)){
-		printk("daemon_open : read of data socket failed, err = %d\n",
-		       -n);
+	n = read(pri->control, sun, sizeof(*sun));
+	if (n != sizeof(*sun)) {
+		printk(UM_KERN_ERR "daemon_open : read of data socket failed, "
+		       "err = %d\n", -errno);
 		err = -ENOTCONN;
 		goto out_free;
 	}
@@ -116,9 +119,9 @@ static int connect_to_switch(struct daem
  out_free:
 	kfree(sun);
  out_close:
-	os_close_file(fd);
+	close(fd);
  out:
-	os_close_file(pri->control);
+	close(pri->control);
 	return err;
 }
 
@@ -132,8 +135,8 @@ static int daemon_user_init(void *data, 
 		int usecs;
 	} name;
 
-	if(!strcmp(pri->sock_type, "unix"))
-		pri->ctl_addr = new_addr(pri->ctl_sock, 
+	if (!strcmp(pri->sock_type, "unix"))
+		pri->ctl_addr = new_addr(pri->ctl_sock,
 					 strlen(pri->ctl_sock) + 1);
 	name.zero = 0;
 	name.pid = os_getpid();
@@ -142,7 +145,7 @@ static int daemon_user_init(void *data, 
 	pri->local_addr = new_addr(&name, sizeof(name));
 	pri->dev = dev;
 	pri->fd = connect_to_switch(pri);
-	if(pri->fd < 0){
+	if (pri->fd < 0) {
 		kfree(pri->local_addr);
 		pri->local_addr = NULL;
 		return pri->fd;
@@ -161,9 +164,9 @@ static void daemon_remove(void *data)
 {
 	struct daemon_data *pri = data;
 
-	os_close_file(pri->fd);
+	close(pri->fd);
 	pri->fd = -1;
-	os_close_file(pri->control);
+	close(pri->control);
 	pri->control = -1;
 
 	kfree(pri->data_addr);
arch/um/drivers/mcast_user.c +30 -32

138 lines not on this page · raw message

arch/um/drivers/pcap_user.c +26 -23

121 lines not on this page · raw message

arch/um/drivers/slip_user.c +67 -55

266 lines not on this page · raw message

arch/um/drivers/slirp_user.c +35 -32

128 lines not on this page · raw message

arch/um/os-Linux/drivers/ethertap_user.c +44 -42

180 lines not on this page · raw message

arch/um/os-Linux/drivers/tuntap_user.c +38 -37

168 lines not on this page · raw message

arch/um/drivers/net_kern.c +97 -100

481 lines not on this page · raw message

arch/um/drivers/vde_user.c +3 -5
Index: linux-2.6.20/arch/um/drivers/vde_user.c
===================================================================
@@ -3,15 +3,13 @@
  * Licensed under the GPL.
  */
 
+#include <stddef.h>
 #include <errno.h>
-#include <unistd.h>
 #include <libvdeplug.h>
-#include "net_user.h"
-#include "kern_util.h"
 #include "kern_constants.h"
-#include "user.h"
-#include "os.h"
+#include "net_user.h"
 #include "um_malloc.h"
+#include "user.h"
 #include "vde.h"
 
 #define MAX_PACKET (ETH_MAX_PACKET + ETH_HEADER_OTHER)
arch/um/drivers/daemon_kern.c +15 -16
Index: linux-2.6.20/arch/um/drivers/daemon_kern.c
===================================================================
@@ -1,16 +1,14 @@
 /*
- * Copyright (C) 2001 Lennert Buytenhek ([email protected]) and 
+ * Copyright (C) 2001 Lennert Buytenhek ([email protected]) and
  * James Leu ([email protected]).
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Copyright (C) 2001 by various other people who didn't put their name here.
  * Licensed under the GPL.
  */
 
-#include "linux/kernel.h"
 #include "linux/init.h"
-#include "linux/netdevice.h"
-#include "linux/etherdevice.h"
+#include <linux/netdevice.h>
 #include "net_kern.h"
-#include "net_user.h"
 #include "daemon.h"
 
 struct daemon_init {
@@ -36,25 +34,26 @@ static void daemon_init(struct net_devic
 	dpri->data_addr = NULL;
 	dpri->local_addr = NULL;
 
-	printk("daemon backend (uml_switch version %d) - %s:%s", 
+	printk("daemon backend (uml_switch version %d) - %s:%s",
 	       SWITCH_VERSION, dpri->sock_type, dpri->ctl_sock);
 	printk("\n");
 }
 
-static int daemon_read(int fd, struct sk_buff **skb, 
+static int daemon_read(int fd, struct sk_buff **skb,
 		       struct uml_net_private *lp)
 {
 	*skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER);
-	if(*skb == NULL) return(-ENOMEM);
-	return(net_recvfrom(fd, skb_mac_header(*skb),
-			    (*skb)->dev->mtu + ETH_HEADER_OTHER));
+	if (*skb == NULL)
+		return -ENOMEM;
+	return net_recvfrom(fd, skb_mac_header(*skb),
+			    (*skb)->dev->mtu + ETH_HEADER_OTHER);
 }
 
 static int daemon_write(int fd, struct sk_buff **skb,
 			struct uml_net_private *lp)
 {
-	return(daemon_user_write(fd, (*skb)->data, (*skb)->len, 
-				 (struct daemon_data *) &lp->user));
+	return daemon_user_write(fd, (*skb)->data, (*skb)->len,
+				 (struct daemon_data *) &lp->user);
 }
 
 static const struct net_kern_info daemon_kern_info = {
@@ -72,14 +71,14 @@ static int daemon_setup(char *str, char 
 	*init = ((struct daemon_init)
 		{ .sock_type 		= "unix",
 		  .ctl_sock 		= "/tmp/uml.ctl" });
-	
+
 	remain = split_if_spec(str, mac_out, &init->sock_type, &init->ctl_sock,
 			       NULL);
-	if(remain != NULL)
+	if (remain != NULL)
 		printk(KERN_WARNING "daemon_setup : Ignoring data socket "
 		       "specification\n");
-	
-	return(1);
+
+	return 1;
 }
 
 static struct transport daemon_transport = {
arch/um/drivers/mcast_kern.c +24 -31

108 lines not on this page · raw message

arch/um/drivers/net_user.c +66 -60

267 lines not on this page · raw message

arch/um/drivers/pcap_kern.c +13 -14
Index: linux-2.6.20/arch/um/drivers/pcap_kern.c
===================================================================
@@ -1,13 +1,11 @@
 /*
- * Copyright (C) 2002 Jeff Dike <[email protected]>
+ * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL.
  */
 
 #include "linux/init.h"
-#include "linux/netdevice.h"
-#include "linux/etherdevice.h"
+#include <linux/netdevice.h>
 #include "net_kern.h"
-#include "net_user.h"
 #include "pcap_user.h"
 
 struct pcap_init {
@@ -37,7 +35,7 @@ static int pcap_read(int fd, struct sk_b
 		       struct uml_net_private *lp)
 {
 	*skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER);
-	if(*skb == NULL)
+	if (*skb == NULL)
 		return -ENOMEM;
 
 	return pcap_user_read(fd, skb_mac_header(*skb),
@@ -71,28 +69,29 @@ int pcap_setup(char *str, char **mac_out
 
 	remain = split_if_spec(str, &host_if, &init->filter,
 			       &options[0], &options[1], mac_out, NULL);
-	if(remain != NULL){
+	if (remain != NULL) {
 		printk(KERN_ERR "pcap_setup - Extra garbage on "
 		       "specification : '%s'\n", remain);
 		return 0;
 	}
 
-	if(host_if != NULL)
+	if (host_if != NULL)
 		init->host_if = host_if;
 
-	for(i = 0; i < ARRAY_SIZE(options); i++){
-		if(options[i] == NULL)
+	for (i = 0; i < ARRAY_SIZE(options); i++) {
+		if (options[i] == NULL)
 			continue;
-		if(!strcmp(options[i], "promisc"))
+		if (!strcmp(options[i], "promisc"))
 			init->promisc = 1;
-		else if(!strcmp(options[i], "nopromisc"))
+		else if (!strcmp(options[i], "nopromisc"))
 			init->promisc = 0;
-		else if(!strcmp(options[i], "optimize"))
+		else if (!strcmp(options[i], "optimize"))
 			init->optimize = 1;
-		else if(!strcmp(options[i], "nooptimize"))
+		else if (!strcmp(options[i], "nooptimize"))
 			init->optimize = 0;
 		else {
-			printk("pcap_setup : bad option - '%s'\n", options[i]);
+			printk(KERN_ERR "pcap_setup : bad option - '%s'\n",
+			       options[i]);
 			return 0;
 		}
 	}
arch/um/drivers/slip_kern.c +17 -17
Index: linux-2.6.20/arch/um/drivers/slip_kern.c
===================================================================
@@ -1,11 +1,12 @@
-#include "linux/kernel.h"
-#include "linux/stddef.h"
-#include "linux/init.h"
-#include "linux/netdevice.h"
-#include "linux/if_arp.h"
+/*
+ * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
+ * Licensed under the GPL.
+ */
+
+#include <linux/if_arp.h>
+#include <linux/init.h>
+#include <linux/netdevice.h>
 #include "net_kern.h"
-#include "net_user.h"
-#include "kern.h"
 #include "slip.h"
 
 struct slip_init {
@@ -43,21 +44,21 @@ void slip_init(struct net_device *dev, v
 
 static unsigned short slip_protocol(struct sk_buff *skbuff)
 {
-	return(htons(ETH_P_IP));
+	return htons(ETH_P_IP);
 }
 
-static int slip_read(int fd, struct sk_buff **skb, 
+static int slip_read(int fd, struct sk_buff **skb,
 		       struct uml_net_private *lp)
 {
-	return(slip_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu,
-			      (struct slip_data *) &lp->user));
+	return slip_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu,
+			      (struct slip_data *) &lp->user);
 }
 
 static int slip_write(int fd, struct sk_buff **skb,
 		      struct uml_net_private *lp)
 {
-	return(slip_user_write(fd, (*skb)->data, (*skb)->len, 
-			       (struct slip_data *) &lp->user));
+	return slip_user_write(fd, (*skb)->data, (*skb)->len,
+			       (struct slip_data *) &lp->user);
 }
 
 const struct net_kern_info slip_kern_info = {
@@ -71,12 +72,11 @@ static int slip_setup(char *str, char **
 {
 	struct slip_init *init = data;
 
-	*init = ((struct slip_init)
-		{ .gate_addr 		= NULL });
+	*init = ((struct slip_init) { .gate_addr = NULL });
 
-	if(str[0] != '\0') 
+	if (str[0] != '\0')
 		init->gate_addr = str;
-	return(1);
+	return 1;
 }
 
 static struct transport slip_transport = {
arch/um/drivers/slirp_kern.c +29 -26

100 lines not on this page · raw message

arch/um/drivers/vde_kern.c +3 -5
Index: linux-2.6.20/arch/um/drivers/vde_kern.c
===================================================================
@@ -7,10 +7,8 @@
  *
  */
 
-#include "linux/kernel.h"
 #include "linux/init.h"
-#include "linux/netdevice.h"
-#include "linux/etherdevice.h"
+#include <linux/netdevice.h>
 #include "net_kern.h"
 #include "net_user.h"
 #include "vde.h"
@@ -30,12 +28,12 @@ static void vde_init(struct net_device *
 	vpri->conn = NULL;
 	vpri->dev = dev;
 
-	printk(KERN_INFO "vde backend - %s, ", vpri->vde_switch ?
+	printk("vde backend - %s, ", vpri->vde_switch ?
 	       vpri->vde_switch : "(default socket)");
 
 	vde_init_libstuff(vpri, init);
 
-	printk(KERN_INFO "\n");
+	printk("\n");
 }
 
 static int vde_read(int fd, struct sk_buff **skb, struct uml_net_private *lp)
arch/um/os-Linux/drivers/ethertap_kern.c +19 -17
Index: linux-2.6.20/arch/um/os-Linux/drivers/ethertap_kern.c
===================================================================
@@ -1,16 +1,15 @@
 /*
- * Copyright (C) 2001 Lennert Buytenhek ([email protected]) and 
+ * Copyright (C) 2001 Lennert Buytenhek ([email protected]) and
  * James Leu ([email protected]).
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Copyright (C) 2001 by various other people who didn't put their name here.
  * Licensed under the GPL.
  */
 
 #include "linux/init.h"
-#include "linux/netdevice.h"
-#include "linux/etherdevice.h"
-#include "net_kern.h"
-#include "net_user.h"
+#include <linux/netdevice.h>
 #include "etap.h"
+#include "net_kern.h"
 
 struct ethertap_init {
 	char *dev_name;
@@ -42,27 +41,30 @@ static int etap_read(int fd, struct sk_b
 	int len;
 
 	*skb = ether_adjust_skb(*skb, ETH_HEADER_ETHERTAP);
-	if(*skb == NULL) return(-ENOMEM);
+	if (*skb == NULL)
+		return -ENOMEM;
 	len = net_recvfrom(fd, skb_mac_header(*skb),
 			   (*skb)->dev->mtu + 2 * ETH_HEADER_ETHERTAP);
-	if(len <= 0) return(len);
+	if (len <= 0)
+		return len;
 	skb_pull(*skb, 2);
 	len -= 2;
-	return(len);
+	return len;
 }
 
 static int etap_write(int fd, struct sk_buff **skb, struct uml_net_private *lp)
 {
-	if(skb_headroom(*skb) < 2){
+	if (skb_headroom(*skb) < 2) {
 	  	struct sk_buff *skb2;
 
 		skb2 = skb_realloc_headroom(*skb, 2);
 		dev_kfree_skb(*skb);
-		if (skb2 == NULL) return(-ENOMEM);
+		if (skb2 == NULL)
+			return -ENOMEM;
 		*skb = skb2;
 	}
 	skb_push(*skb, 2);
-	return(net_send(fd, (*skb)->data, (*skb)->len));
+	return net_send(fd, (*skb)->data, (*skb)->len);
 }
 
 const struct net_kern_info ethertap_kern_info = {
@@ -79,15 +81,15 @@ int ethertap_setup(char *str, char **mac
 	*init = ((struct ethertap_init)
 		{ .dev_name 	= NULL,
 		  .gate_addr 	= NULL });
-	if(tap_setup_common(str, "ethertap", &init->dev_name, mac_out,
+	if (tap_setup_common(str, "ethertap", &init->dev_name, mac_out,
 			    &init->gate_addr))
-		return(0);
-	if(init->dev_name == NULL){
-		printk("ethertap_setup : Missing tap device name\n");
-		return(0);
+		return 0;
+	if (init->dev_name == NULL) {
+		printk(KERN_ERR "ethertap_setup : Missing tap device name\n");
+		return 0;
 	}
 
-	return(1);
+	return 1;
 }
 
 static struct transport ethertap_transport = {
arch/um/os-Linux/drivers/tuntap_kern.c +16 -18
Index: linux-2.6.20/arch/um/os-Linux/drivers/tuntap_kern.c
===================================================================
@@ -1,16 +1,13 @@
-/* 
- * Copyright (C) 2001 Jeff Dike ([email protected])
+/*
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
 
-#include "linux/stddef.h"
-#include "linux/netdevice.h"
-#include "linux/etherdevice.h"
-#include "linux/skbuff.h"
-#include "linux/init.h"
-#include "asm/errno.h"
+#include <linux/netdevice.h>
+#include <linux/init.h>
+#include <linux/skbuff.h>
+#include <asm/errno.h>
 #include "net_kern.h"
-#include "net_user.h"
 #include "tuntap.h"
 
 struct tuntap_init {
@@ -38,19 +35,20 @@ static void tuntap_init(struct net_devic
 	printk("\n");
 }
 
-static int tuntap_read(int fd, struct sk_buff **skb, 
+static int tuntap_read(int fd, struct sk_buff **skb,
 		       struct uml_net_private *lp)
 {
 	*skb = ether_adjust_skb(*skb, ETH_HEADER_OTHER);
-	if(*skb == NULL) return(-ENOMEM);
-	return(net_read(fd, skb_mac_header(*skb),
-			(*skb)->dev->mtu + ETH_HEADER_OTHER));
+	if (*skb == NULL)
+		return -ENOMEM;
+	return net_read(fd, skb_mac_header(*skb),
+			(*skb)->dev->mtu + ETH_HEADER_OTHER);
 }
 
-static int tuntap_write(int fd, struct sk_buff **skb, 
+static int tuntap_write(int fd, struct sk_buff **skb,
 			struct uml_net_private *lp)
 {
-	return(net_write(fd, (*skb)->data, (*skb)->len));
+	return net_write(fd, (*skb)->data, (*skb)->len);
 }
 
 const struct net_kern_info tuntap_kern_info = {
@@ -67,11 +65,11 @@ int tuntap_setup(char *str, char **mac_o
 	*init = ((struct tuntap_init)
 		{ .dev_name 	= NULL,
 		  .gate_addr 	= NULL });
-	if(tap_setup_common(str, "tuntap", &init->dev_name, mac_out,
+	if (tap_setup_common(str, "tuntap", &init->dev_name, mac_out,
 			    &init->gate_addr))
-		return(0);
+		return 0;
 
-	return(1);
+	return 1;
 }
 
 static struct transport tuntap_transport = {
arch/um/drivers/daemon.h +7 -13
Index: linux-2.6.20/arch/um/drivers/daemon.h
===================================================================
@@ -1,8 +1,11 @@
-/* 
- * Copyright (C) 2001 Jeff Dike ([email protected])
+/*
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
 
+#ifndef __DAEMON_H__
+#define __DAEMON_H__
+
 #include "net_user.h"
 
 #define SWITCH_VERSION 3
@@ -20,16 +23,7 @@ struct daemon_data {
 
 extern const struct net_user_info daemon_user_info;
 
-extern int daemon_user_write(int fd, void *buf, int len, 
+extern int daemon_user_write(int fd, void *buf, int len,
 			     struct daemon_data *pri);
 
-/*
- * 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:
- */
+#endif
arch/um/drivers/mcast.h +5 -11
Index: linux-2.6.20/arch/um/drivers/mcast.h
===================================================================
@@ -1,8 +1,11 @@
 /* 
- * Copyright (C) 2001 Jeff Dike ([email protected])
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
 
+#ifndef __DRIVERS_MCAST_H
+#define __DRIVERS_MCAST_H
+
 #include "net_user.h"
 
 struct mcast_data {
@@ -18,13 +21,4 @@ extern const struct net_user_info mcast_
 extern int mcast_user_write(int fd, void *buf, int len, 
 			    struct mcast_data *pri);
 
-/*
- * 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:
- */
+#endif
arch/um/os-Linux/drivers/etap.h +5 -11
Index: linux-2.6.20/arch/um/os-Linux/drivers/etap.h
===================================================================
@@ -1,8 +1,11 @@
 /* 
- * Copyright (C) 2001 Jeff Dike ([email protected])
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
 
+#ifndef __DRIVERS_ETAP_H
+#define __DRIVERS_ETAP_H
+
 #include "net_user.h"
 
 struct ethertap_data {
@@ -15,13 +18,4 @@ struct ethertap_data {
 
 extern const struct net_user_info ethertap_user_info;
 
-/*
- * 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:
- */
+#endif
arch/um/os-Linux/drivers/tuntap.h +1 -12
Index: linux-2.6.20/arch/um/os-Linux/drivers/tuntap.h
===================================================================
@@ -1,5 +1,5 @@
 /* 
- * Copyright (C) 2001, 2002 Jeff Dike ([email protected])
+ * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
  * Licensed under the GPL
  */
 
@@ -19,14 +19,3 @@ struct tuntap_data {
 extern const struct net_user_info tuntap_user_info;
 
 #endif
-
-/*
- * 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:
- */

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel