WIP: bugfixes, add {error, written}
This commit is contained in:
parent
4fc0578a9d
commit
841235b3b5
3 changed files with 5 additions and 0 deletions
|
@ -42,6 +42,7 @@ enum Mpb_GeneralStatusCode {
|
||||||
BAD_CHECKSUM = 3;
|
BAD_CHECKSUM = 3;
|
||||||
PARTITION = 4;
|
PARTITION = 4;
|
||||||
NOT_WRITTEN = 5;
|
NOT_WRITTEN = 5;
|
||||||
|
WRITTEN = 6;
|
||||||
BAD_JOSS = 255; // Only for testing by the Taipan
|
BAD_JOSS = 255; // Only for testing by the Taipan
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -367,6 +367,8 @@ convert_general_status_code('PARTITION') ->
|
||||||
{error, partition};
|
{error, partition};
|
||||||
convert_general_status_code('NOT_WRITTEN') ->
|
convert_general_status_code('NOT_WRITTEN') ->
|
||||||
{error, not_written};
|
{error, not_written};
|
||||||
|
convert_general_status_code('WRITTEN') ->
|
||||||
|
{error, written};
|
||||||
convert_general_status_code('BAD_JOSS') ->
|
convert_general_status_code('BAD_JOSS') ->
|
||||||
throw({error, bad_joss_taipan_fixme}).
|
throw({error, bad_joss_taipan_fixme}).
|
||||||
|
|
||||||
|
|
|
@ -365,6 +365,8 @@ conv_from_status({error, partition}) ->
|
||||||
'PARTITION';
|
'PARTITION';
|
||||||
conv_from_status({error, not_written}) ->
|
conv_from_status({error, not_written}) ->
|
||||||
'NOT_WRITTEN';
|
'NOT_WRITTEN';
|
||||||
|
conv_from_status({error, written}) ->
|
||||||
|
'WRITTEN';
|
||||||
conv_from_status(_OOPS) ->
|
conv_from_status(_OOPS) ->
|
||||||
io:format(user, "HEY, ~s:~w got ~w\n", [?MODULE, ?LINE, _OOPS]),
|
io:format(user, "HEY, ~s:~w got ~w\n", [?MODULE, ?LINE, _OOPS]),
|
||||||
'BAD_JOSS'.
|
'BAD_JOSS'.
|
||||||
|
|
Loading…
Reference in a new issue