diff options
Diffstat (limited to 'usr/src/cmd')
68 files changed, 1256 insertions, 337 deletions
diff --git a/usr/src/cmd/Makefile b/usr/src/cmd/Makefile index e303927b65..6d8b247797 100644 --- a/usr/src/cmd/Makefile +++ b/usr/src/cmd/Makefile @@ -152,6 +152,7 @@ COMMON_SUBDIRS= \ enhance \ env \ eqn \ + etdump \ expand \ expr \ exstr \ @@ -781,7 +782,7 @@ AUDITSUBDIRS= \ auditreduce \ auditset \ auditstat \ - praudit + praudit # # commands not owned by the systems group diff --git a/usr/src/cmd/bnu/Makefile.inc b/usr/src/cmd/bnu/Makefile.inc index 4d16a7a8a2..5433cd6431 100644 --- a/usr/src/cmd/bnu/Makefile.inc +++ b/usr/src/cmd/bnu/Makefile.inc @@ -22,6 +22,8 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2019, Joyent, Inc. +# SRCS = account.c anlwrk.c bnuconvert.c callers.c \ chremdir.c cntrl.c conn.c cpmv.c ct.c \ @@ -46,6 +48,9 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-extra CERRWARN += -_gcc=-Wno-implicit-function-declaration +# "parse error: parsing (arg (9223372034707292160-0,2-s32max) == 2)" +SMATCH = off + TLILIB = -lnsl -lsocket PAMLIB = -lpam diff --git a/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile b/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile index 324a3c4897..234a87f7d6 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/pppd/Makefile @@ -4,6 +4,7 @@ # # cmd/cmd-inet/usr.bin/pppd/Makefile # +# Copyright (c) 2019, Joyent, Inc. include ../../../Makefile.cmd include Makefile.def @@ -52,6 +53,9 @@ CLOBBERFILES += mschap_test CERRWARN += -_gcc=-Wno-uninitialized +# main() is too hairy for smatch +SMATCH=off + # This is used *only* for testing the portability of the libraries # required for MS-CHAPv1. It is not needed in any normal system and # is not built by default. diff --git a/usr/src/cmd/deroff/Makefile b/usr/src/cmd/deroff/Makefile index 6f08eb2b86..5502c1e162 100644 --- a/usr/src/cmd/deroff/Makefile +++ b/usr/src/cmd/deroff/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2019, Joyent, Inc. PROG= deroff @@ -31,9 +32,12 @@ CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-parentheses +# too hairy for smatch +SMATCH=off + .KEEP_STATE: -all: $(PROG) +all: $(PROG) install: all $(ROOTPROG) diff --git a/usr/src/cmd/devctl/Makefile b/usr/src/cmd/devctl/Makefile index 98ba25c5c8..f3893877f6 100644 --- a/usr/src/cmd/devctl/Makefile +++ b/usr/src/cmd/devctl/Makefile @@ -23,6 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# # Copyright (c) 2019, Joyent, Inc. PROG= devctl @@ -32,7 +33,7 @@ include ../Makefile.cmd CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses -LDLIBS += -ldevice -l devinfo +LDLIBS += -ldevice -ldevinfo all: $(PROG) diff --git a/usr/src/cmd/etdump/Makefile b/usr/src/cmd/etdump/Makefile new file mode 100644 index 0000000000..8776a2d698 --- /dev/null +++ b/usr/src/cmd/etdump/Makefile @@ -0,0 +1,37 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2018 Toomas Soome <tsoome@me.com> +# + +PROG= etdump +OBJS= etdump.o output_shell.o output_text.o cd9660_conversion.o +SRCS= $(OBJS:%.o=%.c) + +include ../Makefile.cmd + +.KEEP_STATE: + +all: $(PROG) + +install: all $(ROOTPROG) + +clean: + $(RM) $(OBJS) + +$(PROG): $(OBJS) + $(LINK.c) $(OBJS) -o $@ $(LDLIBS) + $(POST_PROCESS) + +lint: + +include ../Makefile.targ diff --git a/usr/src/cmd/etdump/THIRDPARTYLICENSE b/usr/src/cmd/etdump/THIRDPARTYLICENSE new file mode 100644 index 0000000000..f47273514f --- /dev/null +++ b/usr/src/cmd/etdump/THIRDPARTYLICENSE @@ -0,0 +1,66 @@ +cd9660_eltorito.h: +cd9660_conversion.c: +/* + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * + * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan + * Perez-Rathke and Ram Vedam. All rights reserved. + * + * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys, + * Alan Perez-Rathke and Ram Vedam. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ + +etdump.h: +etdump.c: +etdump.1: +output_shell.c: +output_text.c: +/* + * Copyright (c) 2018 iXsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ diff --git a/usr/src/cmd/etdump/THIRDPARTYLICENSE.descrip b/usr/src/cmd/etdump/THIRDPARTYLICENSE.descrip new file mode 100644 index 0000000000..18f61b4a66 --- /dev/null +++ b/usr/src/cmd/etdump/THIRDPARTYLICENSE.descrip @@ -0,0 +1 @@ +etdump utility cpommand diff --git a/usr/src/cmd/etdump/cd9660_conversion.c b/usr/src/cmd/etdump/cd9660_conversion.c new file mode 100644 index 0000000000..a980af35fb --- /dev/null +++ b/usr/src/cmd/etdump/cd9660_conversion.c @@ -0,0 +1,191 @@ +/* + * $NetBSD: cd9660_conversion.c,v 1.4 2007/03/14 14:11:17 christos Exp $ + */ + +/* + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * + * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan + * Perez-Rathke and Ram Vedam. All rights reserved. + * + * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys, + * Alan Perez-Rathke and Ram Vedam. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ + +#include <stdio.h> +#include <string.h> +#include <sys/time.h> +#include <endian.h> + +static char cd9660_compute_gm_offset(time_t); + +/* + * These can probably be implemented using a macro + */ + +/* Little endian */ +void +cd9660_721(uint16_t w, unsigned char *twochar) +{ +#if BYTE_ORDER == BIG_ENDIAN + w = htole16(w); +#endif + memcpy(twochar, &w, 2); +} + +void +cd9660_731(uint32_t w, unsigned char *fourchar) +{ +#if BYTE_ORDER == BIG_ENDIAN + w = htole32(w); +#endif + memcpy(fourchar, &w, 4); +} + +/* Big endian */ +void +cd9660_722(uint16_t w, unsigned char *twochar) +{ +#if BYTE_ORDER == LITTLE_ENDIAN + w = htobe16(w); +#endif + memcpy(twochar, &w, 2); +} + +void +cd9660_732(uint32_t w, unsigned char *fourchar) +{ +#if BYTE_ORDER == LITTLE_ENDIAN + w = htobe32(w); +#endif + memcpy(fourchar, &w, 4); +} + +/* + * Convert a dword into a double endian string of eight characters + * @param int The double word to convert + * @param char* The string to write the both endian double word to - It is + * assumed this is allocated and at least eight characters long. + */ +void +cd9660_bothendian_dword(uint32_t dw, unsigned char *eightchar) +{ + uint32_t le, be; +#if BYTE_ORDER == LITTLE_ENDIAN + le = dw; + be = htobe32(dw); +#endif +#if BYTE_ORDER == BIG_ENDIAN + be = dw; + le = htole32(dw); +#endif + memcpy(eightchar, &le, 4); + memcpy((eightchar+4), &be, 4); +} + +/* + * Convert a word into a double endian string of four characters + * @param int The word to convert + * @param char* The string to write the both endian word to - It is assumed + * this is allocated and at least four characters long. + */ +void +cd9660_bothendian_word(uint16_t dw, unsigned char *fourchar) +{ + uint16_t le, be; +#if BYTE_ORDER == LITTLE_ENDIAN + le = dw; + be = htobe16(dw); +#endif +#if BYTE_ORDER == BIG_ENDIAN + be = dw; + le = htole16(dw); +#endif + memcpy(fourchar, &le, 2); + memcpy((fourchar+2), &be, 2); +} + +void +cd9660_pad_string_spaces(char *str, int len) +{ + int i; + + for (i = 0; i < len; i ++) { + if (str[i] == '\0') + str[i] = 0x20; + } +} + +static char +cd9660_compute_gm_offset(time_t tim) +{ + struct tm t, gm; + + (void) localtime_r(&tim, &t); + (void) gmtime_r(&tim, &gm); + gm.tm_year -= t.tm_year; + gm.tm_yday -= t.tm_yday; + gm.tm_hour -= t.tm_hour; + gm.tm_min -= t.tm_min; + if (gm.tm_year < 0) + gm.tm_yday = -1; + else if (gm.tm_year > 0) + gm.tm_yday = 1; + + return (char)(-(gm.tm_min + 60* (24 * gm.tm_yday + gm.tm_hour)) / 15); +} + +/* Long dates: 17 characters */ +void +cd9660_time_8426(unsigned char *buf, time_t tim) +{ + struct tm t; + char temp[18]; + + (void) localtime_r(&tim, &t); + (void) snprintf(temp, sizeof (temp), "%04i%02i%02i%02i%02i%02i%02i", + 1900 + (int)t.tm_year, (int)t.tm_mon + 1, (int)t.tm_mday, + (int)t.tm_hour, (int)t.tm_min, (int)t.tm_sec, 0); + (void) memcpy(buf, temp, 16); + buf[16] = cd9660_compute_gm_offset(tim); +} + +/* Short dates: 7 characters */ +void +cd9660_time_915(unsigned char *buf, time_t tim) +{ + struct tm t; + + (void) localtime_r(&tim, &t); + buf[0] = t.tm_year; + buf[1] = t.tm_mon+1; + buf[2] = t.tm_mday; + buf[3] = t.tm_hour; + buf[4] = t.tm_min; + buf[5] = t.tm_sec; + buf[6] = cd9660_compute_gm_offset(tim); +} diff --git a/usr/src/cmd/etdump/cd9660_eltorito.h b/usr/src/cmd/etdump/cd9660_eltorito.h new file mode 100644 index 0000000000..c73f591a73 --- /dev/null +++ b/usr/src/cmd/etdump/cd9660_eltorito.h @@ -0,0 +1,187 @@ +/* + * $NetBSD: cd9660_eltorito.h,v 1.6 2017/01/24 11:22:43 nonaka Exp $ + */ + +/* + * SPDX-License-Identifier: BSD-2-Clause-NetBSD + * + * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan + * Perez-Rathke and Ram Vedam. All rights reserved. + * + * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys, + * Alan Perez-Rathke and Ram Vedam. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ + +#ifndef _CD9660_ELTORITO_H_ +#define _CD9660_ELTORITO_H_ + +#include <sys/types.h> +#include <sys/queue.h> + +/* Boot defines */ +#define ET_ID "EL TORITO SPECIFICATION" +#define ET_SYS_X86 0 +#define ET_SYS_PPC 1 +#define ET_SYS_MAC 2 +#define ET_SYS_EFI 0xef /* Platform ID at section header entry */ + +#define ET_BOOT_ENTRY_SIZE 0x20 + +#define ET_BOOTABLE 0x88 +#define ET_NOT_BOOTABLE 0 + +#define ET_MEDIA_NOEM 0 +#define ET_MEDIA_12FDD 1 +#define ET_MEDIA_144FDD 2 +#define ET_MEDIA_288FDD 3 +#define ET_MEDIA_HDD 4 + +#define ET_INDICATOR_HEADERMORE 0x90 +#define ET_INDICATOR_HEADERLAST 0x91 +#define ET_INDICATOR_EXTENSION 0x44 + +/* Boot Structures */ + +#define ISODCL(from, to) (to - from + 1) + +typedef struct _boot_volume_descriptor { + uchar_t boot_record_indicator [ISODCL(0x00, 0x00)]; + uchar_t identifier [ISODCL(0x01, 0x05)]; + uchar_t version [ISODCL(0x06, 0x06)]; + uchar_t boot_system_identifier [ISODCL(0x07, 0x26)]; + uchar_t unused1 [ISODCL(0x27, 0x46)]; + uchar_t boot_catalog_pointer [ISODCL(0x47, 0x4A)]; + uchar_t unused2 [ISODCL(0x4B, 0x7FF)]; +} boot_volume_descriptor; + +typedef struct _boot_catalog_validation_entry { + uchar_t header_id [ISODCL(0x00, 0x00)]; + uchar_t platform_id [ISODCL(0x01, 0x01)]; + uchar_t reserved1 [ISODCL(0x02, 0x03)]; + uchar_t manufacturer [ISODCL(0x04, 0x1B)]; + uchar_t checksum [ISODCL(0x1C, 0x1D)]; + uchar_t key [ISODCL(0x1E, 0x1F)]; +} boot_catalog_validation_entry; + +typedef struct _boot_catalog_initial_entry { + uchar_t boot_indicator [ISODCL(0x00, 0x00)]; + uchar_t media_type [ISODCL(0x01, 0x01)]; + uchar_t load_segment [ISODCL(0x02, 0x03)]; + uchar_t system_type [ISODCL(0x04, 0x04)]; + uchar_t unused_1 [ISODCL(0x05, 0x05)]; + uchar_t sector_count [ISODCL(0x06, 0x07)]; + uchar_t load_rba [ISODCL(0x08, 0x0B)]; + uchar_t unused_2 [ISODCL(0x0C, 0x1F)]; +} boot_catalog_initial_entry; + +#define ET_SECTION_HEADER_MORE 0x90 +#define ET_SECTION_HEADER_LAST 0x91 + +typedef struct _boot_catalog_section_header { + uchar_t header_indicator [ISODCL(0x00, 0x00)]; + uchar_t platform_id [ISODCL(0x01, 0x01)]; + uchar_t num_section_entries [ISODCL(0x02, 0x03)]; + uchar_t id_string [ISODCL(0x04, 0x1F)]; +} boot_catalog_section_header; + +typedef struct _boot_catalog_section_entry { + uchar_t boot_indicator [ISODCL(0x00, 0x00)]; + uchar_t media_type [ISODCL(0x01, 0x01)]; + uchar_t load_segment [ISODCL(0x02, 0x03)]; + uchar_t system_type [ISODCL(0x04, 0x04)]; + uchar_t unused_1 [ISODCL(0x05, 0x05)]; + uchar_t sector_count [ISODCL(0x06, 0x07)]; + uchar_t load_rba [ISODCL(0x08, 0x0B)]; + uchar_t selection_criteria [ISODCL(0x0C, 0x0C)]; + uchar_t vendor_criteria [ISODCL(0x0D, 0x1F)]; +} boot_catalog_section_entry; + +typedef struct _boot_catalog_section_entry_extension { + uchar_t extension_indicator [ISODCL(0x00, 0x00)]; + uchar_t flags [ISODCL(0x01, 0x01)]; + uchar_t vendor_criteria [ISODCL(0x02, 0x1F)]; +} boot_catalog_section_entry_extension; + +#define ET_ENTRY_VE 1 +#define ET_ENTRY_IE 2 +#define ET_ENTRY_SH 3 +#define ET_ENTRY_SE 4 +#define ET_ENTRY_EX 5 + +struct boot_catalog_entry { + char entry_type; + union { + boot_catalog_validation_entry VE; + boot_catalog_initial_entry IE; + boot_catalog_section_header SH; + boot_catalog_section_entry SE; + boot_catalog_section_entry_extension EX; + } entry_data; + + LIST_ENTRY(boot_catalog_entry) ll_struct; +}; + +/* Temporary structure */ +struct cd9660_boot_image { + char *filename; + int size; + int sector; /* copied to LoadRBA */ + int num_sectors; + unsigned int loadSegment; + uchar_t targetMode; + uchar_t system; + uchar_t bootable; + uchar_t platform_id; /* for section header entry */ + /* + * If the boot image exists in the filesystem + * already, this is a pointer to that node. For the sake + * of simplicity in future versions, this pointer is only + * to the node in the primary volume. This SHOULD be done + * via a hashtable lookup. + */ + struct _cd9660node *boot_image_node; + TAILQ_ENTRY(cd9660_boot_image) image_list; + int serialno; +}; + +void cd9660_721(uint16_t, unsigned char *); + +static __inline uint16_t +isonum_721(const unsigned char *p) +{ + + return (p[0] | p[1] << 8); +} + +static __inline uint32_t +isonum_731(const unsigned char *p) +{ + + return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24); +} + +#endif /* _CD9660_ELTORITO_H_ */ diff --git a/usr/src/cmd/etdump/etdump.c b/usr/src/cmd/etdump/etdump.c new file mode 100644 index 0000000000..5469597151 --- /dev/null +++ b/usr/src/cmd/etdump/etdump.c @@ -0,0 +1,272 @@ +/* + * Copyright (c) 2018 iXsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <err.h> +#include <getopt.h> +#include <libgen.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <sys/queue.h> + +#include <sys/fs/hsfs_isospec.h> +#include "cd9660_eltorito.h" + +#include "etdump.h" + +#define ISO_DEFAULT_BLOCK_SHIFT 11 +#define ISO_DEFAULT_BLOCK_SIZE (1 << ISO_DEFAULT_BLOCK_SHIFT) + +const char * +system_id_string(uchar_t system_id) +{ + + switch (system_id) { + case ET_SYS_X86: + return ("i386"); + case ET_SYS_PPC: + return ("powerpc"); + case ET_SYS_MAC: + return ("mac"); + case ET_SYS_EFI: + return ("efi"); + default: + return ("invalid"); + } +} + +const char * +media_type_string(uchar_t media_type) +{ + + switch (media_type) { + case ET_MEDIA_NOEM: + return ("no emulation"); + case ET_MEDIA_12FDD: + return ("1.2MB FDD"); + case ET_MEDIA_144FDD: + return ("1.44MB FDD"); + case ET_MEDIA_288FDD: + return ("2.88MB FDD"); + case ET_MEDIA_HDD: + return ("HDD"); + default: + return ("invalid"); + } +} + +static int +read_sector(FILE *iso, daddr_t sector, char *buffer) +{ + + fseek(iso, sector * ISO_DEFAULT_BLOCK_SIZE, SEEK_SET); + if (fread(buffer, ISO_DEFAULT_BLOCK_SIZE, 1, iso) != 1) { + return (errno); + } + return (0); +} + +static bool +boot_catalog_valid(char *entry) +{ + boot_catalog_validation_entry *ve; + int16_t checksum, sum; + unsigned char *csptr; + size_t i; + + ve = (boot_catalog_validation_entry *)entry; + + checksum = isonum_721(ve->checksum); + cd9660_721(0, ve->checksum); + csptr = (unsigned char *)ve; + + for (i = sum = 0; i < sizeof (*ve); i += 2) { + sum += (int16_t)csptr[i]; + sum += 256 * (int16_t)csptr[i + 1]; + } + if (sum + checksum != 0) { + return (false); + } + + cd9660_721(checksum, ve->checksum); + return (true); +} + +static int +dump_section(char *buffer, size_t offset, FILE *outfile, const char *filename, + struct outputter *outputter) +{ + boot_catalog_section_header *sh; + uchar_t platform_id; + int i; + size_t entry_offset; + boot_catalog_section_entry *entry; + + sh = (boot_catalog_section_header *)&buffer[offset]; + if (outputter->output_section != NULL) { + outputter->output_section(outfile, filename, sh); + } + + platform_id = sh->platform_id[0]; + + if (outputter->output_entry != NULL) { + for (i = 1; i <= (int)sh->num_section_entries[0]; i++) { + entry_offset = offset + i * ET_BOOT_ENTRY_SIZE; + entry = + (boot_catalog_section_entry *)&buffer[entry_offset]; + outputter->output_entry(outfile, filename, entry, + platform_id, false); + } + } + + return (1 + (int)sh->num_section_entries[0]); +} + +static void +dump_eltorito(FILE *iso, const char *filename, FILE *outfile, + struct outputter *outputter) +{ + char buffer[ISO_DEFAULT_BLOCK_SIZE], *entry; + boot_volume_descriptor *bvd; + daddr_t boot_catalog; + size_t offset; + int entry_count; + + if (read_sector(iso, 17, buffer) != 0) + err(1, "failed to read from image"); + + bvd = (boot_volume_descriptor *)buffer; + if (memcmp(bvd->identifier, ISO_ID_STRING, 5) != 0) + warnx("%s: not a valid ISO", filename); + if (bvd->boot_record_indicator[0] != ISO_VD_BOOT) + warnx("%s: not an El Torito bootable ISO", filename); + if (memcmp(bvd->boot_system_identifier, ET_ID, 23) != 0) + warnx("%s: not an El Torito bootable ISO", filename); + + boot_catalog = isonum_731(bvd->boot_catalog_pointer); + + if (read_sector(iso, boot_catalog, buffer) != 0) + err(1, "failed to read from image"); + + entry = buffer; + offset = 0; + + if (!boot_catalog_valid(entry)) + warnx("%s: boot catalog checksum is invalid", filename); + + if (outputter->output_image != NULL) + outputter->output_image(outfile, filename, bvd); + + offset += ET_BOOT_ENTRY_SIZE; + entry = &buffer[offset]; + if (outputter->output_entry != NULL) + outputter->output_entry(outfile, filename, + (boot_catalog_section_entry *)entry, 0, true); + + offset += ET_BOOT_ENTRY_SIZE; + + while (offset < ISO_DEFAULT_BLOCK_SIZE) { + entry = &buffer[offset]; + + if ((uint8_t)entry[0] != ET_SECTION_HEADER_MORE && + (uint8_t)entry[0] != ET_SECTION_HEADER_LAST) + break; + + entry_count = dump_section(buffer, offset, outfile, filename, + outputter); + + offset += entry_count * ET_BOOT_ENTRY_SIZE; + } +} + +static void +usage(const char *progname) +{ + char *path; + + path = strdup(progname); + + fprintf(stderr, "usage: %s [-f format] [-o filename] filename [...]\n", + basename(path)); + fprintf(stderr, "\tsupported output formats: shell, text\n"); + exit(1); +} + +int +main(int argc, char **argv) +{ + int ch, i; + FILE *outfile, *iso; + struct outputter *outputter; + + outfile = stdout; + outputter = output_text; + + static struct option longopts[] = { + { "format", required_argument, NULL, 'f' }, + { "output", required_argument, NULL, 'o' }, + { NULL, 0, NULL, 0 }, + }; + + while ((ch = getopt_long(argc, argv, "f:o:", longopts, NULL)) != -1) { + switch (ch) { + case 'f': + if (strcmp(optarg, "shell") == 0) + outputter = output_shell; + else if (strcmp(optarg, "text") == 0) + outputter = output_text; + else + usage(argv[0]); + break; + case 'o': + if (strcmp(optarg, "-") == 0) { + outfile = stdout; + } else if ((outfile = fopen(optarg, "w")) == NULL) { + err(1, "unable to open %s for output", optarg); + } + break; + default: + usage(argv[0]); + } + } + + argc -= optind; + argv += optind; + + for (i = 0; i < argc; i++) { + if (strcmp(argv[i], "-") == 0) { + iso = stdin; + } else { + iso = fopen(argv[i], "r"); + if (iso == NULL) + err(1, "could not open %s", argv[1]); + } + dump_eltorito(iso, argv[i], outfile, outputter); + } + return (0); +} diff --git a/usr/src/cmd/etdump/etdump.h b/usr/src/cmd/etdump/etdump.h new file mode 100644 index 0000000000..f7e64205dd --- /dev/null +++ b/usr/src/cmd/etdump/etdump.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2018 iXsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: head/usr.bin/etdump/etdump.h 331949 2018-04-03 21:08:10Z benno $ + */ + +#ifndef _ETDUMP_H_ +#define _ETDUMP_H_ + +struct outputter { + void (*output_image)(FILE *outfile, const char *filename, + boot_volume_descriptor *bvd); + void (*output_section)(FILE *outfile, const char *filename, + boot_catalog_section_header *bcsh); + void (*output_entry)(FILE *outfile, const char *filename, + boot_catalog_section_entry *bcse, + uchar_t platform_id, bool initial); +}; + +extern struct outputter *output_text; +extern struct outputter *output_shell; + +const char *system_id_string(uchar_t system_id); +const char *media_type_string(uchar_t media_type); + +#endif /* _ETDUMP_H_ */ diff --git a/usr/src/cmd/etdump/output_shell.c b/usr/src/cmd/etdump/output_shell.c new file mode 100644 index 0000000000..291983ff64 --- /dev/null +++ b/usr/src/cmd/etdump/output_shell.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2018 iXsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <stdbool.h> +#include <stdio.h> + +#include "cd9660_eltorito.h" + +#include "etdump.h" + +static void +output_entry(FILE *outfile, const char *filename __unused, + boot_catalog_section_entry *bcse, uchar_t platform_id, bool initial) +{ + const char *platform; + + switch (bcse->boot_indicator[0]) { + case ET_BOOTABLE: + break; + case ET_NOT_BOOTABLE: + default: + return; + } + + if (initial) + platform = "default"; + else + platform = system_id_string(platform_id); + + fprintf(outfile, + "et_platform=%s;et_system=%s;et_lba=%d;et_sectors=%d\n", + platform, system_id_string(bcse->system_type[0]), + isonum_731(bcse->load_rba), isonum_721(bcse->sector_count)); +} + +static struct outputter _output_shell = { + .output_image = NULL, + .output_section = NULL, + .output_entry = output_entry, +}; + +struct outputter *output_shell = &_output_shell; diff --git a/usr/src/cmd/etdump/output_text.c b/usr/src/cmd/etdump/output_text.c new file mode 100644 index 0000000000..eb0681c63f --- /dev/null +++ b/usr/src/cmd/etdump/output_text.c @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2018 iXsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <stdbool.h> +#include <stdio.h> + +#include "cd9660_eltorito.h" +#include "etdump.h" + +static void +output_image(FILE *outfile, const char *filename, + boot_volume_descriptor *bvd __unused) +{ + + fprintf(outfile, "Image in %s\n", filename); +} + +static void +output_section(FILE *outfile, const char *filename __unused, + boot_catalog_section_header *bcsh) +{ + + fprintf(outfile, "\nSection header: %s", + system_id_string(bcsh->platform_id[0])); + + if (bcsh->header_indicator[0] == ET_SECTION_HEADER_LAST) + fprintf(outfile, ", final\n"); + else + fprintf(outfile, "\n"); +} + +static void +output_entry(FILE *outfile, const char *filename __unused, + boot_catalog_section_entry *bcse, uchar_t platform_id __unused, + bool initial) +{ + const char *indent; + + switch (bcse->boot_indicator[0]) { + case ET_BOOTABLE: + break; + case ET_NOT_BOOTABLE: + default: + return; + } + + if (initial) { + fprintf(outfile, "Default entry\n"); + indent = "\t"; + } else { + fprintf(outfile, "\tSection entry\n"); + indent = "\t\t"; + } + + fprintf(outfile, "%sSystem %s\n", indent, + system_id_string(bcse->system_type[0])); + fprintf(outfile, "%sStart LBA %d (0x%x), sector count %d (0x%x)\n", + indent, isonum_731(bcse->load_rba), isonum_731(bcse->load_rba), + isonum_721(bcse->sector_count), isonum_721(bcse->sector_count)); + fprintf(outfile, "%sMedia type: %s\n", indent, + media_type_string(bcse->media_type[0])); +} + +static struct outputter _output_text = { + .output_image = output_image, + .output_section = output_section, + .output_entry = output_entry, +}; + +struct outputter *output_text = &_output_text; diff --git a/usr/src/cmd/fs.d/smbclnt/test/Makefile b/usr/src/cmd/fs.d/smbclnt/test/Makefile index 64b626f5a4..affd6d9a00 100644 --- a/usr/src/cmd/fs.d/smbclnt/test/Makefile +++ b/usr/src/cmd/fs.d/smbclnt/test/Makefile @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # Copyright 2013 Nexenta Systems, Inc. All rights reserved. +# Copyright (c) 2019, Joyent, Inc. # include $(SRC)/cmd/Makefile.cmd @@ -43,7 +44,7 @@ INST_CMDS = $(PROG:%=$(TESTDIR)/%) CPPFLAGS += -I../../../../uts/common CPPFLAGS += -I../../../../lib/libsmbfs -LDLIBS += -R '$$ORIGIN/../../../usr/lib' +LDLIBS += -R'$$ORIGIN/../../../usr/lib' LDLIBS += -lsmbfs LINTLIBS= -L$(ROOTLIB) -lsmbfs @@ -51,6 +52,9 @@ CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-variable CSTD= $(CSTD_GNU99) +# not linted +SMATCH=off + LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 # CLOBBERFILES += $(LIBPROG) diff --git a/usr/src/cmd/fs.d/ufs/mkfs/Makefile b/usr/src/cmd/fs.d/ufs/mkfs/Makefile index 6b10524058..1df1d8c86d 100644 --- a/usr/src/cmd/fs.d/ufs/mkfs/Makefile +++ b/usr/src/cmd/fs.d/ufs/mkfs/Makefile @@ -22,6 +22,8 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2019, Joyent, Inc. +# FSTYPE= ufs LIBPROG= mkfs @@ -30,6 +32,8 @@ ATTMK= $(LIBPROG) include ../../Makefile.fstype include ../Makefile.roll +CPPFLAGS += -I../../ + OBJS= $(LIBPROG).o $(ROLLOBJS) $(FSLIB) SRCS= $(LIBPROG).c $(ROLLSRCS) $(FSLIBSRC) MKFSOBJS= mkfs.o @@ -39,6 +43,9 @@ CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-empty-body CERRWARN += -_gcc=-Wno-uninitialized +# can't hack main() ! +SMATCH = off + # for messaging catalog # POFILE= mkfs.po diff --git a/usr/src/cmd/geniconvtbl/Makefile.com b/usr/src/cmd/geniconvtbl/Makefile.com index 4030af32e6..95049755ef 100644 --- a/usr/src/cmd/geniconvtbl/Makefile.com +++ b/usr/src/cmd/geniconvtbl/Makefile.com @@ -21,6 +21,8 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2019, Joyent, Inc. +# $(NOT_NATIVE)NATIVE_BUILD = $(POUND_SIGN) @@ -92,7 +94,10 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration YFLAGS += -d -v CFLAGS += -D_FILE_OFFSET_BITS=64 -$(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h $@ +# dump_expr() is too hairy +SMATCH=off + +$(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h$@ $(ITM) := CPPFLAGS += -D_REENTRANT $(ITM) := sparc_CFLAGS += -xregs=no%appl $(ITM) := sparcv9_CFLAGS += -xregs=no%appl diff --git a/usr/src/cmd/ipcs/Makefile b/usr/src/cmd/ipcs/Makefile index 1050b0a571..9e4bbffb5c 100644 --- a/usr/src/cmd/ipcs/Makefile +++ b/usr/src/cmd/ipcs/Makefile @@ -20,13 +20,10 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/ipcs/Makefile -# +# Copyright (c) 2019, Joyent, Inc. PROG= ipcs XPG4PROG= $(PROG) @@ -37,6 +34,9 @@ LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 CFLAGS += $(CCVERBOSE) LDLIBS += -lproject +# main() too hairy +SMATCH = off + .KEEP_STATE: all: $(PROG) diff --git a/usr/src/cmd/loadkeys/dumpkeys.c b/usr/src/cmd/loadkeys/dumpkeys.c index b200d5c73a..e16f319a2b 100644 --- a/usr/src/cmd/loadkeys/dumpkeys.c +++ b/usr/src/cmd/loadkeys/dumpkeys.c @@ -19,9 +19,6 @@ * * CDDL HEADER END */ -#ifndef lint -#ident "%Z%%M% %I% %E% SMI" -#endif /* * Copyright (c) 1988 by Sun Microsystems, Inc. @@ -66,9 +63,7 @@ static void printchar(int character, int delim); /*ARGSUSED*/ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { register int kbdfd; register int keystation; @@ -242,6 +237,9 @@ static char *funnies[] = { "nop", "oops", "hole", + "", /* not used */ + "", /* not used */ + "", /* not used */ "reset", "error", "idle", @@ -258,6 +256,15 @@ static char *fa_class[] = { "fa_cedilla", "fa_acute", "fa_grave", + "fa_macron", + "fa_breve", + "fa_dot", + "fa_slash", + "fa_ring", + "fa_apostrophe", + "fa_dacute", + "fa_ogonek", + "fa_caron" }; #define NFA_CLASS (sizeof (fa_class) / sizeof (fa_class[0])) @@ -311,15 +318,14 @@ static char *padkeys[] = { #define NPADKEYS (sizeof (padkeys) / sizeof (padkeys[0])) static void -printentry(kio) - register struct kiockeymap *kio; +printentry(struct kiockeymap *kio) { - register int entry = (kio->kio_entry & 0x1F); - register int fkeyset; - register int i; - register int c; + int entry = (kio->kio_entry & 0x1F); + int fkeyset; + int i; + int c; - switch (kio->kio_entry >> 8) { + switch (KEYFLAGS(kio->kio_entry)) { case 0x0: if (kio->kio_entry == '"') @@ -330,37 +336,37 @@ printentry(kio) printchar((int)kio->kio_entry, '\''); break; - case SHIFTKEYS >> 8: + case SHIFTKEYS: if (entry < NSHIFTKEYS) (void) printf("shiftkeys+%s", shiftkeys[entry]); else (void) printf("%#4x", kio->kio_entry); break; - case BUCKYBITS >> 8: + case BUCKYBITS: if (entry < NBUCKYBITS) (void) printf("buckybits+%s", buckybits[entry]); else (void) printf("%#4x", kio->kio_entry); break; - case FUNNY >> 8: + case FUNNY: if (entry < NFUNNIES) (void) printf("%s", funnies[entry]); else (void) printf("%#4x", kio->kio_entry); break; - case FA_CLASS >> 8: + case FA_CLASS: if (entry < NFA_CLASS) (void) printf("%s", fa_class[entry]); else (void) printf("%#4x", kio->kio_entry); break; - case STRING >> 8: + case STRING: if (entry < NBUILTIN_STRINGS && strncmp(kio->kio_string, - builtin_strings[entry].string, KTAB_STRLEN) == 0) + builtin_strings[entry].string, KTAB_STRLEN) == 0) (void) printf("string+%s", builtin_strings[entry].name); else { (void) printf("\""); @@ -372,16 +378,16 @@ printentry(kio) } break; - case FUNCKEYS >> 8: + case FUNCKEYS: fkeyset = (int)(kio->kio_entry & 0xF0) >> 4; if (fkeyset < NFKEYSETS) (void) printf("%s(%d)", fkeysets[fkeyset], - (entry&0x0F) + 1); + (entry & 0x0F) + 1); else (void) printf("%#4x", kio->kio_entry); break; - case PADKEYS >> 8: + case PADKEYS: if (entry < NPADKEYS) (void) printf("%s", padkeys[entry]); else @@ -395,9 +401,7 @@ printentry(kio) } static void -printchar(character, delim) - int character; - int delim; +printchar(int character, int delim) { switch (character) { @@ -433,8 +437,10 @@ printchar(character, delim) } else { if (character < 040) (void) printf("^%c", character + 0100); - else + else if (character <= 0xff) (void) printf("'\\%.3o'", character); + else + (void) printf("%#4x", character); } break; } diff --git a/usr/src/cmd/loadkeys/loadkeys.y b/usr/src/cmd/loadkeys/loadkeys.y index 2795f1f7bf..eb146480e6 100644 --- a/usr/src/cmd/loadkeys/loadkeys.y +++ b/usr/src/cmd/loadkeys/loadkeys.y @@ -21,10 +21,6 @@ * CDDL HEADER END */ -#ifndef lint -#pragma ident "%Z%%M% %I% %E% SMI" -#endif - /* * Copyright (c) 1999 by Sun Microsystems, Inc. * All rights reserved. @@ -45,21 +41,7 @@ #define ALL -1 /* special symbol for all tables */ -/* - * SunOS 4.x and Solaris 2.[1234] put Type 4 key tables into - * the keytables directory with no type qualification. - * If we're a SPARC, we might be using an NFS server that - * doesn't have the new type-qualified directories. - * (loadkeys wasn't used on non-SPARCs in 2.[1234].) - */ -#ifdef sparc -#define COMPATIBILITY_DIR -#endif - static char keytable_dir[] = "/usr/share/lib/keytables/type_%d/"; -#ifdef COMPATIBILITY_DIR -static char keytable_dir2[] = "/usr/share/lib/keytables/"; -#endif static char layout_prefix[] = "layout_"; struct keyentry { @@ -132,6 +114,7 @@ static int loadkey(int kbdfd, keyentry *kep); static int dupkey(int kbdfd, dupentry *dep, int shiftmask); static int swapkey(int kbdfd, dupentry *dep, int shiftmask); static int yylex(); +extern int yyparse(void); static int readesc(FILE *stream, int delim, int single_char); static int wordcmp(const void *w1, const void *w2); static int yyerror(char *msg); @@ -141,20 +124,18 @@ static FILE *open_mapping_file(char *pathbuf, char *name, boolean_t explicit_name, int type); int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { - register int kbdfd; + int kbdfd; int type; int layout; /* maxint is 8 hex digits. */ char layout_filename[sizeof(layout_prefix)+8]; char pathbuf[MAXPATHLEN]; - register int shift; + int shift; struct kiockeymap mapentry; - register keyentry *kep; - register dupentry *dep; + keyentry *kep; + dupentry *dep; boolean_t explicit_name; while(++argv, --argc) { @@ -333,12 +314,8 @@ set_layout(char *arg) * else print a message on stderr and return NULL. */ FILE * -open_mapping_file( - char *pathbuf, - char *name, - boolean_t explicit_name, - int type -) { +open_mapping_file(char *pathbuf, char *name, boolean_t explicit_name, int type) +{ /* If the user specified the name, try it "raw". */ if (explicit_name) { strcpy(pathbuf, name); @@ -358,23 +335,8 @@ open_mapping_file( return (NULL); } (void) strcat(pathbuf, name); - infile = fopen(pathbuf, "r"); - if (infile) return (infile); - if (errno != ENOENT) goto fopen_fail; - -#ifdef COMPATIBILITY_DIR - /* If not, and either the name was specified explicitly */ - /* or this is a type 4... */ - if (explicit_name || type == KB_SUN4) { - /* Try the compatibility name. */ - /* No need to check len here, it's shorter. */ - (void) strcpy(pathbuf, keytable_dir2); - (void) strcat(pathbuf, infilename); - infile = fopen(pathbuf, "r"); - if (infile) return (infile); - if (errno != ENOENT) goto fopen_fail; - } -#endif + if ((infile = fopen(pathbuf, "r")) != NULL) + return (infile); fopen_fail: (void) fprintf(stderr, "loadkeys: "); @@ -425,7 +387,7 @@ makeentry(tablemask, entry) kep->ke_next = NULL; kep->ke_entry.kio_tablemask = tablemask; kep->ke_entry.kio_station = 0; - kep->ke_entry.kio_entry = (u_short)entry; + kep->ke_entry.kio_entry = entry; index = entry - STRING; if (index >= 0 && index <= 15) (void) strncpy(kep->ke_entry.kio_string, strings[index], @@ -624,6 +586,10 @@ code: { $$ = $1; } +| INT + { + $$ = $1; + } | '(' { $$ = '('; @@ -707,9 +673,18 @@ word_t wordtab[] = { { "downarrow", CONSTANT, DOWNARROW }, { "error", CONSTANT, ERROR }, { "fa_acute", CONSTANT, FA_ACUTE }, + { "fa_apostrophe", CONSTANT, FA_APOSTROPHE }, + { "fa_breve", CONSTANT, FA_BREVE }, + { "fa_caron", CONSTANT, FA_CARON }, { "fa_cedilla", CONSTANT, FA_CEDILLA }, { "fa_cflex", CONSTANT, FA_CFLEX }, + { "fa_dacute", CONSTANT, FA_DACUTE }, + { "fa_dot", CONSTANT, FA_DOT }, { "fa_grave", CONSTANT, FA_GRAVE }, + { "fa_macron", CONSTANT, FA_MACRON }, + { "fa_ogonek", CONSTANT, FA_OGONEK }, + { "fa_ring", CONSTANT, FA_RING }, + { "fa_slash", CONSTANT, FA_SLASH }, { "fa_tilde", CONSTANT, FA_TILDE }, { "fa_umlaut", CONSTANT, FA_UMLAUT }, { "hole", CONSTANT, HOLE }, @@ -910,7 +885,7 @@ yylex() yylval.number = wptr->w_lval; tokentype = wptr->w_type; } else { - yylval.number = strtol(tokbuf, &ptr, 10); + yylval.number = strtol(tokbuf, &ptr, 0); if (ptr == tokbuf) yyerror("syntax error"); else diff --git a/usr/src/cmd/loadkeys/type_6/albania b/usr/src/cmd/loadkeys/type_6/albania index d58ab75d5d..0ef261a8be 100644 --- a/usr/src/cmd/loadkeys/type_6/albania +++ b/usr/src/cmd/loadkeys/type_6/albania @@ -22,8 +22,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Albania Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/belarus b/usr/src/cmd/loadkeys/type_6/belarus index 432affeae3..b89fc72366 100644 --- a/usr/src/cmd/loadkeys/type_6/belarus +++ b/usr/src/cmd/loadkeys/type_6/belarus @@ -22,8 +22,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Belarus Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/belgium b/usr/src/cmd/loadkeys/type_6/belgium index 42c1edcacf..bd29bf992c 100644 --- a/usr/src/cmd/loadkeys/type_6/belgium +++ b/usr/src/cmd/loadkeys/type_6/belgium @@ -26,18 +26,18 @@ # Belgian Type 6 (USB) key layout # # -key 53 base ² shift ³ caps ² ctrl ² altg nop +key 53 base 0x00B2 shift 0x00B3 caps 0x00B2 ctrl 0x00B2 altg nop key 30 base & shift 1 caps & ctrl & altg | -key 31 base é shift 2 caps é ctrl é altg @ +key 31 base 0x00E9 shift 2 caps 0x00E9 ctrl 0x00E9 altg @ key 32 base '"' shift 3 caps '"' ctrl '"' altg # key 33 base '\'' shift 4 caps '\'' ctrl '\'' altg nop key 34 base ( shift 5 caps ( ctrl ^[ altg nop -key 35 base § shift 6 caps § ctrl ^_ altg ^ -key 36 base è shift 7 caps è ctrl è altg nop +key 35 base 0x00A7 shift 6 caps 0x00A7 ctrl ^_ altg ^ +key 36 base 0x00E8 shift 7 caps 0x00E8 ctrl 0x00E8 altg nop key 37 base ! shift 8 caps ! ctrl ^\ altg nop -key 38 base ç shift 9 caps ç ctrl ^^ altg { -key 39 base à shift 0 caps à ctrl ^@ altg } -key 45 base ) shift ° caps ) ctrl ^] altg nop +key 38 base 0x00E7 shift 9 caps 0x00E7 ctrl ^^ altg { +key 39 base 0x00E0 shift 0 caps 0x00E0 ctrl ^@ altg } +key 45 base ) shift 0x00B0 caps ) ctrl ^] altg nop key 46 base - shift _ caps - ctrl ^_ altg nop key 20 base a shift A caps A ctrl ^A altg nop key 26 base z shift Z caps Z ctrl ^Z altg nop @@ -45,8 +45,8 @@ key 47 base fa_cflex shift fa_umlaut caps fa_cflex ctrl fa_cflex altg [ key 48 base $ shift * caps $ ctrl $ altg ] key 4 base q shift Q caps Q ctrl ^Q altg nop key 51 base m shift M caps M ctrl ^M altg nop -key 52 base ù shift % caps ù ctrl ù altg fa_grave -key 50 base µ shift £ caps µ ctrl µ altg fa_acute numl nonl up nop +key 52 base 0x00F9 shift % caps 0x00F9 ctrl 0x00F9 altg fa_grave +key 50 base 0x00B5 shift 0x00A3 caps 0x00B5 ctrl 0x00B5 altg fa_acute numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl < altg '\\' numl nonl up nop key 29 base w shift W caps W ctrl ^W altg nop diff --git a/usr/src/cmd/loadkeys/type_6/brazil b/usr/src/cmd/loadkeys/type_6/brazil index d20cdfe74e..b1c905f5e4 100644 --- a/usr/src/cmd/loadkeys/type_6/brazil +++ b/usr/src/cmd/loadkeys/type_6/brazil @@ -29,44 +29,44 @@ # "caps lock" acts as "shift lock" on this keyboard # # -key 53 base '\'' shift '"' caps '\'' ctrl '\'' altg ¬ -key 30 base 1 shift ! caps 1 ctrl 1 altg ¹ -key 31 base 2 shift @ caps 2 ctrl ^@ altg ² -key 32 base 3 shift # caps 3 ctrl 3 altg ³ -key 33 base 4 shift $ caps 4 ctrl 4 altg £ -key 34 base 5 shift % caps 5 ctrl 5 altg ¢ -key 35 base 6 shift fa_umlaut caps 6 ctrl ^^ altg ¬ +key 53 base '\'' shift '"' caps '\'' ctrl '\'' altg 0x00AC +key 30 base 1 shift ! caps 1 ctrl 1 altg 0x00B9 +key 31 base 2 shift @ caps 2 ctrl ^@ altg 0x00B2 +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00B3 +key 33 base 4 shift $ caps 4 ctrl 4 altg 0x00A3 +key 34 base 5 shift % caps 5 ctrl 5 altg 0x00A2 +key 35 base 6 shift fa_umlaut caps 6 ctrl ^^ altg 0x00AC key 36 base 7 shift & caps 7 ctrl 7 altg { key 37 base 8 shift * caps 8 ctrl ^[ altg [ key 38 base 9 shift ( caps 9 ctrl ^] altg ] key 39 base 0 shift ) caps 0 ctrl 0 altg } key 45 base - shift _ caps - ctrl ^_ altg '\\' -key 46 base = shift + caps = ctrl = altg § +key 46 base = shift + caps = ctrl = altg 0x00A7 key 20 base q shift Q caps Q ctrl ^Q altg nop key 26 base w shift W caps W ctrl ^W altg nop key 8 base e shift E caps E ctrl ^E altg nop key 28 base y shift Y caps Y ctrl ^Y altg nop -key 18 base o shift O caps O ctrl ^O altg § -key 19 base p shift P caps P ctrl ^P altg ¶ +key 18 base o shift O caps O ctrl ^O altg 0x00A7 +key 19 base p shift P caps P ctrl ^P altg 0x00B6 key 47 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg '`' -key 48 base [ shift { caps [ ctrl ^[ altg ª +key 48 base [ shift { caps [ ctrl ^[ altg 0x00AA key 4 base a shift A caps A ctrl ^A altg nop key 22 base s shift S caps S ctrl ^S altg nop -key 51 base ç shift Ç caps Ç ctrl ç altg ¡ +key 51 base 0x00E7 shift 0x00C7 caps 0x00C7 ctrl 0x00E7 altg ¡ key 52 base fa_tilde shift fa_cflex caps fa_tilde ctrl ^^ altg ~ -key 50 base ] shift } caps ] ctrl ^] altg º numl nonl up nop -key 29 base z shift Z caps Z ctrl ^Z altg « -key 27 base x shift X caps X ctrl ^X altg » +key 50 base ] shift } caps ] ctrl ^] altg 0x00BA numl nonl up nop +key 29 base z shift Z caps Z ctrl ^Z altg 0x00AB +key 27 base x shift X caps X ctrl ^X altg 0x00BB key 6 base c shift C caps C ctrl ^C altg nop key 25 base v shift V caps V ctrl ^V altg nop key 5 base b shift B caps B ctrl ^B altg nop key 17 base n shift N caps N ctrl ^N altg nop -key 16 base m shift M caps M ctrl ^M altg µ +key 16 base m shift M caps M ctrl ^M altg 0x00B5 key 49 all hole -key 100 base / shift | caps / ctrl ^\ altg ° numl nonl up nop +key 100 base / shift | caps / ctrl ^\ altg 0x00B0 numl nonl up nop key 54 base , shift < caps , ctrl , altg ? key 55 base . shift > caps . ctrl . altg nop -key 56 base ; shift : caps ; ctrl ; altg ¿ +key 56 base ; shift : caps ; ctrl ; altg 0x00BF # # # diff --git a/usr/src/cmd/loadkeys/type_6/bulgaria b/usr/src/cmd/loadkeys/type_6/bulgaria index 1846c455c5..feafdf59b3 100644 --- a/usr/src/cmd/loadkeys/type_6/bulgaria +++ b/usr/src/cmd/loadkeys/type_6/bulgaria @@ -22,8 +22,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Bulgaria Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/canadian_bilingual b/usr/src/cmd/loadkeys/type_6/canadian_bilingual index d27e0abe84..e727c55cbf 100644 --- a/usr/src/cmd/loadkeys/type_6/canadian_bilingual +++ b/usr/src/cmd/loadkeys/type_6/canadian_bilingual @@ -28,42 +28,42 @@ # "caps lock" acts as "shift lock" on this keyboard # key 53 base / shift | caps / ctrl ^\ altg '\\' -key 30 base 1 shift ! caps 1 ctrl 1 altg ± +key 30 base 1 shift ! caps 1 ctrl 1 altg 0x00B1 key 31 base 2 shift @ caps 2 ctrl 2 altg nop -key 32 base 3 shift # caps 3 ctrl 3 altg £ -key 33 base 4 shift $ caps 4 ctrl 4 altg ¢ -key 34 base 5 shift % caps 5 ctrl 5 altg ¤ -key 35 base 6 shift ? caps 6 ctrl 6 altg ¬ +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00A3 +key 33 base 4 shift $ caps 4 ctrl 4 altg 0x00A2 +key 34 base 5 shift % caps 5 ctrl 5 altg 0x00A4 +key 35 base 6 shift ? caps 6 ctrl 6 altg 0x00AC key 36 base 7 shift & caps 7 ctrl 7 altg { key 37 base 8 shift * caps 8 ctrl 8 altg } key 38 base 9 shift ( caps 9 ctrl 9 altg [ key 39 base 0 shift ) caps 0 ctrl 0 altg ] -key 45 base - shift _ caps - ctrl ^_ altg ½ -key 46 base = shift + caps = ctrl = altg ¬ +key 45 base - shift _ caps - ctrl ^_ altg 0x00B0 +key 46 base = shift + caps = ctrl = altg 0x00AC key 20 base q shift Q caps Q ctrl ^Q altg nop key 26 base w shift W caps W ctrl ^W altg nop key 8 base e shift E caps E ctrl ^E altg nop key 28 base y shift Y caps Y ctrl ^Y altg nop -key 18 base o shift O caps O ctrl ^O altg § -key 19 base p shift P caps P ctrl ^P altg ¶ +key 18 base o shift O caps O ctrl ^O altg 0x00A7 +key 19 base p shift P caps P ctrl ^P altg 0x00B6 key 47 base fa_cflex shift fa_umlaut caps fa_cflex ctrl fa_cflex altg fa_grave -key 48 base ç shift Ç caps Ç ctrl ç altg ~ +key 48 base 0x00E7 shift 0x00C7 caps 0x00C7 ctrl 0x00E7 altg ~ key 4 base a shift A caps A ctrl ^A altg nop key 22 base s shift S caps S ctrl ^S altg nop key 51 base ; shift : caps ; ctrl ; altg ° -key 52 base è shift È caps È ctrl ¨ altg { -key 50 base à shift À caps À ctrl à altg } numl nonl up nop -key 29 base z shift Z caps Z ctrl ^Z altg « -key 27 base x shift X caps X ctrl ^X altg » +key 52 base 0x00E8 shift 0x00C8 caps 0x00C8 ctrl 0x00A8 altg { +key 50 base 0x00E0 shift 0x00C0 caps 0x00C0 ctrl 0x00E0 altg } numl nonl up nop +key 29 base z shift Z caps Z ctrl ^Z altg 0x00AB +key 27 base x shift X caps X ctrl ^X altg 0x00BB key 6 base c shift C caps C ctrl ^C altg nop key 25 base v shift V caps V ctrl ^V altg nop key 5 base b shift B caps B ctrl ^B altg nop key 17 base n shift N caps N ctrl ^N altg nop -key 16 base m shift M caps M ctrl ^M altg µ +key 16 base m shift M caps M ctrl ^M altg 0x00B5 key 54 base , shift '\'' caps , ctrl , altg < key 55 base . shift '"' caps . ctrl . altg > -key 56 base é shift É caps É ctrl é altg fa_acute -key 100 base ù shift Ù caps Ù ctrl ù altg nop numl nonl up nop +key 56 base 0x00E9 shift 0x00C9 caps 0x00C9 ctrl 0x00E9 altg fa_acute +key 100 base 0x00F9 shift 0x00D9 caps 0x00D9 ctrl 0x00F9 altg nop numl nonl up nop # # # New function keys assigned old codes diff --git a/usr/src/cmd/loadkeys/type_6/canadian_french b/usr/src/cmd/loadkeys/type_6/canadian_french index fab1b9a32c..8ebf7eecb8 100644 --- a/usr/src/cmd/loadkeys/type_6/canadian_french +++ b/usr/src/cmd/loadkeys/type_6/canadian_french @@ -22,40 +22,38 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Canadian French Type 6 (USB) key layout # # "caps lock" acts as "shift lock" on this keyboard # -key 53 base ² shift nop caps ² ctrl ² altg nop +key 53 base 0x00B2 shift nop caps 0x00B2 ctrl 0x00B2 altg nop key 30 base & shift 1 caps & ctrl & altg nop -key 31 base é shift 2 caps é ctrl é altg ~ +key 31 base 0x00E9 shift 2 caps 0x00E9 ctrl 0x00E9 altg ~ key 32 base '"' shift 3 caps '"' ctrl '"' altg # key 33 base '\'' shift 4 caps '\'' ctrl '\'' altg { key 34 base ( shift 5 caps ( ctrl ^[ altg [ key 35 base - shift 6 caps - ctrl ^_ altg | -key 36 base è shift 7 caps è ctrl è altg ` +key 36 base 0x00E8 shift 7 caps 0x00E8 ctrl 0x00E8 altg ` key 37 base _ shift 8 caps _ ctrl ^\ altg \ -key 38 base ç shift 9 caps ç ctrl ^^ altg ^ -key 39 base à shift 0 caps à ctrl ^@ altg @ -key 45 base ) shift ° caps ) ctrl ^] altg ] +key 38 base 0x00E7 shift 9 caps 0x00E7 ctrl ^^ altg ^ +key 39 base 0x00E0 shift 0 caps 0x00E0 ctrl ^@ altg @ +key 45 base ) shift 0x00B0 caps ) ctrl ^] altg ] key 46 base = shift + caps = ctrl = altg } key 20 base a shift A caps A ctrl ^A altg nop key 26 base z shift Z caps Z ctrl ^Z altg nop key 47 base fa_cflex shift fa_umlaut caps fa_cflex ctrl fa_cflex altg nop -key 48 base $ shift £ caps $ ctrl $ altg ¤ +key 48 base $ shift 0x00A3 caps $ ctrl $ altg 0x00A4 key 4 base q shift Q caps Q ctrl ^Q altg nop key 51 base m shift M caps M ctrl ^M altg nop -key 52 base ù shift % caps ù ctrl ù altg nop -key 50 base * shift µ caps * ctrl * altg nop numl nonl up nop +key 52 base 0x00F9 shift % caps 0x00F9 ctrl 0x00F9 altg nop +key 50 base * shift 0x00B5 caps * ctrl * altg nop numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl < altg nop numl nonl up nop key 29 base w shift W caps W ctrl ^W altg nop key 16 base , shift ? caps , ctrl , altg nop key 54 base ; shift . caps ; ctrl ; altg nop key 55 base : shift / caps : ctrl : altg nop -key 56 base ! shift § caps ! ctrl ! altg nop +key 56 base ! shift 0x00A7 caps ! ctrl ! altg nop # # # diff --git a/usr/src/cmd/loadkeys/type_6/croatia b/usr/src/cmd/loadkeys/type_6/croatia index bcedf7b51c..16530a2648 100644 --- a/usr/src/cmd/loadkeys/type_6/croatia +++ b/usr/src/cmd/loadkeys/type_6/croatia @@ -22,8 +22,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Croatia Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/czech b/usr/src/cmd/loadkeys/type_6/czech index c68d403b4f..e762e3d7af 100644 --- a/usr/src/cmd/loadkeys/type_6/czech +++ b/usr/src/cmd/loadkeys/type_6/czech @@ -21,8 +21,6 @@ # # CDDL HEADER END # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Czech Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/denmark b/usr/src/cmd/loadkeys/type_6/denmark index fbebfb1d56..4f493d11f6 100644 --- a/usr/src/cmd/loadkeys/type_6/denmark +++ b/usr/src/cmd/loadkeys/type_6/denmark @@ -22,14 +22,12 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Danish Type 6 (USB) key layout # -key 53 base ½ shift § caps ½ ctrl ½ altg nop +key 53 base 0x00BD shift 0x00A7 caps 0x00BD ctrl 0x00BD altg nop key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ -key 32 base 3 shift # caps 3 ctrl 3 altg £ -key 33 base 4 shift ¤ caps 4 ctrl 4 altg $ +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00A3 +key 33 base 4 shift 0x00A4 caps 4 ctrl 4 altg $ key 34 base 5 shift % caps 5 ctrl 5 altg ~ key 35 base 6 shift & caps 6 ctrl ^^ altg ^ key 36 base 7 shift / caps 7 ctrl 7 altg { @@ -38,10 +36,10 @@ key 38 base 9 shift ) caps 9 ctrl ^] altg ] key 39 base 0 shift = caps 0 ctrl 0 altg } key 45 base + shift ? caps + ctrl ^_ altg nop key 46 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg | -key 47 base å shift Å caps Å ctrl å altg nop +key 47 base 0x00E5 shift 0x00C5 caps 0x00C5 ctrl 0x00E5 altg nop key 48 base fa_umlaut shift fa_cflex caps fa_umlaut ctrl fa_umlaut altg fa_tilde -key 51 base æ shift Æ caps Æ ctrl æ altg nop -key 52 base ø shift Ø caps Ø ctrl ø altg nop +key 51 base 0x00E6 shift 0x00C6 caps 0x00C6 ctrl 0x00E6 altg nop +key 52 base 0x00F8 shift 0x00D8 caps 0x00D8 ctrl 0x00F8 altg nop key 50 base '\'' shift * caps '\'' ctrl '\'' altg '`' numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl ^\ altg '\\' numl nonl up nop diff --git a/usr/src/cmd/loadkeys/type_6/estonia b/usr/src/cmd/loadkeys/type_6/estonia index eadf99a94a..8b9f62b3f1 100644 --- a/usr/src/cmd/loadkeys/type_6/estonia +++ b/usr/src/cmd/loadkeys/type_6/estonia @@ -30,13 +30,13 @@ # However, all necessary ASCII characters are placed onto the right keys. # # -key 53 base ` shift fa_tilde caps ` ctrl ^^ altg '¬' -key 30 base 1 shift ! caps 1 ctrl 1 altg ¹ +key 53 base fa_caron shift fa_tilde caps ` ctrl ^^ altg '~' +key 30 base 1 shift ! caps 1 ctrl 1 altg 0x00B9 key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ -key 32 base 3 shift # caps 3 ctrl 3 altg £ -key 33 base 4 shift ¤ caps 4 ctrl 4 altg $ -key 34 base 5 shift % caps 5 ctrl 5 altg ½ -key 35 base 6 shift & caps 6 ctrl 6 altg '¬' +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00A2 +key 33 base 4 shift 0x00A4 caps 4 ctrl 4 altg $ +key 34 base 5 shift % caps 5 ctrl 5 altg 0x00BD +key 35 base 6 shift & caps 6 ctrl 6 altg 0x00AC key 36 base 7 shift / caps 7 ctrl 7 altg { key 37 base 8 shift ( caps 8 ctrl ^[ altg [ key 38 base 9 shift ) caps 9 ctrl ^] altg ] @@ -44,17 +44,19 @@ key 39 base 0 shift = caps 0 ctrl 0 altg } key 45 base + shift ? caps + ctrl ^_ altg '\\' key 46 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg ` key 20 base q shift Q caps Q ctrl ^Q altg @ -key 47 base ü shift Ü caps Ü ctrl ü altg fa_umlaut -key 48 base fa_umlaut shift ^ caps fa_umlaut ctrl fa_tilde altg ~ -key 51 base ö shift Ö caps Ö ctrl ö altg nop -key 52 base ä shift Ä caps Ä ctrl ä altg ^ +key 47 base 0x00FC shift 0x00DC caps 0x00DC ctrl nop altg fa_umlaut +key 48 base 0x00F5 shift 0x00D5 caps 0x00D5 ctrl nop altg ~ +key 51 base 0x00F6 shift 0x00D6 caps 0x00D6 ctrl nop altg nop +key 52 base 0x00E4 shift 0x00C4 caps 0x00C4 ctrl nop altg ^ key 50 base '\'' shift * caps '\'' ctrl '\'' altg '`' numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl ^| altg | numl nonl up nop -key 29 base z shift Z caps Z ctrl ^Z altg « -key 27 base x shift X caps X ctrl ^X altg » -key 6 base c shift C caps C ctrl ^C altg ¢ -key 16 base m shift M caps M ctrl '\r' altg µ +key 22 base s shift S caps S ctrl ^S altg 0x0161 +key 29 base z shift Z caps Z ctrl ^Z altg 0x017E +key 27 base x shift X caps X ctrl ^X altg nop +key 6 base c shift C caps C ctrl ^C altg 0x00A2 +key 8 base e shift E caps E ctrl ^E altg 0x20AC +key 16 base m shift M caps M ctrl '\r' altg 0x00B5 key 54 base , shift ; caps , ctrl , altg < key 55 base . shift : caps . ctrl . altg > key 56 base - shift _ caps - ctrl ^_ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/finnish b/usr/src/cmd/loadkeys/type_6/finnish index 6a7f113331..bc3926aa17 100644 --- a/usr/src/cmd/loadkeys/type_6/finnish +++ b/usr/src/cmd/loadkeys/type_6/finnish @@ -22,13 +22,11 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Finnish Type 6 (USB) key layout # -key 53 base § shift ½ caps § ctrl § altg nop +key 53 base 0x00A7 shift 0x00B0 caps 0x00A7 ctrl 0x00A7 altg nop key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ -key 32 base 3 shift # caps 3 ctrl 3 altg £ +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00A3 key 33 base 4 shift ¤ caps 4 ctrl 4 altg $ key 34 base 5 shift % caps 5 ctrl 5 altg nop key 35 base 6 shift & caps 6 ctrl 6 altg nop @@ -38,10 +36,10 @@ key 38 base 9 shift ) caps 9 ctrl ^] altg ] key 39 base 0 shift = caps 0 ctrl 0 altg } key 45 base + shift ? caps + ctrl ^_ altg '\\' key 46 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg nop -key 47 base å shift Å caps Å ctrl å altg nop +key 47 base 0x00E5 shift 0x00C5 caps 0x00C5 ctrl 0x00E5 altg nop key 48 base fa_umlaut shift ^ caps fa_umlaut ctrl fa_umlaut altg ~ -key 51 base ö shift Ö caps Ö ctrl ö altg nop -key 52 base ä shift Ä caps Ä ctrl ä altg nop +key 51 base 0x00F6 shift 0x00D6 caps 0x00D6 ctrl 0x00F6 altg nop +key 52 base 0x00E4 shift 0x00C4 caps 0x00C4 ctrl 0x00E4 altg nop key 50 base '\'' shift * caps '\'' ctrl '\'' altg '`' numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl ^| altg | numl nonl up nop diff --git a/usr/src/cmd/loadkeys/type_6/france b/usr/src/cmd/loadkeys/type_6/france index 0e1c39c3cb..edcad8053c 100644 --- a/usr/src/cmd/loadkeys/type_6/france +++ b/usr/src/cmd/loadkeys/type_6/france @@ -22,40 +22,38 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # French Type 6 (USB) key layout # # "caps lock" acts as "shift lock" on this keyboard # -key 53 base ² shift nop caps ² ctrl ² altg nop +key 53 base 0x00B2 shift nop caps 0x00B2 ctrl 0x00B2 altg nop key 30 base & shift 1 caps & ctrl & altg nop -key 31 base é shift 2 caps é ctrl é altg ~ +key 31 base 0x00E9 shift 2 caps 0x00E9 ctrl 0x00E9 altg ~ key 32 base '"' shift 3 caps '"' ctrl '"' altg # key 33 base '\'' shift 4 caps '\'' ctrl '\'' altg { key 34 base ( shift 5 caps ( ctrl ^[ altg [ key 35 base - shift 6 caps - ctrl ^_ altg | -key 36 base è shift 7 caps è ctrl è altg ` +key 36 base 0x00E8 shift 7 caps 0x00E8 ctrl 0x00E8 altg ` key 37 base _ shift 8 caps _ ctrl ^\ altg \ -key 38 base ç shift 9 caps ç ctrl ^^ altg ^ -key 39 base à shift 0 caps à ctrl ^@ altg @ -key 45 base ) shift ° caps ) ctrl ^] altg ] +key 38 base 0x00E7 shift 9 caps 0x00E7 ctrl ^^ altg ^ +key 39 base 0x00E0 shift 0 caps 0x00E0 ctrl ^@ altg @ +key 45 base ) shift 0x00B0 caps ) ctrl ^] altg ] key 46 base = shift + caps = ctrl = altg } key 20 base a shift A caps A ctrl ^A altg nop key 26 base z shift Z caps Z ctrl ^Z altg nop key 47 base fa_cflex shift fa_umlaut caps fa_cflex ctrl fa_cflex altg nop -key 48 base $ shift £ caps $ ctrl $ altg ¤ +key 48 base $ shift 0x00A3 caps $ ctrl $ altg 0x00A4 key 4 base q shift Q caps Q ctrl ^Q altg nop key 51 base m shift M caps M ctrl ^M altg nop -key 52 base ù shift % caps ù ctrl ù altg nop -key 50 base * shift µ caps * ctrl * altg nop numl nonl up nop +key 52 base 0x00F9 shift % caps 0x00F9 ctrl 0x00F9 altg nop +key 50 base * shift 0x00B5 caps * ctrl * altg nop numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl < altg nop numl nonl up nop key 29 base w shift W caps W ctrl ^W altg nop key 16 base , shift ? caps , ctrl , altg nop key 54 base ; shift . caps ; ctrl ; altg nop key 55 base : shift / caps : ctrl : altg nop -key 56 base ! shift § caps ! ctrl ! altg nop +key 56 base ! shift 0x00A7 caps ! ctrl ! altg nop # # # diff --git a/usr/src/cmd/loadkeys/type_6/germany b/usr/src/cmd/loadkeys/type_6/germany index c26ba4eee1..1377c4c4b4 100644 --- a/usr/src/cmd/loadkeys/type_6/germany +++ b/usr/src/cmd/loadkeys/type_6/germany @@ -22,16 +22,14 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # German Type 6 (USB) key layout # # "caps lock" acts as "shift lock" on this keyboard # -key 53 base ^ shift ° caps ^ ctrl ^^ altg nop +key 53 base ^ shift 0x00B0 caps ^ ctrl ^^ altg nop key 30 base 1 shift ! caps 1 ctrl 1 altg nop -key 31 base 2 shift '"' caps 2 ctrl ^@ altg ² -key 32 base 3 shift § caps 3 ctrl 3 altg ³ +key 31 base 2 shift '"' caps 2 ctrl ^@ altg 0x00B2 +key 32 base 3 shift 0x00A7 caps 3 ctrl 3 altg 0x00B3 key 33 base 4 shift $ caps 4 ctrl 4 altg nop key 34 base 5 shift % caps 5 ctrl 5 altg nop key 35 base 6 shift & caps 6 ctrl 6 altg nop @@ -39,19 +37,19 @@ key 36 base 7 shift / caps 7 ctrl 7 altg { key 37 base 8 shift ( caps 8 ctrl ^[ altg [ key 38 base 9 shift ) caps 9 ctrl ^] altg ] key 39 base 0 shift = caps 0 ctrl 0 altg } -key 45 base ß shift ? caps ß ctrl ^\ altg '\\' +key 45 base 0x00DF shift ? caps 0x00DF ctrl ^\ altg '\\' key 46 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg nop key 20 base q shift Q caps Q ctrl ^Q altg @ key 28 base z shift Z caps Z ctrl ^Z altg nop -key 47 base ü shift Ü caps Ü ctrl ü altg nop +key 47 base 0x00FC shift 0x00DC caps 0x00DC ctrl 0x00FC altg nop key 48 base + shift * caps + ctrl + altg ~ -key 51 base ö shift Ö caps Ö ctrl ö altg nop -key 52 base ä shift Ä caps Ä ctrl ä altg nop +key 51 base 0x00F6 shift 0x00D6 caps 0x00D6 ctrl 0x00F6 altg nop +key 52 base 0x00E4 shift 0x00C4 caps 0x00C4 ctrl 0x00E4 altg nop key 50 base # shift '\'' caps # ctrl # altg '`' numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl < altg | numl nonl up nop key 29 base y shift Y caps Y ctrl ^Y altg nop -key 16 base m shift M caps M ctrl '\r' altg µ +key 16 base m shift M caps M ctrl '\r' altg 0x00B5 key 54 base , shift ; caps , ctrl , altg nop key 55 base . shift : caps . ctrl . altg nop key 56 base - shift _ caps - ctrl ^_ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/greece b/usr/src/cmd/loadkeys/type_6/greece index c20507e228..aa9f6ca157 100644 --- a/usr/src/cmd/loadkeys/type_6/greece +++ b/usr/src/cmd/loadkeys/type_6/greece @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Greek Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/hungary b/usr/src/cmd/loadkeys/type_6/hungary index 668765061f..0227c744b2 100644 --- a/usr/src/cmd/loadkeys/type_6/hungary +++ b/usr/src/cmd/loadkeys/type_6/hungary @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Hungary Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/iceland b/usr/src/cmd/loadkeys/type_6/iceland index e18c8206e2..4ff9b4ab8a 100644 --- a/usr/src/cmd/loadkeys/type_6/iceland +++ b/usr/src/cmd/loadkeys/type_6/iceland @@ -22,8 +22,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Iceland Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/italy b/usr/src/cmd/loadkeys/type_6/italy index c2b70a221b..6c9e1effc0 100644 --- a/usr/src/cmd/loadkeys/type_6/italy +++ b/usr/src/cmd/loadkeys/type_6/italy @@ -22,25 +22,23 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Italian Type 6 (USB) key layout # key 53 base '\\' shift | caps '\\' ctrl ^\ altg nop key 31 base 2 shift '"' caps 2 ctrl 2 altg nop -key 32 base 3 shift £ caps 3 ctrl 3 altg nop +key 32 base 3 shift 0x00A3 caps 3 ctrl 3 altg nop key 35 base 6 shift & caps 6 ctrl 6 altg nop key 36 base 7 shift / caps 7 ctrl 7 altg nop key 37 base 8 shift ( caps 8 ctrl 8 altg { key 38 base 9 shift ) caps 9 ctrl 9 altg } key 39 base 0 shift = caps 0 ctrl 0 altg nop key 45 base '\'' shift ? caps '\'' ctrl '\'' altg '`' -key 46 base ì shift ^ caps Ì ctrl ^^ altg nop -key 47 base è shift é caps È ctrl ^[ altg [ +key 46 base 0x00EC shift ^ caps 0x00CC ctrl ^^ altg nop +key 47 base 0x00E8 shift 0x00E9 caps 0x00C8 ctrl ^[ altg [ key 48 base + shift * caps + ctrl ^] altg ] -key 51 base ò shift ç caps Ò ctrl ^@ altg @ -key 52 base à shift ° caps À ctrl à altg # -key 50 base ù shift § caps Ù ctrl ù altg ~ numl nonl up nop +key 51 base 0x00F2 shift 0x00E7 caps 0x00D2 ctrl ^@ altg @ +key 52 base 0x00E0 shift 0x00B0 caps 0x00C0 ctrl 0x00E0 altg # +key 50 base 0x00F9 shift 0x00A7 caps 0x00D9 ctrl 0x00F9 altg ~ numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl < altg nop numl nonl up nop key 54 base , shift ; caps , ctrl , altg nop diff --git a/usr/src/cmd/loadkeys/type_6/japan b/usr/src/cmd/loadkeys/type_6/japan index c4b2ea1eeb..37f87cf47b 100644 --- a/usr/src/cmd/loadkeys/type_6/japan +++ b/usr/src/cmd/loadkeys/type_6/japan @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Japanese Type 6 (USB) key layout # # key 13: ROMAN/KANA diff --git a/usr/src/cmd/loadkeys/type_6/korea b/usr/src/cmd/loadkeys/type_6/korea index 2f8df8125f..473a996db6 100644 --- a/usr/src/cmd/loadkeys/type_6/korea +++ b/usr/src/cmd/loadkeys/type_6/korea @@ -22,8 +22,6 @@ # # CDDL HEADER END # -# ident "%Z%%M% %I% %E% SMI" -# # Korean Type 6 (USB) key layout # # diff --git a/usr/src/cmd/loadkeys/type_6/latinamerica b/usr/src/cmd/loadkeys/type_6/latinamerica index 26182531ce..a383f26390 100644 --- a/usr/src/cmd/loadkeys/type_6/latinamerica +++ b/usr/src/cmd/loadkeys/type_6/latinamerica @@ -22,11 +22,9 @@ # # CDDL HEADER END # -# ident "%Z%%M% %I% %E% SMI" -# # Latin American Type 6 (USB) key layout # -key 53 base | shift ° caps | ctrl hole altg ¬ +key 53 base | shift 0x00B0 caps | ctrl hole altg 0x00AC key 30 base 1 shift ! caps 1 ctrl 1 altg nop key 31 base 2 shift '"' caps 2 ctrl 2 altg nop key 32 base 3 shift # caps 3 ctrl 3 altg nop @@ -38,11 +36,11 @@ key 37 base 8 shift ( caps 8 ctrl 8 altg nop key 38 base 9 shift ) caps 9 ctrl 9 altg nop key 39 base 0 shift = caps 0 ctrl 0 altg nop key 45 base '\'' shift ? caps '\'' ctrl '\'' altg '\\' -key 46 base ¿ shift ¡ caps ¿ ctrl ¿ altg nop +key 46 base 0x00BF shift 0x00A1 caps 0x00BF ctrl 0x00BF altg nop key 20 base q shift Q caps Q ctrl ^@ altg @ key 47 base fa_acute shift fa_umlaut caps fa_acute ctrl fa_acute altg nop key 48 base + shift * caps + ctrl + altg ~ -key 51 base ñ shift Ñ caps Ñ ctrl ñ altg nop +key 51 base 0x00F1 shift 0x00D1 caps 0x00D1 ctrl 0x00F1 altg nop key 52 base { shift [ caps { ctrl ^[ altg ^ key 50 base } shift ] caps } ctrl ^] altg ` numl nonl up nop key 49 all hole diff --git a/usr/src/cmd/loadkeys/type_6/latvia b/usr/src/cmd/loadkeys/type_6/latvia index 99d9514c0d..b2794e5186 100644 --- a/usr/src/cmd/loadkeys/type_6/latvia +++ b/usr/src/cmd/loadkeys/type_6/latvia @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Latvian Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/lithuania b/usr/src/cmd/loadkeys/type_6/lithuania index 9b5fa55d8a..a594d3f440 100644 --- a/usr/src/cmd/loadkeys/type_6/lithuania +++ b/usr/src/cmd/loadkeys/type_6/lithuania @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Lithuanian Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/macedonia b/usr/src/cmd/loadkeys/type_6/macedonia index f287e76aa9..a48c051c54 100644 --- a/usr/src/cmd/loadkeys/type_6/macedonia +++ b/usr/src/cmd/loadkeys/type_6/macedonia @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Macedonian Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/maltauk b/usr/src/cmd/loadkeys/type_6/maltauk index 6e2862208d..71b10d6f09 100644 --- a/usr/src/cmd/loadkeys/type_6/maltauk +++ b/usr/src/cmd/loadkeys/type_6/maltauk @@ -22,8 +22,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Malta UK Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/maltaus b/usr/src/cmd/loadkeys/type_6/maltaus index 4e95c9aa28..bc93655470 100644 --- a/usr/src/cmd/loadkeys/type_6/maltaus +++ b/usr/src/cmd/loadkeys/type_6/maltaus @@ -22,8 +22,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Malta US Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/netherlands b/usr/src/cmd/loadkeys/type_6/netherlands index a412f185ff..7524bacf09 100644 --- a/usr/src/cmd/loadkeys/type_6/netherlands +++ b/usr/src/cmd/loadkeys/type_6/netherlands @@ -22,37 +22,35 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Dutch Type 6 (USB) key layout # -key 53 base @ shift § caps @ ctrl ^@ altg '¬' -key 30 base 1 shift ! caps 1 ctrl 1 altg ¹ -key 31 base 2 shift '"' caps 2 ctrl 2 altg ² -key 32 base 3 shift # caps 3 ctrl 3 altg ³ -key 33 base 4 shift $ caps 4 ctrl 4 altg ¼ -key 34 base 5 shift % caps 5 ctrl 5 altg ½ -key 35 base 6 shift & caps 6 ctrl 6 altg ¾ -key 36 base 7 shift _ caps 7 ctrl ^_ altg £ +key 53 base @ shift 0x00A7 caps @ ctrl ^@ altg 0x00AC +key 30 base 1 shift ! caps 1 ctrl 1 altg 0x00B9 +key 31 base 2 shift '"' caps 2 ctrl 2 altg 0x00B2 +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00B3 +key 33 base 4 shift $ caps 4 ctrl 4 altg 0x00BC +key 34 base 5 shift % caps 5 ctrl 5 altg 0x00BD +key 35 base 6 shift & caps 6 ctrl 6 altg 0x00BE +key 36 base 7 shift _ caps 7 ctrl ^_ altg 0x00A3 key 37 base 8 shift ( caps 8 ctrl 8 altg { key 38 base 9 shift ) caps 9 ctrl ^] altg } key 39 base 0 shift '\'' caps 0 ctrl 0 altg '`' key 45 base / shift ? caps / ctrl ^\ altg '\\' -key 46 base ° shift fa_tilde caps ° ctrl ° altg fa_cedilla +key 46 base 0x00B0 shift fa_tilde caps 0x00B0 ctrl 0x00B0 altg fa_cedilla key 47 base fa_umlaut shift fa_cflex caps fa_umlaut ctrl fa_umlaut altg nop key 48 base * shift | caps * ctrl * altg ~ -key 22 base s shift S caps S ctrl ^S altg ß -key 51 base + shift ± caps + ctrl + altg nop +key 22 base s shift S caps S ctrl ^S altg 0x00DF +key 51 base + shift 0x00B1 caps + ctrl + altg nop key 52 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg nop key 50 base < shift > caps < ctrl ^^ altg ^ numl nonl up nop key 49 all hole -key 100 base ] shift [ caps [ ctrl ^[ altg ¦ numl nonl up nop -key 29 base z shift Z caps Z ctrl ^Z altg « -key 27 base x shift X caps X ctrl ^X altg » -key 6 base c shift C caps C ctrl ^C altg ¢ -key 16 base m shift M caps M ctrl '\r' altg µ +key 100 base ] shift [ caps [ ctrl ^[ altg 0x00A6 numl nonl up nop +key 29 base z shift Z caps Z ctrl ^Z altg 0x00AB +key 27 base x shift X caps X ctrl ^X altg 0x00BB +key 6 base c shift C caps C ctrl ^C altg 0x00A2 +key 16 base m shift M caps M ctrl '\r' altg 0x00B5 key 54 base , shift ; caps , ctrl , altg nop -key 55 base . shift : caps . ctrl . altg · +key 55 base . shift : caps . ctrl . altg 0x00B7 key 56 base - shift = caps - ctrl ^_ altg nop # # diff --git a/usr/src/cmd/loadkeys/type_6/norway b/usr/src/cmd/loadkeys/type_6/norway index 182f912305..21f93521a3 100644 --- a/usr/src/cmd/loadkeys/type_6/norway +++ b/usr/src/cmd/loadkeys/type_6/norway @@ -22,14 +22,12 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Norwegian Type 6 (USB) key layout # -key 53 base | shift § caps | ctrl | altg nop +key 53 base | shift 0x00A7 caps | ctrl | altg nop key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ -key 32 base 3 shift # caps 3 ctrl 3 altg £ -key 33 base 4 shift ¤ caps 4 ctrl 4 altg $ +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00A3 +key 33 base 4 shift 0x00A4 caps 4 ctrl 4 altg $ key 34 base 5 shift % caps 5 ctrl 5 altg ~ key 35 base 6 shift & caps 6 ctrl ^^ altg ^ key 36 base 7 shift / caps 7 ctrl 7 altg { @@ -38,10 +36,10 @@ key 38 base 9 shift ) caps 9 ctrl ^] altg ] key 39 base 0 shift = caps 0 ctrl 0 altg } key 45 base + shift ? caps + ctrl + altg nop key 46 base '\\' shift fa_grave caps '\\' ctrl ^\ altg fa_acute -key 47 base å shift Å caps Å ctrl å altg nop +key 47 base 0x00E5 shift 0x00C5 caps 0x00C5 ctrl 0x00E5 altg nop key 48 base fa_umlaut shift fa_cflex caps fa_umlaut ctrl ^^ altg fa_tilde -key 51 base ø shift Ø caps Ø ctrl ø altg nop -key 52 base æ shift Æ caps Æ ctrl æ altg nop +key 51 base 0x00F8 shift 0x00D8 caps 0x00D8 ctrl 0x00F8 altg nop +key 52 base 0x00E6 shift 0x00C6 caps 0x00C6 ctrl 0x00E6 altg nop key 50 base '\'' shift * caps '\'' ctrl '\'' altg '`' numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl < altg nop numl nonl up nop diff --git a/usr/src/cmd/loadkeys/type_6/poland b/usr/src/cmd/loadkeys/type_6/poland index 4c7c605aef..b5da164e8a 100644 --- a/usr/src/cmd/loadkeys/type_6/poland +++ b/usr/src/cmd/loadkeys/type_6/poland @@ -21,8 +21,6 @@ # # CDDL HEADER END # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Polish Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/portugal b/usr/src/cmd/loadkeys/type_6/portugal index 335ea464e5..817b821ab7 100644 --- a/usr/src/cmd/loadkeys/type_6/portugal +++ b/usr/src/cmd/loadkeys/type_6/portugal @@ -22,14 +22,12 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Portuguese Type 6 (USB) key layout # key 53 base '\\' shift | caps '\\' ctrl ^\ altg nop key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ -key 32 base 3 shift # caps 3 ctrl 3 altg £ -key 33 base 4 shift $ caps 4 ctrl 4 altg § +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00A3 +key 33 base 4 shift $ caps 4 ctrl 4 altg 0x00A7 key 34 base 5 shift % caps 5 ctrl 5 altg ~ key 35 base 6 shift & caps 6 ctrl ^^ altg ^ key 36 base 7 shift / caps 7 ctrl 7 altg { @@ -37,11 +35,11 @@ key 37 base 8 shift ( caps 8 ctrl ^[ altg [ key 38 base 9 shift ) caps 9 ctrl ^] altg ] key 39 base 0 shift = caps 0 ctrl 0 altg } key 45 base '\'' shift ? caps '\'' ctrl '\'' altg '`' -key 46 base « shift » caps « ctrl « altg nop +key 46 base 0x00AB shift 0x00BB caps 0x00AB ctrl 0x00AB altg nop key 47 base + shift * caps + ctrl + altg fa_umlaut key 48 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg nop -key 51 base ç shift Ç caps Ç ctrl ç altg nop -key 52 base º shift ª caps º ctrl º altg nop +key 51 base 0x00E7 shift 0x00C7 caps 0x00C7 ctrl 0x00E7 altg nop +key 52 base 0x00BA shift 0x00AA caps 0x00BA ctrl 0x00BA altg nop key 50 base fa_tilde shift fa_cflex caps fa_tilde ctrl ^^ altg nop numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl < altg nop numl nonl up nop diff --git a/usr/src/cmd/loadkeys/type_6/russia b/usr/src/cmd/loadkeys/type_6/russia index 15a7272e43..22803f8357 100644 --- a/usr/src/cmd/loadkeys/type_6/russia +++ b/usr/src/cmd/loadkeys/type_6/russia @@ -22,8 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Russian Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/serbiaandmontenegro b/usr/src/cmd/loadkeys/type_6/serbiaandmontenegro index 9b91b1fef0..68712e9ee5 100644 --- a/usr/src/cmd/loadkeys/type_6/serbiaandmontenegro +++ b/usr/src/cmd/loadkeys/type_6/serbiaandmontenegro @@ -21,8 +21,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Serbia-And-Montenegro Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/slovakia b/usr/src/cmd/loadkeys/type_6/slovakia index 038490b74a..429d36edff 100644 --- a/usr/src/cmd/loadkeys/type_6/slovakia +++ b/usr/src/cmd/loadkeys/type_6/slovakia @@ -20,8 +20,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Slovakia Type 6 (USB) key layout # # Note, on the console, this keyboard layout is exactly diff --git a/usr/src/cmd/loadkeys/type_6/spain b/usr/src/cmd/loadkeys/type_6/spain index 41acd98d81..b9d60e76f7 100644 --- a/usr/src/cmd/loadkeys/type_6/spain +++ b/usr/src/cmd/loadkeys/type_6/spain @@ -23,28 +23,26 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Spanish Type 6 (USB) key layout # -key 53 base º shift ª caps º ctrl ^\ altg '\\' +key 53 base 0x00BA shift 0x00AA caps 0x00BA ctrl ^\ altg '\\' key 30 base 1 shift ! caps 1 ctrl 1 altg | key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ -key 32 base 3 shift · caps 3 ctrl 3 altg # +key 32 base 3 shift 0x00B7 caps 3 ctrl 3 altg # key 33 base 4 shift $ caps 4 ctrl ^^ altg ^ key 34 base 5 shift % caps 5 ctrl 5 altg ~ -key 35 base 6 shift & caps 6 ctrl 6 altg ¬ +key 35 base 6 shift & caps 6 ctrl 6 altg 0x00AC key 36 base 7 shift / caps 7 ctrl 7 altg nop key 37 base 8 shift ( caps 8 ctrl 8 altg nop key 38 base 9 shift ) caps 9 ctrl 9 altg nop key 39 base 0 shift = caps 0 ctrl 0 altg nop key 45 base '\'' shift ? caps '\'' ctrl '\'' altg '`' -key 46 base ¡ shift ¿ caps ¡ ctrl ¡ altg nop +key 46 base 0x00A1 shift 0x00BF caps 0x00A1 ctrl 0x00A1 altg nop key 47 base fa_grave shift fa_cflex caps fa_grave ctrl ^[ altg [ key 48 base + shift * caps + ctrl ^] altg ] -key 51 base ñ shift Ñ caps Ñ ctrl ñ altg nop +key 51 base 0x00F1 shift 0x00D1 caps 0x00D1 ctrl 0x00F1 altg nop key 52 base fa_acute shift fa_umlaut caps fa_acute ctrl fa_acute altg { -key 50 base ç shift Ç caps Ç ctrl ç altg } numl nonl up nop +key 50 base 0x00E7 shift 0x00C7 caps 0x00C7 ctrl 0x00E7 altg } numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl ^^ altg nop numl nonl up nop key 54 base , shift ; caps , ctrl , altg nop diff --git a/usr/src/cmd/loadkeys/type_6/sweden b/usr/src/cmd/loadkeys/type_6/sweden index 2561cc7c2f..9b04ff05af 100644 --- a/usr/src/cmd/loadkeys/type_6/sweden +++ b/usr/src/cmd/loadkeys/type_6/sweden @@ -22,14 +22,12 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Swedish Type 6 (USB) key layout # -key 53 base § shift ½ caps § ctrl § altg nop +key 53 base 0x00A7 shift 0x00BD caps 0x00A7 ctrl 0x00A7 altg nop key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ -key 32 base 3 shift # caps 3 ctrl 3 altg £ -key 33 base 4 shift ¤ caps 4 ctrl 4 altg $ +key 32 base 3 shift # caps 3 ctrl 3 altg 0x00A3 +key 33 base 4 shift 0x00A4 caps 4 ctrl 4 altg $ key 34 base 5 shift % caps 5 ctrl 5 altg nop key 35 base 6 shift & caps 6 ctrl 6 altg nop key 36 base 7 shift / caps 7 ctrl 7 altg { @@ -38,10 +36,10 @@ key 38 base 9 shift ) caps 9 ctrl ^] altg ] key 39 base 0 shift = caps 0 ctrl 0 altg } key 45 base + shift ? caps + ctrl ^_ altg '\\' key 46 base fa_acute shift fa_grave caps fa_acute ctrl fa_acute altg nop -key 47 base å shift Å caps Å ctrl å altg nop +key 47 base 0x00E5 shift 0x00C5 caps 0x00C5 ctrl 0x00E5 altg nop key 48 base fa_umlaut shift ^ caps fa_umlaut ctrl fa_umlaut altg ~ -key 51 base ö shift Ö caps Ö ctrl ö altg nop -key 52 base ä shift Ä caps Ä ctrl ä altg nop +key 51 base 0x00F6 shift 0x00D6 caps 0x00D6 ctrl 0x00F6 altg nop +key 52 base 0x00E4 shift 0x00C4 caps 0x00C4 ctrl 0x00E4 altg nop key 50 base '\'' shift * caps '\'' ctrl '\'' altg '`' numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl ^| altg | numl nonl up nop diff --git a/usr/src/cmd/loadkeys/type_6/swiss_french b/usr/src/cmd/loadkeys/type_6/swiss_french index 0b4efa5ca6..5a5e9af0fe 100644 --- a/usr/src/cmd/loadkeys/type_6/swiss_french +++ b/usr/src/cmd/loadkeys/type_6/swiss_french @@ -22,15 +22,13 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Swiss French Type 6 (USB) key layout # -key 53 base § shift ° caps § ctrl § altg nop +key 53 base 0x00A7 shift 0x00B0 caps 0x00A7 ctrl 0x00A7 altg nop key 30 base 1 shift + caps 1 ctrl 1 altg | key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ key 32 base 3 shift * caps 3 ctrl 3 altg # -key 33 base 4 shift ç caps 4 ctrl ^^ altg ^ +key 33 base 4 shift 0x00E7 caps 4 ctrl ^^ altg ^ key 34 base 5 shift % caps 5 ctrl 5 altg ~ key 35 base 6 shift & caps 6 ctrl 6 altg nop key 36 base 7 shift / caps 7 ctrl 7 altg nop @@ -40,11 +38,11 @@ key 39 base 0 shift = caps 0 ctrl 0 altg '`' key 45 base '\'' shift ? caps '\'' ctrl '\'' altg fa_acute key 46 base fa_cflex shift fa_grave caps fa_cflex ctrl ^^ altg fa_tilde key 28 base z shift Z caps Z ctrl ^Z altg nop -key 47 base è shift ü caps È ctrl ^[ altg [ +key 47 base 0x00E8 shift 0x00FC caps 0x00C8 ctrl ^[ altg [ key 48 base fa_umlaut shift ! caps fa_umlaut ctrl ^] altg ] -key 51 base é shift ö caps É ctrl é altg nop -key 52 base à shift ä caps À ctrl à altg { -key 50 base $ shift £ caps $ ctrl $ altg } numl nonl up nop +key 51 base 0x00E9 shift 0x00F6 caps 0x00C9 ctrl 0x00E9 altg nop +key 52 base 0x00E0 shift 0x00E4 caps 0x00C0 ctrl 0x00E0 altg { +key 50 base $ shift 0x00A3 caps $ ctrl $ altg } numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl ^\ altg '\\' numl nonl up nop key 29 base y shift Y caps Y ctrl ^Y altg nop diff --git a/usr/src/cmd/loadkeys/type_6/swiss_german b/usr/src/cmd/loadkeys/type_6/swiss_german index 0131514521..bae367d68d 100644 --- a/usr/src/cmd/loadkeys/type_6/swiss_german +++ b/usr/src/cmd/loadkeys/type_6/swiss_german @@ -22,15 +22,13 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Swiss German Type 6 (USB) key layout # -key 53 base § shift ° caps § ctrl § altg nop +key 53 base 0x00A7 shift 0x00B0 caps 0x00A7 ctrl 0x00A7 altg nop key 30 base 1 shift + caps 1 ctrl 1 altg | key 31 base 2 shift '"' caps 2 ctrl ^@ altg @ key 32 base 3 shift * caps 3 ctrl 3 altg # -key 33 base 4 shift ç caps 4 ctrl ^^ altg ^ +key 33 base 4 shift 0x00E7 caps 4 ctrl ^^ altg ^ key 34 base 5 shift % caps 5 ctrl 5 altg ~ key 35 base 6 shift & caps 6 ctrl 6 altg nop key 36 base 7 shift / caps 7 ctrl 7 altg nop @@ -40,11 +38,11 @@ key 39 base 0 shift = caps 0 ctrl 0 altg '`' key 45 base '\'' shift ? caps '\'' ctrl '\'' altg fa_acute key 46 base fa_cflex shift fa_grave caps fa_cflex ctrl ^^ altg fa_tilde key 28 base z shift Z caps Z ctrl ^Z altg nop -key 47 base ü shift è caps Ü ctrl ^[ altg [ +key 47 base 0x00FC shift 0x00E8 caps 0x00DC ctrl ^[ altg [ key 48 base fa_umlaut shift ! caps fa_umlaut ctrl ^] altg ] -key 51 base ö shift é caps Ö ctrl ö altg nop -key 52 base ä shift à caps Ä ctrl ä altg { -key 50 base $ shift £ caps $ ctrl $ altg } numl nonl up nop +key 51 base 0x00F6 shift 0x00E9 caps 0x00D6 ctrl 0x00F6 altg nop +key 52 base 0x00E4 shift 0x00E0 caps 0x00C4 ctrl 0x00E4 altg { +key 50 base $ shift 0x00A3 caps $ ctrl $ altg } numl nonl up nop key 49 all hole key 100 base < shift > caps < ctrl ^\ altg '\\' numl nonl up nop key 29 base y shift Y caps Y ctrl ^Y altg nop diff --git a/usr/src/cmd/loadkeys/type_6/turkeyf b/usr/src/cmd/loadkeys/type_6/turkeyf index 56d77fffc2..d74476ea09 100644 --- a/usr/src/cmd/loadkeys/type_6/turkeyf +++ b/usr/src/cmd/loadkeys/type_6/turkeyf @@ -21,8 +21,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Turkey F Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/turkeyq b/usr/src/cmd/loadkeys/type_6/turkeyq index e794343a27..a8e337c3dd 100644 --- a/usr/src/cmd/loadkeys/type_6/turkeyq +++ b/usr/src/cmd/loadkeys/type_6/turkeyq @@ -21,8 +21,6 @@ # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Turkey F Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/loadkeys/type_6/uk b/usr/src/cmd/loadkeys/type_6/uk index 5f1ab05034..1a07302667 100644 --- a/usr/src/cmd/loadkeys/type_6/uk +++ b/usr/src/cmd/loadkeys/type_6/uk @@ -22,13 +22,11 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # UK Type 6 (USB) key layout # -key 53 base ` shift ¬ caps ` ctrl ` altg ¦ +key 53 base ` shift 0x00AC caps ` ctrl ` altg 0x00A6 key 31 base 2 shift '"' caps 2 ctrl 2 altg nop -key 32 base 3 shift £ caps 3 ctrl 3 altg nop +key 32 base 3 shift 0x00A3 caps 3 ctrl 3 altg nop key 52 base '\'' shift @ caps '\'' ctrl ^@ altg nop key 50 base # shift ~ caps # ctrl # altg nop numl nonl up nop key 49 all hole diff --git a/usr/src/cmd/loadkeys/type_6/us b/usr/src/cmd/loadkeys/type_6/us index 8d66fdadd0..4375f25e12 100644 --- a/usr/src/cmd/loadkeys/type_6/us +++ b/usr/src/cmd/loadkeys/type_6/us @@ -22,8 +22,6 @@ # # CDDL HEADER END # -# ident "%Z%%M% %I% %E% SMI" -# # US Type 6 (USB) key layout # key 49 base '\\' shift | caps '\\' ctrl ^\ altg nop diff --git a/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs b/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs index 99556bf1c7..58dcfe2a46 100644 --- a/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs +++ b/usr/src/cmd/perl/contrib/Sun/Solaris/Kstat/Kstat.xs @@ -1219,6 +1219,14 @@ read_kstats(HV *self, int refresh) return (1); } +static int +read_kstats_wrap(HV *self, void *ptr) +{ + int refresh = (intptr_t)ptr; + + return (read_kstats(self, refresh)); +} + /* * The XS code exported to perl is below here. Note that the XS preprocessor * has its own commenting syntax, so all comments from this point on are in @@ -1383,7 +1391,7 @@ PPCODE: * that have already been read */ if (ret == 0) { - if (! apply_to_ties(self, (ATTCb_t)read_kstats, (void *)TRUE)) { + if (! apply_to_ties(self, read_kstats_wrap, (void *)TRUE)) { if (GIMME_V == G_ARRAY) { EXTEND(SP, 2); PUSHs(sv_2mortal(newRV_noinc((SV *)add))); diff --git a/usr/src/cmd/sendmail/Makefile.cmd b/usr/src/cmd/sendmail/Makefile.cmd index a90a1502ac..d3378329bd 100644 --- a/usr/src/cmd/sendmail/Makefile.cmd +++ b/usr/src/cmd/sendmail/Makefile.cmd @@ -23,6 +23,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2019, Joyent, Inc. +# CPPFLAGS.sm= $(CPPFLAGS.master) -DSOLARIS=2$(RELEASE_MINOR)00 \ -D_FILE_OFFSET_BITS=64 @@ -36,6 +38,9 @@ CERRWARN += -_gcc=-Wno-unused-but-set-parameter CERRWARN += -_gcc=-Wno-unused-but-set-variable DBMDEF= -DNDBM -DNEWDB -DNIS -DUSERDB -DMAP_REGEX -DLDAPMAP +# smatch can't handle main() +SMATCH = off + ROOTLIBSMTPSM = $(ROOTLIB)/smtp/sendmail $(ROOTLIBSMTPSM): diff --git a/usr/src/cmd/sgs/libld/common/support.c b/usr/src/cmd/sgs/libld/common/support.c index e449602952..cd3a8f9ba3 100644 --- a/usr/src/cmd/sgs/libld/common/support.c +++ b/usr/src/cmd/sgs/libld/common/support.c @@ -64,7 +64,7 @@ static Support_list support[LDS_NUM] = { uintptr_t ld_sup_loadso(Ofl_desc *ofl, const char *obj) { - void *handle, (*fptr)(); + void *handle, *fptr; uint_t interface, version = LD_SUP_VERSION1; /* @@ -80,8 +80,7 @@ ld_sup_loadso(Ofl_desc *ofl, const char *obj) for (interface = 0; interface < LDS_NUM; interface++) { Func_list fl; - if ((fptr = (void (*)())dlsym(handle, - support[interface].sup_name)) == NULL) + if ((fptr = dlsym(handle, support[interface].sup_name)) == NULL) continue; DBG_CALL(Dbg_support_load(ofl->ofl_lml, obj, diff --git a/usr/src/cmd/sgs/rtld/common/external.c b/usr/src/cmd/sgs/rtld/common/external.c index c0bde0fd57..2476a6dbbc 100644 --- a/usr/src/cmd/sgs/rtld/common/external.c +++ b/usr/src/cmd/sgs/rtld/common/external.c @@ -202,7 +202,7 @@ * call during process execution. * * - _ld_libc() can also be called by libc during process execution to - * re-establish interfaces such as the locale. + * re-establish interfaces such as the locale. */ static void get_lcinterface(Rt_map *lmp, Lc_interface *funcs) @@ -475,14 +475,13 @@ rt_bind_clear(int flags) void rt_thr_init(Lm_list *lml) { - void (*fptr)(void); + int (*fptr)(void); - if ((fptr = - (void (*)())lml->lm_lcs[CI_THRINIT].lc_un.lc_func) != NULL) { + if ((fptr = lml->lm_lcs[CI_THRINIT].lc_un.lc_func) != NULL) { lml->lm_lcs[CI_THRINIT].lc_un.lc_func = NULL; leave(lml, thr_flg_reenter); - (*fptr)(); + (void) (*fptr)(); (void) enter(thr_flg_reenter); /* diff --git a/usr/src/cmd/sgs/rtld/common/tls.c b/usr/src/cmd/sgs/rtld/common/tls.c index e36c03c02d..21dc63cb65 100644 --- a/usr/src/cmd/sgs/rtld/common/tls.c +++ b/usr/src/cmd/sgs/rtld/common/tls.c @@ -120,12 +120,12 @@ tls_modaddrem(Rt_map *lmp, uint_t flag) Lm_list *lml = LIST(lmp); TLS_modinfo tmi; Phdr *tlsphdr; - void (*fptr)(TLS_modinfo *); + int (*fptr)(TLS_modinfo *); if (flag & TM_FLG_MODADD) { - fptr = (void (*)())lml->lm_lcs[CI_TLS_MODADD].lc_un.lc_func; + fptr = lml->lm_lcs[CI_TLS_MODADD].lc_un.lc_func; } else if (FLAGS1(lmp) & FL1_RT_TLSADD) { - fptr = (void (*)())lml->lm_lcs[CI_TLS_MODREM].lc_un.lc_func; + fptr = lml->lm_lcs[CI_TLS_MODREM].lc_un.lc_func; } else { return; } @@ -147,7 +147,7 @@ tls_modaddrem(Rt_map *lmp, uint_t flag) tmi.tm_stattlsoffset = 0; DBG_CALL(Dbg_tls_modactivity(LIST(lmp), &tmi, flag)); - (*fptr)(&tmi); + (void) (*fptr)(&tmi); /* * Tag that this link-map has registered its TLS, and, if this object @@ -258,9 +258,9 @@ tls_statmod(Lm_list *lml, Rt_map *lmp) uint_t tlsmodndx, tlsmodcnt = lml->lm_tls; TLS_modinfo **tlsmodlist, *tlsbuflist; Phdr *tlsphdr; - void (*fptr)(TLS_modinfo **, ulong_t); + int (*fptr)(TLS_modinfo **, ulong_t); - fptr = (void (*)())lml->lm_lcs[CI_TLS_STATMOD].lc_un.lc_func; + fptr = lml->lm_lcs[CI_TLS_STATMOD].lc_un.lc_func; /* * Allocate a buffer to report the TLS modules, the buffer consists of: @@ -285,8 +285,8 @@ tls_statmod(Lm_list *lml, Rt_map *lmp) * If we don't have any TLS modules - report that and return. */ if (tlsmodcnt == 0) { - if (fptr) - (*fptr)(tlsmodlist, tls_static_resv); + if (fptr != NULL) + (void) (*fptr)(tlsmodlist, tls_static_resv); DBG_CALL(Dbg_tls_static_block(&lml_main, 0, 0, tls_static_resv)); return (1); @@ -330,7 +330,7 @@ tls_statmod(Lm_list *lml, Rt_map *lmp) DBG_CALL(Dbg_tls_static_block(&lml_main, (void *)tlsmodlist, tls_static_size, tls_static_resv)); - (*fptr)(tlsmodlist, (tls_static_size + tls_static_resv)); + (void) (*fptr)(tlsmodlist, (tls_static_size + tls_static_resv)); /* * We're done with the list - clean it up. diff --git a/usr/src/cmd/troff/nroff.d/Makefile b/usr/src/cmd/troff/nroff.d/Makefile index 295dcfb704..4a33471ff6 100644 --- a/usr/src/cmd/troff/nroff.d/Makefile +++ b/usr/src/cmd/troff/nroff.d/Makefile @@ -22,6 +22,7 @@ # # Copyright (c) 1989 by Sun Microsystems, Inc. # +# Copyright (c) 2019, Joyent, Inc. include ../../Makefile.cmd @@ -45,6 +46,9 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-variable +# parse error: parsing (i (9223372034707292160-96) >= 65) +SMATCH = off + LDLIBS += -lmapmalloc # # message catalog diff --git a/usr/src/cmd/troff/troff.d/Makefile b/usr/src/cmd/troff/troff.d/Makefile index e94bea647d..dfe5b8fee7 100644 --- a/usr/src/cmd/troff/troff.d/Makefile +++ b/usr/src/cmd/troff/troff.d/Makefile @@ -24,6 +24,7 @@ # # cmd/troff/troff.d/Makefile # +# Copyright (c) 2019, Joyent, Inc. include ../../Makefile.cmd @@ -50,6 +51,9 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-extra +# "parse error: parsing (i (9223372034707292160-96) >= 65)" +SMATCH = off + # # For message catalog # |
