Rename fs_desc_buffer to desc
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m24s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m24s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <desc.h>
|
||||
#include <fs/path.h>
|
||||
#include <fs/tarfs.h>
|
||||
#include <fs/vfs.h>
|
||||
#include <fs_desc_buffer.h>
|
||||
#include <libk/align.h>
|
||||
#include <libk/minmax.h>
|
||||
#include <libk/std.h>
|
||||
@@ -103,8 +103,7 @@ int tarfs_mount (struct vfs_mountpoint* mountpoint, struct proc* proc,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int tarfs_describe (struct vfs_mountpoint* mountpoint, const char* path,
|
||||
struct fs_desc_buffer* desc) {
|
||||
int tarfs_describe (struct vfs_mountpoint* mountpoint, const char* path, struct desc* desc) {
|
||||
(void)mountpoint;
|
||||
|
||||
const char* filename = path_basename (path);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef _KERNEL_FS_TARFS_H
|
||||
#define _KERNEL_FS_TARFS_H
|
||||
|
||||
#include <desc.h>
|
||||
#include <device/device.h>
|
||||
#include <fs_desc_buffer.h>
|
||||
#include <libk/std.h>
|
||||
#include <proc/proc.h>
|
||||
#include <proc/reschedule.h>
|
||||
@@ -35,8 +35,7 @@ struct vfs_mountpoint;
|
||||
|
||||
int tarfs_mount (struct vfs_mountpoint* mountpoint, struct proc* proc, struct reschedule_ctx* rctx);
|
||||
|
||||
int tarfs_describe (struct vfs_mountpoint* mountpoint, const char* path,
|
||||
struct fs_desc_buffer* desc);
|
||||
int tarfs_describe (struct vfs_mountpoint* mountpoint, const char* path, struct desc* desc);
|
||||
|
||||
int tarfs_read (struct vfs_mountpoint* mountpoint, const char* path, uint8_t* buffer, size_t off,
|
||||
size_t size);
|
||||
|
||||
@@ -122,7 +122,7 @@ int vfs_close (struct procgroup* procgroup, const char* mountpoint, const char*
|
||||
}
|
||||
|
||||
int vfs_describe (struct procgroup* procgroup, const char* mountpoint, const char* path,
|
||||
struct fs_desc_buffer* desc) {
|
||||
struct desc* desc) {
|
||||
struct vfs_mountpoint* vmp = vfs_find_mountpoint (mountpoint);
|
||||
|
||||
if (vmp == NULL)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef _KERNEL_FS_VFS_H
|
||||
#define _KERNEL_FS_VFS_H
|
||||
|
||||
#include <desc.h>
|
||||
#include <device/device.h>
|
||||
#include <fs_desc_buffer.h>
|
||||
#include <libk/hash.h>
|
||||
#include <libk/list.h>
|
||||
#include <libk/std.h>
|
||||
@@ -24,8 +24,7 @@ struct vfs_mountpoint {
|
||||
int (*mount) (struct vfs_mountpoint* mountpoint, struct proc* proc,
|
||||
struct reschedule_ctx* rctx);
|
||||
|
||||
int (*describe) (struct vfs_mountpoint* mountpoint, const char* path,
|
||||
struct fs_desc_buffer* desc);
|
||||
int (*describe) (struct vfs_mountpoint* mountpoint, const char* path, struct desc* desc);
|
||||
|
||||
int (*read) (struct vfs_mountpoint* mountpoint, const char* path, uint8_t* buffer, size_t off,
|
||||
size_t size);
|
||||
@@ -43,7 +42,7 @@ int vfs_create_mountpoint (const char* key, int fs_type, struct device* back_dev
|
||||
struct proc* proc, struct reschedule_ctx* rctx);
|
||||
|
||||
int vfs_describe (struct procgroup* procgroup, const char* mountpoint, const char* path,
|
||||
struct fs_desc_buffer* desc);
|
||||
struct desc* desc);
|
||||
|
||||
int vfs_read (struct procgroup* procgroup, const char* mountpoint, const char* path,
|
||||
uint8_t* buffer, size_t off, size_t size);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <aux/compiler.h>
|
||||
#include <aux/elf.h>
|
||||
#include <desc.h>
|
||||
#include <fs/vfs.h>
|
||||
#include <fs_desc_buffer.h>
|
||||
#include <irq/irq.h>
|
||||
#include <libk/align.h>
|
||||
#include <libk/list.h>
|
||||
@@ -106,7 +106,7 @@ struct elf_aux proc_load_segments (struct proc* proc, uint8_t* elf) {
|
||||
|
||||
struct proc* proc_from_file (struct procgroup* procgroup, const char* mountpoint,
|
||||
const char* path) {
|
||||
struct fs_desc_buffer desc;
|
||||
struct desc desc;
|
||||
|
||||
if (vfs_open (procgroup, mountpoint, path) != ST_OK)
|
||||
return NULL;
|
||||
|
||||
@@ -384,13 +384,12 @@ DEFINE_SYSCALL (sys_read) {
|
||||
return SYSRESULT (vfs_read (proc->procgroup, mountpoint, subpath, buffer, off, size));
|
||||
}
|
||||
|
||||
/* int describe (char* path, struct fs_desc_buffer* desc) */
|
||||
/* int describe (char* path, struct desc* desc) */
|
||||
DEFINE_SYSCALL (sys_describe) {
|
||||
uintptr_t uvaddr_path = a1;
|
||||
uintptr_t uvaddr_desc = a2;
|
||||
|
||||
struct fs_desc_buffer* desc =
|
||||
sys_get_user_buffer (proc, uvaddr_desc, sizeof (struct fs_desc_buffer));
|
||||
struct desc* desc = sys_get_user_buffer (proc, uvaddr_desc, sizeof (struct desc));
|
||||
|
||||
if (desc == NULL)
|
||||
return SYSRESULT (-ST_BAD_ADDRESS_SPACE);
|
||||
|
||||
Reference in New Issue
Block a user