git: sys/dev/disk/dm: Add dm_alloc_string()

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Mon Nov 9 04:01:22 PST 2015


commit 1849c72c6fecef60ca1df44346a6ed07cce6d6ca
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Mon Nov 9 18:56:38 2015 +0900

    sys/dev/disk/dm: Add dm_alloc_string()
    
    Add dm_alloc_string() which kmallocs char* from M_DM.
    
    It was confusing that targets had to use M_DM for status
    purpose while targets had their own M_DMXXX. Using this
    wrapper function makes target code less error prone when
    allocating a string without an extra comment on usage.

Summary of changes:
 sys/dev/disk/dm/device-mapper.c                       | 8 ++++++++
 sys/dev/disk/dm/dm.h                                  | 2 ++
 sys/dev/disk/dm/targets/crypt/dm_target_crypt.c       | 3 +--
 sys/dev/disk/dm/targets/delay/dm_target_delay.c       | 4 ++--
 sys/dev/disk/dm/targets/linear/dm_target_linear.c     | 3 +--
 sys/dev/disk/dm/targets/snapshot/dm_target_snapshot.c | 3 +--
 sys/dev/disk/dm/targets/striped/dm_target_striped.c   | 4 ++--
 7 files changed, 17 insertions(+), 10 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1849c72c6fecef60ca1df44346a6ed07cce6d6ca


-- 
DragonFly BSD source repository



More information about the Commits mailing list