summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2015-07-31 11:44:30 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2015-07-31 11:44:30 +0000
commit4539a4b1613c47afea11a0cd76b29d992ab828eb (patch)
treec07df713146aa022dc25b138699703dc555fb84e
parent92d00144d1e2f01ebc15a0099c0a06a8210c7ccb (diff)
parent7bbc5723436be52a39f5c04d60cc236082c52d5a (diff)
downloadillumos-joyent-4539a4b1613c47afea11a0cd76b29d992ab828eb.tar.gz
[illumos-gate merge]
commit 7bbc5723436be52a39f5c04d60cc236082c52d5a 6058 ipadm doesn't accept "ALL" as valid field name commit 18961ad2c52f9d85e1f18c75f82d40639f483e1a 6087 bootadm message.h is hiding errors from lint commit 50b1420592e389f7ad93528e20c703aff72dc15e 6088 Unable to enable the nfs/server service when nothing is shared commit 1f183ba0b0be3e10202501aa3740753df6512804 5850 tcp timestamping behavior changed mid-connection
-rw-r--r--usr/src/cmd/boot/bootadm/bootadm.c4
-rw-r--r--usr/src/cmd/boot/bootadm/bootadm_upgrade.c4
-rw-r--r--usr/src/cmd/boot/bootadm/message.h548
-rw-r--r--usr/src/cmd/fs.d/nfs/svc/nfs-server53
-rw-r--r--usr/src/lib/libinetutil/common/ofmt.c6
-rw-r--r--usr/src/man/man7p/tcp.7p22
-rw-r--r--usr/src/uts/common/inet/tcp/tcp_input.c173
-rw-r--r--usr/src/uts/common/inet/tcp/tcp_time_wait.c25
-rw-r--r--usr/src/uts/common/inet/tcp_impl.h12
9 files changed, 411 insertions, 436 deletions
diff --git a/usr/src/cmd/boot/bootadm/bootadm.c b/usr/src/cmd/boot/bootadm/bootadm.c
index e948e7c34c..dfafc5f87f 100644
--- a/usr/src/cmd/boot/bootadm/bootadm.c
+++ b/usr/src/cmd/boot/bootadm/bootadm.c
@@ -2269,7 +2269,7 @@ is_valid_archive(char *root, int what)
if (stat(timestamp_path, &timestamp) != 0 ||
sb.st_mtime > timestamp.st_mtime) {
if (bam_verbose && !bam_check)
- bam_print(UPDATE_CACHE_OLD, timestamp);
+ bam_print(UPDATE_CACHE_OLD);
/*
* Don't generate a false positive for the boot-archive service
* but trigger an update of the archive cache in
@@ -2688,7 +2688,7 @@ update_timestamp(char *root)
*/
if (creat(timestamp_path, FILE_STAT_MODE) < 0) {
bam_error(OPEN_FAIL, timestamp_path, strerror(errno));
- bam_error(TIMESTAMP_FAIL, rootbuf);
+ bam_error(TIMESTAMP_FAIL);
}
}
diff --git a/usr/src/cmd/boot/bootadm/bootadm_upgrade.c b/usr/src/cmd/boot/bootadm/bootadm_upgrade.c
index bb04f64749..82ff62a05f 100644
--- a/usr/src/cmd/boot/bootadm/bootadm_upgrade.c
+++ b/usr/src/cmd/boot/bootadm/bootadm_upgrade.c
@@ -21,7 +21,7 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- * Copyright 2014 Toomas Soome <tsoome@me.com>
+ * Copyright 2015 Toomas Soome <tsoome@me.com>
*/
#include <stdio.h>
@@ -887,7 +887,7 @@ upgrade_menu(menu_t *mp, char *osroot, char *menu_root)
*/
if (bam_is_findroot != BAM_FINDROOT_PRESENT ||
bam_direct != BAM_DIRECT_DBOOT) {
- bam_error(DOWNGRADE_NOTSUP, osroot);
+ bam_error(DOWNGRADE_NOTSUP);
return (BAM_ERROR);
}
diff --git a/usr/src/cmd/boot/bootadm/message.h b/usr/src/cmd/boot/bootadm/message.h
index d2141441e6..4e43b5c3da 100644
--- a/usr/src/cmd/boot/bootadm/message.h
+++ b/usr/src/cmd/boot/bootadm/message.h
@@ -21,7 +21,7 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- * Copyright 2014 Toomas Soome <tsoome@me.com>
+ * Copyright 2015 Toomas Soome <tsoome@me.com>
*/
#ifndef _MESSAGE_H
@@ -33,672 +33,678 @@ extern "C" {
#include <libintl.h>
-#define FILE_MISS gettext("file not found: %s\n")
+#ifndef lint
+#define _(x) gettext(x)
+#else
+#define _(x) (x)
+#endif
+
+#define FILE_MISS _("file not found: %s\n")
-#define ARCH_EXEC_MISS gettext("archive creation file not found: %s: %s\n")
+#define ARCH_EXEC_MISS _("archive creation file not found: %s: %s\n")
-#define PATH_EXEC_OWNER gettext("%s is not owned by %d, skipping\n")
+#define PATH_EXEC_OWNER _("%s is not owned by %d, skipping\n")
-#define PATH_EXEC_LINK gettext("%s is not a regular file, skipping\n")
+#define PATH_EXEC_LINK _("%s is not a regular file, skipping\n")
-#define PATH_EXEC_PERMS gettext("%s is others or group writable, skipping\n")
+#define PATH_EXEC_PERMS _("%s is others or group writable, skipping\n")
-#define UPDATE_CACHE_OLD gettext("archive cache is out of sync. Rebuilding.\n")
+#define UPDATE_CACHE_OLD _("archive cache is out of sync. Rebuilding.\n")
-#define MUST_BE_ROOT gettext("you must be root to run this command\n")
+#define MUST_BE_ROOT _("you must be root to run this command\n")
#define NOT_ARCHIVE_BOOT \
- gettext("%s: not a boot archive based Solaris instance\n")
+ _("%s: not a boot archive based Solaris instance\n")
-#define MULT_CMDS gettext("multiple commands specified: -%c\n")
+#define MULT_CMDS _("multiple commands specified: -%c\n")
-#define INVALID_SUBCMD gettext("invalid sub-command specified: %s\n")
+#define INVALID_SUBCMD _("invalid sub-command specified: %s\n")
-#define NEED_SUBCMD gettext("this command requires a sub-command\n")
+#define NEED_SUBCMD _("this command requires a sub-command\n")
-#define NEED_CMD gettext("a command option must be specified\n")
+#define NEED_CMD _("a command option must be specified\n")
-#define DUP_OPT gettext("duplicate options specified: -%c\n")
+#define DUP_OPT _("duplicate options specified: -%c\n")
-#define BAD_OPT gettext("invalid option or missing option argument: -%c\n")
+#define BAD_OPT _("invalid option or missing option argument: -%c\n")
-#define NO_OPT_REQ gettext("this sub-command (%s) does not take options\n")
+#define NO_OPT_REQ _("this sub-command (%s) does not take options\n")
-#define MISS_OPT gettext("an option is required for this sub-command: %s\n")
+#define MISS_OPT _("an option is required for this sub-command: %s\n")
-#define ABS_PATH_REQ gettext("path is not absolute: %s\n")
+#define ABS_PATH_REQ _("path is not absolute: %s\n")
#define PATH_TOO_LONG \
- gettext("unable to create path on mountpoint %s, path too long\n")
+ _("unable to create path on mountpoint %s, path too long\n")
-#define TOO_LONG gettext("the following line is too long (> %d chars)\n\t%s\n")
+#define TOO_LONG _("the following line is too long (> %d chars)\n\t%s\n")
#define NOT_GRUB_BOOT \
- gettext("not a GRUB 0.97 based Illumos instance. Operation not supported\n")
+ _("not a GRUB 0.97 based Illumos instance. Operation not supported\n")
-#define NOT_GRUB_ROOT gettext("missing /boot/grub on root: %s\n")
+#define NOT_GRUB_ROOT _("missing /boot/grub on root: %s\n")
#define ALT_ROOT_INVALID \
- gettext("an alternate root (%s) cannot be used with this sub-command\n")
+ _("an alternate root (%s) cannot be used with this sub-command\n")
-#define NO_ENTRY gettext("no %s entry found\n")
+#define NO_ENTRY _("no %s entry found\n")
-#define NO_MATCH_ENTRY gettext("no matching entry found\n")
+#define NO_MATCH_ENTRY _("no matching entry found\n")
-#define NO_BOOTADM_MATCH gettext("no matching bootadm entry found\n")
+#define NO_BOOTADM_MATCH _("no matching bootadm entry found\n")
-#define NO_MEM gettext("could not allocate memory: size = %u\n")
+#define NO_MEM _("could not allocate memory: size = %u\n")
-#define NO_SPARC gettext("%s operation unsupported on SPARC machines\n")
+#define NO_SPARC _("%s operation unsupported on SPARC machines\n")
-#define CANNOT_LOCATE_GRUB_MENU gettext("cannot find GRUB menu\n")
+#define CANNOT_LOCATE_GRUB_MENU _("cannot find GRUB menu\n")
-#define CANNOT_LOCATE_GRUB_MENU_FILE gettext("cannot find GRUB menu file: %s\n")
+#define CANNOT_LOCATE_GRUB_MENU_FILE _("cannot find GRUB menu file: %s\n")
-#define GRUB_MENU_PATH gettext("the location for the active GRUB menu is: %s\n")
+#define GRUB_MENU_PATH _("the location for the active GRUB menu is: %s\n")
-#define STUBBOOT_DIR_NOT_FOUND gettext("cannot find stubboot directory\n")
+#define STUBBOOT_DIR_NOT_FOUND _("cannot find stubboot directory\n")
-#define NO_CMD gettext("no command at line %d\n")
+#define NO_CMD _("no command at line %d\n")
#define DUP_CMD \
- gettext("duplicate command %s at line %d of %sboot/grub/menu.lst\n")
+ _("duplicate command %s at line %d of %sboot/grub/menu.lst\n")
-#define NO_MENU gettext("menu file not found: %s\n")
+#define NO_MENU _("menu file not found: %s\n")
-#define GLOBAL_CMD gettext("%s %s\n")
+#define GLOBAL_CMD _("%s %s\n")
-#define INVALID_ENTRY gettext("invalid boot entry number: %s\n")
+#define INVALID_ENTRY _("invalid boot entry number: %s\n")
-#define INVALID_OPTION gettext("invalid option: %s\n")
+#define INVALID_OPTION _("invalid option: %s\n")
-#define SUBOPT_MISS gettext("missing suboption: %s\n")
+#define SUBOPT_MISS _("missing suboption: %s\n")
-#define NO_KERNEL gettext("no kernel line found in entry %d\n")
+#define NO_KERNEL _("no kernel line found in entry %d\n")
-#define EMPTY_MENU gettext("the GRUB menu is empty\n")
+#define EMPTY_MENU _("the GRUB menu is empty\n")
-#define UNLINK_EMPTY gettext("file is empty, deleting file: %s\n")
+#define UNLINK_EMPTY _("file is empty, deleting file: %s\n")
-#define UNLINK_FAIL gettext("failed to unlink file: %s: %s\n")
+#define UNLINK_FAIL _("failed to unlink file: %s: %s\n")
-#define NO_MATCH gettext("no matching entry found: %s\n")
+#define NO_MATCH _("no matching entry found: %s\n")
-#define INVALID_OPT gettext("invalid option: %s\n")
+#define INVALID_OPT _("invalid option: %s\n")
-#define FAILED_SIG gettext("cannot set SIGCHLD disposition: %s\n")
+#define FAILED_SIG _("cannot set SIGCHLD disposition: %s\n")
-#define CANT_UNBLOCK_SIGCHLD gettext("cannot unblock SIGCHLD: %s\n")
+#define CANT_UNBLOCK_SIGCHLD _("cannot unblock SIGCHLD: %s\n")
#define NO3264ELF \
- gettext("WARNING: file %s is neither a 32-bit nor a 64-bit ELF\n")
+ _("WARNING: file %s is neither a 32-bit nor a 64-bit ELF\n")
-#define BLOCKED_SIG gettext("SIGCHLD signal blocked. Cannot exec: %s\n")
+#define BLOCKED_SIG _("SIGCHLD signal blocked. Cannot exec: %s\n")
-#define POPEN_FAIL gettext("popen failed: %s\n")
+#define POPEN_FAIL _("popen failed: %s: %s\n")
-#define PCLOSE_FAIL gettext("pclose failed: %s\n")
+#define PCLOSE_FAIL _("pclose failed: %s: %s\n")
-#define EXEC_FAIL gettext("command terminated abnormally: %s: %d\n")
+#define EXEC_FAIL _("command terminated abnormally: %s: %d\n")
-#define OPEN_FAIL gettext("failed to open file: %s: %s\n")
+#define OPEN_FAIL _("failed to open file: %s: %s\n")
-#define LOCK_FAIL gettext("failed to lock file: %s: %s\n")
+#define LOCK_FAIL _("failed to lock file: %s: %s\n")
-#define UNLOCK_FAIL gettext("failed to unlock file: %s: %s\n")
+#define UNLOCK_FAIL _("failed to unlock file: %s: %s\n")
-#define TIMESTAMP_FAIL gettext("failed to update the timestamp file, next\
+#define TIMESTAMP_FAIL _("failed to update the timestamp file, next\
archive update may experience reduced performance\n")
-#define MMAP_FAIL gettext("failed to mmap file: %s: %s\n")
+#define MMAP_FAIL _("failed to mmap file: %s: %s\n")
-#define FILE_LOCKED gettext("another instance of bootadm (pid %u) is running\n")
+#define FILE_LOCKED _("another instance of bootadm (pid %lu) is running\n")
-#define NO_FLIST gettext("archive filelist is empty\n")
+#define NO_FLIST _("archive filelist is empty\n")
-#define CLOSE_FAIL gettext("failed to close file: %s: %s\n")
+#define CLOSE_FAIL _("failed to close file: %s: %s\n")
-#define RENAME_FAIL gettext("rename to file failed: %s: %s\n")
+#define RENAME_FAIL _("rename to file failed: %s: %s\n")
-#define NOT_IN_MNTTAB gettext("alternate root %s not in mnttab\n")
+#define NOT_IN_MNTTAB _("alternate root %s not in mnttab\n")
-#define CANT_RESOLVE gettext("cannot resolve path %s: %s\n")
+#define CANT_RESOLVE _("cannot resolve path %s: %s\n")
-#define ROOT_ABS gettext("this sub-command doesn't take root arguments: %s\n")
+#define ROOT_ABS _("this sub-command doesn't take root arguments: %s\n")
-#define ARCHIVE_FAIL gettext("boot-archive creation FAILED, command: '%s'\n")
+#define ARCHIVE_FAIL _("boot-archive creation FAILED, command: '%s'\n")
#define MULTI_FAIL \
- gettext("Command '%s' failed while generating multisession archive\n")
+ _("Command '%s' failed while generating multisession archive\n")
-#define INFILE_FAIL gettext("unable to read from %s: %s\n")
+#define INFILE_FAIL _("unable to read from %s: %s\n")
-#define ARCHIVE_BAD gettext("archive file %s not generated correctly\n")
+#define ARCHIVE_BAD _("archive file %s not generated correctly\n")
#define CACHE_FAIL \
- gettext("Failed to gather cache files, archives generation aborted\n")
+ _("Failed to gather cache files, archives generation aborted\n")
-#define BOOTBLK_FAIL gettext("unable to access bootblk file : %s\n")
+#define BOOTBLK_FAIL _("unable to access bootblk file : %s\n")
-#define WRITE_FAIL gettext("write to file failed: %s: %s\n")
+#define WRITE_FAIL _("write to file failed: %s: %s\n")
-#define GZ_WRITE_FAIL gettext("failed to write to %s\n")
+#define GZ_WRITE_FAIL _("failed to write to %s\n")
-#define STAT_FAIL gettext("stat of file failed: %s: %s\n")
+#define STAT_FAIL _("stat of file failed: %s: %s\n")
-#define PACK_FAIL gettext("failed to pack stat data: %s\n")
+#define PACK_FAIL _("failed to pack stat data: %s\n")
-#define NVALLOC_FAIL gettext("failed to create stat data: %s\n")
+#define NVALLOC_FAIL _("failed to create stat data: %s\n")
-#define NVADD_FAIL gettext("failed to update stat data for: %s: %s\n")
+#define NVADD_FAIL _("failed to update stat data for: %s: %s\n")
#define DISKMAP_FAIL \
- gettext("create_diskmap command failed for OS root: %s.\n")
+ _("create_diskmap command failed for OS root: %s.\n")
#define BIOSDEV_SKIP \
- gettext("not using biosdev command for disk: %s.\n")
+ _("not using biosdev command for disk: %s.\n")
#define CHECK_NOT_SUPPORTED \
- gettext("the check option is not supported with subcmd: %s\n")
+ _("the check option is not supported with subcmd: %s\n")
-#define PARSEABLE_NEW_FILE gettext(" new %s\n")
+#define PARSEABLE_NEW_FILE _(" new %s\n")
-#define PARSEABLE_OUT_DATE gettext(" changed %s\n")
+#define PARSEABLE_OUT_DATE _(" changed %s\n")
-#define PARSEABLE_STALE_FILE gettext(" stale %s\n")
+#define PARSEABLE_STALE_FILE _(" stale %s\n")
-#define UPDATE_FORCE gettext("forced update of archive requested\n")
+#define UPDATE_FORCE _("forced update of archive requested\n")
-#define NO_NEW_STAT gettext("cannot create new stat data\n")
+#define NO_NEW_STAT _("cannot create new stat data\n")
-#define UPDATE_ARCH_MISS gettext("archive not found: %s\n")
+#define UPDATE_ARCH_MISS _("archive not found: %s\n")
-#define UPDATE_CDIR_MISS gettext("archive cache directory not found: %s\n")
+#define UPDATE_CDIR_MISS _("archive cache directory not found: %s\n")
#define MULTI_SIZE \
- gettext("archive %s is bigger than %d bytes and will be rebuilt\n")
+ _("archive %s is bigger than %d bytes and will be rebuilt\n")
-#define READ_FAIL gettext("read failed for file: %s: %s\n")
+#define READ_FAIL _("read failed for file: %s: %s\n")
-#define UNPACK_FAIL gettext("failed to unpack stat data: %s: %s\n")
+#define UNPACK_FAIL _("failed to unpack stat data: %s: %s\n")
-#define NFTW_FAIL gettext("cannot find: %s: %s\n")
+#define NFTW_FAIL _("cannot find: %s: %s\n")
-#define SIGN_FAIL gettext("iso descriptor signature for %s is invalid\n")
+#define SIGN_FAIL _("iso descriptor signature for %s is invalid\n")
-#define STATVFS_FAIL gettext("statvfs failed for %s: %s\n")
+#define STATVFS_FAIL _("statvfs failed for %s: %s\n")
-#define IS_RAMDISK gettext("%s is on a ramdisk device\n")
+#define IS_RAMDISK _("%s is on a ramdisk device\n")
-#define PRINT gettext("%s\n")
+#define PRINT _("%s\n")
-#define PRINT_TITLE gettext("%d %s\n")
+#define PRINT_TITLE _("%d %s\n")
-#define INT_ERROR gettext("Internal error: %s\n")
+#define INT_ERROR _("Internal error: %s\n")
#define CANT_FIND_USER \
- gettext("getpwnam: uid for %s failed, defaulting to %d\n")
+ _("getpwnam: uid for %s failed, defaulting to %d\n")
#define CANT_FIND_GROUP \
- gettext("getgrnam: gid for %s failed, defaulting to %d\n")
+ _("getgrnam: gid for %s failed, defaulting to %d\n")
-#define CHMOD_FAIL gettext("chmod operation on %s failed - %s\n")
+#define CHMOD_FAIL _("chmod operation on %s failed - %s\n")
-#define CHOWN_FAIL gettext("chgrp operation on %s failed - %s\n")
+#define CHOWN_FAIL _("chgrp operation on %s failed - %s\n")
-#define MISSING_SLICE_FILE gettext("GRUB slice file %s missing: %s\n")
+#define MISSING_SLICE_FILE _("GRUB slice file %s missing: %s\n")
-#define MKDIR_FAILED gettext("mkdir of %s failed: %s\n")
+#define MKDIR_FAILED _("mkdir of %s failed: %s\n")
-#define MOUNT_FAILED gettext("mount of %s (fstype %s) failed\n")
+#define MOUNT_FAILED _("mount of %s (fstype %s) failed\n")
-#define MOUNT_MNTPT_FAILED gettext("mount at %s failed\n")
+#define MOUNT_MNTPT_FAILED _("mount at %s failed\n")
-#define UMOUNT_FAILED gettext("umount of %s failed\n")
+#define UMOUNT_FAILED _("umount of %s failed\n")
-#define CANNOT_RESTORE_GRUB_SLICE gettext("cannot restore GRUB slice\n")
+#define CANNOT_RESTORE_GRUB_SLICE _("cannot restore GRUB slice\n")
-#define RESTORE_GRUB_FAILED gettext("cannot restore GRUB loader\n")
+#define RESTORE_GRUB_FAILED _("cannot restore GRUB loader\n")
-#define MISSING_BACKUP_MENU gettext("no backup menu %s: %s\n")
+#define MISSING_BACKUP_MENU _("no backup menu %s: %s\n")
-#define RESTORE_MENU_FAILED gettext("cannot restore menu %s\n")
+#define RESTORE_MENU_FAILED _("cannot restore menu %s\n")
-#define MISSING_ROOT_FILE gettext("file missing: %s: %s\n")
+#define MISSING_ROOT_FILE _("file missing: %s: %s\n")
-#define BAD_ROOT_FILE gettext("file is invalid: %s\n")
+#define BAD_ROOT_FILE _("file is invalid: %s\n")
-#define TRAILING_ARGS gettext("invalid trailing arguments\n")
+#define TRAILING_ARGS _("invalid trailing arguments\n")
#define RESTORING_GRUB \
- gettext("No GRUB installation found. Restoring GRUB from backup\n")
+ _("No GRUB installation found. Restoring GRUB from backup\n")
#define REBOOT_WITH_ARGS_ADD_ENTRY_FAILED \
- gettext("Cannot update menu. Cannot reboot with requested arguments\n")
+ _("Cannot update menu. Cannot reboot with requested arguments\n")
#define FDISK_FILES_FOUND \
- gettext("Deferred FDISK update file(s) found: %s, %s. Not supported.\n")
+ _("Deferred FDISK update file(s) found: %s, %s. Not supported.\n")
-#define UNKNOWN_KERNEL gettext("unable to expand %s to a full file path.\n")
+#define UNKNOWN_KERNEL _("unable to expand %s to a full file path.\n")
#define UNKNOWN_KERNEL_REBOOT \
- gettext("Rebooting with default kernel and options.\n")
+ _("Rebooting with default kernel and options.\n")
#define NOT_DBOOT \
- gettext("bootadm set-menu %s may only be run on directboot kernels.\n")
+ _("bootadm set-menu %s may only be run on directboot kernels.\n")
-#define DEFAULT_NOT_BAM gettext( \
+#define DEFAULT_NOT_BAM _( \
"Default /boot/grub/menu.lst entry is not controlled by bootadm. Exiting\n")
#define CANT_FIND_DEFAULT \
-gettext("unable to find default boot entry (%d) in menu.lst file.\n")
+_("unable to find default boot entry (%d) in menu.lst file.\n")
#define UNKNOWN_KERNEL_LINE \
-gettext("kernel command on line %d not recognized.\n")
+_("kernel command on line %d not recognized.\n")
#define UNKNOWN_MODULE_LINE \
-gettext("module command on line %d not recognized.\n")
+_("module command on line %d not recognized.\n")
#define FINDROOT_NOT_FOUND \
-gettext("findroot in default boot entry (%d) missing.\n")
+_("findroot in default boot entry (%d) missing.\n")
#define KERNEL_NOT_FOUND \
-gettext("kernel$ in default boot entry (%d) missing.\n")
+_("kernel$ in default boot entry (%d) missing.\n")
#define KERNEL_NOT_PARSEABLE \
-gettext("kernel$ in default boot entry (%d) missing or not parseable.\n")
+_("kernel$ in default boot entry (%d) missing or not parseable.\n")
#define MODULE_NOT_PARSEABLE \
-gettext("module$ in default boot entry (%d) missing or not parseable.\n")
+_("module$ in default boot entry (%d) missing or not parseable.\n")
-#define NOT_ELF_FILE gettext("%s is not an ELF file.\n")
+#define NOT_ELF_FILE _("%s is not an ELF file.\n")
-#define WRONG_ELF_CLASS gettext("%s is wrong ELF class 0x%x\n")
+#define WRONG_ELF_CLASS _("%s is wrong ELF class 0x%x\n")
#define FAILSAFE_MISSING \
-gettext("bootadm -m upgrade run, but the failsafe archives have not been\n\
+_("bootadm -m upgrade run, but the failsafe archives have not been\n\
updated. Not updating line %d\n")
#define INVALID_PLAT \
- gettext("invalid platform %s - must be one of sun4u, sun4v or i86pc\n")
+ _("invalid platform %s - must be one of sun4u, sun4v or i86pc\n")
-#define FDISKPART_FAIL gettext("failed to determine fdisk partition: %s\n")
+#define FDISKPART_FAIL _("failed to determine fdisk partition: %s\n")
-#define INVALID_MHASH_KEY gettext("invalid key for mnttab hash: %s\n")
+#define INVALID_MHASH_KEY _("invalid key for mnttab hash: %s\n")
-#define INVALID_UFS_SIGNATURE gettext("invalid UFS boot signature: %s\n")
+#define INVALID_UFS_SIGNATURE _("invalid UFS boot signature: %s\n")
#define SIGN_LIST_FPUTS_ERR \
- gettext("failed to write signature %s to signature list: %s\n")
+ _("failed to write signature %s to signature list: %s\n")
-#define SIGNATURE_LIST_EXISTS gettext(" - signature list %s exists\n")
+#define SIGNATURE_LIST_EXISTS _(" - signature list %s exists\n")
-#define OPENDIR_FAILED gettext("opendir of %s failed: %s\n")
+#define OPENDIR_FAILED _("opendir of %s failed: %s\n")
-#define GRUBSIGN_SORT_FAILED gettext("error sorting GRUB UFS boot signatures\n")
+#define GRUBSIGN_SORT_FAILED _("error sorting GRUB UFS boot signatures\n")
-#define SEARCHING_UFS_SIGN gettext(" - searching for UFS boot signatures\n")
+#define SEARCHING_UFS_SIGN _(" - searching for UFS boot signatures\n")
-#define ERR_FIND_UFS_SIGN gettext("search for UFS boot signatures failed\n")
+#define ERR_FIND_UFS_SIGN _("search for UFS boot signatures failed\n")
-#define UFS_SIGNATURE_LIST_MISS gettext("missing UFS signature list file: %s\n")
+#define UFS_SIGNATURE_LIST_MISS _("missing UFS signature list file: %s\n")
#define UFS_SIGNATURE_LIST_OPENERR \
- gettext("error opening UFS boot signature list file %s: %s\n")
+ _("error opening UFS boot signature list file %s: %s\n")
-#define UFS_BADSIGN gettext("bad UFS boot signature: %s\n")
+#define UFS_BADSIGN _("bad UFS boot signature: %s\n")
#define GRUBSIGN_BACKUP_OPENERR \
- gettext("error opening boot signature backup file %s: %s\n")
+ _("error opening boot signature backup file %s: %s\n")
#define GRUBSIGN_BACKUP_WRITEERR \
- gettext("error writing boot signature backup file %s: %s\n")
+ _("error writing boot signature backup file %s: %s\n")
#define GRUBSIGN_BACKUP_UPDATED \
- gettext("updated boot signature backup file %s\n")
+ _("updated boot signature backup file %s\n")
#define GRUBSIGN_PRIMARY_CREATERR \
- gettext("error creating primary boot signature %s: %s\n")
+ _("error creating primary boot signature %s: %s\n")
#define GRUBSIGN_PRIMARY_SYNCERR \
- gettext("error syncing primary boot signature %s: %s\n")
+ _("error syncing primary boot signature %s: %s\n")
#define GRUBSIGN_CREATED_PRIMARY \
- gettext("created primary GRUB boot signature: %s\n")
+ _("created primary GRUB boot signature: %s\n")
#define GRUBSIGN_CREATE_FAIL \
- gettext("failed to create GRUB boot signature for device: %s\n")
+ _("failed to create GRUB boot signature for device: %s\n")
#define GRUBSIGN_WRITE_FAIL \
- gettext("failed to write GRUB boot signature for device: %s\n")
+ _("failed to write GRUB boot signature for device: %s\n")
-#define GRUBSIGN_UFS_NONE gettext(" - no existing UFS boot signatures\n")
+#define GRUBSIGN_UFS_NONE _(" - no existing UFS boot signatures\n")
-#define GRUBSIGN_NOTSUP gettext("boot signature not supported for fstype: %s\n")
+#define GRUBSIGN_NOTSUP _("boot signature not supported for fstype: %s\n")
#define GRUBSIGN_MKDIR_ERR \
- gettext("error creating boot signature directory %s: %s\n")
+ _("error creating boot signature directory %s: %s\n")
-#define NOT_UFS_SLICE gettext("%s is not a ufs slice: %s\n")
+#define NOT_UFS_SLICE _("%s is not a ufs slice: %s\n")
-#define FSTYP_FAILED gettext("fstyp failed for slice: %s\n")
+#define FSTYP_FAILED _("fstyp failed for slice: %s\n")
-#define FSTYP_BAD gettext("bad output from fstyp for slice: %s\n")
+#define FSTYP_BAD _("bad output from fstyp for slice: %s\n")
-#define ZFS_MOUNT_FAILED gettext("mount of ZFS pool %s failed\n")
+#define ZFS_MOUNT_FAILED _("mount of ZFS pool %s failed\n")
#define ZFS_MNTPT_FAILED \
- gettext("failed to determine mount point of ZFS pool %s\n")
+ _("failed to determine mount point of ZFS pool %s\n")
-#define NULL_ZFS_MNTPT gettext("ZFS pool %s has no mount-point\n")
+#define NULL_ZFS_MNTPT _("ZFS pool %s has no mount-point\n")
-#define BAD_ZFS_MNTPT gettext("ZFS pool %s has bad mount-point %s\n")
+#define BAD_ZFS_MNTPT _("ZFS pool %s has bad mount-point %s\n")
-#define NULL_ZFS_MNTPT gettext("ZFS pool %s has no mount-point\n")
+#define NULL_ZFS_MNTPT _("ZFS pool %s has no mount-point\n")
-#define BAD_ZFS_MNTED gettext("ZFS pool %s has bad mount status\n")
+#define BAD_ZFS_MNTED _("ZFS pool %s has bad mount status\n")
#define ZFS_MNTED_FAILED \
- gettext("failed to determine mount status of ZFS pool %s\n")
+ _("failed to determine mount status of ZFS pool %s\n")
#define INT_BAD_MNTSTATE \
- gettext("Internal error: bad saved mount state for pool %s\n")
+ _("Internal error: bad saved mount state for pool %s\n")
-#define FSTYP_A_FAILED gettext("fstyp -a on device %s failed\n")
+#define FSTYP_A_FAILED _("fstyp -a on device %s failed\n")
-#define NULL_FSTYP_A gettext("NULL fstyp -a output for device %s\n")
+#define NULL_FSTYP_A _("NULL fstyp -a output for device %s\n")
-#define BAD_FSTYP_A gettext("bad fstyp -a output for device %s\n")
+#define BAD_FSTYP_A _("bad fstyp -a output for device %s\n")
-#define INVALID_UFS_SIGN gettext("invalid UFS boot signature %s\n")
+#define INVALID_UFS_SIGN _("invalid UFS boot signature %s\n")
-#define CANT_FIND_SPECIAL gettext("cant find special file for mount-point %s\n")
+#define CANT_FIND_SPECIAL _("cant find special file for mount-point %s\n")
-#define CANT_FIND_POOL gettext("cant find pool for mount-point %s\n")
+#define CANT_FIND_POOL _("cant find pool for mount-point %s\n")
-#define NULL_FINDROOT gettext("can't find argument for findroot command\n")
+#define NULL_FINDROOT _("can't find argument for findroot command\n")
-#define INVALID_DEV_DSK gettext("not a /dev/[r]dsk name: %s\n")
+#define INVALID_DEV_DSK _("not a /dev/[r]dsk name: %s\n")
-#define CVT_FINDROOT gettext("converting entries to findroot...\n")
+#define CVT_FINDROOT _("converting entries to findroot...\n")
-#define CVT_HV gettext("adding xVM entries...\n")
+#define CVT_HV _("adding xVM entries...\n")
-#define CVT_DBOOT gettext("converting entries to dboot...\n")
+#define CVT_DBOOT _("converting entries to dboot...\n")
#define DOWNGRADE_NOTSUP \
-gettext("automated downgrade of GRUB menu to older version not supported.\n")
+_("automated downgrade of GRUB menu to older version not supported.\n")
-#define CANT_FIND_GRUBSIGN gettext("cannot find GRUB signature for %s\n")
+#define CANT_FIND_GRUBSIGN _("cannot find GRUB signature for %s\n")
#define CVT_TODO \
-gettext("one or more GRUB menu entries were not automatically upgraded\n\
+_("one or more GRUB menu entries were not automatically upgraded\n\
For details on manually updating entries, see %s\n")
#define CVT_ABORT \
-gettext("error upgrading GRUB menu entries on %s. Aborting.\n\
+_("error upgrading GRUB menu entries on %s. Aborting.\n\
For details on manually updating entries, see %s\n")
#define ALREADY_HYPER \
-gettext("default entry already setup for use with the hypervisor!\n")
+_("default entry already setup for use with the hypervisor!\n")
#define HYPER_ABORT \
-gettext("error converting GRUB menu entry on %s for use with the hypervisor.\n\
+_("error converting GRUB menu entry on %s for use with the hypervisor.\n\
Aborting.\n")
#define ALREADY_METAL \
-gettext("default entry already setup for use with a metal kernel!\n")
+_("default entry already setup for use with a metal kernel!\n")
#define METAL_ABORT \
-gettext("error converting GRUB menu entry on %s for use with a metal kernel.\n\
+_("error converting GRUB menu entry on %s for use with a metal kernel.\n\
Aborting.\n")
#define HAND_ADDED_ENTRIES \
-gettext("bootadm(1M) will only upgrade GRUB menu entries added by \n\
+_("bootadm(1M) will only upgrade GRUB menu entries added by \n\
bootadm(1M) or lu(1M). The following entries on %s will not be upgraded.\n\
For details on manually updating entries, see %s\n")
#define SIGN_FSTYPE_MISMATCH \
-gettext("found mismatched boot signature %s for filesystem type: %s.\n")
+_("found mismatched boot signature %s for filesystem type: %s.\n")
#define REBOOT_FSTYPE_FAILED \
-gettext("failed to determine filesystem type for \"/\". Reboot with \n\
+_("failed to determine filesystem type for \"/\". Reboot with \n\
arguments failed.\n")
#define REBOOT_SPECIAL_FAILED \
-gettext("failed to find device special file for \"/\". Reboot with \n\
+_("failed to find device special file for \"/\". Reboot with \n\
arguments failed.\n")
#define REBOOT_SIGN_FAILED \
-gettext("failed to find boot signature. Reboot with arguments failed.\n")
+_("failed to find boot signature. Reboot with arguments failed.\n")
#define REBOOT_DIRECT_FAILED \
-gettext("the root filesystem is not a dboot Solaris instance. \n\
+_("the root filesystem is not a dboot Solaris instance. \n\
This version of bootadm is not supported on this version of Solaris.\n")
#define BOOTENV_FSTYPE_FAILED \
-gettext("cannot determine filesystem type for \"/\".\n\
+_("cannot determine filesystem type for \"/\".\n\
Cannot generate GRUB menu entry with EEPROM arguments.\n")
#define BOOTENV_SPECIAL_FAILED \
-gettext("cannot determine device special file for \"/\".\n\
+_("cannot determine device special file for \"/\".\n\
Cannot generate GRUB menu entry with EEPROM arguments.\n")
#define BOOTENV_SIGN_FAILED \
-gettext("cannot determine boot signature for \"/\".\n\
+_("cannot determine boot signature for \"/\".\n\
Cannot generate GRUB menu entry with EEPROM arguments.\n")
#define GRUB_SLICE_FILE_EXISTS \
- gettext("unsupported GRUB slice file (%s) exists - ignoring.\n")
+ _("unsupported GRUB slice file (%s) exists - ignoring.\n")
#define GRUBSIGN_FOUND_OR_CREATED \
-gettext("found or created GRUB signature %s for %s\n")
+_("found or created GRUB signature %s for %s\n")
-#define GET_FSTYPE_ARGS gettext("no OS mountpoint. Cannot determine fstype\n")
+#define GET_FSTYPE_ARGS _("no OS mountpoint. Cannot determine fstype\n")
#define MNTTAB_MNTPT_NOT_FOUND \
- gettext("failed to find OS mountpoint %s in %s\n")
+ _("failed to find OS mountpoint %s in %s\n")
-#define MNTTAB_FSTYPE_NULL gettext("NULL fstype found for OS root %s\n")
+#define MNTTAB_FSTYPE_NULL _("NULL fstype found for OS root %s\n")
-#define MISSING_ARG gettext("missing argument for sub-command\n")
+#define MISSING_ARG _("missing argument for sub-command\n")
-#define INVALID_BINARY gettext("invalid or corrupted binary: %s\n")
+#define INVALID_BINARY _("invalid or corrupted binary: %s\n")
-#define PCFS_ROOT_NOTSUP gettext("root <%s> on PCFS is not supported\n")
+#define PCFS_ROOT_NOTSUP _("root <%s> on PCFS is not supported\n")
-#define NO_O_OSROOT gettext("OS root not specified with -o option: %s\n")
+#define NO_O_OSROOT _("OS root not specified with -o option: %s\n")
#define RDONLY_FS \
- gettext("%s filesystem is read-only, skipping archives update\n")
+ _("%s filesystem is read-only, skipping archives update\n")
-#define RDONLY_TEST_ERROR gettext("error during read-only test on %s: %s\n")
+#define RDONLY_TEST_ERROR _("error during read-only test on %s: %s\n")
#define CANNOT_GRUBROOT_BOOTDISK \
- gettext("cannot get (hd?,?,?) for menu. menu not on bootdisk: %s\n")
+ _("cannot get (hd?,?,?) for menu. menu not on bootdisk: %s\n")
#define NO_GRUBROOT_FOR_DISK \
- gettext("cannot determine BIOS disk ID 'hd?' for disk: %s\n")
+ _("cannot determine BIOS disk ID 'hd?' for disk: %s\n")
-#define CACHE_MNTTAB_FAIL gettext("%s: failed to cache /etc/mnttab\n")
+#define CACHE_MNTTAB_FAIL _("%s: failed to cache /etc/mnttab\n")
-#define FAILED_ADD_SIGNLIST gettext("failed to add sign %s to signlist.\n")
+#define FAILED_ADD_SIGNLIST _("failed to add sign %s to signlist.\n")
-#define GRUBSIGN_BACKUP_MKDIRERR gettext("mkdirp() of backup dir failed: %s\n")
+#define GRUBSIGN_BACKUP_MKDIRERR _("mkdirp() of backup dir failed: %s: %s\n")
-#define GET_POOL_FAILED gettext("failed to get pool name from %s\n")
+#define GET_POOL_FAILED _("failed to get pool name from %s\n")
-#define FAIL_MNT_TOP_DATASET gettext("failed to mount top dataset for %s\n")
+#define FAIL_MNT_TOP_DATASET _("failed to mount top dataset for %s\n")
-#define PRIMARY_SIGN_EXISTS gettext("primary sign %s exists\n")
+#define PRIMARY_SIGN_EXISTS _("primary sign %s exists\n")
-#define SET_BACKUP_FAILED gettext("failed to set backup sign (%s) for %s: %s\n")
+#define SET_BACKUP_FAILED _("failed to set backup sign (%s) for %s: %s\n")
#define SET_PRIMARY_FAILED \
-gettext("failed to set primary sign (%s) for %s: %s\n")
+_("failed to set primary sign (%s) for %s: %s\n")
-#define GET_FSTYPE_FAILED gettext("failed to get fstype for %s\n")
+#define GET_FSTYPE_FAILED _("failed to get fstype for %s\n")
#define GET_SPECIAL_NULL_MNTPT \
- gettext("cannot get special file: NULL mount-point\n")
+ _("cannot get special file: NULL mount-point\n")
#define GET_SPECIAL_NULL \
- gettext("cannot get special file for mount-point: %s\n")
+ _("cannot get special file for mount-point: %s\n")
#define GET_PHYSICAL_MENU_NULL \
- gettext("cannot get physical device special file for menu root: %s\n")
+ _("cannot get physical device special file for menu root: %s\n")
#define GET_GRUBSIGN_ERROR \
- gettext("failed to get grubsign for root: %s, device %s\n")
+ _("failed to get grubsign for root: %s, device %s\n")
#define FAILED_TO_ADD_BOOT_ENTRY \
- gettext("failed to add boot entry with title=%s, grub signature=%s\n")
+ _("failed to add boot entry with title=%s, grub signature=%s\n")
-#define SET_DEFAULT_FAILED gettext("failed to set GRUB menu default to %d\n")
+#define SET_DEFAULT_FAILED _("failed to set GRUB menu default to %d\n")
#define REBOOT_GET_KERNEL_FAILED \
-gettext("reboot with arguments: error querying current boot-file settings\n")
+_("reboot with arguments: error querying current boot-file settings\n")
#define REBOOT_GET_ARGS_FAILED \
-gettext("reboot with arguments: error querying current boot-args settings\n")
+_("reboot with arguments: error querying current boot-args settings\n")
#define REBOOT_SET_DEFAULT_FAILED \
-gettext("reboot with arguments: setting GRUB menu default to %d failed\n")
+_("reboot with arguments: setting GRUB menu default to %d failed\n")
-#define GET_SET_KERNEL_ADD_BOOT_ENTRY gettext("failed to add boot entry: %s\n")
+#define GET_SET_KERNEL_ADD_BOOT_ENTRY _("failed to add boot entry: %s\n")
-#define GET_SET_KERNEL_SET_GLOBAL gettext("failed to set default to: %d\n")
+#define GET_SET_KERNEL_SET_GLOBAL _("failed to set default to: %d\n")
-#define NO_OPTION_ARG gettext("option has no argument: %s\n")
+#define NO_OPTION_ARG _("option has no argument: %s\n")
#define CANT_MOUNT_POOL_DATASET \
- gettext("cannot mount pool dataset for pool: %s\n")
+ _("cannot mount pool dataset for pool: %s\n")
-#define ZFS_GET_POOL_FAILED gettext("failed to get pool for device: %s\n")
+#define ZFS_GET_POOL_FAILED _("failed to get pool for device: %s\n")
#define ZFS_MOUNT_TOP_DATASET_FAILED \
- gettext("failed to mount top dataset for pool: %s\n")
+ _("failed to mount top dataset for pool: %s\n")
-#define GET_POOL_OSDEV_NULL gettext("NULL device: cannot determine pool name\n")
+#define GET_POOL_OSDEV_NULL _("NULL device: cannot determine pool name\n")
#define GET_POOL_BAD_OSDEV \
-gettext("invalid device %s: cannot determine pool name\n")
+_("invalid device %s: cannot determine pool name\n")
#define POOL_SIGN_INCOMPAT \
-gettext("pool name %s not present in signature %s\n")
+_("pool name %s not present in signature %s\n")
#define INVALID_ZFS_SPECIAL \
-gettext("invalid device for ZFS filesystem: %s\n")
+_("invalid device for ZFS filesystem: %s\n")
#define CANT_FIND_POOL_FROM_SPECIAL \
-gettext("cannot derive ZFS pool from special: %s\n")
+_("cannot derive ZFS pool from special: %s\n")
#define ZFS_GET_POOL_STATUS \
-gettext("cannot get zpool status for pool: %s\n")
+_("cannot get zpool status for pool: %s\n")
#define BAD_ZPOOL_STATUS \
-gettext("bad zpool status for pool=%s\n")
+_("bad zpool status for pool=%s\n")
#define NO_POOL_IN_ZPOOL_STATUS \
-gettext("no pool name %s in zpool status\n")
+_("no pool name %s in zpool status\n")
#define NO_PHYS_IN_ZPOOL_STATUS \
-gettext("no physical device in zpool status for pool=%s\n")
+_("no physical device in zpool status for pool=%s\n")
#define UFS_GET_PHYS_NOT_SVM \
-gettext("not a SVM metadevice: %s. Cannot derive physical device\n")
+_("not a SVM metadevice: %s. Cannot derive physical device\n")
#define UFS_GET_PHYS_INVALID_SVM \
-gettext("invalid SVM metadevice name: %s. Cannot derive physical device\n")
+_("invalid SVM metadevice name: %s. Cannot derive physical device\n")
#define UFS_SVM_METASTAT_ERR \
-gettext("metastat command failed on SVM metadevice: %s\n")
+_("metastat command failed on SVM metadevice: %s\n")
#define UFS_SVM_METASTAT_SVC_ERR \
-gettext("failed to start service %s for metastat command\n")
+_("failed to start service %s for metastat command\n")
#define BAD_UFS_SVM_METASTAT \
-gettext("bad output from metastat command on SVM metadevice: %s\n")
+_("bad output from metastat command on SVM metadevice: %s\n")
#define INVALID_UFS_SVM_METASTAT \
-gettext("invalid fields in metastat output for SVM metadevice: %s\n")
+_("invalid fields in metastat output for SVM metadevice: %s\n")
#define CANNOT_PARSE_UFS_SVM_METASTAT \
-gettext("cannot parse output of metastat command for metadevice: %s\n")
+_("cannot parse output of metastat command for metadevice: %s\n")
#define CANNOT_PARSE_UFS_SVM_SUBMIRROR \
-gettext("cannot parse submirror line in metastat output for metadevice: %s\n")
+_("cannot parse submirror line in metastat output for metadevice: %s\n")
#define GET_PHYSICAL_NOTSUP_FSTYPE \
-gettext("cannot derive physical device for %s (%s), unsupported filesystem\n")
+_("cannot derive physical device for %s (%s), unsupported filesystem\n")
#define ERROR_PARSE_UFS_SVM_METASTAT \
-gettext("error parsing metastat output for SVM metadevice: %s\n")
+_("error parsing metastat output for SVM metadevice: %s\n")
#define GET_OSROOT_SPECIAL_ERR \
-gettext("failed to get special file for osroot: %s\n")
+_("failed to get special file for osroot: %s\n")
#define GET_MENU_ROOT_SPECIAL_ERR \
-gettext("failed to get special file for menu_root: %s\n")
+_("failed to get special file for menu_root: %s\n")
-#define GET_SVC_STATE_ERR gettext("failed to determine state of service: %s\n")
+#define GET_SVC_STATE_ERR _("failed to determine state of service: %s\n")
#define SVC_IS_ONLINE_FAILED \
- gettext("failed to determine if service is online: %s\n")
+ _("failed to determine if service is online: %s\n")
-#define ENABLE_SVC_FAILED gettext("failed to online service: %s\n")
+#define ENABLE_SVC_FAILED _("failed to online service: %s\n")
#define ERR_SVC_GET_ONLINE \
- gettext("failed to get online status for service: %s\n")
+ _("failed to get online status for service: %s\n")
#define TIMEOUT_ENABLE_SVC \
- gettext("timed out waiting for service to online: %s\n")
+ _("timed out waiting for service to online: %s\n")
#define CANNOT_READ_LU_CKSUM \
- gettext("failed to read GRUB menu checksum file: %s\n")
+ _("failed to read GRUB menu checksum file: %s\n")
#define MULTIPLE_LU_CKSUM \
- gettext("multiple checksums for GRUB menu in checksum file: %s\n")
+ _("multiple checksums for GRUB menu in checksum file: %s\n")
#define CANNOT_PARSE_LU_CKSUM \
- gettext("error parsing GRUB menu checksum file: %s\n")
+ _("error parsing GRUB menu checksum file: %s\n")
#define MENU_CKSUM_FAIL \
- gettext("error generating checksum of GRUB menu\n")
+ _("error generating checksum of GRUB menu\n")
#define BAD_CKSUM \
- gettext("bad checksum generated for GRUB menu\n")
+ _("bad checksum generated for GRUB menu\n")
#define BAD_CKSUM_PARSE \
- gettext("error parsing checksum generated for GRUB menu\n")
+ _("error parsing checksum generated for GRUB menu\n")
#define MENU_PROP_FAIL \
- gettext("error propagating updated GRUB menu\n")
+ _("error propagating updated GRUB menu\n")
#define MENU_BACKUP_FAIL \
- gettext("failed to create backup for GRUB menu: %s\n")
+ _("failed to create backup for GRUB menu: %s\n")
#define BACKUP_PROP_FAIL \
- gettext("error propagating backup GRUB menu: %s\n")
+ _("error propagating backup GRUB menu: %s\n")
#define MENU_CKSUM_WRITE_FAIL \
- gettext("failed to write GRUB menu checksum file: %s\n")
+ _("failed to write GRUB menu checksum file: %s\n")
#define MENU_CKSUM_PROP_FAIL \
- gettext("error propagating GRUB menu checksum file: %s\n")
+ _("error propagating GRUB menu checksum file: %s\n")
#define BOOTADM_PROP_FAIL \
- gettext("error propagating bootadm: %s\n")
+ _("error propagating bootadm: %s\n")
#define PROP_GRUB_MENU \
- gettext("propagating updated GRUB menu\n")
+ _("propagating updated GRUB menu\n")
-#define NEED_DIRPATH gettext("need to create directory path for %s\n")
+#define NEED_DIRPATH _("need to create directory path for %s\n")
-#define UPDT_CACHE_FAIL gettext("directory cache update failed for %s\n")
+#define UPDT_CACHE_FAIL _("directory cache update failed for %s\n")
#define NEW_BOOT_ENTRY \
- gettext("unable to modify default entry; creating new boot entry for %s\n")
+ _("unable to modify default entry; creating new boot entry for %s\n")
/*
* NOTE: The following are debug messages and not I18Ned
diff --git a/usr/src/cmd/fs.d/nfs/svc/nfs-server b/usr/src/cmd/fs.d/nfs/svc/nfs-server
index 8542ce9b9f..c15fabd8eb 100644
--- a/usr/src/cmd/fs.d/nfs/svc/nfs-server
+++ b/usr/src/cmd/fs.d/nfs/svc/nfs-server
@@ -19,9 +19,10 @@
#
# CDDL HEADER END
#
+
#
+# Copyright 2015 Nexenta Systems, Inc. All rights reserved.
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2012 Nexenta Systems, Inc. All rights reserved.
#
# Start/stop processes required for server NFS
@@ -76,50 +77,30 @@ case "$1" in
# the shares would have been started long before getting here since
# nfsd has a dependency on them.
- startnfsd=0
-
# restart stopped shares from the repository
/usr/sbin/sharemgr start -P nfs -a
- # Start up mountd and nfsd if anything is exported.
-
- if /usr/bin/grep -s nfs /etc/dfs/sharetab >/dev/null; then
- startnfsd=1
- fi
-
- # If auto-enable behavior is disabled, always start nfsd
-
- if [ `svcprop -p application/auto_enable nfs/server` = "false" ]; then
- startnfsd=1
- fi
-
# Options for nfsd are now set in SMF
- if [ $startnfsd -ne 0 ]; then
- /usr/lib/nfs/mountd
- rc=$?
- if [ $rc != 0 ]; then
- /usr/sbin/svcadm mark -t maintenance svc:/network/nfs/server
- echo "$0: mountd failed with $rc"
- sleep 5 &
- exit $SMF_EXIT_ERR_FATAL
- fi
- /usr/lib/nfs/nfsd
- rc=$?
- if [ $rc != 0 ]; then
- /usr/sbin/svcadm mark -t maintenance svc:/network/nfs/server
- echo "$0: nfsd failed with $rc"
- sleep 5 &
- exit $SMF_EXIT_ERR_FATAL
- fi
+ /usr/lib/nfs/mountd
+ rc=$?
+ if [ $rc != 0 ]; then
+ /usr/sbin/svcadm mark -t maintenance svc:/network/nfs/server
+ echo "$0: mountd failed with $rc"
+ sleep 5 &
+ exit $SMF_EXIT_ERR_FATAL
+ fi
- configure_ipfilter
- else
- /usr/sbin/svcadm disable -t svc:/network/nfs/server
- echo "No NFS filesystems are shared"
+ /usr/lib/nfs/nfsd
+ rc=$?
+ if [ $rc != 0 ]; then
+ /usr/sbin/svcadm mark -t maintenance svc:/network/nfs/server
+ echo "$0: nfsd failed with $rc"
sleep 5 &
+ exit $SMF_EXIT_ERR_FATAL
fi
+ configure_ipfilter
;;
'refresh')
diff --git a/usr/src/lib/libinetutil/common/ofmt.c b/usr/src/lib/libinetutil/common/ofmt.c
index 9d5ad12e53..63d744cdc9 100644
--- a/usr/src/lib/libinetutil/common/ofmt.c
+++ b/usr/src/lib/libinetutil/common/ofmt.c
@@ -200,7 +200,7 @@ ofmt_open(const char *str, const ofmt_field_t *template, uint_t flags,
*/
if (str == NULL || str[0] == '\0')
return (OFMT_EPARSENONE);
- if (strcmp(str, "all") == 0)
+ if (strcasecmp(str, "all") == 0)
return (OFMT_EPARSEALL);
if (wrap)
return (OFMT_EPARSEWRAP);
@@ -213,10 +213,10 @@ ofmt_open(const char *str, const ofmt_field_t *template, uint_t flags,
* split str into the columns selected, or construct the
* full set of columns (equivalent to -o all).
*/
- if (str != NULL && strcmp(str, "all") != 0) {
+ if (str != NULL && strcasecmp(str, "all") != 0) {
sp = split_str(str, nfields);
} else {
- if (parsable || (str != NULL && strcmp(str, "all") == 0))
+ if (parsable || (str != NULL && strcasecmp(str, "all") == 0))
maxcols = 0;
sp = split_fields(template, nfields, maxcols);
}
diff --git a/usr/src/man/man7p/tcp.7p b/usr/src/man/man7p/tcp.7p
index 6101fae25e..db739fc754 100644
--- a/usr/src/man/man7p/tcp.7p
+++ b/usr/src/man/man7p/tcp.7p
@@ -5,7 +5,7 @@
.\" 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]
-.TH TCP 7P "May 27, 2014"
+.TH TCP 7P "Apr 27, 2015"
.SH NAME
tcp, TCP \- Internet Transmission Control Protocol
.SH SYNOPSIS
@@ -40,7 +40,6 @@ tcp, TCP \- Internet Transmission Control Protocol
.fi
.SH DESCRIPTION
-.sp
.LP
\fBTCP\fR is the virtual circuit protocol of the Internet protocol family. It
provides reliable, flow-controlled, in order, two-way transmission of data. It
@@ -183,11 +182,13 @@ PRIV_SYS_NET_CONFIG privilege if it wants to specify a number greater than that
calculated by \fIRFC 3390\fR.
.sp
.LP
-SunOS supports \fBTCP\fR Extensions for High Performance (\fIRFC 1323\fR) which
-includes the window scale and timestamp options, and Protection Against Wrap
-Around Sequence Numbers (PAWS). SunOS also supports Selective Acknowledgment
-(SACK) capabilities (RFC 2018) and Explicit Congestion Notification (ECN)
-mechanism (\fIRFC 3168\fR).
+illumos supports \fBTCP\fR Extensions for High Performance (\fIRFC 7323\fR)
+which includes the window scale and timestamp options, and Protection Against
+Wrap Around Sequence Numbers (PAWS). Note that if timestamps are negotiated on
+a connection, received segments without timestamps on that connection are
+silently dropped per the suggestion in the RFC. illumos also supports Selective
+Acknowledgment (SACK) capabilities (RFC 2018) and Explicit Congestion
+Notification (ECN) mechanism (\fIRFC 3168\fR).
.sp
.LP
Turn on the window scale option in one of the following ways:
@@ -354,7 +355,6 @@ specifies the number of keep-alive probes to be sent before aborting the
connection in the event of no response from peer. TCP_KEEPINTVL specifies the
interval in seconds between successive keep-alive probes.
.SH SEE ALSO
-.sp
.LP
\fBsvcs\fR(1), \fBndd\fR(1M), \fBioctl\fR(2), \fBread\fR(2), \fBsvcadm\fR(1M),
\fBwrite\fR(2), \fBaccept\fR(3SOCKET), \fBbind\fR(3SOCKET),
@@ -376,15 +376,14 @@ Bellovin, S., \fIRFC 1948, Defending Against Sequence Number Attacks\fR, May
1996.
.sp
.LP
-Jacobson, V., Braden, R., and Borman, D., \fIRFC 1323, TCP Extensions for High
-Performance\fR, May 1992.
+D. Borman, B. Braden, V. Jacobson and R. Scheffenegger, Ed., \fIRFC 7323, TCP
+Extensions for High Performance\fR, September 2014.
.sp
.LP
Postel, Jon, \fIRFC 793, Transmission Control Protocol - DARPA Internet Program
Protocol Specification\fR, Network Information Center, SRI International, Menlo
Park, CA., September 1981.
.SH DIAGNOSTICS
-.sp
.LP
A socket operation may fail if:
.sp
@@ -466,7 +465,6 @@ The system ran out of memory for internal data structures.
.RE
.SH NOTES
-.sp
.LP
The \fBtcp\fR service is managed by the service management facility,
\fBsmf\fR(5), under the service identifier:
diff --git a/usr/src/uts/common/inet/tcp/tcp_input.c b/usr/src/uts/common/inet/tcp/tcp_input.c
index 45337d83d9..cf8e0c6bd4 100644
--- a/usr/src/uts/common/inet/tcp/tcp_input.c
+++ b/usr/src/uts/common/inet/tcp/tcp_input.c
@@ -51,7 +51,7 @@
#include <inet/ipsec_impl.h>
/*
- * RFC1323-recommended phrasing of TSTAMP option, for easier parsing
+ * RFC7323-recommended phrasing of TSTAMP option, for easier parsing
*/
#ifdef _BIG_ENDIAN
@@ -63,15 +63,6 @@
#endif
/*
- * Flags returned from tcp_parse_options.
- */
-#define TCP_OPT_MSS_PRESENT 1
-#define TCP_OPT_WSCALE_PRESENT 2
-#define TCP_OPT_TSTAMP_PRESENT 4
-#define TCP_OPT_SACK_OK_PRESENT 8
-#define TCP_OPT_SACK_PRESENT 16
-
-/*
* PAWS needs a timer for 24 days. This is the number of ticks in 24 days
*/
#define PAWS_TIMEOUT ((clock_t)(24*24*60*60*hz))
@@ -171,7 +162,6 @@ static void tcp_icmp_error_ipv6(tcp_t *, mblk_t *, ip_recv_attr_t *);
static mblk_t *tcp_input_add_ancillary(tcp_t *, mblk_t *, ip_pkt_t *,
ip_recv_attr_t *);
static void tcp_input_listener(void *, mblk_t *, void *, ip_recv_attr_t *);
-static int tcp_parse_options(tcpha_t *, tcp_opt_t *);
static void tcp_process_options(tcp_t *, tcpha_t *);
static mblk_t *tcp_reass(tcp_t *, mblk_t *, uint32_t);
static void tcp_reass_elim_overlap(tcp_t *, mblk_t *);
@@ -237,7 +227,7 @@ tcp_mss_set(tcp_t *tcp, uint32_t mss)
* Extract option values from a tcp header. We put any found values into the
* tcpopt struct and return a bitmask saying which options were found.
*/
-static int
+int
tcp_parse_options(tcpha_t *tcpha, tcp_opt_t *tcpopt)
{
uchar_t *endp;
@@ -251,6 +241,19 @@ tcp_parse_options(tcpha_t *tcpha, tcp_opt_t *tcpopt)
endp = up + TCP_HDR_LENGTH(tcpha);
up += TCP_MIN_HEADER_LENGTH;
+ /*
+ * If timestamp option is aligned as recommended in RFC 7323 Appendix
+ * A, and is the only option, return quickly.
+ */
+ if (TCP_HDR_LENGTH(tcpha) == (uint32_t)TCP_MIN_HEADER_LENGTH +
+ TCPOPT_REAL_TS_LEN &&
+ OK_32PTR(up) &&
+ *(uint32_t *)up == TCPOPT_NOP_NOP_TSTAMP) {
+ tcpopt->tcp_opt_ts_val = ABE32_TO_U32((up+4));
+ tcpopt->tcp_opt_ts_ecr = ABE32_TO_U32((up+8));
+
+ return (TCP_OPT_TSTAMP_PRESENT);
+ }
while (up < endp) {
len = endp - up;
switch (*up) {
@@ -686,82 +689,27 @@ tcp_reass_elim_overlap(tcp_t *tcp, mblk_t *mp)
}
/*
- * This function does PAWS protection check. Returns B_TRUE if the
- * segment passes the PAWS test, else returns B_FALSE.
+ * This function does PAWS protection check, per RFC 7323 section 5. Requires
+ * that timestamp options are already processed into tcpoptp. Returns B_TRUE if
+ * the segment passes the PAWS test, else returns B_FALSE.
*/
boolean_t
-tcp_paws_check(tcp_t *tcp, tcpha_t *tcpha, tcp_opt_t *tcpoptp)
+tcp_paws_check(tcp_t *tcp, const tcp_opt_t *tcpoptp)
{
- uint8_t flags;
- int options;
- uint8_t *up;
- conn_t *connp = tcp->tcp_connp;
-
- flags = (unsigned int)tcpha->tha_flags & 0xFF;
- /*
- * If timestamp option is aligned nicely, get values inline,
- * otherwise call general routine to parse. Only do that
- * if timestamp is the only option.
- */
- if (TCP_HDR_LENGTH(tcpha) == (uint32_t)TCP_MIN_HEADER_LENGTH +
- TCPOPT_REAL_TS_LEN &&
- OK_32PTR((up = ((uint8_t *)tcpha) +
- TCP_MIN_HEADER_LENGTH)) &&
- *(uint32_t *)up == TCPOPT_NOP_NOP_TSTAMP) {
- tcpoptp->tcp_opt_ts_val = ABE32_TO_U32((up+4));
- tcpoptp->tcp_opt_ts_ecr = ABE32_TO_U32((up+8));
-
- options = TCP_OPT_TSTAMP_PRESENT;
- } else {
- if (tcp->tcp_snd_sack_ok) {
- tcpoptp->tcp = tcp;
+ if (TSTMP_LT(tcpoptp->tcp_opt_ts_val,
+ tcp->tcp_ts_recent)) {
+ if (LBOLT_FASTPATH64 <
+ (tcp->tcp_last_rcv_lbolt + PAWS_TIMEOUT)) {
+ /* This segment is not acceptable. */
+ return (B_FALSE);
} else {
- tcpoptp->tcp = NULL;
- }
- options = tcp_parse_options(tcpha, tcpoptp);
- }
-
- if (options & TCP_OPT_TSTAMP_PRESENT) {
- /*
- * Do PAWS per RFC 1323 section 4.2. Accept RST
- * regardless of the timestamp, page 18 RFC 1323.bis.
- */
- if ((flags & TH_RST) == 0 &&
- TSTMP_LT(tcpoptp->tcp_opt_ts_val,
- tcp->tcp_ts_recent)) {
- if (LBOLT_FASTPATH64 <
- (tcp->tcp_last_rcv_lbolt + PAWS_TIMEOUT)) {
- /* This segment is not acceptable. */
- return (B_FALSE);
- } else {
- /*
- * Connection has been idle for
- * too long. Reset the timestamp
- * and assume the segment is valid.
- */
- tcp->tcp_ts_recent =
- tcpoptp->tcp_opt_ts_val;
- }
+ /*
+ * Connection has been idle for
+ * too long. Reset the timestamp
+ */
+ tcp->tcp_ts_recent =
+ tcpoptp->tcp_opt_ts_val;
}
- } else {
- /*
- * If we don't get a timestamp on every packet, we
- * figure we can't really trust 'em, so we stop sending
- * and parsing them.
- */
- tcp->tcp_snd_ts_ok = B_FALSE;
-
- connp->conn_ht_iphc_len -= TCPOPT_REAL_TS_LEN;
- connp->conn_ht_ulp_len -= TCPOPT_REAL_TS_LEN;
- tcp->tcp_tcpha->tha_offset_and_reserved -= (3 << 4);
- /*
- * Adjust the tcp_mss and tcp_cwnd accordingly. We avoid
- * doing a slow start here so as to not to lose on the
- * transfer rate built up so far.
- */
- tcp_mss_set(tcp, tcp->tcp_mss + TCPOPT_REAL_TS_LEN);
- if (tcp->tcp_snd_sack_ok)
- tcp->tcp_max_sack_blk = 4;
}
return (B_TRUE);
}
@@ -2912,23 +2860,47 @@ tcp_input_data(void *arg, mblk_t *mp, void *arg2, ip_recv_attr_t *ira)
new_swnd = ntohs(tcpha->tha_win) <<
((tcpha->tha_flags & TH_SYN) ? 0 : tcp->tcp_snd_ws);
- if (tcp->tcp_snd_ts_ok) {
- if (!tcp_paws_check(tcp, tcpha, &tcpopt)) {
+ /*
+ * We are interested in two TCP options: timestamps (if negotiated) and
+ * SACK (if negotiated). Skip option parsing if neither is negotiated.
+ */
+ if (tcp->tcp_snd_ts_ok || tcp->tcp_snd_sack_ok) {
+ int options;
+ if (tcp->tcp_snd_sack_ok)
+ tcpopt.tcp = tcp;
+ else
+ tcpopt.tcp = NULL;
+ options = tcp_parse_options(tcpha, &tcpopt);
+ /*
+ * RST segments must not be subject to PAWS and are not
+ * required to have timestamps.
+ */
+ if (tcp->tcp_snd_ts_ok && !(flags & TH_RST)) {
/*
- * This segment is not acceptable.
- * Drop it and send back an ACK.
+ * Per RFC 7323 section 3.2., silently drop non-RST
+ * segments without expected TSopt. This is a 'SHOULD'
+ * requirement.
*/
- freemsg(mp);
- flags |= TH_ACK_NEEDED;
- goto ack_check;
+ if (!(options & TCP_OPT_TSTAMP_PRESENT)) {
+ /*
+ * Leave a breadcrumb for people to detect this
+ * behavior.
+ */
+ DTRACE_TCP1(droppedtimestamp, tcp_t *, tcp);
+ freemsg(mp);
+ return;
+ }
+
+ if (!tcp_paws_check(tcp, &tcpopt)) {
+ /*
+ * This segment is not acceptable.
+ * Drop it and send back an ACK.
+ */
+ freemsg(mp);
+ flags |= TH_ACK_NEEDED;
+ goto ack_check;
+ }
}
- } else if (tcp->tcp_snd_sack_ok) {
- tcpopt.tcp = tcp;
- /*
- * SACK info in already updated in tcp_parse_options. Ignore
- * all other TCP options...
- */
- (void) tcp_parse_options(tcpha, &tcpopt);
}
try_again:;
mss = tcp->tcp_mss;
@@ -3221,11 +3193,10 @@ ok:;
}
/*
- * Check whether we can update tcp_ts_recent. This test is
- * NOT the one in RFC 1323 3.4. It is from Braden, 1993, "TCP
- * Extensions for High Performance: An Update", Internet Draft.
+ * Check whether we can update tcp_ts_recent. This test is from RFC
+ * 7323, section 5.3.
*/
- if (tcp->tcp_snd_ts_ok &&
+ if (tcp->tcp_snd_ts_ok && !(flags & TH_RST) &&
TSTMP_GEQ(tcpopt.tcp_opt_ts_val, tcp->tcp_ts_recent) &&
SEQ_LEQ(seg_seq, tcp->tcp_rack)) {
tcp->tcp_ts_recent = tcpopt.tcp_opt_ts_val;
diff --git a/usr/src/uts/common/inet/tcp/tcp_time_wait.c b/usr/src/uts/common/inet/tcp/tcp_time_wait.c
index adde51e745..b470934da0 100644
--- a/usr/src/uts/common/inet/tcp/tcp_time_wait.c
+++ b/usr/src/uts/common/inet/tcp/tcp_time_wait.c
@@ -517,10 +517,20 @@ tcp_time_wait_processing(tcp_t *tcp, mblk_t *mp, uint32_t seg_seq,
flags = (unsigned int)tcpha->tha_flags & 0xFF;
new_swnd = ntohs(tcpha->tha_win) <<
((tcpha->tha_flags & TH_SYN) ? 0 : tcp->tcp_snd_ws);
- if (tcp->tcp_snd_ts_ok) {
- if (!tcp_paws_check(tcp, tcpha, &tcpopt)) {
- tcp_xmit_ctl(NULL, tcp, tcp->tcp_snxt,
- tcp->tcp_rnxt, TH_ACK);
+
+ if (tcp->tcp_snd_ts_ok && !(tcpha->tha_flags & TH_RST)) {
+ int options;
+ if (tcp->tcp_snd_sack_ok)
+ tcpopt.tcp = tcp;
+ else
+ tcpopt.tcp = NULL;
+ options = tcp_parse_options(tcpha, &tcpopt);
+ if (!(options & TCP_OPT_TSTAMP_PRESENT)) {
+ DTRACE_TCP1(droppedtimestamp, tcp_t *, tcp);
+ goto done;
+ } else if (!tcp_paws_check(tcp, &tcpopt)) {
+ tcp_xmit_ctl(NULL, tcp, tcp->tcp_snxt, tcp->tcp_rnxt,
+ TH_ACK);
goto done;
}
}
@@ -667,11 +677,10 @@ tcp_time_wait_processing(tcp_t *tcp, mblk_t *mp, uint32_t seg_seq,
}
}
/*
- * Check whether we can update tcp_ts_recent. This test is
- * NOT the one in RFC 1323 3.4. It is from Braden, 1993, "TCP
- * Extensions for High Performance: An Update", Internet Draft.
+ * Check whether we can update tcp_ts_recent. This test is from RFC
+ * 7323, section 5.3.
*/
- if (tcp->tcp_snd_ts_ok &&
+ if (tcp->tcp_snd_ts_ok && !(flags & TH_RST) &&
TSTMP_GEQ(tcpopt.tcp_opt_ts_val, tcp->tcp_ts_recent) &&
SEQ_LEQ(seg_seq, tcp->tcp_rack)) {
tcp->tcp_ts_recent = tcpopt.tcp_opt_ts_val;
diff --git a/usr/src/uts/common/inet/tcp_impl.h b/usr/src/uts/common/inet/tcp_impl.h
index 3488630f2c..9926019056 100644
--- a/usr/src/uts/common/inet/tcp_impl.h
+++ b/usr/src/uts/common/inet/tcp_impl.h
@@ -291,6 +291,15 @@ typedef struct tcp_opt_s {
} tcp_opt_t;
/*
+ * Flags returned from tcp_parse_options.
+ */
+#define TCP_OPT_MSS_PRESENT 1
+#define TCP_OPT_WSCALE_PRESENT 2
+#define TCP_OPT_TSTAMP_PRESENT 4
+#define TCP_OPT_SACK_OK_PRESENT 8
+#define TCP_OPT_SACK_PRESENT 16
+
+/*
* Write-side flow-control is implemented via the per instance STREAMS
* write-side Q by explicitly setting QFULL to stop the flow of mblk_t(s)
* and clearing QFULL and calling qbackenable() to restart the flow based
@@ -653,7 +662,8 @@ extern void tcp_icmp_input(void *, mblk_t *, void *, ip_recv_attr_t *);
extern void tcp_input_data(void *, mblk_t *, void *, ip_recv_attr_t *);
extern void tcp_input_listener_unbound(void *, mblk_t *, void *,
ip_recv_attr_t *);
-extern boolean_t tcp_paws_check(tcp_t *, tcpha_t *, tcp_opt_t *);
+extern boolean_t tcp_paws_check(tcp_t *, const tcp_opt_t *);
+extern int tcp_parse_options(tcpha_t *, tcp_opt_t *);
extern uint_t tcp_rcv_drain(tcp_t *);
extern void tcp_rcv_enqueue(tcp_t *, mblk_t *, uint_t, cred_t *);
extern boolean_t tcp_verifyicmp(conn_t *, void *, icmph_t *, icmp6_t *,