Fix swapsector not to wipe out concurrent updates.
Make swaps() bail out if any of the sectors changed while edit() slept for input.
This commit is contained in:
parent
8df262bada
commit
d0db465382
1 changed files with 2 additions and 0 deletions
|
@ -59,6 +59,8 @@ swaps(void)
|
||||||
print_res(§b);
|
print_res(§b);
|
||||||
if (!confirm ("Are you sure these are the two sectors you wish to swap? "))
|
if (!confirm ("Are you sure these are the two sectors you wish to swap? "))
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
|
if (!check_sect_ok(§a) || !check_sect_ok(§b))
|
||||||
|
return RET_FAIL;
|
||||||
tmp = secta;
|
tmp = secta;
|
||||||
/* change the location of secta to that of sectb */
|
/* change the location of secta to that of sectb */
|
||||||
secta.sct_x = sectb.sct_x;
|
secta.sct_x = sectb.sct_x;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue