.longName = "send-buffer", .shortName = 'b', .argInfo = POPT_ARG_INT, .arg = &io_bufsize, .val = 'b', .descrip = "Changes the transmit/send buffer", .argDescrip = "BYTES", }, { .longName = "timeout", .shortName = 't', .argInfo = POPT_ARG_INT, .arg = &io_timeout, .val = 'b', .descrip = "Changes the per-operation timeout", .argDescrip = "SECONDS", b is used for both.
I don't know what's the issue. argInfo is set to POPT_ARG_INT so val should just be not 0. You can set it to 1 if you want.
OK, I knew they had to be unique for the callbacks, so assumed this might matter. (I was debugging a different issue, only seen so far on the 4.15.13 SLES 15.4, where -c was ignored (!), and noticed this).
We have sanity checks in place for developer builds, see: https://gitlab.com/samba-team/samba/-/blob/master/lib/cmdline/cmdline.c#L294