netfilter: nfnetlink_log: Make use of pr_fmt where applicable
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
982f405136
commit
beacd3e8ef
|
@ -12,6 +12,9 @@
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
#include <linux/if_arp.h>
|
#include <linux/if_arp.h>
|
||||||
|
@ -1063,19 +1066,19 @@ static int __init nfnetlink_log_init(void)
|
||||||
netlink_register_notifier(&nfulnl_rtnl_notifier);
|
netlink_register_notifier(&nfulnl_rtnl_notifier);
|
||||||
status = nfnetlink_subsys_register(&nfulnl_subsys);
|
status = nfnetlink_subsys_register(&nfulnl_subsys);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
pr_err("log: failed to create netlink socket\n");
|
pr_err("failed to create netlink socket\n");
|
||||||
goto cleanup_netlink_notifier;
|
goto cleanup_netlink_notifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = nf_log_register(NFPROTO_UNSPEC, &nfulnl_logger);
|
status = nf_log_register(NFPROTO_UNSPEC, &nfulnl_logger);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
pr_err("log: failed to register logger\n");
|
pr_err("failed to register logger\n");
|
||||||
goto cleanup_subsys;
|
goto cleanup_subsys;
|
||||||
}
|
}
|
||||||
|
|
||||||
status = register_pernet_subsys(&nfnl_log_net_ops);
|
status = register_pernet_subsys(&nfnl_log_net_ops);
|
||||||
if (status < 0) {
|
if (status < 0) {
|
||||||
pr_err("log: failed to register pernet ops\n");
|
pr_err("failed to register pernet ops\n");
|
||||||
goto cleanup_logger;
|
goto cleanup_logger;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
|
Loading…
Reference in a new issue