diff options
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/lib/brand/lx/lx_brand/Makefile.com | 3 | ||||
| -rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/lx_brand.c | 18 | ||||
| -rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/xattr.c | 57 | ||||
| -rw-r--r-- | usr/src/lib/brand/lx/lx_brand/sys/lx_syscall.h | 4 |
4 files changed, 72 insertions, 10 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/Makefile.com b/usr/src/lib/brand/lx/lx_brand/Makefile.com index 1b58e78ba0..3515372972 100644 --- a/usr/src/lib/brand/lx/lx_brand/Makefile.com +++ b/usr/src/lib/brand/lx/lx_brand/Makefile.com @@ -61,7 +61,8 @@ COBJS = clock.o \ sysv_ipc.o \ time.o \ truncate.o \ - wait.o + wait.o \ + xattr.o CMNOBJS = lx_signum.o ASOBJS = lx_handler.o lx_runexe.o lx_crt.o diff --git a/usr/src/lib/brand/lx/lx_brand/common/lx_brand.c b/usr/src/lib/brand/lx/lx_brand/common/lx_brand.c index 5156bca450..19a56d25f8 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/lx_brand.c +++ b/usr/src/lib/brand/lx/lx_brand/common/lx_brand.c @@ -1142,15 +1142,15 @@ static struct lx_sysent sysents[] = { {"setxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 226 */ {"lsetxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 227 */ {"fsetxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 228 */ - {"getxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 229 */ - {"lgetxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 230 */ - {"fgetxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 231 */ - {"listxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 232 */ - {"llistxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 233 */ - {"flistxattr", NULL, NOSYS_NO_EQUIV, 0}, /* 234 */ - {"removexattr", NULL, NOSYS_NO_EQUIV, 0}, /* 235 */ - {"lremovexattr", NULL, NOSYS_NO_EQUIV, 0}, /* 236 */ - {"fremovexattr", NULL, NOSYS_NO_EQUIV, 0}, /* 237 */ + {"getxattr", lx_xattr4, 0, 4}, /* 229 */ + {"lgetxattr", lx_xattr4, 0, 4}, /* 230 */ + {"fgetxattr", lx_xattr4, 0, 4}, /* 231 */ + {"listxattr", lx_xattr3, 0, 3}, /* 232 */ + {"llistxattr", lx_xattr3, 0, 3}, /* 233 */ + {"flistxattr", lx_xattr3, 0, 3}, /* 234 */ + {"removexattr", lx_xattr2, 0, 2}, /* 235 */ + {"lremovexattr", lx_xattr2, 0, 2}, /* 236 */ + {"fremovexattr", lx_xattr2, 0, 2}, /* 237 */ {"tkill", lx_tkill, 0, 2}, /* 238 */ {"sendfile64", lx_sendfile64, 0, 4}, /* 239 */ {"futex", lx_futex, EBP_HAS_ARG6, 6}, /* 240 */ diff --git a/usr/src/lib/brand/lx/lx_brand/common/xattr.c b/usr/src/lib/brand/lx/lx_brand/common/xattr.c new file mode 100644 index 0000000000..c4610f6da8 --- /dev/null +++ b/usr/src/lib/brand/lx/lx_brand/common/xattr.c @@ -0,0 +1,57 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2014 Joyent, Inc. All rights reserved. + */ + +/* + * *xattr() family of functions. + * + * These are currently unimplemented. We return EOPNOTSUPP for now, rather + * than using NOSYS_NO_EQUIV to avoid unwanted stderr output from ls(1). + */ + +#include <errno.h> +#include <sys/types.h> +#include <sys/lx_types.h> +#include <sys/lx_syscall.h> + +int +lx_xattr2(uintptr_t p1, uintptr_t p2) +{ + + return (-EOPNOTSUPP); +} + +int +lx_xattr3(uintptr_t p1, uintptr_t p2, uintptr_t p3) +{ + + return (-EOPNOTSUPP); +} + +int +lx_xattr4(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4) +{ + + return (-EOPNOTSUPP); +} diff --git a/usr/src/lib/brand/lx/lx_brand/sys/lx_syscall.h b/usr/src/lib/brand/lx/lx_brand/sys/lx_syscall.h index b0d4cf2eb6..ede03b80b6 100644 --- a/usr/src/lib/brand/lx/lx_brand/sys/lx_syscall.h +++ b/usr/src/lib/brand/lx/lx_brand/sys/lx_syscall.h @@ -240,6 +240,10 @@ extern int lx_sched_setscheduler(uintptr_t, uintptr_t, uintptr_t); extern int lx_sched_get_priority_min(uintptr_t); extern int lx_sched_get_priority_max(uintptr_t); +extern int lx_xattr2(uintptr_t, uintptr_t); +extern int lx_xattr3(uintptr_t, uintptr_t, uintptr_t); +extern int lx_xattr4(uintptr_t, uintptr_t, uintptr_t, uintptr_t); + extern int lx_keyctl(void); extern int lx_ipc(uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); |
