update quickstart and flight
[lttv.git] / trunk / lttv / ltt / tracefile.c
index 4485bf657a7280dedbd422d23a126e342081d975..0fb8fbe7a92ed70d079943c5c85a44d7a02b74f0 100644 (file)
@@ -351,6 +351,7 @@ void get_absolute_pathname(const gchar *pathname, gchar * abs_pathname)
  *
  * The left side is the name, the right side is the number.
  * Exclude leading /.
+ * Exclude flight- prefix.
  */
 
 static int get_tracefile_name_number(gchar *raw_name,
@@ -446,9 +447,12 @@ static int get_tracefile_name_number(gchar *raw_name,
     if(cpu_num == LONG_MIN || cpu_num == LONG_MAX)
       return -1; /* underflow / overflow */
     
+    if (!strncmp(raw_name, "flight-", sizeof("flight-") - 1)) {
+      raw_name += sizeof("flight-") - 1;
+      underscore_pos -= sizeof("flight-") - 1;
+    }
     strncpy(char_name, raw_name, underscore_pos);
     char_name[underscore_pos] = '\0';
-
     *name = g_quark_from_string(char_name);
     *num = cpu_num;
   }
This page took 0.02278 seconds and 4 git commands to generate.