aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:50:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:00 -0400
commita5ed1ffa6c2480cdcf3f0aa945f0b8622fe4e90b (patch)
tree60bc11afebc2ede39683e3d08531856110872d5a /arch/um/sys-x86_64
parent11100b1dfb6e9444d54d38e822753f59ee42a7e6 (diff)
uml: formatting fixes
Formatting fixes - style violations whitespace breakage emacs formatting comment removal Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-x86_64')
-rw-r--r--arch/um/sys-x86_64/bugs.c34
1 files changed, 12 insertions, 22 deletions
diff --git a/arch/um/sys-x86_64/bugs.c b/arch/um/sys-x86_64/bugs.c
index 73ca62312fda..9fa5392e3122 100644
--- a/arch/um/sys-x86_64/bugs.c
+++ b/arch/um/sys-x86_64/bugs.c
@@ -21,7 +21,7 @@ void arch_check_bugs(void)
21 21
22int arch_handle_signal(int sig, union uml_pt_regs *regs) 22int arch_handle_signal(int sig, union uml_pt_regs *regs)
23{ 23{
24 return(0); 24 return 0;
25} 25}
26 26
27#define MAXTOKEN 64 27#define MAXTOKEN 64
@@ -41,21 +41,21 @@ static char token(int fd, char *buf, int len, char stop)
41 n = os_read_file(fd, ptr, sizeof(*ptr)); 41 n = os_read_file(fd, ptr, sizeof(*ptr));
42 c = *ptr++; 42 c = *ptr++;
43 if(n != sizeof(*ptr)){ 43 if(n != sizeof(*ptr)){
44 if(n == 0) return(0); 44 if(n == 0)
45 return 0;
45 printk("Reading /proc/cpuinfo failed, err = %d\n", -n); 46 printk("Reading /proc/cpuinfo failed, err = %d\n", -n);
46 if(n < 0) 47 if(n < 0)
47 return(n); 48 return n;
48 else 49 else return -EIO;
49 return(-EIO);
50 } 50 }
51 } while((c != '\n') && (c != stop) && (ptr < end)); 51 } while((c != '\n') && (c != stop) && (ptr < end));
52 52
53 if(ptr == end){ 53 if(ptr == end){
54 printk("Failed to find '%c' in /proc/cpuinfo\n", stop); 54 printk("Failed to find '%c' in /proc/cpuinfo\n", stop);
55 return(-1); 55 return -1;
56 } 56 }
57 *(ptr - 1) = '\0'; 57 *(ptr - 1) = '\0';
58 return(c); 58 return c;
59} 59}
60 60
61static int find_cpuinfo_line(int fd, char *key, char *scratch, int len) 61static int find_cpuinfo_line(int fd, char *key, char *scratch, int len)
@@ -67,33 +67,23 @@ static int find_cpuinfo_line(int fd, char *key, char *scratch, int len)
67 while(1){ 67 while(1){
68 c = token(fd, scratch, len - 1, ':'); 68 c = token(fd, scratch, len - 1, ':');
69 if(c <= 0) 69 if(c <= 0)
70 return(0); 70 return 0;
71 else if(c != ':'){ 71 else if(c != ':'){
72 printk("Failed to find ':' in /proc/cpuinfo\n"); 72 printk("Failed to find ':' in /proc/cpuinfo\n");
73 return(0); 73 return 0;
74 } 74 }
75 75
76 if(!strncmp(scratch, key, strlen(key))) 76 if(!strncmp(scratch, key, strlen(key)))
77 return(1); 77 return 1;
78 78
79 do { 79 do {
80 n = os_read_file(fd, &c, sizeof(c)); 80 n = os_read_file(fd, &c, sizeof(c));
81 if(n != sizeof(c)){ 81 if(n != sizeof(c)){
82 printk("Failed to find newline in " 82 printk("Failed to find newline in "
83 "/proc/cpuinfo, err = %d\n", -n); 83 "/proc/cpuinfo, err = %d\n", -n);
84 return(0); 84 return 0;
85 } 85 }
86 } while(c != '\n'); 86 } while(c != '\n');
87 } 87 }
88 return(0); 88 return 0;
89} 89}
90
91/* Overrides for Emacs so that we follow Linus's tabbing style.
92 * Emacs will notice this stuff at the end of the file and automatically
93 * adjust the settings for this buffer only. This must remain at the end
94 * of the file.
95 * ---------------------------------------------------------------------------
96 * Local variables:
97 * c-file-style: "linux"
98 * End:
99 */