Mercurial > unleashed > prev-conversion
changeset 18791:98b3bf6c38de
8888 loader: rename STAND to _STANDALONE
author | Toomas Soome <tsoome@me.com> |
---|---|
date | Sun, 15 Jul 2018 22:19:46 +0300 |
parents | 6ba318060715 |
children | 2b2d7cd7561b |
files | usr/src/boot/sys/boot/efi/libefi/Makefile usr/src/boot/sys/boot/efi/loader/Makefile usr/src/boot/sys/boot/ficl/Makefile.inc usr/src/boot/sys/boot/i386/libi386/Makefile usr/src/boot/sys/boot/i386/loader/Makefile usr/src/boot/sys/boot/libstand/Makefile.com usr/src/boot/sys/sys/errno.h usr/src/common/ficl/ficl.h usr/src/common/ficl/ficlplatform/unix.c usr/src/common/ficl/loader.c |
diffstat | 10 files changed, 39 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/boot/sys/boot/efi/libefi/Makefile Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/boot/sys/boot/efi/libefi/Makefile Sun Jul 15 22:19:46 2018 +0300 @@ -35,7 +35,7 @@ OBJS= $(SRCS:%.c=%.o) -CPPFLAGS= -DTERM_EMU -DSTAND +CPPFLAGS= -DTERM_EMU -D_STANDALONE CFLAGS = -O2 #.if ${MACHINE_CPUARCH} == "aarch64"
--- a/usr/src/boot/sys/boot/efi/loader/Makefile Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/boot/sys/boot/efi/loader/Makefile Sun Jul 15 22:19:46 2018 +0300 @@ -62,7 +62,7 @@ LIBSTAND= ../../libstand/${MACHINE}/libstand.a BOOT_FORTH= yes -CPPFLAGS += -DBOOT_FORTH -DSTAND +CPPFLAGS += -DBOOT_FORTH -D_STANDALONE CPPFLAGS += -I$(SRC)/common/ficl CPPFLAGS += -I../../ficl LIBFICL= ../../ficl/${MACHINE}/libficl.a
--- a/usr/src/boot/sys/boot/ficl/Makefile.inc Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/boot/sys/boot/ficl/Makefile.inc Sun Jul 15 22:19:46 2018 +0300 @@ -20,7 +20,8 @@ all: lib -CPPFLAGS= -DSTAND -I. -I.. -I../../../../include -I../../../../lib/libstand +CPPFLAGS= -D_STANDALONE -I. -I.. -I../../../../include +CPPFLAGS += -I../../../../lib/libstand CPPFLAGS += -I../../.. -I$(FICLDIR) -I../../common CFLAGS= -O2 -Wall -nostdinc
--- a/usr/src/boot/sys/boot/i386/libi386/Makefile Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/boot/sys/boot/i386/libi386/Makefile Sun Jul 15 22:19:46 2018 +0300 @@ -17,8 +17,7 @@ include $(SRC)/Makefile.master CFLAGS= -O2 -I../../../../include -I../../.. -CFLAGS += -DLOADER_ZFS_SUPPORT -CPPFLAGS= -DSTAND +CPPFLAGS= -D_STANDALONE -DLOADER_ZFS_SUPPORT all: libi386.a
--- a/usr/src/boot/sys/boot/i386/loader/Makefile Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/boot/sys/boot/i386/loader/Makefile Sun Jul 15 22:19:46 2018 +0300 @@ -18,7 +18,7 @@ include $(SRC)/boot/Makefile.version CFLAGS= -O2 -CPPFLAGS= -DSTAND -nostdinc -I../../../../include -I../../.. +CPPFLAGS= -D_STANDALONE -nostdinc -I../../../../include -I../../.. CPPFLAGS += -I$(SRCTOP)/arch/x86/include/sys/acpi LOADER= zfsloader NEWVERSWHAT= "ZFS enabled bootstrap loader" x86
--- a/usr/src/boot/sys/boot/libstand/Makefile.com Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/boot/sys/boot/libstand/Makefile.com Sun Jul 15 22:19:46 2018 +0300 @@ -29,6 +29,7 @@ CPPFLAGS = -nostdinc -I../../../../include -I${LIBSTAND_SRC} -I../../.. CPPFLAGS += -I../../../sys -I. -I$(SRC)/common/bzip2 +CPPFLAGS += -D_STANDALONE CFLAGS = -O2 -ffreestanding -Wformat CFLAGS += -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
--- a/usr/src/boot/sys/sys/errno.h Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/boot/sys/sys/errno.h Sun Jul 15 22:19:46 2018 +0300 @@ -38,7 +38,7 @@ #ifndef _SYS_ERRNO_H_ #define _SYS_ERRNO_H_ -#ifndef _KERNEL +#if !defined(_KERNEL) && !defined(_STANDALONE) #include <sys/cdefs.h> __BEGIN_DECLS int * __error(void);
--- a/usr/src/common/ficl/ficl.h Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/common/ficl/ficl.h Sun Jul 15 22:19:46 2018 +0300 @@ -140,7 +140,7 @@ extern "C" { #endif -#ifdef STAND +#ifdef _STANDALONE #include <stand.h> #include <sys/stdint.h> #include <sys/linker_set.h> @@ -1794,13 +1794,13 @@ #endif /* Support for linker set inclusions. */ -#ifdef STAND +#ifdef _STANDALONE typedef void ficlCompileFcn(ficlSystem *); #define FICL_COMPILE_SET(func) \ DATA_SET(Xficl_compile_set, func) SET_DECLARE(Xficl_compile_set, ficlCompileFcn); -#endif /* STAND */ +#endif /* _STANDALONE */ #ifdef __cplusplus }
--- a/usr/src/common/ficl/ficlplatform/unix.c Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/common/ficl/ficlplatform/unix.c Sun Jul 15 22:19:46 2018 +0300 @@ -39,7 +39,7 @@ FICL_IGNORE(callback); if (message != NULL) { -#ifdef STAND +#ifdef _STANDALONE while (*message != 0) putchar((unsigned char)*(message++)); #else
--- a/usr/src/common/ficl/loader.c Sun May 28 09:58:45 2017 +0300 +++ b/usr/src/common/ficl/loader.c Sun Jul 15 22:19:46 2018 +0300 @@ -31,7 +31,7 @@ * Additional FICL words designed for FreeBSD's loader */ -#ifndef STAND +#ifndef _STANDALONE #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> @@ -48,7 +48,7 @@ #endif #include "bootstrap.h" #endif -#ifdef STAND +#ifdef _STANDALONE #include <uuid.h> #else #include <uuid/uuid.h> @@ -186,7 +186,7 @@ void ficlCopyin(ficlVm *pVM) { -#ifdef STAND +#ifdef _STANDALONE void* src; vm_offset_t dest; size_t len; @@ -194,7 +194,7 @@ FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 3, 0); -#ifdef STAND +#ifdef _STANDALONE len = ficlStackPopInteger(ficlVmGetDataStack(pVM)); dest = ficlStackPopInteger(ficlVmGetDataStack(pVM)); src = ficlStackPopPointer(ficlVmGetDataStack(pVM)); @@ -209,7 +209,7 @@ void ficlCopyout(ficlVm *pVM) { -#ifdef STAND +#ifdef _STANDALONE void* dest; vm_offset_t src; size_t len; @@ -217,7 +217,7 @@ FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 3, 0); -#ifdef STAND +#ifdef _STANDALONE len = ficlStackPopInteger(ficlVmGetDataStack(pVM)); dest = ficlStackPopPointer(ficlVmGetDataStack(pVM)); src = ficlStackPopInteger(ficlVmGetDataStack(pVM)); @@ -232,7 +232,7 @@ void ficlFindfile(ficlVm *pVM) { -#ifdef STAND +#ifdef _STANDALONE char *name, *type; char *namep, *typep; int names, types; @@ -241,7 +241,7 @@ FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 4, 1); -#ifdef STAND +#ifdef _STANDALONE types = ficlStackPopInteger(ficlVmGetDataStack(pVM)); typep = (char *)ficlStackPopPointer(ficlVmGetDataStack(pVM)); names = ficlStackPopInteger(ficlVmGetDataStack(pVM)); @@ -300,7 +300,7 @@ char *uuid_ptr; int uuid_size; uuid_t *u; -#ifdef STAND +#ifdef _STANDALONE uint32_t status; #else int status; @@ -318,7 +318,7 @@ uuid[uuid_size] = '\0'; u = ficlMalloc(sizeof (*u)); -#ifdef STAND +#ifdef _STANDALONE uuid_from_string(uuid, u, &status); ficlFree(uuid); if (status != uuid_s_ok) { @@ -341,14 +341,14 @@ { char *uuid; uuid_t *u; -#ifdef STAND +#ifdef _STANDALONE uint32_t status; #endif FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 1, 0); u = ficlStackPopPointer(ficlVmGetDataStack(pVM)); -#ifdef STAND +#ifdef _STANDALONE uuid_to_string(u, &uuid, &status); if (status == uuid_s_ok) { ficlStackPushPointer(ficlVmGetDataStack(pVM), uuid); @@ -476,7 +476,7 @@ { int mode, fd, count; char *ptr, *name; -#ifndef STAND +#ifndef _STANDALONE char *tmp; #endif @@ -495,7 +495,7 @@ name = (char *)malloc(count+1); bcopy(ptr, name, count); name[count] = 0; -#ifndef STAND +#ifndef _STANDALONE tmp = get_dev(name); free(name); name = tmp; @@ -552,7 +552,7 @@ */ static void pfopendir(ficlVm *pVM) { -#ifndef STAND +#ifndef _STANDALONE DIR *dir; char *tmp; #else @@ -576,7 +576,7 @@ name = (char *)malloc(count+1); bcopy(ptr, name, count); name[count] = 0; -#ifndef STAND +#ifndef _STANDALONE tmp = get_dev(name); free(name); name = tmp; @@ -602,7 +602,7 @@ ficlStackPushInteger(ficlVmGetDataStack(pVM), flag); return; #endif -#ifndef STAND +#ifndef _STANDALONE dir = opendir(name); if (dir == NULL) { ficlStackPushInteger(ficlVmGetDataStack(pVM), flag); @@ -622,7 +622,7 @@ static void pfreaddir(ficlVm *pVM) { -#ifndef STAND +#ifndef _STANDALONE static DIR *dir = NULL; #else int fd; @@ -634,7 +634,7 @@ * libstand readdir does not always return . nor .. so filter * them out to have consistent behaviour. */ -#ifndef STAND +#ifndef _STANDALONE dir = ficlStackPopPointer(ficlVmGetDataStack(pVM)); if (dir != NULL) do { @@ -675,7 +675,7 @@ static void pfclosedir(ficlVm *pVM) { -#ifndef STAND +#ifndef _STANDALONE DIR *dir; #else int fd; @@ -683,7 +683,7 @@ FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 1, 0); -#ifndef STAND +#ifndef _STANDALONE dir = ficlStackPopPointer(ficlVmGetDataStack(pVM)); /* get dir */ if (dir != NULL) closedir(dir); @@ -771,7 +771,7 @@ static void keyQuestion(ficlVm *pVM) { -#ifndef STAND +#ifndef _STANDALONE char ch = -1; struct termios oldt; struct termios newt; @@ -779,7 +779,7 @@ FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 0, 1); -#ifndef STAND +#ifndef _STANDALONE tcgetattr(STDIN_FILENO, &oldt); newt = oldt; newt.c_lflag &= ~(ICANON | ECHO); @@ -828,7 +828,7 @@ { FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 1, 0); -#ifndef STAND +#ifndef _STANDALONE usleep(ficlStackPopUnsigned(ficlVmGetDataStack(pVM)) * 1000); #else delay(ficlStackPopUnsigned(ficlVmGetDataStack(pVM)) * 1000); @@ -853,7 +853,7 @@ } -#ifdef STAND +#ifdef _STANDALONE #ifdef __i386__ /* @@ -907,7 +907,7 @@ { ficlDictionary *dp = ficlSystemGetDictionary(pSys); ficlDictionary *env = ficlSystemGetEnvironment(pSys); -#ifdef STAND +#ifdef _STANDALONE ficlCompileFcn **fnpp; #endif @@ -953,7 +953,7 @@ FICL_WORD_DEFAULT); ficlDictionarySetPrimitive(dp, "uuid-to-string", ficlUuidToString, FICL_WORD_DEFAULT); -#ifdef STAND +#ifdef _STANDALONE #ifdef __i386__ ficlDictionarySetPrimitive(dp, "outb", ficlOutb, FICL_WORD_DEFAULT); ficlDictionarySetPrimitive(dp, "inb", ficlInb, FICL_WORD_DEFAULT);