Code

Added Niki Waibel's quota patch
[collectd.git] / src / quota_fs.c
1 /**
2  * collectd - src/quota_fs.c
3  * Copyright (C) 2005  Niki W. Waibel
4  *
5  * This program is free software; you can redistribute it and/
6  * or modify it under the terms of the GNU General Public Li-
7  * cence as published by the Free Software Foundation; either
8  * version 2 of the Licence, or any later version.
9  *
10  * This program is distributed in the hope that it will be use-
11  * ful, but WITHOUT ANY WARRANTY; without even the implied war-
12  * ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  * See the GNU General Public Licence for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * Licence along with this program; if not, write to the Free
17  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
18  * USA.
19  *
20  * Author:
21  *   Niki W. Waibel <niki.waibel@gmx.net>
22 **/
24 #include "common.h"
25 #include "quota_debug.h"
26 #include "quota_fs.h"
28 int
29 quota_fs_issupported(const char *fsname)
30 {
31         if(!strcmp(fsname, "ext2")
32         || !strcmp(fsname, "ext3")
33         || !strcmp(fsname, "ufs")
34         || !strcmp(fsname, "vxfs")
35         || !strcmp(fsname, "zfs"))
36         {
37                 return EXIT_SUCCESS;
38         } else {
39 #if 0
40                 DBG("%s filesystem not supported", fsname);
41 #endif
42                 return EXIT_FAILURE;
43         }
44 }
46 int
47 quota_fs_isnfs(const char *fsname)
48 {
49         if(!strcmp(fsname, "nfs") || !strcmp(fsname, "nfs4")) {
50                 return EXIT_SUCCESS;
51         } else {
52                 return EXIT_FAILURE;
53         }
54 }