X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/d57ee3ae693448387e3022fdd07bd741b2db818a..45e1f8b055043e54be35462852ab6649d634da7c:/lunaix-os/kernel/fs/xattr.c diff --git a/lunaix-os/kernel/fs/xattr.c b/lunaix-os/kernel/fs/xattr.c index 94f85b7..3fa09a0 100644 --- a/lunaix-os/kernel/fs/xattr.c +++ b/lunaix-os/kernel/fs/xattr.c @@ -1,7 +1,11 @@ #include #include #include +#include #include +#include + +#define DO_STATUS(errno) SYSCALL_ESTATUS(__current->k_status = errno) struct v_xattr_entry* xattr_new(struct hstr* name) @@ -11,7 +15,8 @@ xattr_new(struct hstr* name) return NULL; } *entry = - (struct v_xattr_entry){ .name = HHSTR(valloc(VFS_NAME_MAXLEN), 0, 0) }; + (struct v_xattr_entry){ .name = HHSTR(valloc(VFS_NAME_MAXLEN), 0, 0), + .value = NULL }; hstrcpy(&entry->name, name); return entry; @@ -20,7 +25,7 @@ xattr_new(struct hstr* name) void xattr_free(struct v_xattr_entry* entry) { - vfree(entry->name.value); + vfree((void*)entry->name.value); vfree(entry); }