diff --git a/src/machi.proto b/src/machi.proto index dbf5237..c3f40f8 100644 --- a/src/machi.proto +++ b/src/machi.proto @@ -42,6 +42,7 @@ enum Mpb_GeneralStatusCode { BAD_CHECKSUM = 3; PARTITION = 4; NOT_WRITTEN = 5; + WRITTEN = 6; BAD_JOSS = 255; // Only for testing by the Taipan } diff --git a/src/machi_pb_high_client.erl b/src/machi_pb_high_client.erl index bd42741..abec13c 100644 --- a/src/machi_pb_high_client.erl +++ b/src/machi_pb_high_client.erl @@ -367,6 +367,8 @@ convert_general_status_code('PARTITION') -> {error, partition}; convert_general_status_code('NOT_WRITTEN') -> {error, not_written}; +convert_general_status_code('WRITTEN') -> + {error, written}; convert_general_status_code('BAD_JOSS') -> throw({error, bad_joss_taipan_fixme}). diff --git a/src/machi_pb_wrap.erl b/src/machi_pb_wrap.erl index be089ab..9daa54c 100644 --- a/src/machi_pb_wrap.erl +++ b/src/machi_pb_wrap.erl @@ -365,6 +365,8 @@ conv_from_status({error, partition}) -> 'PARTITION'; conv_from_status({error, not_written}) -> 'NOT_WRITTEN'; +conv_from_status({error, written}) -> + 'WRITTEN'; conv_from_status(_OOPS) -> io:format(user, "HEY, ~s:~w got ~w\n", [?MODULE, ?LINE, _OOPS]), 'BAD_JOSS'.