[gnome-boxes] util: compare_cpu_architectures() should support 'all' arch



commit c2ac7bf63a9ac16229c6dbe1cce90fb6e22ae622
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Feb 5 16:24:00 2013 +0200

    util: compare_cpu_architectures() should support 'all' arch
    
    This is going to be needed in the following patches when we use this
    function for comparing CPU arch against minimum/recommended resources.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688333

 src/util-app.vala |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/util-app.vala b/src/util-app.vala
index d98f259..89949f5 100644
--- a/src/util-app.vala
+++ b/src/util-app.vala
@@ -458,8 +458,15 @@ namespace Boxes {
             default:
                 return CPUArchCompatibity.INCOMPATIBLE;
             }
+        case Osinfo.ARCHITECTURE_ALL:
+            return CPUArchCompatibity.COMPATIBLE;
         default:
-            return CPUArchCompatibity.INCOMPATIBLE;
+            switch (arch1) {
+            case Osinfo.ARCHITECTURE_ALL:
+                return CPUArchCompatibity.IDENTICAL;
+            default:
+                return CPUArchCompatibity.INCOMPATIBLE;
+            }
         }
     }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]