projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd7fcbf
)
netfilter 08/09: xt_time: print timezone for user information
author
Jan Engelhardt
<
[email protected]
>
Mon, 12 Jan 2009 00:06:10 +0000
(
00:06
+0000)
committer
David S. Miller
<
[email protected]
>
Tue, 13 Jan 2009 05:18:36 +0000
(21:18 -0800)
netfilter: xt_time: print timezone for user information
Let users have a way to figure out if their distro set the kernel
timezone at all.
Signed-off-by: Jan Engelhardt <
[email protected]
>
Signed-off-by: Patrick McHardy <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/netfilter/xt_time.c
patch
|
blob
|
history
diff --git
a/net/netfilter/xt_time.c
b/net/netfilter/xt_time.c
index 29375ba8db7335ca8dfb02b02336783f96fec83d..93acaa59d1089909378d2c6768942345e197217e 100644
(file)
--- a/
net/netfilter/xt_time.c
+++ b/
net/netfilter/xt_time.c
@@
-243,6
+243,17
@@
static struct xt_match xt_time_mt_reg __read_mostly = {
static int __init time_mt_init(void)
{
+ int minutes = sys_tz.tz_minuteswest;
+
+ if (minutes < 0) /* east of Greenwich */
+ printk(KERN_INFO KBUILD_MODNAME
+ ": kernel timezone is +%02d%02d\n",
+ -minutes / 60, -minutes % 60);
+ else /* west of Greenwich */
+ printk(KERN_INFO KBUILD_MODNAME
+ ": kernel timezone is -%02d%02d\n",
+ minutes / 60, minutes % 60);
+
return xt_register_match(&xt_time_mt_reg);
}