Sfoglia il codice sorgente

u-a: Move config_all() function near action handling code

Guillem Jover 14 anni fa
parent
commit
9e176a05d9
1 ha cambiato i file con 14 aggiunte e 14 eliminazioni
  1. 14 14
      utils/update-alternatives.c

+ 14 - 14
utils/update-alternatives.c

@@ -494,20 +494,6 @@ subcall(const char *prog, ...)
 	exit(128);
 }
 
-static void
-alternative_config_all(void)
-{
-	struct dirent **table;
-	int i, count;
-
-	count = altdb_get_namelist(&table);
-	for (i = 0; i < count; i++) {
-		subcall(prog_path, "--config", table[i]->d_name, NULL);
-		printf("\n");
-	}
-	altdb_free_namelist(table, count);
-}
-
 static bool
 rename_mv(const char *src, const char *dst)
 {
@@ -1612,6 +1598,20 @@ alternative_select_choice(struct alternative *a)
 	return NULL;
 }
 
+static void
+alternative_config_all(void)
+{
+	struct dirent **table;
+	int i, count;
+
+	count = altdb_get_namelist(&table);
+	for (i = 0; i < count; i++) {
+		subcall(prog_path, "--config", table[i]->d_name, NULL);
+		printf("\n");
+	}
+	altdb_free_namelist(table, count);
+}
+
 static void
 alternative_add_commit_op(struct alternative *a, enum opcode opcode,
                           const char *arg_a, const char *arg_b)