Displaying 2 results from an estimated 2 matches for "unknown_flag".
2020 Sep 07
0
Re: [libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
...e setter? In such a setup, libnbd would still be
> rejecting input of out-of-range bits in relation to what libnbd knew
> at its compilation time.
While placeholders could be used, a more natural way is to extend the
flags type (in OCaml) to:
type t =
| FIXED_NEWSTYLE
| NO_ZEROES
| UNKNOWN_FLAG of int
where the unknown (at the time of compilation) flags would be
encoded as UNKNOWN_FLAG + the bit index of the unknown flag. eg:
[ FIXED_NEWSTYLE; UNKNOWN_FLAG 2 ] => 1 | (1<<2)
(1<<3) | 2 => [ UNKNOWN_FLAG 3; NO_ZEROES ]
Even though we distrib...
2020 Sep 06
8
[libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
Natural fallout after my recent testsuite additions that fixed a
couple of ocaml bugs in the setters. However, on at least the OCaml
code, I'm not sure what we should do if a newer libnbd ever returns a
bit that an older NBD.mli was not expecting at the time the OCaml
compiler ran (see below). I'm also not sure if there is a more
efficient way to avoid outputting Val_FOO() converters for