On Wed, Oct 25, 2017 at 11:50 AM, Julien Gomes <jul...@arista.com> wrote: > If the name argument of dev_get_valid_name() contains "%d", it will try > to assign it a unit number in __dev__alloc_name() and return either the > unit number (>= 0) or an error code (< 0). > Considering positive values as error values prevent tun device creations > relying this mechanism, therefor we should only consider negative values > as errors here. > > Signed-off-by: Julien Gomes <jul...@arista.com>
Good catch! I missed this case indeed. We'd better document it in the future. Acked-by: Cong Wang <xiyou.wangc...@gmail.com>