userland: Pass more sizes with ioctls where we can.

No "functional" change intended.
This commit is contained in:
Augustin Cavalier
2019-07-11 23:41:52 -04:00
parent 4c9e8f77e4
commit 9d06690ede
9 changed files with 92 additions and 89 deletions
+5 -4
View File
@@ -56,7 +56,7 @@ error(const char* message, ...)
va_list args;
va_start(args, message);
vsnprintf(buffer, sizeof(buffer), message, args);
va_end(args);
@@ -79,7 +79,7 @@ update_leds(int fd, uint32 modifiers)
if ((modifiers & B_SCROLL_LOCK) != 0)
lockIO[2] = 1;
ioctl(fd, KB_SET_LEDS, &lockIO);
ioctl(fd, KB_SET_LEDS, &lockIO, sizeof(lockIO));
}
@@ -106,7 +106,8 @@ keyboard_reader(void* arg)
for (;;) {
raw_key_info rawKeyInfo;
if (ioctl(keyboard->device, KB_READ, &rawKeyInfo) != 0)
if (ioctl(keyboard->device, KB_READ, &rawKeyInfo,
sizeof(rawKeyInfo)) != 0)
break;
uint32 keycode = rawKeyInfo.keycode;
@@ -313,7 +314,7 @@ start_console(struct console* con)
continue;
snprintf(name, sizeof(name), "/dev/pt/%s", entry->d_name);
con->tty_master_fd = open(name, O_RDWR);
if (con->tty_master_fd >= 0) {
snprintf(name, sizeof(name), "/dev/tt/%s", entry->d_name);
+1 -1
View File
@@ -412,7 +412,7 @@ command_list(int argc, const char* const* argv)
// issue the request
ram_disk_ioctl_info request;
if (ioctl(fd, RAM_DISK_IOCTL_INFO, &request) < 0)
if (ioctl(fd, RAM_DISK_IOCTL_INFO, &request, sizeof(request)) < 0)
continue;
int32 rowIndex = table.CountRows();