Lines Matching refs:args
502 static int ioctl_alt_func(/*int fd,*/ int cmd, unsigned char *args, int alt, const char *string) in ioctl_alt_func() argument
504 if (!ioctl(fd, cmd, args)) in ioctl_alt_func()
506 args[0] = alt; in ioctl_alt_func()
507 return bb_ioctl_or_warn(fd, cmd, args, string); in ioctl_alt_func()
509 #define ioctl_alt_or_warn(cmd,args,alt) ioctl_alt_func(cmd,args,alt,#cmd) argument
511 static int ioctl_alt_func(/*int fd,*/ int cmd, unsigned char *args, int alt) in ioctl_alt_func() argument
513 if (!ioctl(fd, cmd, args)) in ioctl_alt_func()
515 args[0] = alt; in ioctl_alt_func()
516 return bb_ioctl_or_warn(fd, cmd, args); in ioctl_alt_func()
518 #define ioctl_alt_or_warn(cmd,args,alt) ioctl_alt_func(cmd,args,alt) argument
1665 unsigned char args[4] = { WIN_SETFEATURES, 0, 0, 0 }; local
1685 args[0] = hwif_data;
1686 args[1] = hwif_ctrl;
1687 args[2] = hwif_irq;
1688 ioctl_or_warn(fd, HDIO_SCAN_HWIF, args);
1689 args[0] = WIN_SETFEATURES;
1690 args[1] = 0;
1749 args[0] = doorlock ? WIN_DOORLOCK : WIN_DOORUNLOCK;
1750 args[2] = 0;
1752 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1753 args[0] = WIN_SETFEATURES;
1758 args[2] = dkeep ? 0x66 : 0xcc;
1759 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1762 args[2] = defects ? 0x04 : 0x84;
1764 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1767 args[1] = prefetch;
1768 args[2] = 0xab;
1770 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1771 args[1] = 0;
1774 args[1] = xfermode_requested;
1775 args[2] = 3;
1778 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1779 args[1] = 0;
1782 args[2] = lookahead ? 0xaa : 0x55;
1784 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1788 args[2] = (apmmode == 255) ? 0x85 /* disable */ : 0x05 /* set */;
1789 args[1] = apmmode; /* sector count register 1-255 */
1793 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1794 args[1] = 0;
1802 args[2] = wcache ? 0x02 : 0x82;
1808 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1817 args[2] = 0;
1827 args[0] = WIN_STANDBYNOW1;
1828 ioctl_alt_or_warn(HDIO_DRIVE_CMD, args, WIN_STANDBYNOW2);
1838 args[0] = WIN_SLEEPNOW1;
1839 ioctl_alt_or_warn(HDIO_DRIVE_CMD, args, WIN_SLEEPNOW2);
1842 args[0] = 0xfb;
1844 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1847 args[0] = WIN_SETIDLE1;
1848 args[1] = standby_requested;
1851 ioctl_or_warn(fd, HDIO_DRIVE_CMD, &args);
1852 args[1] = 0;
1948 args[0] = WIN_CHECKPOWERMODE1;
1949 if (ioctl_alt_or_warn(HDIO_DRIVE_CMD, args, WIN_CHECKPOWERMODE2)) {
1950 if (errno != EIO || args[0] != 0 || args[1] != 0)
1955 state = (args[2] == 255) ? "active/idle" : "standby";
1956 args[1] = args[2] = 0;
1968 args[0] = 0;
1969 args[1] = tristate;
1970 ioctl_or_warn(fd, HDIO_TRISTATE_HWIF, &args);