Whamcloud - gitweb
- ext2_obd.c --- fix the bugs in read/write for Linux 2.4.3
[fs/lustre-release.git] / lustre / obdclass / proc_lustre.c
index e9fe724..f83e7a6 100644 (file)
@@ -1,5 +1,10 @@
 /* proc_lustre.c manages /proc/lustre/obd. 
  *
 /* proc_lustre.c manages /proc/lustre/obd. 
  *
+ * Copyright (c) 2001 Rumi Zahir <rumi.zahir@intel.com>
+ *
+ * This code is issued under the GNU General Public License.
+ * See the file COPYING in this distribution
+ *
  * OBD devices materialize in /proc as a directory:
  *              /proc/lustre/obd/<number>
  * when /dev/obd<number> is opened. When the device is closed, the 
  * OBD devices materialize in /proc as a directory:
  *              /proc/lustre/obd/<number>
  * when /dev/obd<number> is opened. When the device is closed, the 
@@ -29,8 +34,6 @@
  *     proc_lustre_remove_obd_entry() removes a
  *     /proc/lustre/obd/<obdid>/ entry by name. This is the only
  *     function that is exported to other modules. 
  *     proc_lustre_remove_obd_entry() removes a
  *     /proc/lustre/obd/<obdid>/ entry by name. This is the only
  *     function that is exported to other modules. 
- *
- * Copyright (c) 2001 Rumi Zahir <rumi.zahir@intel.com>
  */
 
 #include <linux/config.h>
  */
 
 #include <linux/config.h>
@@ -76,7 +79,7 @@ static int read_lustre_status(char *page, char **start, off_t offset,
        
        if (obddev->obd_refcnt==0) { 
                /* obd is unused */
        
        if (obddev->obd_refcnt==0) { 
                /* obd is unused */
-               p += sprintf(&page[p], "open but unused\n\0");
+               p += sprintf(&page[p], "open but unused\n");
        }
        else {  /* obd in use */
                p += sprintf(&page[p], "refcnt(%d)", obddev->obd_refcnt);
        }
        else {  /* obd in use */
                p += sprintf(&page[p], "refcnt(%d)", obddev->obd_refcnt);
@@ -121,7 +124,7 @@ static int read_lustre_status(char *page, char **start, off_t offset,
                        }
                }
                
                        }
                }
                
-               p += sprintf(&page[p], "\n\0");
+               p += sprintf(&page[p], "\n");
        }
 
        /* Compute eof and return value */
        }
 
        /* Compute eof and return value */