Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / quota / quotactl_test.c
index 92ada91..09993c1 100644 (file)
@@ -80,7 +80,7 @@ static int quotactl_test_2(struct obd_device *obd, struct super_block *sb)
         RETURN(0);
 }
 #endif
-       
+
 /* Test set/getquota */
 static int quotactl_test_3(struct obd_device *obd, struct super_block *sb)
 {
@@ -288,16 +288,26 @@ static int quotactl_run_tests(struct obd_device *obd, struct obd_device *tgt)
         return rc;
 }
 
+#ifdef LPROCFS
+static struct lprocfs_vars lprocfs_quotactl_test_obd_vars[] = { {0} };
+static struct lprocfs_vars lprocfs_quotactl_test_module_vars[] = { {0} };
+
+void lprocfs_quotactl_test_init_vars(struct lprocfs_static_vars *lvars)
+{
+    lvars->module_vars  = lprocfs_quotactl_test_module_vars;
+    lvars->obd_vars     = lprocfs_quotactl_test_obd_vars;
+}
+#endif
+
 static int quotactl_test_cleanup(struct obd_device *obd)
 {
         lprocfs_obd_cleanup(obd);
         return 0;
 }
 
-static int quotactl_test_setup(struct obd_device *obd, obd_count len, void *buf)
+static int quotactl_test_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 {
-        struct lprocfs_static_vars lvars;
-        struct lustre_cfg *lcfg = buf;
+        struct lprocfs_static_vars lvars = { 0 };
         struct obd_device *tgt;
         int rc;
         ENTRY;
@@ -314,7 +324,7 @@ static int quotactl_test_setup(struct obd_device *obd, obd_count len, void *buf)
                 RETURN(-EINVAL);
         }
 
-        lprocfs_init_vars(quotactl_test, &lvars);
+        lprocfs_quotactl_test_init_vars(&lvars);
         lprocfs_obd_setup(obd, lvars.obd_vars);
 
         rc = quotactl_run_tests(obd, tgt);
@@ -330,19 +340,13 @@ static struct obd_ops quotactl_obd_ops = {
         .o_cleanup     = quotactl_test_cleanup,
 };
 
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_obd_vars[] = { {0} };
-static struct lprocfs_vars lprocfs_module_vars[] = { {0} };
-LPROCFS_INIT_VARS(quotactl_test, lprocfs_module_vars, lprocfs_obd_vars)
-#endif
-
 static int __init quotactl_test_init(void)
 {
-        struct lprocfs_static_vars lvars;
+        struct lprocfs_static_vars lvars = { 0 };
 
-        lprocfs_init_vars(quotactl_test, &lvars);
-        return class_register_type(&quotactl_obd_ops, lvars.module_vars,
-                                   "quotactl_test");
+        lprocfs_quotactl_test_init_vars(&lvars);
+        return class_register_type(&quotactl_obd_ops, NULL, lvars.module_vars,
+                                   "quotactl_test", NULL);
 }
 
 static void __exit quotactl_test_exit(void)