sys/dev/disk/dm: Always initialize target's status string
Ioctl by dmsetup(8)'s "status" subcommand doesn't necessary
have a handler function from the way it's implemented.
In such a case, it seems prop_dictionary_t object of libprop
(in-kernel library) isn't properly initialized. This results
in dmsetup(8)'s "status" subcommand showing a binary junk.
This commit explicitly initializes it with C string "" to
fix this in above case where char *params remains == NULL.
This issue existed before
f134a703 (touched related code).
Below can reproduce this issue. Using a kernel prior to this
commit will show some junk after each line of dmsetup status
output except for the last line. Target type and definition
of table can be anything, but the target needs to have more
than 1 entries for the table to reproduce this.
=====(A) using the existing code
# kldload dm
# echo "0
117218241 linear /dev/daX 0" > ./table.txt
# echo "
117218241 117218241 linear /dev/daY 0" >> ./table.txt
# dmsetup create linear1 ./table.txt
# dmsetup status /dev/mapper/linear1
0
117218241 linear
\9bΓΌ
117218241 117218241 linear
=====(B) using this commit
# kldload dm
# echo "0
117218241 linear /dev/daX 0" > ./table.txt
# echo "
117218241 117218241 linear /dev/daY 0" >> ./table.txt
# dmsetup create linear1 ./table.txt
# dmsetup status /dev/mapper/linear1
0
117218241 linear
117218241 117218241 linear