diff options
| author | Dan McDonald <danmcd@joyent.com> | 2021-03-16 10:56:28 -0400 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2021-03-16 10:56:39 -0400 |
| commit | 1d684b54ff06842338ae5e57f8873ec9b9d24df3 (patch) | |
| tree | a54993b0c3f763422b5b90371f8e870ec61eedfa /usr/src/boot | |
| parent | 1bdd4b7b527e6552b00be56972027c83b8a68c05 (diff) | |
| parent | 974fceab66899bd599db3037669647d0e261838d (diff) | |
| download | illumos-joyent-1d684b54ff06842338ae5e57f8873ec9b9d24df3.tar.gz | |
[illumos-gate merge]
commit 974fceab66899bd599db3037669647d0e261838d
13618 mdb: cast between incompatible function types
commit 24537d3ef87e4452da693fc3143ef18a1a0f3cac
13617 mdb: variable may be used uninitialized
commit 258f91c6020f3614878f3dcd49df02d9e004de2c
13527 csh: multiply-defined symbols
commit ffe7853a48540d186f99d86ee9801b5f00135d9c
13549 vi: multiply-defined symbols
commit a522dae157f0619c63fd51d4b80abc2ded60ec51
13590 sol_uverbs: implicit conversion from 'ibt_cep_state_t' to 'enum ib_qp_state'
commit 1769817e9676d2db341d2b6828c199f0eabac823
13620 _lib_version should not be present in mapfile-vers
commit 915894ef19890baaed00080f85f6b69e225cda98
13508 door_layout() should align the stack to 16 bytes for i386 processes
commit b8ccc4133d4adaea81b30537c9a156ae726b2146
13519 pkcs11_tpm: symbol 'hPrivateLeafKey' is multiply-defined
commit 20af54a8dfd25497aa77acb3ad11cf1e91b122e9
13528 bnu: multiply-defined symbols
commit 144488712135c03d546fb15b718e6a21f4f6d4cf
13550 gprof: multiply-defined symbols
commit 28ab0ca48b3e331cbbb231b1c8325f9f24f9af95
13551 error: multiply-defined symbols
commit 830ec39e9a3d673fcf5865875006ab471d56b85b
13553 iasl: multiply-defined symbols
commit 92163adad0f33b8ee626f71225670465b4718da2
13532 ftp: multiply-defined symbols
commit 835b861bfa01968a312484d1d7bd1798865ea383
13608 tem: use dynamic array for tab stops
commit ba2848d4cb17292e88f04f6a47e0b3305f17efa7
13607 loader: tem should use dynamic array for tab stops
commit a11d78d661ddb4b26a53fad39aba982d2bb5a63b
13531 format: multiply-defined symbols
commit e0dfa398a76c38cdf3380b38117ee2d1ed3249f0
13525 backup: multiply-defined symbols
commit 3a4671b6f0da381fd0891bf9fe1fcb82176d9897
13524 cdrw: multiply-defined symbols
commit 9c508120caba0f594e67ae6e1f0ca8a7e3a274e5
13521 libnisdb: symbol 'ldapConfig' is multiply-defined
commit 518a3de174fca27c87a655a6dab31dc0d75a66a9
13517 libeti: multiply-defined symbols
commit 288166677c0b62978c976160131a2cc1cf4176b4
13614 user-level thread swtch panic
commit 431a74760e42d5af1054ef3d5de0e389ea277476
13580 cpcgen frees bad buffer
commit c45618a5778581b6ec976bf7c034fd7afaa757d7
13581 geniconvtbl gets really confused about freeing cpp options
commit b8767451d156f585534afac0bf22721810d0dc63
13588 want a tools geniconvtbl
commit 63be7eb52ac2a58b3a00a7c7dff8d701df814cc0
12302 ksh dumps core while parsing functions
Conflicts:
usr/src/tools/Makefile
Diffstat (limited to 'usr/src/boot')
| -rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
| -rw-r--r-- | usr/src/boot/sys/boot/common/tem.c | 18 | ||||
| -rw-r--r-- | usr/src/boot/sys/sys/tem_impl.h | 6 |
3 files changed, 16 insertions, 10 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index fc79093fee..32d625d23a 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -34,4 +34,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2021.02.13.1 +BOOT_VERSION = $(LOADER_VERSION)-2021.03.07.1 diff --git a/usr/src/boot/sys/boot/common/tem.c b/usr/src/boot/sys/boot/common/tem.c index ebb3ae48f8..0ceb83c72a 100644 --- a/usr/src/boot/sys/boot/common/tem.c +++ b/usr/src/boot/sys/boot/common/tem.c @@ -214,6 +214,11 @@ tem_internal_init(struct tem_vt_state *ptem, if (ptem->tvs_outbuf == NULL) panic("out of memory in tem_internal_init()\n"); + ptem->tvs_maxtab = width / 8; + ptem->tvs_tabs = calloc(ptem->tvs_maxtab, sizeof (*ptem->tvs_tabs)); + if (ptem->tvs_tabs == NULL) + panic("out of memory in tem_internal_init()\n"); + tem_reset_display(ptem, clear_screen, init_color); ptem->tvs_utf8_left = 0; @@ -294,6 +299,9 @@ tem_free_buf(struct tem_vt_state *tem) free(tem->tvs_screen_buf); tem->tvs_screen_buf = NULL; + + free(tem->tvs_tabs); + tem->tvs_tabs = NULL; } static int @@ -2399,7 +2407,7 @@ tem_back_tab(struct tem_vt_state *tem) static void tem_tab(struct tem_vt_state *tem) { - int i; + size_t i; screen_pos_t tabstop; tabstop = tems.ts_c_dimension.width - 1; @@ -2417,10 +2425,9 @@ tem_tab(struct tem_vt_state *tem) static void tem_set_tab(struct tem_vt_state *tem) { - int i; - int j; + size_t i, j; - if (tem->tvs_ntabs == TEM_MAXTAB) + if (tem->tvs_ntabs == tem->tvs_maxtab) return; if (tem->tvs_ntabs == 0 || tem->tvs_tabs[tem->tvs_ntabs] < tem->tvs_c_cursor.col) { @@ -2443,8 +2450,7 @@ tem_set_tab(struct tem_vt_state *tem) static void tem_clear_tabs(struct tem_vt_state *tem, int action) { - int i; - int j; + size_t i, j; switch (action) { case 3: /* clear all tabs */ diff --git a/usr/src/boot/sys/sys/tem_impl.h b/usr/src/boot/sys/sys/tem_impl.h index 6764475695..2afcb5df0a 100644 --- a/usr/src/boot/sys/sys/tem_impl.h +++ b/usr/src/boot/sys/sys/tem_impl.h @@ -66,7 +66,6 @@ typedef uint32_t tem_char_t; /* 32bit char to support UTF-8 */ #define TEM_ATTR_ISSET(c, a) ((TEM_CHAR_ATTR(c) & (a)) == (a)) #define TEM_MAXPARAMS 5 /* maximum number of ANSI paramters */ -#define TEM_MAXTAB 40 /* maximum number of tab stops */ #define TEM_MAXFKEY 30 /* max length of function key with <ESC>Q */ #define MAX_TEM 2 /* max number of loadable terminal emulators */ @@ -172,8 +171,9 @@ struct tem_vt_state { int tvs_curparam; /* current param # of output esc seq */ int tvs_paramval; /* value of current param */ int tvs_params[TEM_MAXPARAMS]; /* parameters of output esc seq */ - screen_pos_t tvs_tabs[TEM_MAXTAB]; /* tab stops */ - int tvs_ntabs; /* number of tabs used */ + screen_pos_t *tvs_tabs; /* tab stops */ + size_t tvs_maxtab; /* maximum number of tab stops */ + size_t tvs_ntabs; /* number of tabs used */ int tvs_nscroll; /* number of lines to scroll */ struct tem_char_pos tvs_s_cursor; /* start cursor position */ |
