Whamcloud - gitweb
3e918504e79ab14ef792ba7fd0448b71b92edfbe
[fs/lustre-release.git] / lustre / ptlrpc / lproc_ptlrpc.c
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *  Copyright (C) 2002 Cluster File Systems, Inc.
5  *
6  *   This file is part of Lustre, http://www.lustre.org.
7  *
8  *   Lustre is free software; you can redistribute it and/or
9  *   modify it under the terms of version 2 of the GNU General Public
10  *   License as published by the Free Software Foundation.
11  *
12  *   Lustre is distributed in the hope that it will be useful,
13  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *   GNU General Public License for more details.
16  *
17  *   You should have received a copy of the GNU General Public License
18  *   along with Lustre; if not, write to the Free Software
19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  *
21  */
22 #define DEBUG_SUBSYSTEM S_CLASS
23 #include <linux/obd_support.h>
24 #include <linux/obd_class.h>
25 #include <linux/lprocfs.h>
26 #include <linux/string.h>
27 #include <linux/lustre_lib.h>
28
29
30
31
32 int rd_uuid(char* page, char **start, off_t off,
33                int count, int *eof, void *data)
34 {
35         int len=0;
36         len+=snprintf(page, count, "%s\n", \
37                       ((struct obd_device*)data)->obd_uuid);
38         return len;
39
40 }
41
42 int rd_blksize(char* page, char **start, off_t off,
43                int count, int *eof, void *data)
44 {
45         return 0;
46
47 }
48 int rd_blktotal(char* page, char **start, off_t off,
49                 int count, int *eof, void *data)
50 {
51         return 0;
52 }
53
54 int rd_blkfree(char* page, char **start, off_t off,
55                int count, int *eof, void *data)
56 {
57         return 0;
58 }
59
60 int rd_kbfree(char* page, char **start, off_t off,
61               int count, int *eof, void *data)
62 {
63         return 0;
64 }
65
66 int rd_numobjects(char* page, char **start, off_t off,
67                   int count, int *eof, void *data)
68 {
69         return 0;
70 }
71
72 int rd_objfree(char* page, char **start, off_t off,
73                int count, int *eof, void *data)
74 {
75         return 0;
76 }
77
78 int rd_objgroups(char* page, char **start, off_t off,
79                  int count, int *eof, void *data)
80 {
81         return 0;
82 }
83
84
85 int rd_fs_type(char* page, char **start, off_t off,
86                int count, int *eof, void *data)
87 {
88         return 0;
89 }
90
91 int rd_other(char* page, char **start, off_t off, int count, int *eof,
92              void *data)
93 {
94         return 0;
95 }
96
97 int rd_string(char* page, char **start, off_t off, int count, int *eof,
98               void *data)
99 {
100         printk("Hello string");
101         return 0;
102 }
103
104 int lprocfs_ll_wr(struct file* file, const char *buffer, unsigned long count,
105                   void *data)
106 {
107         return 0;
108 }
109
110 int wr_other(struct file* file, const char *buffer, unsigned long count,
111              void *data)
112 {
113         return 0;
114 }
115
116 int wr_string(struct file* file, const char *buffer, unsigned long count,
117               void *data)
118 {
119         return 0;
120 }
121 lprocfs_vars_t snmp_var_nm_1[]={
122         {"snmp/uuid", rd_uuid, 0},
123         {"snmp/f_blocksize",rd_blksize, 0},
124         {"snmp/f_blockstotal",rd_blktotal, 0},
125         {"snmp/f_blocksfree",rd_blkfree, 0},
126         {"snmp/f_kbytesfree", rd_kbfree, 0},
127         {"snmp/f_objects", rd_numobjects, 0},
128         {"snmp/f_objectsfree", rd_objfree, 0},
129         {"snmp/f_objectgroups", rd_objgroups, 0},
130         {0}
131 };