staging/lustre: adapt proc_dir_entry change
[linux-block.git] / drivers / staging / lustre / lustre / mgc / mgc_request.c
index 74232f4c100496d987e6953b3d9a6f08e8b5a72e..c6c84d97ce4e6f29805883273d3bb08598a3b9a8 100644 (file)
@@ -409,32 +409,29 @@ static int config_log_end(char *logname, struct config_llog_instance *cfg)
        RETURN(rc);
 }
 
-int lprocfs_mgc_rd_ir_state(char *page, char **start, off_t off,
-                           int count, int *eof, void *data)
+int lprocfs_mgc_rd_ir_state(struct seq_file *m, void *data)
 {
        struct obd_device       *obd = data;
        struct obd_import       *imp = obd->u.cli.cl_import;
        struct obd_connect_data *ocd = &imp->imp_connect_data;
        struct config_llog_data *cld;
-       int rc = 0;
        ENTRY;
 
-       rc = snprintf(page, count, "imperative_recovery: %s\n",
+       seq_printf(m, "imperative_recovery: %s\n",
                      OCD_HAS_FLAG(ocd, IMP_RECOV) ? "ENABLED" : "DISABLED");
-       rc += snprintf(page + rc, count - rc, "client_state:\n");
+       seq_printf(m, "client_state:\n");
 
        spin_lock(&config_list_lock);
        list_for_each_entry(cld, &config_llog_list, cld_list_chain) {
                if (cld->cld_recover == NULL)
                        continue;
-               rc += snprintf(page + rc, count - rc,
-                              "    - { client: %s, nidtbl_version: %u }\n",
+               seq_printf(m,  "    - { client: %s, nidtbl_version: %u }\n",
                               cld->cld_logname,
                               cld->cld_recover->cld_cfg.cfg_last_idx);
        }
        spin_unlock(&config_list_lock);
 
-       RETURN(rc);
+       RETURN(0);
 }
 
 /* reenqueue any lost locks */