ioctl: request should be 'unsigned long'

This commit is contained in:
K. Lange 2021-11-15 21:51:33 +09:00
parent 1b5352ac59
commit f3759daadf
4 changed files with 5 additions and 5 deletions

View File

@ -192,7 +192,7 @@ extern int tcgetattr(int, struct termios *);
extern pid_t tcgetsid(int);
extern int tcsendbreak(int, int);
extern int tcsetattr(int, int, struct termios *);
extern int ioctl(int, int, void*);
extern int ioctl(int, unsigned long, void*);
#endif /* ndef _KERNEL_ */
_End_C_Header

View File

@ -105,7 +105,7 @@ DECL_SYSCALL2(sysfunc, int, char **);
DECL_SYSCALL2(shutdown, int, int);
DECL_SYSCALL2(sleepabs, unsigned long, unsigned long);
DECL_SYSCALL2(sleep, unsigned long, unsigned long);
DECL_SYSCALL3(ioctl, int, int, void *);
DECL_SYSCALL3(ioctl, int, unsigned long, void *);
DECL_SYSCALL2(access, char *, int);
DECL_SYSCALL2(statf, char *, void *);
DECL_SYSCALL2(chmod, char *, int);

View File

@ -416,7 +416,7 @@ long sys_read(int fd, char * ptr, unsigned long len) {
return -EBADF;
}
long sys_ioctl(int fd, int request, void * argp) {
long sys_ioctl(int fd, unsigned long request, void * argp) {
if (FD_CHECK(fd)) {
PTR_VALIDATE(argp);
return ioctl_fs(FD_ENTRY(fd), request, argp);

View File

@ -3,9 +3,9 @@
#include <sys/ioctl.h>
#include <unistd.h>
DEFN_SYSCALL3(ioctl, SYS_IOCTL, int, int, void *);
DEFN_SYSCALL3(ioctl, SYS_IOCTL, int, unsigned long, void *);
int ioctl(int fd, int request, void * argp) {
int ioctl(int fd, unsigned long request, void * argp) {
return syscall_ioctl(fd, request, argp);
}