rm_entry = temp;
temp = temp->parent;
remove_proc_entry(rm_entry->name, rm_entry->parent);
- if (temp == parent) break;
+ if (temp == parent)
+ break;
}
}
new_root = root;
mover_str = temp_string;
while ((my_str = strsep(&mover_str, tok))) {
- if(!*my_str)
+ if (!*my_str)
continue;
CDEBUG(D_OTHER, "SEARCH= %s\t, ROOT=%s\n", my_str,
new_root->name);
CDEBUG(D_OTHER, "Adding: %s\n", my_str);
temp_entry = lprocfs_mkdir(my_str, new_root);
if (temp_entry == NULL) {
- CDEBUG(D_OTHER,
+ CDEBUG(D_OTHER,
"! Did not create new dir %s !!\n",
my_str);
return temp_entry;
return new_root;
}
-int lprocfs_new_vars(struct proc_dir_entry* root,
- struct lprocfs_vars* list,
+int lprocfs_new_vars(struct proc_dir_entry* root, struct lprocfs_vars* list,
const char* tok, void* data)
{
struct proc_dir_entry *temp_root;
{
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!",
+
+ if (lprocfs_srch(device->obd_type->typ_procroot, device->obd_name)) {
+ CDEBUG(D_OTHER, "Device with name [%s] exists!",
device->obd_name);
return 0;
}
struct proc_dir_entry* lprocfs_reg_mnt(char* mnt_name)
{
- if(lprocfs_srch(proc_lustre_fs_root, mnt_name)){
+ if (lprocfs_srch(proc_lustre_fs_root, mnt_name)) {
CDEBUG(D_OTHER, "Mount with same name exists!");
return 0;
}
int lprocfs_dereg_mnt(struct proc_dir_entry* root)
{
- if(root == NULL){
+ if (root == NULL) {
CDEBUG(D_OTHER, "Non-existent root!");
return 0;
}
int lprocfs_reg_class(struct obd_type* type, struct lprocfs_vars* list,
void* data)
{
-
struct proc_dir_entry* root;
int retval;
root = lprocfs_mkdir(type->typ_name, proc_lustre_dev_root);
int lprocfs_dereg_class(struct obd_type* class)
{
- if(class == NULL){
- CDEBUG(D_OTHER, "Non-existent class",
- class->typ_name);
+ if (class == NULL) {
+ CDEBUG(D_OTHER, "Non-existent class");
return 0;
}
lprocfs_remove_all(class->typ_procroot);
return 0;
}
+
int lprocfs_reg_main()
{
proc_lustre_root = lprocfs_mkdir("lustre", &proc_root);