anchor.diff:      end.
   
   linux_cpuinfo_bogomips() ->
  -    case linux_cpuinfo_lookup("bogomips") of
  +    case linux_cpuinfo_bogomips("bogomips") of
  +        "-" ->
  +            linux_cpuinfo_bogomips("BogoMIPS");
  +        Res ->
  +            Res
  +    end.
  +
  +linux_cpuinfo_bogomips(Key) ->
  +    case linux_cpuinfo_lookup(Key) of
  +        [] ->
  +            "-";
           BMips when is_list(BMips) ->
               try lists:sum([bogomips_to_int(BM) || BM <- BMips])
               catch
  
positive.code: 
  
  analyze_and_print_linux_host_info(Version) ->
      {Distro, Label} =
          case file:read_file_info("/etc/issue") of
              {ok, _} ->
                  linux_which_distro(Version);
              _ ->
                  L = ts_extra_flatform_label(),
                  io:format("Linux: ~s"
                            "~n   TS Extra Platform Label: ~s"
                            "~n", [Version, L]),
                  {other, simplify_label(L)}
          end,
      %% 'VirtFactor' will be 0 unless virtual
      VirtFactor = linux_virt_factor(),
      Factor =
  
negative.code:                     end
              end;
          _ ->
              throw({error, not_found})
      end.
  
  do_linux_which_distro_issue(Version, Label) ->
      case file:read_file_info("/etc/issue") of
          {ok, _} ->
              case [string:trim(S) ||
                       S <- string:tokens(os:cmd("cat /etc/issue"), [$\n])] of
                  [DistroStr | _] ->
                      case DistroStr of
                          "Wind River Linux" ++ _ ->
                              io:format("Linux: ~s"
                                        "~n   Distro:                  ~s"
                                        "~n   TS Extra Platform Label: ~s"
                                        "~n   Product Name:            ~s"
                                        "~n",
                                        [Version, DistroStr, Label,
                                         linux_product_name()]),
                              throw({distro,
                                     {wind_river, simplify_label(Label)}});
                          "MontaVista" ++ _ ->
                              io:format("Linux: ~s"
                                        "~n   Distro:                  ~s"
                                        "~n   TS Extra Platform Label: ~s"
                                        "~n   Product Name:            ~s"
                                        "~n",
                                        [Version, DistroStr, Label,
                                         linux_product_name()]),
                              throw({distro, 
                                     {montavista, simplify_label(Label)}});
                          "Yellow Dog" ++ _ ->
                              io:format("Linux: ~s"
                                        "~n   Distro:                  ~s"
                                        "~n   TS Extra Platform Label: ~s"
                                        "~n   Product Name:            ~s"
                                        "~n",
                                        [Version, DistroStr, Label,
                                         linux_product_name()]),
                              throw({distro,
                                     {yellow_dog, simplify_label(Label)}});
                          "Debian" ++ _ ->
                              io:format("Linux: ~s"
                                        "~n   Distro:                  ~s"
                                        "~n   TS Extra Platform Label: ~s"
                                        "~n   Product Name:            ~s"
                                        "~n",
                                        [Version, DistroStr, Label,
                                         linux_product_name()]),
                              throw({distro,
                                     {debian, simplify_label(Label)}});
                          "Ubuntu" ++ _ ->
                              io:format("Linux: ~s"
                                        "~n   Distro:                  ~s"
                                        "~n   TS Extra Platform Label: ~s"
                                        "~n   Product Name:            ~s"
                                        "~n",
                                        [Version, DistroStr, Label,
                                         linux_product_name()]),
                              throw({distro,
                                     {ubuntu, simplify_label(Label)}});
                          "Linux Mint" ++ _ ->
                              io:format("Linux: ~s"
                                        "~n   Distro:                  ~s"
                                        "~n   TS Extra Platform Label: ~s"
                                        "~n   Product Name:            ~s"
                                        "~n",
                                        [Version, DistroStr, Label,
                                         linux_product_name()]),
                              throw({distro,
                                     {linux_mint, simplify_label(Label)}});
                          _ ->
                              DistroStr
                      end;
                  X ->
                      X
              end;
          _ ->
              throw({error, not_found})
      end.
  
  
  %% linux_which_distro(Version) ->
  %%     try do_linux_which_distro(Version)
  %%     catch
  %%         throw:{distro, DistroAndLabel} ->
  %%             DistroAndLabel
  %%     end.
  
  %% do_linux_which_distro(Version) ->
  %%     Label = ts_extra_platform_label(),
  
  %%     %% Many (linux) distro's use the /etc/issue file, so try that first.
  %%     %% Then we just keep going until we are "done".
  %%     DistroStr = do_linux_which_distro_issue(Version, Label),
  
  %%     %% Still not sure; try fedora
  %%     _ = do_linux_which_distro_fedora(Version, Label),
  
  %%     %% Still not sure; try suse
  %%     _ = do_linux_which_distro_suse(Version, Label),
  
  %%     %% Still not sure; try os-release
  %%     _ = do_linux_which_distro_os_release(Version, Label),
  
  %%     %% And the fallback
  %%     io:format("Linux: ~s"
  %%               "~n   Distro:       ~s"
  %%               "~n   Label:        ~s"
  %%               "~n   Product Name: ~s"
  %%               "~n",
  %%               [Version, DistroStr, Label,
  %%                linux_product_name()]),
  %%     {other, simplify_label(Label)}.
  
  %% do_linux_which_distro_issue(Version, Label) ->
  %%     case file:read_file_info("/etc/issue") of
  %%         {ok, _} ->
  %%             case [string:trim(S) ||
  %%                      S <- string:tokens(os:cmd("cat /etc/issue"), [$\n])] of
  %%                 [DistroStr | _] ->
  %%                     case DistroStr of
  %%                         "Wind River Linux" ++ _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro,
  %%                                    {wind_river, simplify_label(Label)}});
  %%                         "MontaVista" ++ _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro,
  %%                                    {montavista, simplify_label(Label)}});
  %%                         "Yellow Dog" ++ _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro,
  %%                                    {yellow_dog, simplify_label(Label)}});
  %%                         "Debian" ++ _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro,
  %%                                    {debian, simplify_label(Label)}});
  %%                         "Ubuntu" ++ _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro,
  %%                                    {ubuntu, simplify_label(Label)}});
  %%                         "Linux Mint" ++ _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro,
  %%                                    {linux_mint, simplify_label(Label)}});
  %%                         _ ->
  %%                             DistroStr
  %%                     end;
  %%                 X ->
  %%                     X
  %%             end;
  %%         _ ->
  %%             throw({error, not_found})
  %%     end.
                              
  %% do_linux_which_distro_fedora(Version, Label) ->
  %%     %% Check if fedora
  %%     case file:read_file_info("/etc/fedora-release") of
  %%         {ok, _} ->
  %%             case [string:trim(S) ||
  %%                      S <- string:tokens(os:cmd("cat /etc/fedora-release"),
  %%                                         [$\n])] of
  %%                 [DistroStr | _] ->
  %%                     io:format("Linux: ~s"
  %%                               "~n   Distro:                  ~s"
  %%                               "~n   TS Extra Platform Label: ~s"
  %%                               "~n   Product Name:            ~s"
  %%                               "~n",
  %%                               [Version, DistroStr, Label,
  %%                                linux_product_name()]);
  %%                 _ ->
  %%                     io:format("Linux: ~s"
  %%                               "~n   Distro:                  ~s"
  %%                               "~n   TS Extra Platform Label: ~s"
  %%                               "~n   Product Name:            ~s"
  %%                               "~n",
  %%                               [Version, "Fedora", Label,
  %%                                linux_product_name()])
  %%             end,
  %%             throw({distro, {fedora, simplify_label(Label)}});
  %%         _ ->
  %%             ignore
  %%     end.
  
  %% do_linux_which_distro_suse(Version, Label) ->
  %%     %% Check if its a SuSE
  %%     case file:read_file_info("/etc/SUSE-brand") of
  %%         {ok, _} ->
  %%             case file:read_file_info("/etc/SuSE-release") of
  %%                 {ok, _} ->
  %%                     case [string:trim(S) ||
  %%                              S <- string:tokens(os:cmd("cat /etc/SuSE-release"),
  %%                                                 [$\n])] of
  %%                         ["SUSE Linux Enterprise Server" ++ _ = DistroStr | _] ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro, {sles, simplify_label(Label)}});
  %%                         [DistroStr | _] ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, DistroStr, Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro, {suse, simplify_label(Label)}});
  %%                         _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, "SuSE", Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro, {suse, simplify_label(Label)}})
  %%                     end;
  %%                 _ ->
  %%                     case string:tokens(os:cmd("cat /etc/SUSE-brand"), [$\n]) of
  %%                         ["SLE" = DistroStr, VERSION | _] ->
  %%                             case [string:strip(S) ||
  %%                                      S <- string:tokens(VERSION, [$=])] of
  %%                                 ["VERSION", VersionNo] ->
  %%                                     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,
  %%                                            {sles, simplify_label(Label)}});
  %%                                 _ ->
  %%                                     io:format("Linux: ~s"
  %%                                               "~n   Distro:                  ~s"
  %%                                               "~n   TS Extra Platform Label: ~s"
  %%                                               "~n   Product Name:            ~s"
  %%                                               "~n",
  %%                                               [Version, DistroStr, Label,
  %%                                                linux_product_name()]),
  %%                                     throw({distro,
  %%                                            {sles, simplify_label(Label)}})
  %%                             end;
  %%                         ["openSUSE" = DistroStr, VERSION | _] ->
  %%                             case [string:strip(S) ||
  %%                                      S <- string:tokens(VERSION, [$=])] of
  %%                                 ["VERSION", VersionNo] ->
  %%                                     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,
  %%                                            {suse, simplify_label(Label)}});
  %%                                 _ ->
  %%                                     io:format("Linux: ~s"
  %%                                               "~n   Distro:                  ~s"
  %%                                               "~n   TS Extra Platform Label: ~s"
  %%                                               "~n   Product Name:            ~s"
  %%                                               "~n",
  %%                                               [Version, DistroStr, Label,
  %%                                                linux_product_name()]),
  %%                                     throw({distro,
  %%                                            {suse, simplify_label(Label)}})
  %%                             end;
  %%                         _ ->
  %%                             io:format("Linux: ~s"
  %%                                       "~n   Distro:                  ~s"
  %%                                       "~n   TS Extra Platform Label: ~s"
  %%                                       "~n   Product Name:            ~s"
  %%                                       "~n",
  %%                                       [Version, "Unknown SUSE", Label,
  %%                                        linux_product_name()]),
  %%                             throw({distro, {suse, simplify_label(Label)}})
  %%                     end
  %%             end;
  %%         _ ->
  %%             throw({error, not_found})
  %%     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.
  
  
  simplify_label("Systemtap" ++ _) ->
  