anchor.diff:      case linux_cpuinfo_lookup("Processor") of
           [P] ->
               P;
  +        _ ->
  +            "-"
  +    end.
  +
  +linux_cpuinfo_machine() ->
  +    case linux_cpuinfo_lookup("machine") of
  +        [M] ->
  +            M;
           _ ->
               "-"
       end.
  
positive.code:             {ok, {CPU, BMips}}
      end;
  
  linux_which_cpuinfo(Distro)
    when (Distro =:= sles) orelse
         (Distro =:= opensuse) orelse
         (Distro =:= fedora) orelse
         (Distro =:= linuxmint) orelse
         (Distro =:= ubuntu) ->
      CPU =
          case linux_cpuinfo_model_name() of
              "-" ->
                  throw(noinfo);
              ModelName ->
                  ModelName
          end,
      case linux_cpuinfo_bogomips() of
  
negative.code:     end.
      
  
      ts_extra_flatform_label() ->
      case os:getenv("TS_EXTRA_PLATFORM_LABEL") of
          false -> "-";
          Val   -> Val
      end.
  
  simplify_label("Systemtap" ++ _) ->
      {host, systemtap};
  simplify_label("Meamax" ++ _) ->
      {host, meamax};
  simplify_label("Cover" ++ _) ->
      {host, cover};
  simplify_label(Label) ->
      case string:find(string:to_lower(Label), "docker") of
          "docker" ++ _ ->
              docker;
          _ ->
              {host, undefined}
      end.
  
  label2factor(docker) ->
      4;
  label2factor({host, meamax}) ->
      2;
  label2factor({host, cover}) ->
      6;
  label2factor({host, _}) ->
      0.
  
  linux_which_distro(Version) ->
      Label = ts_extra_flatform_label(),
      Checks =
          [fun() -> do_linux_which_distro_os_release(Version,     Label) end,
           fun() -> do_linux_which_distro_suse_release(Version,   Label) end,
           fun() -> do_linux_which_distro_fedora_release(Version, Label) end,
           fun() -> do_linux_which_distro_issue(Version,          Label) end],
      try linux_which_distro("", Version, Label, Checks)
      catch
          throw:{distro, Distro} ->
              Distro
      end.
  
  linux_which_distro("", Version, Label, []) ->
      io:format("Linux: ~s"
                "~n   Label:        ~s"
                "~n   Product Name: ~s"
                "~n", [Version, Label,
                       linux_product_name()]),    
      {other, simplify_label(Label)};
  linux_which_distro(DestroStr, Version, Label, []) ->
      io:format("Linux: ~s"
                "~n   Distro:       ~s"
                "~n   Label:        ~s"
                "~n   Product Name: ~s"
                "~n", [Version, DestroStr, Label,
                       linux_product_name()]),    
      {other, simplify_label(Label)};
  linux_which_distro(Default, Version, Label, [Check|Checks]) ->
      try Check() of
          DistroStr when is_list(DistroStr) ->
              linux_which_distro(DistroStr, Version, Label, Checks);
          retry ->
              linux_which_distro(Default, Version, Label, Checks);
          {error, _Reason} ->
              linux_which_distro(Default, Version, Label, Checks)
      catch
          throw:{error, _Reason} ->
  	    linux_which_distro(Default, Version, Label, Checks)
      end.
         
  
  do_linux_which_distro_os_release(Version, Label) ->
      case file:read_file_info("/etc/os-release") of
  	{ok, _} ->
              %% We want to 'catch' if our processing is wrong,
              %% that's why we catch and re-throw the distro.
              %% Actual errors will be returned as 'ignore'.
              try
                  begin
                      Info = linux_process_os_release(),
                      {value, {_, DistroStr}} = lists:keysearch(name, 1, Info),
                      {value, {_, VersionNo}} = lists:keysearch(version, 1, Info),
                      io:format("Linux: ~s"
                                "~n   Distro:                  ~s"
                                "~n   Distro Version:          ~s"
                                "~n   TS Extra Platform Label: ~s"
                                "~n   Product Name:            ~s"
                                "~n",
                                [Version, DistroStr, VersionNo, Label,
                                 linux_product_name()]),
                      throw({distro,
                             {linux_distro_str_to_distro_id(DistroStr),
                              simplify_label(Label)}})
                  end
              catch
                  throw:{distro, _} = DISTRO ->
                      throw(DISTRO);
                  _:_ ->
                      retry
              end;
          _ ->
              retry
      end.
  	    
  
  linux_process_os_release() ->
      %% Read the "raw" file
      Raw = os:cmd("cat /etc/os-release"),
      %% Split it into lines
      Lines1 = string:tokens(Raw, [$\n]),
      %% Just in case, skip any lines starting with '#'.
      Lines2 = linux_process_os_release1(Lines1),
      %% Each (remaining) line *should* be: <TAG>=<VALUE>
      %% Both sides will be strings, the value side will be a quoted string...
      %% Convert those into a 2-tuple list: [{Tag, Value}]
      linux_process_os_release2(Lines2).
  
  linux_process_os_release1(Lines) ->
      linux_process_os_release1(Lines, []).
  
  linux_process_os_release1([], Acc) ->
      lists:reverse(Acc);
  linux_process_os_release1([H|T], Acc) ->
      case H of
          "#" ++ _ ->
              linux_process_os_release1(T, Acc);
          _ ->
              linux_process_os_release1(T, [H|Acc])
      end.
  
  linux_process_os_release2(Lines) ->
      linux_process_os_release2(Lines, []).
  
  linux_process_os_release2([], Acc) ->
      lists:reverse(Acc);
  linux_process_os_release2([H|T], Acc) ->
      case linux_process_os_release3(H) of
          {value, Value} ->
              linux_process_os_release2(T, [Value|Acc]);
          false ->
              linux_process_os_release2(T, Acc)
      end.
  
  linux_process_os_release3(H) ->
      case [string:strip(S) || S <- string:tokens(H, [$=])] of
          [Tag, Value] ->
              Tag2   = list_to_atom(string:to_lower(Tag)),
              Value2 = string:strip(Value, both, $"),
              linux_process_os_release4(Tag2, Value2);
          _ ->
              false
      end.
  
  linux_process_os_release4(name = Tag, Value) ->
      {value, {Tag, Value}};
  linux_process_os_release4(version = Tag, Value) ->
      {value, {Tag, Value}};
  linux_process_os_release4(version_id = Tag, Value) ->
      {value, {Tag, Value}};
  linux_process_os_release4(id = Tag, Value) ->
      {value, {Tag, Value}};
  linux_process_os_release4(pretty_name = Tag, Value) ->
      {value, {Tag, Value}};
  linux_process_os_release4(_Tag, _Value) ->
      false.
  
  linux_distro_str_to_distro_id("Debian" ++ _) ->
      debian;
  linux_distro_str_to_distro_id("Fedora" ++ _) ->
      fedora;
  linux_distro_str_to_distro_id("Linux Mint" ++ _) ->
      linux_mint;
  linux_distro_str_to_distro_id("MontaVista" ++ _) ->
      montavista;
  linux_distro_str_to_distro_id("openSUSE" ++ _) ->
      suse;
  linux_distro_str_to_distro_id("SLES" ++ _) ->
      sles;
  linux_distro_str_to_distro_id("Ubuntu" ++ _) ->
      ubuntu;
  linux_distro_str_to_distro_id("Wind River Linux" ++ _) ->
      wind_river;
  linux_distro_str_to_distro_id("Yellow Dog" ++ _) ->
      yellow_dog;
  linux_distro_str_to_distro_id(X) ->
      X.
  
  
  do_linux_which_distro_fedora_release(Version, Label) ->
      %% Check if fedora
      case file:read_file_info("/etc/fedora-release") of
          {ok, _} ->
  