• Jacob Tanenbaum's avatar
    cpupower: rework the "cpupower frequency-info" command · 562e5f1a
    Jacob Tanenbaum authored
    this patch makes two changes to the way that "cpupower
    frequancy-info" operates
    
    1. make it so that querying individual values always returns a
       message to the user
    
    currently cpupower frequency info doesn't return anything to the user when
    querying an individual value cannot be returned
    
    [root@amd-dinar-09 cpupower]# cpupower -c 4 frequency-info -d
    analyzing CPU 4:
    [root@amd-dinar-09 cpupower]#
    
    I added messages so that each query prints a message to the terminal
    
    [root@amd-dinar-09 cpupower]# ./cpupower -c 4 frequency-info -d
    analyzing CPU 4:
      no or unknown cpufreq driver is active on this CPU
    [root@amd-dinar-09 cpupower]#
    
    (this is just one example)
    
    2. change debug_output_one() to use the functions already provided
       by cpufreq-info.c to query individual values of interest.
    Signed-off-by: default avatarJacob Tanenbaum <jtanenba@redhat.com>
    Signed-off-by: default avatarThomas Renninger <trenn@suse.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    562e5f1a
cpufreq-info.c 14.3 KB