fix --block handling with invalid paths

The rootdev program was printing the path buffer even when the library
call failed.  In that case, the buffer most likely is uninitialized.
Make sure we seed it with a NUL byte so it's always valid.

TEST=`FEATURES=test emerge-link rootdev` passes

Change-Id: I00d334376de9bedee0a3fac3b1a74e48237c06b7
Trybot-Ready: Mike Frysinger <>
Reviewed-by: Yunlian Jiang <>
Commit-Queue: Mike Frysinger <>
Tested-by: Mike Frysinger <>
1 file changed