On Tue, Sep 16, 2025 at 04:05:55PM -0600, Uday Shankar wrote:
> Simplify the definition of feat_map by introducing a helper macro
> FEAT_NAME to avoid having to type the feature name twice. As a side
> effect, this changes the names in the feature list to be the full macro
> name instead of the abbreviated names that were used before, but this is
> a good change for clarity.
> 
> Using the full feature macro names ruins the alignment of the output, so
> change the output format to put each feature's hex value before its
> name, as this is easier to align nicely. The output now looks as
> follows:
> 
> # ./kublk features
> ublk_drv features: 0x7fff
> 0x1               : UBLK_F_SUPPORT_ZERO_COPY
> 0x2               : UBLK_F_URING_CMD_COMP_IN_TASK
> 0x4               : UBLK_F_NEED_GET_DATA
> 0x8               : UBLK_F_USER_RECOVERY
> 0x10              : UBLK_F_USER_RECOVERY_REISSUE
> 0x20              : UBLK_F_UNPRIVILEGED_DEV
> 0x40              : UBLK_F_CMD_IOCTL_ENCODE
> 0x80              : UBLK_F_USER_COPY
> 0x100             : UBLK_F_ZONED
> 0x200             : UBLK_F_USER_RECOVERY_FAIL_IO
> 0x400             : UBLK_F_UPDATE_SIZE
> 0x800             : UBLK_F_AUTO_BUF_REG
> 0x1000            : UBLK_F_QUIESCE
> 0x2000            : UBLK_F_PER_IO_DAEMON
> 0x4000            : unknown
> 
> Signed-off-by: Uday Shankar <[email protected]>

Reviewed-by: Ming Lei <[email protected]>


Thanks,
Ming


Reply via email to