/* ioctl argument types */
enum {
ARG_NONE,
+ ARG_USHRT,
ARG_INT,
+ ARG_UINT,
ARG_LONG,
ARG_ULONG,
ARG_LLONG,
do_commands(int fd, char **argv, int d) {
int res, i, j;
int iarg;
+ unsigned int uarg;
+ unsigned short huarg;
long larg;
long long llarg;
unsigned long lu;
case ARG_NONE:
res = ioctl(fd, bdcms[j].ioc, 0);
break;
+ case ARG_USHRT:
+ huarg = bdcms[j].argval;
+ res = ioctl(fd, bdcms[j].ioc, &huarg);
+ break;
case ARG_INT:
if (bdcms[j].argname) {
if (i == d-1) {
ioctl(fd, bdcms[j].ioc, iarg) :
ioctl(fd, bdcms[j].ioc, &iarg);
break;
+ case ARG_UINT:
+ uarg = bdcms[j].argval;
+ res = ioctl(fd, bdcms[j].ioc, &uarg);
+ break;
case ARG_LONG:
larg = bdcms[j].argval;
res = ioctl(fd, bdcms[j].ioc, &larg);
printf("%s: ", _(bdcms[j].help));
switch(bdcms[j].argtype) {
+ case ARG_USHRT:
+ printf("%hu\n", huarg);
+ break;
case ARG_INT:
printf("%d\n", iarg);
break;
+ case ARG_UINT:
+ printf("%u\n", uarg);
+ break;
case ARG_LONG:
printf("%ld\n", larg);
break;