Fri, Jan 19, 2018 at 09:51:22PM CET, [email protected] wrote:
>On 1/17/18 2:48 AM, Jiri Pirko wrote:
>> @@ -89,7 +93,21 @@ static int tc_filter_modify(int cmd, unsigned int flags,
>> int argc, char **argv,
>> NEXT_ARG();
>> if (d[0])
>> duparg("dev", *argv);
>> + if (block_index) {
>> + fprintf(stderr, "Error: \"dev\" cannot be used
>> in the same time as \"block\"\n");
>
>'in the same time' does not sound right. something like: 'dev and block
>are mutually exlusive'
ack
>
>> + return -1;
>> + }
>> strncpy(d, *argv, sizeof(d)-1);
>> + } else if (matches(*argv, "block") == 0) {
>> + NEXT_ARG();
>> + if (block_index)
>> + duparg("block", *argv);
>> + if (d[0]) {
>> + fprintf(stderr, "Error: \"block\" cannot be
>> used in the same time as \"dev\"\n");
>
>same here. Correct the ones below as well.
ack
>
>
>> + return -1;
>> + }
>> + if (get_u32(&block_index, *argv, 0) || !block_index)
>> + invarg("invalid block index value", *argv);