diff options
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/fcntl.c | 10 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/ioctl.c | 10 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/lx_brand.c | 8 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/mount.c | 18 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/signal.c | 3 |
5 files changed, 22 insertions, 27 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/fcntl.c b/usr/src/lib/brand/lx/lx_brand/common/fcntl.c index 995a3b5e7b..7d00453b76 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/fcntl.c +++ b/usr/src/lib/brand/lx/lx_brand/common/fcntl.c @@ -22,11 +22,9 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2014 Joyent, Inc. All rights reserved. */ - -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/filio.h> #include <unistd.h> @@ -81,8 +79,7 @@ lx_fcntl(uintptr_t p1, uintptr_t p2, uintptr_t p3) if (cmd == LX_F_SETSIG || cmd == LX_F_GETSIG || cmd == LX_F_SETLEASE || cmd == LX_F_GETLEASE) { - lx_unsupported(gettext("%s(): unsupported command: %d"), - "fcntl", cmd); + lx_unsupported("unsupported fcntl command: %d", cmd); return (-ENOTSUP); } @@ -117,8 +114,7 @@ lx_fcntl64(uintptr_t p1, uintptr_t p2, uintptr_t p3) if (cmd == LX_F_SETSIG || cmd == LX_F_GETSIG || cmd == LX_F_SETLEASE || cmd == LX_F_GETLEASE) { - lx_unsupported(gettext("%s(): unsupported command: %d"), - "fcntl64", cmd); + lx_unsupported("unsupported fcntl64 command: %d", cmd); return (-ENOTSUP); } diff --git a/usr/src/lib/brand/lx/lx_brand/common/ioctl.c b/usr/src/lib/brand/lx/lx_brand/common/ioctl.c index 2f2b022ed5..e4c3d95af4 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/ioctl.c +++ b/usr/src/lib/brand/lx/lx_brand/common/ioctl.c @@ -22,10 +22,9 @@ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2014 Joyent, Inc. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <assert.h> #include <fcntl.h> #include <sys/types.h> @@ -672,8 +671,7 @@ lx_ioctl(uintptr_t p1, uintptr_t p2, uintptr_t p3) lx_ioctl_msg(fd, cmd, NULL, &stat, "lx_ioctl(): unsupported linux ioctl"); - lx_unsupported(gettext("lx_ioctl(): unsupported linux ioctl (%d)"), - cmd); + lx_unsupported("unsupported linux ioctl 0x%x", cmd); return (-EINVAL); } @@ -864,9 +862,7 @@ ict_siocifhwaddr(int fd, struct stat *stat, int cmd, char *cmd_str, * should have returned EFAULT. */ if (cmd == LX_SIOCSIFHWADDR) { - lx_unsupported(gettext( - "lx_ioctl(): unsupported linux ioctl: %s"), - "SIOCSIFHWADDR"); + lx_unsupported("unsupported linux ioctl: SIOCSIFHWADDR"); return (-EINVAL); } 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 bda9876190..de4bcb9fef 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 @@ -126,7 +126,9 @@ struct lx_locale_ending { */ int lx_traceflag; -#define NOSYS_NULL 1 +/* Offsets for nosys_msgs */ +#define NOSYS_NULL 0 +#define NOSYS_NONE 1 #define NOSYS_NO_EQUIV 2 #define NOSYS_KERNEL 3 #define NOSYS_UNDOC 4 @@ -142,7 +144,7 @@ int lx_traceflag; #define SYS_PASSTHRU 5 static char *nosys_msgs[] = { - "Either not yet done, or we haven't come up with an excuse", + "Not done yet", "No such Linux system call", "No equivalent Solaris functionality", "Reads/modifies Linux kernel state", @@ -933,7 +935,7 @@ IN_KERNEL_SYSCALL(get_thread_area, 244) IN_KERNEL_SYSCALL(set_tid_address, 258) static struct lx_sysent sysents[] = { - {"nosys", NULL, NOSYS_NULL, 0}, /* 0 */ + {"nosys", NULL, NOSYS_NONE, 0}, /* 0 */ {"exit", lx_exit, 0, 1}, /* 1 */ {"fork", lx_fork, 0, 0}, /* 2 */ {"read", lx_read, 0, 3}, /* 3 */ diff --git a/usr/src/lib/brand/lx/lx_brand/common/mount.c b/usr/src/lib/brand/lx/lx_brand/common/mount.c index 59ae227201..76392fee54 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/mount.c +++ b/usr/src/lib/brand/lx/lx_brand/common/mount.c @@ -567,8 +567,7 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, /* Make sure we support the requested mount flags. */ if ((flags & ~LX_MS_SUPPORTED) != 0) { - lx_unsupported( - "unsupported mount flags: 0x%x", flags); + lx_unsupported("unsupported mount flags: 0x%x", flags); return (-ENOTSUP); } @@ -589,7 +588,8 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, /* Verify Linux mount options. */ if (i_lx_opt_verify(options, lofs_options) == 0) { - lx_unsupported("unsupported lofs mount options"); + lx_unsupported("unsupported lofs mount options: %s", + options); return (-ENOTSUP); } } else if (strcmp(fstype, "tmpfs") == 0) { @@ -605,7 +605,8 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, /* Verify Linux mount options. */ if (i_lx_opt_verify(options, lx_tmpfs_options) == 0) { - lx_unsupported("unsupported tmpfs mount options"); + lx_unsupported("unsupported tmpfs mount options: %s", + options); return (-ENOTSUP); } } else if (strcmp(fstype, "proc") == 0) { @@ -625,7 +626,8 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, /* Verify Linux mount options. */ if (i_lx_opt_verify(options, lx_proc_options) == 0) { - lx_unsupported("unsupported lx_proc mount options"); + lx_unsupported("unsupported proc mount options: %s", + options); return (-ENOTSUP); } @@ -650,7 +652,8 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, /* Verify Linux mount options. */ if (i_lx_opt_verify(options, lx_autofs_options) == 0) { - lx_unsupported("unsupported lx_autofs mount options"); + lx_unsupported("unsupported autofs mount options: %s", + options); return (-ENOTSUP); } } else if (strcmp(fstype, "nfs") == 0) { @@ -682,8 +685,7 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, sdataptr = (char *)&nfs_args; sdatalen = sizeof (nfs_args); } else { - lx_unsupported( - "unsupported mount filesystem type: %s", fstype); + lx_unsupported("unsupported mount filesystem type: %s", fstype); return (-ENOTSUP); } diff --git a/usr/src/lib/brand/lx/lx_brand/common/signal.c b/usr/src/lib/brand/lx/lx_brand/common/signal.c index 1b7c6f90fb..96796a7d6f 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/signal.c +++ b/usr/src/lib/brand/lx/lx_brand/common/signal.c @@ -1559,8 +1559,7 @@ lx_tgkill(uintptr_t tgid, uintptr_t pid, uintptr_t sig) return (-EINVAL); if (tgid != pid) { - lx_unsupported(gettext( - "BrandZ tgkill(2) does not support gid != pid\n")); + lx_unsupported("tgkill does not support gid != pid"); return (-ENOTSUP); } |