Only change devsd version number when media size changes. Do not change when it is zero and remains zero. Also, remove useless and confusing > lines in: switch(unit->state){ ... case Rawdata: > if(unit->state != Rawdata) > error(Ebadusefd); ... }