diff options
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/Makefile | 4 | ||||
-rw-r--r-- | usr/src/lib/libinetutil/Makefile | 12 | ||||
-rw-r--r-- | usr/src/lib/libinetutil/Makefile.com | 7 | ||||
-rw-r--r-- | usr/src/lib/libinetutil/common/llib-linetutil | 1 | ||||
-rw-r--r-- | usr/src/lib/libinetutil/common/mapfile-vers | 10 | ||||
-rw-r--r-- | usr/src/lib/libofmt/Makefile | 52 | ||||
-rw-r--r-- | usr/src/lib/libofmt/Makefile.com | 37 | ||||
-rw-r--r-- | usr/src/lib/libofmt/amd64/Makefile | 19 | ||||
-rw-r--r-- | usr/src/lib/libofmt/common/llib-lofmt | 19 | ||||
-rw-r--r-- | usr/src/lib/libofmt/common/mapfile-vers | 42 | ||||
-rw-r--r-- | usr/src/lib/libofmt/common/ofmt.c (renamed from usr/src/lib/libinetutil/common/ofmt.c) | 19 | ||||
-rw-r--r-- | usr/src/lib/libofmt/common/ofmt.h (renamed from usr/src/lib/libinetutil/common/ofmt.h) | 0 | ||||
-rw-r--r-- | usr/src/lib/libofmt/i386/Makefile | 18 | ||||
-rw-r--r-- | usr/src/lib/libofmt/sparc/Makefile | 18 | ||||
-rw-r--r-- | usr/src/lib/libofmt/sparcv9/Makefile | 19 |
15 files changed, 245 insertions, 32 deletions
diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index 05de71f42d..36367793ac 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -168,6 +168,7 @@ SUBDIRS += \ libnls \ libnsctl \ libnwam \ + libofmt \ libpam \ libpcidb \ libpctx \ @@ -316,7 +317,6 @@ MSGSUBDIRS= \ libgss \ libidmap \ libilb \ - libinetutil \ libinstzones \ libipadm \ libipmp \ @@ -324,6 +324,7 @@ MSGSUBDIRS= \ libldap5 \ libnsl \ libnwam \ + libofmt \ libpam \ libpicl \ libpkg \ @@ -427,6 +428,7 @@ HDRSUBDIRS= \ libnsl \ libnvpair \ libnwam \ + libofmt \ libpam \ libpcidb \ libpctx \ diff --git a/usr/src/lib/libinetutil/Makefile b/usr/src/lib/libinetutil/Makefile index 0bc13a5c87..1d1ed69ccd 100644 --- a/usr/src/lib/libinetutil/Makefile +++ b/usr/src/lib/libinetutil/Makefile @@ -26,15 +26,11 @@ include ../Makefile.lib -HDRS = libinetutil.h ofmt.h +HDRS = libinetutil.h HDRDIR = common SUBDIRS = $(MACH) $(BUILD64)SUBDIRS += $(MACH64) -POFILE = libinetutil.po -MSGFILES = common/ofmt.c -XGETFLAGS = -a - all := TARGET = all clean := TARGET = clean clobber := TARGET = clobber @@ -49,15 +45,9 @@ install_h: $(ROOTHDRS) check: $(CHECKHDRS) -$(POFILE): $(MSGFILES) - $(BUILDPO.msgfiles) - -_msg: $(MSGDOMAINPOFILE) - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) FRC: -include $(SRC)/Makefile.msg.targ include ../Makefile.targ diff --git a/usr/src/lib/libinetutil/Makefile.com b/usr/src/lib/libinetutil/Makefile.com index e866d1c434..d22ab84726 100644 --- a/usr/src/lib/libinetutil/Makefile.com +++ b/usr/src/lib/libinetutil/Makefile.com @@ -25,8 +25,7 @@ LIBRARY = libinetutil.a VERS = .1 -OBJECTS = octet.o inetutil.o ifspec.o ifaddrlist.o ifaddrlistx.o eh.o tq.o \ - ofmt.o +OBJECTS = octet.o inetutil.o ifspec.o ifaddrlist.o ifaddrlistx.o eh.o tq.o include ../../Makefile.lib @@ -39,8 +38,7 @@ SRCDIR = ../common COMDIR = $(SRC)/common/net/dhcp SRCS = $(COMDIR)/octet.c $(SRCDIR)/inetutil.c \ $(SRCDIR)/ifspec.c $(SRCDIR)/eh.c $(SRCDIR)/tq.c \ - $(SRCDIR)/ifaddrlist.c $(SRCDIR)/ifaddrlistx.c \ - $(SRCDIR)/ofmt.c + $(SRCDIR)/ifaddrlist.c $(SRCDIR)/ifaddrlistx.c $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC) LDLIBS += -lsocket -lc @@ -48,7 +46,6 @@ LDLIBS += -lsocket -lc CFLAGS += $(CCVERBOSE) CPPFLAGS += -I$(SRCDIR) -CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses .KEEP_STATE: diff --git a/usr/src/lib/libinetutil/common/llib-linetutil b/usr/src/lib/libinetutil/common/llib-linetutil index 9dd868fa9f..03504ac752 100644 --- a/usr/src/lib/libinetutil/common/llib-linetutil +++ b/usr/src/lib/libinetutil/common/llib-linetutil @@ -27,4 +27,3 @@ /* PROTOLIB1 */ #include <libinetutil.h> -#include <ofmt.h> diff --git a/usr/src/lib/libinetutil/common/mapfile-vers b/usr/src/lib/libinetutil/common/mapfile-vers index f47657c56e..a26d988990 100644 --- a/usr/src/lib/libinetutil/common/mapfile-vers +++ b/usr/src/lib/libinetutil/common/mapfile-vers @@ -63,11 +63,11 @@ SYMBOL_VERSION SUNWprivate_1.1 { iu_tq_destroy; iu_unregister_event; octet_to_hexascii; - ofmt_open; - ofmt_close; - ofmt_print; - ofmt_update_winsize; - ofmt_strerror; + ofmt_open { TYPE = FUNCTION; FILTER = libofmt.so.1 }; + ofmt_close { TYPE = FUNCTION; FILTER = libofmt.so.1 }; + ofmt_print { TYPE = FUNCTION; FILTER = libofmt.so.1 }; + ofmt_update_winsize { TYPE = FUNCTION; FILTER = libofmt.so.1 }; + ofmt_strerror { TYPE = FUNCTION; FILTER = libofmt.so.1 }; mask2plen; plen2mask; sockaddrcmp; diff --git a/usr/src/lib/libofmt/Makefile b/usr/src/lib/libofmt/Makefile new file mode 100644 index 0000000000..21bb7cdea8 --- /dev/null +++ b/usr/src/lib/libofmt/Makefile @@ -0,0 +1,52 @@ +# +# 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 2017 Nexenta Systems, Inc. +# + +include $(SRC)/lib/Makefile.lib + +SUBDIRS= $(MACH) $(BUILD64) $(MACH64) + +HDRS= ofmt.h +HDRDIR= common + +POFILE= libofmt.po +MSGFILES= common/ofmt.c +XGETFLAGS= -a + +all := TARGET= all +clean := TARGET= clean +clobber := TARGET= clobber +install := TARGET= install +lint := TARGET= lint + +.KEEP_STATE: + +all clean clobber install lint: $(SUBDIRS) + +install_h: $(ROOTHDRS) + +check: $(CHECKHDRS) + +$(POFILE): $(MSGFILES) + $(BUILDPO.msgfiles) + +_msg: $(MSGDOMAINPOFILE) + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: + +include $(SRC)/Makefile.msg.targ +include $(SRC)/lib/Makefile.targ diff --git a/usr/src/lib/libofmt/Makefile.com b/usr/src/lib/libofmt/Makefile.com new file mode 100644 index 0000000000..1d27b92411 --- /dev/null +++ b/usr/src/lib/libofmt/Makefile.com @@ -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 2017 Nexenta Systems, Inc. +# + +LIBRARY= libofmt.a +VERS= .1 + +OBJECTS= ofmt.o + +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.rootfs + +SRCDIR= ../common + +LIBS= $(DYNLIB) $(LINTLIB) +SRCS= $(SRCDIR)/ofmt.c + +LDLIBS += -lc + +.KEEP_STATE: + +all: $(LIBS) + +lint: lintcheck + +include $(SRC)/lib/Makefile.targ diff --git a/usr/src/lib/libofmt/amd64/Makefile b/usr/src/lib/libofmt/amd64/Makefile new file mode 100644 index 0000000000..ea4e1ac4f2 --- /dev/null +++ b/usr/src/lib/libofmt/amd64/Makefile @@ -0,0 +1,19 @@ +# +# 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 2017 Nexenta Systems, Inc. +# + +include ../Makefile.com +include $(SRC)/lib/Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libofmt/common/llib-lofmt b/usr/src/lib/libofmt/common/llib-lofmt new file mode 100644 index 0000000000..3abbb9f946 --- /dev/null +++ b/usr/src/lib/libofmt/common/llib-lofmt @@ -0,0 +1,19 @@ +/* + * 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 2017 Nexenta Systems, Inc. + */ + +/* LINTLIBRARY */ +/* PROTOLIB1 */ + +#include <ofmt.h> diff --git a/usr/src/lib/libofmt/common/mapfile-vers b/usr/src/lib/libofmt/common/mapfile-vers new file mode 100644 index 0000000000..b2a87b3ecc --- /dev/null +++ b/usr/src/lib/libofmt/common/mapfile-vers @@ -0,0 +1,42 @@ +# +# 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 2017 Nexenta Systems, Inc. +# + +# +# MAPFILE HEADER START +# +# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. +# Object versioning must comply with the rules detailed in +# +# usr/src/lib/README.mapfiles +# +# You should not be making modifications here until you've read the most current +# copy of that file. If you need help, contact a gatekeeper for guidance. +# +# MAPFILE HEADER END +# + +$mapfile_version 2 + +SYMBOL_VERSION ILLUMOSprivate { + global: + ofmt_close; + ofmt_open; + ofmt_print; + ofmt_strerror; + ofmt_update_winsize; + + local: + *; +}; diff --git a/usr/src/lib/libinetutil/common/ofmt.c b/usr/src/lib/libofmt/common/ofmt.c index 63d744cdc9..bab3da7311 100644 --- a/usr/src/lib/libinetutil/common/ofmt.c +++ b/usr/src/lib/libofmt/common/ofmt.c @@ -182,9 +182,9 @@ ofmt_open(const char *str, const ofmt_field_t *template, uint_t flags, uint_t i, j, of_index; const ofmt_field_t *ofp; ofmt_field_t *of; - ofmt_state_t *os; + ofmt_state_t *os = NULL; int nfields = 0; - ofmt_status_t err = OFMT_SUCCESS; + ofmt_status_t error = OFMT_SUCCESS; boolean_t parsable = (flags & OFMT_PARSABLE); boolean_t wrap = (flags & OFMT_WRAP); boolean_t multiline = (flags & OFMT_MULTILINE); @@ -247,7 +247,7 @@ ofmt_open(const char *str, const ofmt_field_t *template, uint_t flags, if (j == nfields) { int nbad = os->os_nbad++; - err = OFMT_EBADFIELDS; + error = OFMT_EBADFIELDS; if (os->os_badfields == NULL) { os->os_badfields = malloc(sp->s_nfields * sizeof (char *)); @@ -277,14 +277,14 @@ ofmt_open(const char *str, const ofmt_field_t *template, uint_t flags, return (OFMT_ENOFIELDS); os->os_nfields = of_index; /* actual number of fields printed */ ofmt_update_winsize(*ofmt); - return (err); + return (error); nomem: - err = OFMT_ENOMEM; + error = OFMT_ENOMEM; if (os != NULL) ofmt_close(os); *ofmt = NULL; splitfree(sp); - return (err); + return (error); } /* @@ -537,7 +537,8 @@ ofmt_update_winsize(ofmt_handle_t ofmt) * Return error diagnostics using the information in the ofmt_handle_t */ char * -ofmt_strerror(ofmt_handle_t ofmt, ofmt_status_t err, char *buf, uint_t bufsize) +ofmt_strerror(ofmt_handle_t ofmt, ofmt_status_t error, char *buf, + uint_t bufsize) { ofmt_state_t *os = ofmt; int i; @@ -551,7 +552,7 @@ ofmt_strerror(ofmt_handle_t ofmt, ofmt_status_t err, char *buf, uint_t bufsize) */ ebuf[0] = '\0'; - switch (err) { + switch (error) { case OFMT_SUCCESS: s = "success"; break; @@ -604,7 +605,7 @@ ofmt_strerror(ofmt_handle_t ofmt, ofmt_status_t err, char *buf, uint_t bufsize) default: (void) snprintf(buf, bufsize, dgettext(TEXT_DOMAIN, "unknown ofmt error (%d)"), - err); + error); return (buf); } (void) snprintf(buf, bufsize, dgettext(TEXT_DOMAIN, s)); diff --git a/usr/src/lib/libinetutil/common/ofmt.h b/usr/src/lib/libofmt/common/ofmt.h index e69d43e20a..e69d43e20a 100644 --- a/usr/src/lib/libinetutil/common/ofmt.h +++ b/usr/src/lib/libofmt/common/ofmt.h diff --git a/usr/src/lib/libofmt/i386/Makefile b/usr/src/lib/libofmt/i386/Makefile new file mode 100644 index 0000000000..d00779a2ee --- /dev/null +++ b/usr/src/lib/libofmt/i386/Makefile @@ -0,0 +1,18 @@ +# +# 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 2017 Nexenta Systems, Inc. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libofmt/sparc/Makefile b/usr/src/lib/libofmt/sparc/Makefile new file mode 100644 index 0000000000..d00779a2ee --- /dev/null +++ b/usr/src/lib/libofmt/sparc/Makefile @@ -0,0 +1,18 @@ +# +# 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 2017 Nexenta Systems, Inc. +# + +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libofmt/sparcv9/Makefile b/usr/src/lib/libofmt/sparcv9/Makefile new file mode 100644 index 0000000000..ea4e1ac4f2 --- /dev/null +++ b/usr/src/lib/libofmt/sparcv9/Makefile @@ -0,0 +1,19 @@ +# +# 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 2017 Nexenta Systems, Inc. +# + +include ../Makefile.com +include $(SRC)/lib/Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) |