LCOV - code coverage report
Current view: top level - include/linux - bsg.h (source / functions) Hit Total Coverage
Test: landlock.info Lines: 0 4 0.0 %
Date: 2021-04-22 12:43:58 Functions: 0 0 -

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : #ifndef _LINUX_BSG_H
       3             : #define _LINUX_BSG_H
       4             : 
       5             : #include <uapi/linux/bsg.h>
       6             : 
       7             : struct request;
       8             : 
       9             : #ifdef CONFIG_BLK_DEV_BSG
      10             : struct bsg_ops {
      11             :         int     (*check_proto)(struct sg_io_v4 *hdr);
      12             :         int     (*fill_hdr)(struct request *rq, struct sg_io_v4 *hdr,
      13             :                                 fmode_t mode);
      14             :         int     (*complete_rq)(struct request *rq, struct sg_io_v4 *hdr);
      15             :         void    (*free_rq)(struct request *rq);
      16             : };
      17             : 
      18             : struct bsg_class_device {
      19             :         struct device *class_dev;
      20             :         int minor;
      21             :         struct request_queue *queue;
      22             :         const struct bsg_ops *ops;
      23             : };
      24             : 
      25             : int bsg_register_queue(struct request_queue *q, struct device *parent,
      26             :                 const char *name, const struct bsg_ops *ops);
      27             : int bsg_scsi_register_queue(struct request_queue *q, struct device *parent);
      28             : void bsg_unregister_queue(struct request_queue *q);
      29             : #else
      30           0 : static inline int bsg_scsi_register_queue(struct request_queue *q,
      31             :                 struct device *parent)
      32             : {
      33           0 :         return 0;
      34             : }
      35           0 : static inline void bsg_unregister_queue(struct request_queue *q)
      36             : {
      37           0 : }
      38             : #endif /* CONFIG_BLK_DEV_BSG */
      39             : #endif /* _LINUX_BSG_H */

Generated by: LCOV version 1.14