r26690: torture: Move torture_context_init() to the ui.c, where all functions related...
authorJelmer Vernooij <jelmer@samba.org>
Tue, 8 Jan 2008 04:34:46 +0000 (22:34 -0600)
committerStefan Metzmacher <metze@samba.org>
Mon, 7 Jan 2008 22:42:02 +0000 (16:42 -0600)
source/torture/torture.c
source/torture/ui.c

index b471135ce119a4b476f8799fd324c5e38d91f352..23b8ee31436881144fff09989f31510601cd31a0 100644 (file)
@@ -23,9 +23,8 @@
 #include "torture/torture.h"
 #include "build.h"
 #include "lib/util/dlinklist.h"
-#include "auth/credentials/credentials.h"
-#include "lib/cmdline/popt_common.h"
 #include "param/param.h"
+#include "lib/cmdline/popt_common.h"
 
 _PUBLIC_ int torture_numops=10;
 _PUBLIC_ int torture_entries=1000;
@@ -46,21 +45,6 @@ bool torture_register_suite(struct torture_suite *suite)
        return torture_suite_add_suite(torture_root, suite);
 }
 
-struct torture_context *torture_context_init(TALLOC_CTX *mem_ctx, 
-                                            const struct torture_ui_ops *ui_ops)
-{
-       struct torture_context *torture = talloc_zero(mem_ctx, 
-                                                     struct torture_context);
-       torture->ui_ops = ui_ops;
-       torture->returncode = true;
-       torture->ev = cli_credentials_get_event_context(cmdline_credentials);
-
-       if (ui_ops->init)
-               ui_ops->init(torture);
-
-       return torture;
-}
-
 
 int torture_init(void)
 {
index 66722a4cae0f23edf63f03f3f7947cd796fec752..a7025aac95281f4829a95ddb56fdd2dca9294cec 100644 (file)
 #include "lib/util/dlinklist.h"
 #include "param/param.h"
 #include "system/filesys.h"
+#include "auth/credentials/credentials.h"
+#include "lib/cmdline/popt_common.h"
+
+struct torture_context *torture_context_init(TALLOC_CTX *mem_ctx, 
+                                            const struct torture_ui_ops *ui_ops)
+{
+       struct torture_context *torture = talloc_zero(mem_ctx, 
+                                                     struct torture_context);
+       torture->ui_ops = ui_ops;
+       torture->returncode = true;
+       torture->ev = cli_credentials_get_event_context(cmdline_credentials);
+
+       if (ui_ops->init)
+               ui_ops->init(torture);
+
+       return torture;
+}
 
 /**
  create a temporary directory.