struct lprocfs_vars status_var_nm_1[] = {
{"status/uuid", rd_uuid, 0, 0},
{"status/mntpt_path", rd_path, 0, 0},
- {"status/fs_type", rd_fstype, 0, 0},
+ {"status/fstype", rd_fstype, 0, 0},
{"status/blocksize",rd_blksize, 0, 0},
{"status/kbytestotal",rd_kbytestotal, 0, 0},
{"status/kbytesfree", rd_kbytesfree, 0, 0},
mdc_getstatus(&sbi->ll_mdc_conn, &rootfid);
lprocfs_dereg_mnt(sbi->ll_proc_root);
- sbi->ll_proc_root=0;
+ sbi->ll_proc_root = NULL;
obd_disconnect(&sbi->ll_mdc_conn);
mdc_getstatus(&sbi->ll_mdc_conn, &rootfid);
lprocfs_dereg_mnt(sbi->ll_proc_root);
- sbi->ll_proc_root=0;
+ sbi->ll_proc_root = NULL;
obd_disconnect(&sbi->ll_mdc_conn);
OBD_FREE(sbi, sizeof(*sbi));
RETURN(rc);
}
-int lov_attach(struct obd_device *dev,
- obd_count len, void *data)
+int lov_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
return rc;
}
-int mdc_attach(struct obd_device *dev,
- obd_count len, void *data)
+int mdc_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
RETURN(rc);
}
-int mds_attach(struct obd_device *dev,
- obd_count len, void *data)
+int mds_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
return err;
obd_sysctl_init();
- err=lprocfs_reg_main();
+ err = lprocfs_reg_main();
return 0;
}
struct proc_dir_entry *new_parent;
char temp_string[MAX_STRING_SIZE];
- if (!list)
+ if (list == NULL)
return 0;
while (list->name) {
temp_root = lprocfs_new_dir(root, list->name, tok);
if (temp_root == NULL) {
CDEBUG(D_OTHER, "!LProcFS: Mods: No root!");
- return PTR_ERR(temp_root);
+ return -EINVAL;
}
/* Convert the last element into a leaf-node */
int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *var,
void *data)
{
- return lprocfs_new_vars(root, var, (const char*) tok, data);
+ return lprocfs_new_vars(root, var, tok, data);
}
int lprocfs_reg_obd(struct obd_device *device, struct lprocfs_vars *list,
void *data)
{
- struct proc_dir_entry* this_dev_root = NULL;
- int retval = 0;
+ struct proc_dir_entry* this_dev_root;
+ int retval;
if(lprocfs_srch(device->obd_type->typ_procroot, device->obd_name)){
CDEBUG(D_OTHER, "Device with name [%s] exists!",
{
CDEBUG(D_OTHER, "LPROCFS removing device = %s\n", device->obd_name);
- if (!device) {
+ if (device == NULL) {
CDEBUG(D_OTHER, "! LProcfs: Null pointer !\n");
return 0;
}
- if (!device->obd_proc_entry) {
+ if (device->obd_proc_entry == NULL) {
CDEBUG(D_OTHER, "! Proc entry non-existent !");
return 0;
}
lprocfs_remove_all(device->obd_proc_entry);
- device->obd_proc_entry = 0;
+ device->obd_proc_entry = NULL;
if (device->counters)
OBD_FREE(device->counters, device->cntr_mem_size);
int lprocfs_dereg_class(struct obd_type* class)
{
- if(!class){
+ if(class == NULL){
CDEBUG(D_OTHER, "Non-existent class",
class->typ_name);
return 0;
}
lprocfs_remove_all(class->typ_procroot);
- class->typ_procroot = 0;
+ class->typ_procroot = NULL;
CDEBUG(D_OTHER, "LPROCFS removed = %s\n", class->typ_name);
return 0;
int lprocfs_dereg_main()
{
lprocfs_remove_all(proc_lustre_root);
- proc_lustre_root = 0;
- proc_lustre_dev_root = 0;
- proc_lustre_fs_root = 0;
-
+ proc_lustre_root = NULL;
+ proc_lustre_dev_root = NULL;
+ proc_lustre_fs_root = NULL;
return 0;
}
* and Andreas Dilger <adilger@clusterfs.com>
*/
-static char rcsid[] __attribute ((unused)) = "$Id: echo.c,v 1.47 2002/11/13 02:46:41 thantry Exp $";
-#define OBDECHO_VERSION "$Revision: 1.47 $"
+static char rcsid[] __attribute ((unused)) = "$Id: echo.c,v 1.48 2002/11/13 04:45:21 thantry Exp $";
+#define OBDECHO_VERSION "$Revision: 1.48 $"
#define EXPORT_SYMTAB
RETURN(0);
}
-int echo_attach(struct obd_device *dev,
- obd_count len, void *data)
+int echo_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
RETURN(err);
}
-int filter_attach(struct obd_device *dev,
- obd_count len, void *data)
+int filter_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
return err;
}
-int osc_attach(struct obd_device *dev,
- obd_count len, void *data)
+int osc_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
MOD_DEC_USE_COUNT;
RETURN(0);
}
-int ost_attach(struct obd_device *dev,
- obd_count len, void *data)
+int ost_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
{
return class_connect(conn, src, cluuid);
}
-int connmgr_attach(struct obd_device *dev,
- obd_count len, void *data)
+int connmgr_attach(struct obd_device *dev, obd_count len, void *data)
{
return lprocfs_reg_obd(dev, status_var_nm_1, dev);
}
if (rc)
RETURN(rc);
ptlrpc_init_connection();
- rc = class_register_type(&recovd_obd_ops,
- status_class_var,
+ rc = class_register_type(&recovd_obd_ops, status_class_var,
LUSTRE_HA_NAME);
if (rc)
RETURN(rc);