Several follow-up changes required by the changes either to the VFS

syscalls or to the syscall mechanism (which exposed naming and parameter
inconsistencies).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8703 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2004-08-28 20:45:00 +00:00
parent 3d6fb35361
commit 383cdedbd2
22 changed files with 71 additions and 67 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ fs_stat_attr(int fd, const char *attribute, struct attr_info *attrInfo)
if (attr < 0)
RETURN_AND_SET_ERRNO(attr);
status = _kern_read_stat(attr, &stat, sizeof(struct stat));
status = _kern_read_stat(attr, NULL, false, &stat, sizeof(struct stat));
if (status == B_OK) {
attrInfo->type = stat.st_type;
attrInfo->size = stat.st_size;
+1 -1
View File
@@ -27,7 +27,7 @@ dev_t
dev_for_path(const char *path)
{
struct stat stat;
int status = _kern_read_path_stat(path, false, &stat, sizeof(struct stat));
int status = _kern_read_stat(-1, path, false, &stat, sizeof(struct stat));
if (status == B_OK)
return stat.st_dev;
+14 -14
View File
@@ -11,28 +11,28 @@
port_id
create_port(int32 capacity, const char *name)
{
return sys_port_create(capacity, name);
return _kern_create_port(capacity, name);
}
port_id
find_port(const char *name)
{
return sys_port_find(name);
return _kern_find_port(name);
}
status_t
write_port(port_id port, int32 code, const void *buffer, size_t bufferSize)
{
return sys_port_write(port, code, buffer, bufferSize);
return _kern_write_port_etc(port, code, buffer, bufferSize, 0, 0);
}
status_t
read_port(port_id port, int32 *code, void *buffer, size_t bufferSize)
{
return sys_port_read(port, code, buffer, bufferSize);
return _kern_read_port_etc(port, code, buffer, bufferSize, 0, 0);
}
@@ -40,7 +40,7 @@ status_t
write_port_etc(port_id port, int32 code, const void *buffer, size_t bufferSize,
uint32 flags, bigtime_t timeout)
{
return sys_port_write_etc(port, code, buffer, bufferSize, flags, timeout);
return _kern_write_port_etc(port, code, buffer, bufferSize, flags, timeout);
}
@@ -48,49 +48,49 @@ status_t
read_port_etc(port_id port, int32 *code, void *buffer, size_t bufferSize,
uint32 flags, bigtime_t timeout)
{
return sys_port_read_etc(port, code, buffer, bufferSize, flags, timeout);
return _kern_read_port_etc(port, code, buffer, bufferSize, flags, timeout);
}
ssize_t
port_buffer_size(port_id port)
{
return sys_port_buffer_size(port);
return _kern_port_buffer_size_etc(port, 0, 0);
}
ssize_t
port_buffer_size_etc(port_id port, uint32 flags, bigtime_t timeout)
{
return sys_port_buffer_size_etc(port, flags, timeout);
return _kern_port_buffer_size_etc(port, flags, timeout);
}
ssize_t
port_count(port_id port)
{
return sys_port_count(port);
return _kern_port_count(port);
}
status_t
set_port_owner(port_id port, team_id team)
{
return sys_port_set_owner(port, team);
return _kern_set_port_owner(port, team);
}
status_t
close_port(port_id port)
{
return sys_port_close(port);
return _kern_close_port(port);
}
status_t
delete_port(port_id port)
{
return sys_port_delete(port);
return _kern_delete_port(port);
}
@@ -100,13 +100,13 @@ _get_next_port_info(team_id team, int32 *cookie, port_info *info, size_t size)
// size is not yet used, but may, if port_info changes
(void)size;
return sys_port_get_next_port_info(team, cookie, info);
return _kern_get_next_port_info(team, cookie, info);
}
status_t
_get_port_info(port_id port, port_info *info, size_t size)
{
return sys_port_get_info(port, info);
return _kern_get_port_info(port, info);
}
+1 -1
View File
@@ -53,7 +53,7 @@ release_sem_etc(sem_id id, int32 count, uint32 flags)
status_t
get_sem_count(sem_id sem, int32 *count)
{
return sys_sem_get_count(sem, count);
return sys_get_sem_count(sem, count);
}
+1 -1
View File
@@ -12,7 +12,7 @@
int
remove(const char *path)
{
int status = _kern_unlink(path);
int status = _kern_unlink(-1, path);
if (status < B_OK) {
errno = status;
return -1;
+1 -1
View File
@@ -12,7 +12,7 @@
int
rename(const char *from, const char *to)
{
int status = _kern_rename(from, to);
int status = _kern_rename(-1, from, -1, to);
if (status < B_OK) {
errno = status;
return -1;
+4 -2
View File
@@ -26,7 +26,8 @@ chmod(const char *path, mode_t mode)
status_t status;
stat.st_mode = mode;
status = _kern_write_path_stat(path, true, &stat, sizeof(struct stat), FS_WRITE_STAT_MODE);
status = _kern_write_stat(-1, path, true, &stat, sizeof(struct stat),
FS_WRITE_STAT_MODE);
RETURN_AND_SET_ERRNO(status);
}
@@ -39,7 +40,8 @@ fchmod(int fd, mode_t mode)
status_t status;
stat.st_mode = mode;
status = _kern_write_stat(fd, &stat, sizeof(struct stat), FS_WRITE_STAT_MODE);
status = _kern_write_stat(fd, NULL, false, &stat, sizeof(struct stat),
FS_WRITE_STAT_MODE);
RETURN_AND_SET_ERRNO(status);
}
+1 -1
View File
@@ -20,7 +20,7 @@
int
mkdir(const char *path, mode_t mode)
{
status_t status = _kern_create_dir(path, mode);
status_t status = _kern_create_dir(-1, path, mode);
RETURN_AND_SET_ERRNO(status);
}
+3 -3
View File
@@ -56,7 +56,7 @@ lstat(const char *path, struct stat *stat)
int
_stat(const char *path, struct stat *stat, size_t statSize)
{
int status = _kern_read_path_stat(path, true, stat, statSize);
int status = _kern_read_stat(-1, path, true, stat, statSize);
RETURN_AND_SET_ERRNO(status);
}
@@ -65,7 +65,7 @@ _stat(const char *path, struct stat *stat, size_t statSize)
int
_lstat(const char *path, struct stat *stat, size_t statSize)
{
int status = _kern_read_path_stat(path, false, stat, statSize);
int status = _kern_read_stat(-1, path, false, stat, statSize);
RETURN_AND_SET_ERRNO(status);
}
@@ -74,7 +74,7 @@ _lstat(const char *path, struct stat *stat, size_t statSize)
int
_fstat(int fd, struct stat *stat, size_t statSize)
{
int status = _kern_read_stat(fd, stat, statSize);
int status = _kern_read_stat(fd, NULL, false, stat, statSize);
RETURN_AND_SET_ERRNO(status);
}
+3 -3
View File
@@ -27,7 +27,7 @@ chown(const char *path, uid_t owner, gid_t group)
stat.st_uid = owner;
stat.st_gid = group;
status = _kern_write_path_stat(path, true, &stat, sizeof(struct stat),
status = _kern_write_stat(-1, path, true, &stat, sizeof(struct stat),
FS_WRITE_STAT_UID | FS_WRITE_STAT_GID);
RETURN_AND_SET_ERRNO(status);
@@ -42,7 +42,7 @@ lchown(const char *path, uid_t owner, gid_t group)
stat.st_uid = owner;
stat.st_gid = group;
status = _kern_write_path_stat(path, false, &stat, sizeof(struct stat),
status = _kern_write_stat(-1, path, false, &stat, sizeof(struct stat),
FS_WRITE_STAT_UID | FS_WRITE_STAT_GID);
RETURN_AND_SET_ERRNO(status);
@@ -57,7 +57,7 @@ fchown(int fd, uid_t owner, gid_t group)
stat.st_uid = owner;
stat.st_gid = group;
status = _kern_write_stat(fd, &stat, sizeof(struct stat),
status = _kern_write_stat(fd, NULL, false, &stat, sizeof(struct stat),
FS_WRITE_STAT_UID | FS_WRITE_STAT_GID);
RETURN_AND_SET_ERRNO(status);
+1 -1
View File
@@ -29,7 +29,7 @@ opendir(const char *path)
{
DIR *dir;
int fd = _kern_open_dir(path);
int fd = _kern_open_dir(-1, path);
if (fd < 0) {
errno = fd;
return NULL;
+3 -3
View File
@@ -20,7 +20,7 @@
ssize_t
readlink(const char *path, char *buffer, size_t bufferSize)
{
int status = _kern_read_link(path, buffer, bufferSize);
int status = _kern_read_link(-1, path, buffer, bufferSize);
RETURN_AND_SET_ERRNO(status);
}
@@ -29,7 +29,7 @@ readlink(const char *path, char *buffer, size_t bufferSize)
int
symlink(const char *path, const char *toPath)
{
int status = _kern_create_symlink(path, toPath, 0);
int status = _kern_create_symlink(-1, path, toPath, 0);
RETURN_AND_SET_ERRNO(status);
}
@@ -38,7 +38,7 @@ symlink(const char *path, const char *toPath)
int
unlink(const char *path)
{
int status = _kern_unlink(path);
int status = _kern_unlink(-1, path);
RETURN_AND_SET_ERRNO(status);
}
+1 -1
View File
@@ -41,7 +41,7 @@ open(const char *path, int oflags, ...)
if (oflags & O_CREAT)
status = _kern_create(path, oflags, perms);
else
status = _kern_open(path, oflags);
status = _kern_open(-1, path, oflags);
if (status < 0) {
errno = status;
+4 -2
View File
@@ -26,7 +26,8 @@ truncate(const char *path, off_t newSize)
status_t status;
stat.st_size = newSize;
status = _kern_write_path_stat(path, true, &stat, sizeof(struct stat), FS_WRITE_STAT_SIZE);
status = _kern_write_stat(-1, path, true, &stat, sizeof(struct stat),
FS_WRITE_STAT_SIZE);
RETURN_AND_SET_ERRNO(status);
}
@@ -39,7 +40,8 @@ ftruncate(int fd, off_t newSize)
status_t status;
stat.st_size = newSize;
status = _kern_write_stat(fd, &stat, sizeof(struct stat), FS_WRITE_STAT_SIZE);
status = _kern_write_stat(fd, NULL, false, &stat, sizeof(struct stat),
FS_WRITE_STAT_SIZE);
RETURN_AND_SET_ERRNO(status);
}
+1 -1
View File
@@ -32,7 +32,7 @@ utime(const char *path, const struct utimbuf *times)
} else
stat.st_atime = stat.st_mtime = time(NULL);
status = _kern_write_path_stat(path, true, &stat, sizeof(struct stat),
status = _kern_write_stat(-1, path, true, &stat, sizeof(struct stat),
FS_WRITE_STAT_MTIME | FS_WRITE_STAT_ATIME);
RETURN_AND_SET_ERRNO(status);