1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
</* $Id: plugin_statfs.c,v 1.2 2005/05/08 04:32:45 reinelt Exp $
*
* plugin for statfs() syscall
*
* Copyright (C) 2005 Michael Reinelt <reinelt@eunet.at>
* Copyright (C) 2005 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net>
*
* This file is part of LCD4Linux.
*
* LCD4Linux is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* LCD4Linux is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
* $Log: plugin_statfs.c,v $
* Revision 1.2 2005/05/08 04:32:45 reinelt
* CodingStyle added and applied
*
* Revision 1.1 2005/04/03 07:07:51 reinelt
* added statfs plugin
*
*/
/*
* exported functions:
*
* int plugin_init_statfs (void)
* adds statfs() functions
*
*/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/vfs.h>
#include "debug.h"
#include "plugin.h"
static void my_statfs(RESULT * result, RESULT * arg1, RESULT * arg2)
{
struct statfs buf;
char *path, *key;
double value;
path = R2S(arg1);
key = R2S(arg2);
if (statfs(path, &buf) != 0) {
error("statfs(%s) failed: %s", path, strerror(errno));
SetResult(&result, R_STRING, "");
return;
}
if (strcasecmp(key, "type") == 0) {
value = buf.f_type;
} else if (strcasecmp(key, "bsize") == 0) {
value = buf.f_bsize;
} else if (strcasecmp(key, "blocks") == 0) {
value = buf.f_blocks;
} else if (strcasecmp(key, "bfree") == 0) {
value = buf.f_bfree;
} else if (strcasecmp(key, "bavail") == 0) {
value = buf.f_bavail;
} else if (strcasecmp(key, "files") == 0) {
value = buf.f_files;
} else if (strcasecmp(key, "ffree"# France ALL (All channel 21 to 60)
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
[UHF 21]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 474000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 22]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 482000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 23]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 490000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 24]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 498000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 25]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 506000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 26]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 514000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 27]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 522000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 28]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 530000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 29]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 538000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 30]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 546000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 31]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 554000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 32]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 562000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 33]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 570000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 34]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 578000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 35]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 586000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 36]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 594000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 37]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 602000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 38]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 610000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 39]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 618000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 40]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 626000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 41]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 634000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 42]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 642000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 43]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 650000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 44]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 658000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 45]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 666000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 46]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 674000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 47]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 682000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 48]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 690000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 49]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 698000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 50]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 706000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 51]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 714000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 52]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 722000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 53]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 730000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 54]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 738000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 55]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 746000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 56]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 754000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 57]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 762000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 58]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 770000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 59]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 778000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
[UHF 60]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 786000000
BANDWIDTH_HZ = 8000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = NONE
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/32
HIERARCHY = NONE
INVERSION = AUTO
|