On Fri, Aug 19, 2022 at 06:35:26PM +0000, Klemens Nanni wrote:
> opendev(3) takes a const char *, just what getinfo() provides.
>
> I see no point in casting away the const;  no amd64 object change.
> OK?

const was added in opendev.c r1.12 in 2012, time for vnconfig to catch up :)

ok

> 
> Index: vnconfig.c
> ===================================================================
> RCS file: /cvs/src/sbin/vnconfig/vnconfig.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 vnconfig.c
> --- vnconfig.c        16 Aug 2022 16:18:16 -0000      1.8
> +++ vnconfig.c        19 Aug 2022 18:33:44 -0000
> @@ -234,7 +234,7 @@ getinfo(const char *vname, int *availp)
>               print_all = 1;
>       }
>  
> -     vd = opendev((char *)vname, O_RDONLY, OPENDEV_PART, NULL);
> +     vd = opendev(vname, O_RDONLY, OPENDEV_PART, NULL);
>       if (vd == -1)
>               err(1, "open: %s", vname);
>  
> 

Reply via email to