Re: [iproute2-next 4/4] vdpa: Enable user to set mtu of the vdpa device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/1/21 9:22 PM, Parav Pandit wrote:
> @@ -154,6 +156,31 @@ static int vdpa_argv_mac(struct vdpa *vdpa, int argc, char **argv, char *mac)
>  	return 0;
>  }
>  
> +static int strtouint16_t(const char *str, uint16_t *p_val)
> +{
> +	char *endptr;
> +	unsigned long int val;
> +
> +	val = strtoul(str, &endptr, 10);
> +	if (endptr == str || *endptr != '\0')
> +		return -EINVAL;
> +	if (val > USHRT_MAX)
> +		return -ERANGE;
> +	*p_val = val;
> +	return 0;
> +}

duplicates get_u16
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux