瀏覽代碼

Fix printing of flags

Due to an error when adding the different current definition types, the
flags configuration field never said (none).  Now it does once again,
and there's no trailing space when printing flags.
Clara Hobbs 6 年之前
父節點
當前提交
ea710cc67d
共有 1 個檔案被更改,包括 6 行新增6 行删除
  1. 6
    6
      src/config.c

+ 6
- 6
src/config.c 查看文件

@@ -54,18 +54,18 @@ void pdbs_config_print(BaseSequentialStream *chp, const struct pdbs_config *cfg)
54 54
     }
55 55
 
56 56
     /* Print the flags */
57
-    chprintf(chp, "flags: ");
58
-    if (cfg->flags == 0) {
59
-        chprintf(chp, "(none)");
57
+    chprintf(chp, "flags:");
58
+    if ((cfg->flags & ~PDBS_CONFIG_FLAGS_CURRENT_DEFN) == 0) {
59
+        chprintf(chp, " (none)");
60 60
     }
61 61
     if (cfg->flags & PDBS_CONFIG_FLAGS_GIVEBACK) {
62
-        chprintf(chp, "GiveBack ");
62
+        chprintf(chp, " GiveBack");
63 63
     }
64 64
     if (cfg->flags & PDBS_CONFIG_FLAGS_VAR_BAT) {
65
-        chprintf(chp, "Var/Bat ");
65
+        chprintf(chp, " Var/Bat");
66 66
     }
67 67
     if (cfg->flags & PDBS_CONFIG_FLAGS_HV_PREFERRED) {
68
-        chprintf(chp, "HV_Preferred ");
68
+        chprintf(chp, " HV_Preferred");
69 69
     }
70 70
     chprintf(chp, "\r\n");
71 71
 

Loading…
取消
儲存