On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote: 
> +/* Following defines are states of sg_request::rq_state */
> +#define SG_RQ_INACTIVE 0        /* request not in use (e.g. on fl) */
> +#define SG_RQ_INFLIGHT 1        /* SCSI request issued, no response yet */
> +#define SG_RQ_AWAIT_READ 2      /* response received, awaiting read */
> +#define SG_RQ_DONE_READ 3       /* read is ongoing or done */
> +#define SG_RQ_BUSY 4            /* example: reserve request changing size */

Please introduce an enumeration type instead of #defining these constants to
allow the compiler to verify assignments to sg_request::rq_state.

Thanks,

Bart.

Reply via email to