Eventually the change to convert_user_fcb is identical, but the problem was inside bdos_LOGINDRIVE. It would return C=1 if the drive was already logged in and hence convert_user_fcb would return with carry set in that case, which was wrong.
I separated both fixes in two commits. Ran a multitude of tests for about 15 minutes so I'm reasonably confident I didn't break anything this time.
As a bonus bdos_LOGINDRIVE has a proper return value in C now. There's no error handling during construction of the bitmap, but that could be added later and is outside the scope of this patch.
Eventually the change to convert_user_fcb is identical, but the problem was inside bdos_LOGINDRIVE. It would return C=1 if the drive was already logged in and hence convert_user_fcb would return with carry set in that case, which was wrong.
I separated both fixes in two commits. Ran a multitude of tests for about 15 minutes so I'm reasonably confident I didn't break anything this time.
As a bonus bdos_LOGINDRIVE has a proper return value in C now. There's no error handling during construction of the bitmap, but that could be added later and is outside the scope of this patch.