this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixing formatting

+10 -22
+10 -22
src/kernel/emulation/linux/misc/sysctl_machdep.c
··· 182 182 183 183 setup(1); 184 184 185 - static const char features[][7] = {"FPU","VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "","SEP","MTRR","PGE", 186 - "MCA", "CMOV", "PAT", "PSE-36", "PSN", "CLFSH", "", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", 187 - "HTT", "TM","IA64","PBE"}; 185 + static const char features[][7] = {"FPU","VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "","SEP","MTRR","PGE", 186 + "MCA", "CMOV", "PAT", "PSE-36", "PSN", "CLFSH", "", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", 187 + "HTT", "TM","IA64","PBE"}; 188 188 189 - __cpuid(0,eax,ebx,ecx,edx); 189 + __cpuid(0,eax,ebx,ecx,edx); 190 + int current_length = 0; 190 191 191 192 if (old != NULL) 192 193 { 193 194 194 195 char *outsr = (char*)old; 195 - int current_length = 0; 196 196 197 197 for (int i = 0; i < 32; i++) 198 198 { 199 - 200 199 if (i == 10 || i == 20) 201 200 continue; 202 201 203 202 if ( (edx & (1<<i)) && current_length < *oldlen) 204 203 { 205 - 206 204 if (current_length) 207 205 { 208 - 209 206 outsr[current_length] = ' '; 210 207 211 208 current_length++; 212 - 213 209 } 214 - 215 210 if (current_length < *oldlen) 216 211 { 217 - 218 212 int len = __simple_strlen(features[i]); 219 213 220 214 strncpy(outsr + current_length, features[i], 221 215 *oldlen - current_length); 222 216 223 217 current_length += len; 224 - 225 218 } 226 - 227 219 } 228 - 229 220 } 230 221 231 222 if (current_length < *oldlen) 232 223 { 233 - 234 224 outsr[current_length] = '\0'; 235 - 236 225 } 237 226 238 227 } 239 228 else 240 229 { 241 - int len = 0; 242 230 243 231 for (int i = 0; i < 32; i++) 244 232 { ··· 246 234 if (i == 10 || i == 20) 247 235 continue; 248 236 249 - if (edx>>i&1) 237 + if (edx & (1<<i)) 250 238 { 251 - if (len != 0) 252 - len++; 239 + if (current_length != 0) 240 + current_length++; 253 241 254 - len += __simple_strlen(features[i]); 242 + current_length += __simple_strlen(features[i]); 255 243 } 256 244 257 245 } 258 246 259 247 if (oldlen) 260 - *oldlen = len; 248 + *oldlen = current_length; 261 249 262 250 } 263 251