diff options
author | Dave Jones <davej@redhat.com> | 2011-02-22 01:22:42 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2011-02-22 01:22:42 -0500 |
commit | ad08ec55fbdd3171580317230bf7a0fafb19db81 (patch) | |
tree | e592e316e5624aaff15b8ff7755f9180903ca1dd | |
parent | 164e79522d7eeae9478f2537b6f6cf5832a8b6e1 (diff) |
eradicate bogus 'silent' flag that wasn't even used
-rw-r--r-- | cpuid.c | 8 | ||||
-rw-r--r-- | identify.c | 3 | ||||
-rw-r--r-- | rdmsr.c | 6 | ||||
-rw-r--r-- | x86info.c | 35 | ||||
-rw-r--r-- | x86info.h | 1 |
5 files changed, 19 insertions, 34 deletions
@@ -134,13 +134,11 @@ void cpuid(unsigned int CPU_number, unsigned long long idx, } else { /* Something went wrong, just do UP and hope for the best. */ nodriver = 1; - if (!silent && nrCPUs != 1) + if (nrCPUs != 1) perror(cpuname); - if (native_cpuid(CPU_number, idx, eax,ebx,ecx,edx)) { + if (native_cpuid(CPU_number, idx, eax,ebx,ecx,edx)) printf("%s", NATIVE_CPUID_FAILED_MSG); - used_UP = 1; - } - used_UP = 1; + used_UP = 1; return; } @@ -95,9 +95,6 @@ void identify(struct cpudata *cpu) void show_info(struct cpudata *cpu) { - if (silent) - return; - printf("EFamily: %u EModel: %u Family: %u Model: %u Stepping: %u\n", cpu->efamily, cpu->emodel, cpu->family, model(cpu), cpu->stepping); @@ -40,8 +40,7 @@ int read_msr(int cpu, unsigned int idx, unsigned long long *val) fh = open(cpuname, O_RDONLY); if (fh==-1) { - if (!silent) - perror(cpuname); + perror(cpuname); nodriver=1; return 0; } @@ -82,8 +81,7 @@ int read_msr(int cpu, unsigned int idx, unsigned long long *val) fh = open(cpuname, O_RDONLY); if (fh==-1) { - if (!silent) - perror(cpuname); + perror(cpuname); nodriver=1; return 0; } @@ -40,7 +40,6 @@ static int num_sockets = 0; int debug = 0; int verbose = 0; -int silent = 0; int used_UP = 0; int user_is_root = 1; static int need_root = 0; @@ -321,10 +320,9 @@ int main (int argc, char **argv) struct cpudata *cpu=NULL, *head=NULL, *tmp; parse_command_line(argc, argv); - if (!silent) { - printf("x86info v1.28beta. Dave Jones 2001-2011\n"); - printf("Feedback to <davej@redhat.com>.\n\n"); - } + + printf("x86info v1.28beta. Dave Jones 2001-2011\n"); + printf("Feedback to <davej@redhat.com>.\n\n"); if ((HaveCPUID()) == 0) { printf("No CPUID instruction available.\n"); @@ -340,20 +338,18 @@ int main (int argc, char **argv) nrCPUs = sysconf(_SC_NPROCESSORS_ONLN); - if (!silent) { - printf("Found %u CPU", nrCPUs); - if (nrCPUs > 1) - printf("s"); + printf("Found %u CPU", nrCPUs); + if (nrCPUs > 1) + printf("s"); - /* Check mptable if present. This way we get number of CPUs - on SMP systems that have booted UP kernels. */ - if (user_is_root) { - nrSMPCPUs = enumerate_cpus(); - if (nrSMPCPUs > nrCPUs) - printf(", but found %ud CPUs in MPTable.", nrSMPCPUs); - } - printf("\n"); + /* Check mptable if present. This way we get number of CPUs + on SMP systems that have booted UP kernels. */ + if (user_is_root) { + nrSMPCPUs = enumerate_cpus(); + if (nrSMPCPUs > nrCPUs) + printf(", but found %ud CPUs in MPTable.", nrSMPCPUs); } + printf("\n"); /* * can't have less than 1 CPU, or more than @@ -391,7 +387,7 @@ int main (int argc, char **argv) cpu->number = i; - if (!silent && nrCPUs != 1) + if (nrCPUs != 1) printf("CPU #%u\n", i+1); bind_cpu(cpu); @@ -443,10 +439,7 @@ int main (int argc, char **argv) if (user_is_root) { if (show_mtrr) dump_mtrrs(cpu); - } - /* Info that requires root access */ - if (user_is_root) { if (show_apic) dump_apics(cpu); } @@ -195,7 +195,6 @@ extern unsigned int all_cpus; extern struct cpudata *firstcpu; extern int used_UP; -extern int silent; extern int user_is_root; #define X86_FEATURE_MTRR 1<<12 |