mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Kernel: Make watch_file() syscall take path length as a size_t
We don't care to handle negative path lengths anyway.
This commit is contained in:
parent
cf7df95ffe
commit
d6b06fd5a3
4 changed files with 4 additions and 4 deletions
|
@ -3447,7 +3447,7 @@ int Process::sys$ftruncate(int fd, off_t length)
|
||||||
return description->truncate(length);
|
return description->truncate(length);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Process::sys$watch_file(const char* user_path, int path_length)
|
int Process::sys$watch_file(const char* user_path, size_t path_length)
|
||||||
{
|
{
|
||||||
auto path = get_syscall_path_argument(user_path, path_length);
|
auto path = get_syscall_path_argument(user_path, path_length);
|
||||||
if (path.is_error())
|
if (path.is_error())
|
||||||
|
|
|
@ -101,7 +101,7 @@ public:
|
||||||
int sys$sync();
|
int sys$sync();
|
||||||
int sys$beep();
|
int sys$beep();
|
||||||
int sys$get_process_name(char* buffer, int buffer_size);
|
int sys$get_process_name(char* buffer, int buffer_size);
|
||||||
int sys$watch_file(const char* path, int path_length);
|
int sys$watch_file(const char* path, size_t path_length);
|
||||||
int sys$dbgputch(u8);
|
int sys$dbgputch(u8);
|
||||||
int sys$dbgputstr(const u8*, int length);
|
int sys$dbgputstr(const u8*, int length);
|
||||||
int sys$dump_backtrace();
|
int sys$dump_backtrace();
|
||||||
|
|
|
@ -15,7 +15,7 @@ int fcntl(int fd, int cmd, ...)
|
||||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int watch_file(const char* path, int path_length)
|
int watch_file(const char* path, size_t path_length)
|
||||||
{
|
{
|
||||||
int rc = syscall(SC_watch_file, path, path_length);
|
int rc = syscall(SC_watch_file, path, path_length);
|
||||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||||
|
|
|
@ -64,7 +64,7 @@ int openat(int dirfd, const char* path, int options, ...);
|
||||||
int openat_with_path_length(int dirfd, const char* path, size_t path_length, int options, mode_t);
|
int openat_with_path_length(int dirfd, const char* path, size_t path_length, int options, mode_t);
|
||||||
|
|
||||||
int fcntl(int fd, int cmd, ...);
|
int fcntl(int fd, int cmd, ...);
|
||||||
int watch_file(const char* path, int path_length);
|
int watch_file(const char* path, size_t path_length);
|
||||||
|
|
||||||
#define F_RDLCK 0
|
#define F_RDLCK 0
|
||||||
#define F_WRLCK 1
|
#define F_WRLCK 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue