On Mon, Oct 18, 2021 at 3:15 PM Tkaczyk, Mariusz
[off-list ref] wrote:
quoted
quoted
+ dv = devid2kname(makedev(disks[d*2].major, disks[d*2].minor));
+ dv_rep = devid2kname(makedev(disks[d*2+1].major, disks[d*2+1].minor));
devid2kname() returns static memory. If both drive and replacement
are available then dv value will be overwritten. Not sure if it is
possible.
I think it has the possibility. It only wants to check if the disk exists. Maybe
it's better to write a new api or check if the device exists directly
here. I'll try to avoid
the problem you mentioned.
Best Regards
Xiao