Details
- Reviewers
emaste
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
So this was the actual bug?
2760 /* Ask holding process to free window and switch to console window */
2761 vt_proc_window_switch(vd->vd_windows[VT_CONSWINDOW]);
Also, if you're going to do this, could you please remove this conditional?
2777 /* Switch back to saved window */
2778 if (vd->vd_savedwindow != NULL)
2779 vt_proc_window_switch(vd->vd_savedwindow);
sys/dev/vt/vt_core.c | ||
---|---|---|
456 | Is there a better debug message that can be provided for this and the item below, e.g. "Cannot switch vw (is NULL)", etc (otherwise I can't distinguish this error from the other, can I)?. | |
468 | Is there a reason why this is returning 0 and the previous error condition is returning EINVAL? |
I think this is probably fine, but do we still have a case where a switch is in progress -- i.e., curvw->vw_switch_to == vw, but curvw != vw?
Good catch:
Do you want me to add a case for that? Right now that is not triggering a problem.
--HPS
I think it would be a very rare problem in practice, but should be considered. Would if (vw == curvw || vw == curvw->vw_switch_to == vw) be an appropriate test? Or maybe two separate tests so different diagnostics can be used in each.
I see one more case:
if (curvw->vw_switch_to_ != vw && curvw->vw_switch_to != NULL) {
return (EINVAL); /* other switch in progress */
}
I'll compile and test and then commit shortly.