scsi_netlink.c (681e4a5e13c1c8315694eb4f44e0cdd84c9082d2) | scsi_netlink.c (a31f2d17b331db970259e875b7223d3aba7e3821) |
---|---|
1/* 2 * scsi_netlink.c - SCSI Transport Netlink Interface 3 * 4 * Copyright (C) 2006 James Smart, Emulex Corporation 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 472 unchanged lines hidden (view full) --- 481 * scsi_netlink_init - Called by SCSI subsystem to initialize 482 * the SCSI transport netlink interface 483 * 484 **/ 485void 486scsi_netlink_init(void) 487{ 488 int error; | 1/* 2 * scsi_netlink.c - SCSI Transport Netlink Interface 3 * 4 * Copyright (C) 2006 James Smart, Emulex Corporation 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 472 unchanged lines hidden (view full) --- 481 * scsi_netlink_init - Called by SCSI subsystem to initialize 482 * the SCSI transport netlink interface 483 * 484 **/ 485void 486scsi_netlink_init(void) 487{ 488 int error; |
489 struct netlink_kernel_cfg cfg = { 490 .input = scsi_nl_rcv_msg, 491 .groups = SCSI_NL_GRP_CNT, 492 }; |
|
489 490 INIT_LIST_HEAD(&scsi_nl_drivers); 491 492 error = netlink_register_notifier(&scsi_netlink_notifier); 493 if (error) { 494 printk(KERN_ERR "%s: register of event handler failed - %d\n", 495 __func__, error); 496 return; 497 } 498 499 scsi_nl_sock = netlink_kernel_create(&init_net, NETLINK_SCSITRANSPORT, | 493 494 INIT_LIST_HEAD(&scsi_nl_drivers); 495 496 error = netlink_register_notifier(&scsi_netlink_notifier); 497 if (error) { 498 printk(KERN_ERR "%s: register of event handler failed - %d\n", 499 __func__, error); 500 return; 501 } 502 503 scsi_nl_sock = netlink_kernel_create(&init_net, NETLINK_SCSITRANSPORT, |
500 SCSI_NL_GRP_CNT, scsi_nl_rcv_msg, NULL, 501 THIS_MODULE); | 504 THIS_MODULE, &cfg); |
502 if (!scsi_nl_sock) { 503 printk(KERN_ERR "%s: register of receive handler failed\n", 504 __func__); 505 netlink_unregister_notifier(&scsi_netlink_notifier); 506 return; 507 } 508 509 /* Register the entry points for the generic SCSI transport */ --- 171 unchanged lines hidden --- | 505 if (!scsi_nl_sock) { 506 printk(KERN_ERR "%s: register of receive handler failed\n", 507 __func__); 508 netlink_unregister_notifier(&scsi_netlink_notifier); 509 return; 510 } 511 512 /* Register the entry points for the generic SCSI transport */ --- 171 unchanged lines hidden --- |