line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Sys::Info::Driver::Linux::Constants; |
2
|
|
|
|
|
|
|
$Sys::Info::Driver::Linux::Constants::VERSION = '0.7904'; |
3
|
2
|
|
|
2
|
|
24
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
46
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
45
|
|
5
|
2
|
|
|
2
|
|
8
|
use base qw( Exporter ); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
161
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# uptime |
8
|
2
|
|
|
2
|
|
12
|
use constant UP_TIME => 0; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
82
|
|
9
|
2
|
|
|
2
|
|
9
|
use constant IDLE_TIME => 1; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
143
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# fstab entries |
12
|
2
|
|
|
2
|
|
12
|
use constant FS_SPECIFIER => 0; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
79
|
|
13
|
2
|
|
|
2
|
|
10
|
use constant MOUNT_POINT => 1; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
80
|
|
14
|
2
|
|
|
2
|
|
10
|
use constant FS_TYPE => 2; |
|
2
|
|
|
|
|
19
|
|
|
2
|
|
|
|
|
84
|
|
15
|
2
|
|
|
2
|
|
11
|
use constant MOUNT_OPTS => 3; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
83
|
|
16
|
2
|
|
|
2
|
|
11
|
use constant DUMP_FREQ => 4; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
74
|
|
17
|
2
|
|
|
2
|
|
9
|
use constant FS_CHECK_ORDER => 5; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
73
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# getpwnam() |
20
|
2
|
|
|
2
|
|
9
|
use constant REAL_NAME_FIELD => 6; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
133
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# format: 'Linux version 1.2.3 (foo@bar.com)' |
23
|
|
|
|
|
|
|
# format: 'Linux version 1.2.3 (foo@bar.com) (gcc 1.2.3)' |
24
|
|
|
|
|
|
|
# format: 'Linux version 1.2.3 (foo@bar.com) (gcc 1.2.3 (Redhat blah blah))' |
25
|
2
|
|
|
|
|
180
|
use constant RE_LINUX_VERSION => qr{ |
26
|
|
|
|
|
|
|
\A |
27
|
|
|
|
|
|
|
Linux \s+ version \s |
28
|
|
|
|
|
|
|
(.+?) |
29
|
|
|
|
|
|
|
\s |
30
|
|
|
|
|
|
|
[(] .+? \@ .+? [)] |
31
|
|
|
|
|
|
|
(.*?) |
32
|
|
|
|
|
|
|
\z |
33
|
2
|
|
|
2
|
|
11
|
}xmsi; |
|
2
|
|
|
|
|
3
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# format: 'linux foo.domain.bar 1.2.3-foo' |
36
|
2
|
|
|
|
|
255
|
use constant RE_LINUX_VERSION2 => qr{ |
37
|
|
|
|
|
|
|
\A |
38
|
|
|
|
|
|
|
linux \s+ [a-zA-Z0-9.]+ \s+ |
39
|
|
|
|
|
|
|
([a-zA-Z0-9.]+)? |
40
|
2
|
|
|
2
|
|
17
|
}xmsi; |
|
2
|
|
|
|
|
5
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
43
|
|
|
|
|
|
|
uptime => [qw/ |
44
|
|
|
|
|
|
|
UP_TIME |
45
|
|
|
|
|
|
|
IDLE_TIME |
46
|
|
|
|
|
|
|
/], |
47
|
|
|
|
|
|
|
fstab => [qw/ |
48
|
|
|
|
|
|
|
FS_SPECIFIER |
49
|
|
|
|
|
|
|
MOUNT_POINT |
50
|
|
|
|
|
|
|
FS_TYPE |
51
|
|
|
|
|
|
|
MOUNT_OPTS |
52
|
|
|
|
|
|
|
DUMP_FREQ |
53
|
|
|
|
|
|
|
FS_CHECK_ORDER |
54
|
|
|
|
|
|
|
/], |
55
|
|
|
|
|
|
|
user => [qw/ |
56
|
|
|
|
|
|
|
REAL_NAME_FIELD |
57
|
|
|
|
|
|
|
/], |
58
|
|
|
|
|
|
|
general => [qw/ |
59
|
|
|
|
|
|
|
RE_LINUX_VERSION |
60
|
|
|
|
|
|
|
RE_LINUX_VERSION2 |
61
|
|
|
|
|
|
|
/], |
62
|
|
|
|
|
|
|
); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
our @EXPORT_OK = map { @{ $_ } } values %EXPORT_TAGS; |
65
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = \@EXPORT_OK; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__END__ |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=pod |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=encoding UTF-8 |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 NAME |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Sys::Info::Driver::Linux::Constants |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 VERSION |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
version 0.7904 |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 SYNOPSIS |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 DESCRIPTION |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Constants for Linux driver. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 NAME |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Sys::Info::Driver::Linux::Constants - Constants for Linux driver |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 METHODS |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
None. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 AUTHOR |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Burak Gursoy <burak@cpan.org> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
This software is copyright (c) 2006 by Burak Gursoy. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
106
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=cut |