[PATCH] Add return value to indicate unsopported cipher
Hello. Right now there's no way for user of osmo_a5(..) to understand if particular cipher (a5/3 for example) is supported or not. Attached patch adds simple return value to osmo_a5 to fix that. Of course I would rather see a5/3 included into mainline but in a meantime this patch might be useful too :) -- best regards, Max, http://fairwaves.ru
Hi,
Right now there's no way for user of osmo_a5(..) to understand if particular cipher (a5/3 for example) is supported or not.
Indeed ..
Attached patch adds simple return value to osmo_a5 to fix that. Of course I would rather see a5/3 included into mainline but in a meantime this patch might be useful too :)
mmm, the "osmocom" usual way is to return 0 for success and a negative error, in this case -ENOTSUP would be perfect. true/false is more a C++ thing :p Cheers, Sylvain
29.11.2012 16:07, Sylvain Munaut пишет:
mmm, the "osmocom" usual way is to return 0 for success and a negative error, in this case -ENOTSUP would be perfect.
Is there common place to define such error codes in osmocom? git grep -ni ENOTSUP reveals nothing of a kind. -- best regards, Max, http://fairwaves.ru
Hi,
mmm, the "osmocom" usual way is to return 0 for success and a negative error, in this case -ENOTSUP would be perfect.
Is there common place to define such error codes in osmocom?
git grep -ni ENOTSUP reveals nothing of a kind.
Well we never used that one yet I guess, but those are defined in errno.h part of POSIX AFAIK. Cheers, Sylvain
participants (2)
-
Sylvain Munaut -
☎