message
stringlengths
6
474
diff
stringlengths
8
5.22k
toml: Fixed some implicit conversions
@@ -262,7 +262,7 @@ static char * readString (char terminatorChar, bool isMultiline, Driver * driver while (terminatorCount < terminatorMax) { - char c = input (); + char c = (char) input (); if (c == terminatorChar) { if (terminatorChar == BASIC_TERMINATOR || terminatorChar == LITERAL_TERMINATOR) @@ -463,7 +463,7 @@ static void readNonAsciiChar (Buffer * buffer, Driver * driver) if (utfLen > 0) { - bufferAddChar (buffer, c, driver); + bufferAddChar (buffer, (char) c, driver); for (int i = 1; i < utfLen; i++) { c = (unsigned char) input (); @@ -473,7 +473,7 @@ static void readNonAsciiChar (Buffer * buffer, Driver * driver) } else { - bufferAddChar (buffer, c, driver); + bufferAddChar (buffer, (char) c, driver); } } }
Don't DeleteLocalRef prematurely.
@@ -419,9 +419,6 @@ JNIEXPORT jstring JNICALL Java_ai_catboost_CatBoostJNIImpl_catBoostModelPredict_ const auto row = (jfloatArray)jenv->GetObjectArrayElement( jnumericFeaturesMatrix, i); CB_ENSURE(jenv->IsSameObject(row, NULL) == JNI_FALSE, "got null row"); - Y_SCOPE_EXIT(jenv, row) { - jenv->DeleteLocalRef(row); - }; const size_t rowSize = jenv->GetArrayLength(row); CB_ENSURE( numericFeatureCount <= rowSize,
Delete duplication of standard io in node loader.
* */ -#if defined(WIN32) || defined(_WIN32) -# define WIN32_LEAN_AND_MEAN -# include <windows.h> -# include <io.h> -# ifndef dup -# define dup _dup -# endif -# ifndef dup2 -# define dup2 _dup2 -# endif -# ifndef STDIN_FILENO -# define STDIN_FILENO _fileno(stdin) -# endif -# ifndef STDOUT_FILENO -# define STDOUT_FILENO _fileno(stdout) -# endif -# ifndef STDERR_FILENO -# define STDERR_FILENO _fileno(stderr) -# endif -#else -# include <unistd.h> -#endif - #include <node_loader/node_loader_impl.h> #include <loader/loader_impl.h> @@ -129,10 +106,6 @@ typedef struct loader_impl_node_type uv_mutex_t mutex; uv_cond_t cond; - int stdin_copy; - int stdout_copy; - int stderr_copy; - int result; const char * error_message; @@ -2407,12 +2380,7 @@ loader_impl_data node_loader_impl_initialize(loader_impl impl, configuration con return NULL; } - /* TODO: On error, delete dup, condition and mutex */ - - /* Duplicate stdin, stdout, stderr */ - node_impl->stdin_copy = dup(STDIN_FILENO); - node_impl->stdout_copy = dup(STDOUT_FILENO); - node_impl->stderr_copy = dup(STDERR_FILENO); + /* TODO: On error, delete condition and mutex */ /* Initialize syncronization */ if (uv_cond_init(&node_impl->cond) != 0) @@ -2855,11 +2823,6 @@ int node_loader_impl_destroy(loader_impl impl) /* Print NodeJS execution result */ log_write("metacall", LOG_LEVEL_INFO, "NodeJS execution return status %d", node_impl->result); - /* Restore stdin, stdout, stderr */ - dup2(node_impl->stdin_copy, STDIN_FILENO); - dup2(node_impl->stdout_copy, STDOUT_FILENO); - dup2(node_impl->stderr_copy, STDERR_FILENO); - delete node_impl; return 0;
Added load swUpdateStateFromDb()
@@ -590,6 +590,14 @@ static int sqliteLoadConfigCallback(void *user, int ncols, char **colval , char d->gwProxyPort = port; } } + else if (strcmp(colval[0], "swupdatestate") == 0) + { + if (!val.isEmpty() && ok) + { + d->gwConfig["swupdatestate"] = val; + d->gwSwUpdateState = val; + } + } return 0; } @@ -618,7 +626,7 @@ static int sqliteLoadUserparameterCallback(void *user, int ncols, char **colval return 0; } -/*! Loads all groups from database +/*! Loads all config from database */ void DeRestPluginPrivate::loadConfigFromDb() { @@ -665,6 +673,53 @@ void DeRestPluginPrivate::loadConfigFromDb() } } +/*! Loads all config from database + */ +void DeRestPluginPrivate::loadSwUpdateStateFromDb() +{ + int rc; + char *errmsg = 0; + + DBG_Assert(db != 0); + + if (!db) + { + return; + } + + QString configTable = "config"; // default config table version 1 + + // check if config table version 2 + { + QString sql = QString("SELECT key FROM config2"); + + DBG_Printf(DBG_INFO_L2, "sql exec %s\n", qPrintable(sql)); + errmsg = NULL; + rc = sqlite3_exec(db, sql.toUtf8().constData(), NULL, NULL, &errmsg); + + if (rc == SQLITE_OK) + { + configTable = "config2"; + } + } + + { + QString sql = QString("SELECT * FROM %1 WHERE key='swupdatestate'").arg(configTable); + + DBG_Printf(DBG_INFO_L2, "sql exec %s\n", qPrintable(sql)); + rc = sqlite3_exec(db, qPrintable(sql), sqliteLoadConfigCallback, this, &errmsg); + + if (rc != SQLITE_OK) + { + if (errmsg) + { + DBG_Printf(DBG_ERROR, "sqlite3_exec %s, error: %s\n", qPrintable(sql), errmsg); + sqlite3_free(errmsg); + } + } + } +} + /*! Loads all userparameter from database */ void DeRestPluginPrivate::loadUserparameterFromDb()
remove BTM_WBS_INCLUDED for bta_hf_client_version select
@@ -232,11 +232,7 @@ const tBTA_HF_CLIENT_ST_TBL bta_hf_client_st_tbl[] = { bta_hf_client_st_closing }; -#if BTM_WBS_INCLUDED const char *bta_hf_client_version = "1.6"; -#else -const char *bta_hf_client_version = "1.5"; -#endif /* HF Client control block */ #if BTA_DYNAMIC_MEMORY == FALSE
Vacuum should operate on auxiliary tables in utility mode Without this commit auxiliary tables such as toast and aoseg are skipped during vacuum when run in utility mode (such as during pg_upgrade).
@@ -2408,8 +2408,13 @@ vacuum_rel(Relation onerel, Oid relid, VacuumStmt *vacstmt, LOCKMODE lmode, * still hold the session lock on the master table. We do this in * cleanup phase when it's AO table or in prepare phase if it's an * empty AO table. + * + * A VacuumStmt object for secondary toast relation is constructed and + * dispatched separately by the QD, when vacuuming the master relation. A + * backend executing dispatched VacuumStmt (GP_ROLE_EXECUTE), therefore, + * should not execute this block of code. */ - if (Gp_role == GP_ROLE_DISPATCH && (is_heap || + if (Gp_role != GP_ROLE_EXECUTE && (is_heap || (!is_heap && (vacstmt->appendonly_phase == AOVAC_CLEANUP || vacstmt->appendonly_relation_empty)))) { @@ -2438,8 +2443,13 @@ vacuum_rel(Relation onerel, Oid relid, VacuumStmt *vacstmt, LOCKMODE lmode, * * We alter the vacuum statement here since the AO auxiliary tables * vacuuming will be dispatched to the primaries. + * + * Similar to toast, a VacuumStmt object for each AO auxiliary relation is + * constructed and dispatched separately by the QD, when vacuuming the + * base AO relation. A backend executing dispatched VacuumStmt + * (GP_ROLE_EXECUTE), therefore, should not execute this block of code. */ - if (Gp_role == GP_ROLE_DISPATCH && + if (Gp_role != GP_ROLE_EXECUTE && (vacstmt->appendonly_phase == AOVAC_CLEANUP || (vacstmt->appendonly_relation_empty && vacstmt->appendonly_phase == AOVAC_PREPARE)))
LICENSE: add system/cu Add license for system/cu to LICENSE file
@@ -621,3 +621,35 @@ apps/wireless/wapi NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +apps/system/cu +============= + + Copyright (C) 2014 sysmocom - s.f.m.c. GmbH. All rights reserved. + Author: Harald Welte <[email protected]> + + 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. + 3. Neither the name NuttX nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 + COPYRIGHT OWNER 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.
doc: add links + other small changes for FOSDEM talks
@@ -32,21 +32,21 @@ The highlights of this release are: ### Fosdem Talk about Elektra in Main Track We are happy to announce that there will be a talk about -Elektra in one of the main tracks of [Fosdem 2018](https://fosdem.org/2018): +Elektra in one of the [main tracks of Fosdem 2018](https://fosdem.org/2018/schedule/event/elektra/): - Title: Configuration Revolution - Subtitle: Why it Needed 13 Years and How it Will be Done - Day: Saturday 2018-02-03 -- Start time: 15:00:00 +- Start time: 15:00 - Duration: 50 min - Room: K.1.105 (La Fontaine) -And a second talk in the Config Management DevRoom: +And a second talk in the [Config Management DevRoom](https://fosdem.org/2018/schedule/event/puppet_key_value/): - Title: Breaking with conventional Configuration File Editing - Subtitle: Puppet with a Key/Value API in a User Study - Day: Sunday 2018-02-04 -- Start time: 30:00 +- Start time: 12:30 - Duration: 25 min - Room: UA2.114 (Baudoux)
Trying to solve bootstrap (again).
@@ -48,15 +48,13 @@ add_custom_target(${target} if(NOT OPTION_BUILD_GUIX) add_custom_target(${target}_depends - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib COMMAND ${CMAKE_COMMAND} -E echo "Installing ${target} dependencies" - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/lib/package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/lib/package-lock.json ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json COMMAND ${NPM_EXECUTABLE} install COMMAND ${CMAKE_COMMAND} -E echo "Copying ${target} dependencies" COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_OUTPUT_DIR}/node_modules - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/node_modules/ ${PROJECT_OUTPUT_DIR}/node_modules - COMMAND ${CMAKE_COMMAND} -E echo "${target} dependencies copied from ${CMAKE_CURRENT_BINARY_DIR}/node_modules to ${PROJECT_OUTPUT_DIR}/node_modules" + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/lib/node_modules/ ${PROJECT_OUTPUT_DIR}/node_modules + COMMAND ${CMAKE_COMMAND} -E echo "${target} dependencies copied from ${CMAKE_CURRENT_SOURCE_DIR}/node_modules to ${PROJECT_OUTPUT_DIR}/node_modules" DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/package.json ${CMAKE_CURRENT_SOURCE_DIR}/lib/package-lock.json ) @@ -69,10 +67,10 @@ if(NOT OPTION_BUILD_GUIX) add_dependencies(${target} ${target}_depends) install(DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR}/node_modules/espree - ${CMAKE_CURRENT_BINARY_DIR}/node_modules/acorn - ${CMAKE_CURRENT_BINARY_DIR}/node_modules/acorn-jsx - ${CMAKE_CURRENT_BINARY_DIR}/node_modules/eslint-visitor-keys + ${PROJECT_OUTPUT_DIR}/node_modules/espree + ${PROJECT_OUTPUT_DIR}/node_modules/acorn + ${PROJECT_OUTPUT_DIR}/node_modules/acorn-jsx + ${PROJECT_OUTPUT_DIR}/node_modules/eslint-visitor-keys DESTINATION ${INSTALL_LIB}/node_modules COMPONENT runtime )
Some comments in configure.ac
@@ -18,7 +18,7 @@ dnl # where: dnl # - library code modified: revision++ dnl # - interfaces changed/added/removed: current++ and revision=0 dnl # - interfaces added: age++ -dnl # - interfaces removed: age=0 +dnl # - interfaces removed or changed: age=0 dnl # *please update only once, before a formal release, not for each change* dnl # dnl ############################################################################ @@ -436,7 +436,7 @@ dnl # Repeating the algorithm to place it closer to the modificatin place: dnl # - library code modified: revision++ dnl # - interfaces changed/added/removed: current++ and revision=0 dnl # - interfaces added: age++ -dnl # - interfaces removed: age=0 +dnl # - interfaces removed or changed: age=0 dnl # *please update only once, before a formal release, not for each change* dnl ############################################################################
Fix Coverity-detected deadlock condition - need to use _papplSystemAddEventNoLock in device open loop since printer rwlock is held.
@@ -989,7 +989,9 @@ start_job(pappl_job_t *job) // I - Job { job->state = IPP_JSTATE_PENDING; - papplSystemAddEvent(job->system, job->printer, job, PAPPL_EVENT_JOB_STATE_CHANGED, NULL); + pthread_rwlock_rdlock(&job->rwlock); + _papplSystemAddEventNoLock(job->system, job->printer, job, PAPPL_EVENT_JOB_STATE_CHANGED, NULL); + pthread_rwlock_unlock(&job->rwlock); } if (printer->device)
Support '-c' with feedback-driven fuzzing
@@ -515,11 +515,17 @@ static void fuzz_fuzzLoop(honggfuzz_t * hfuzz, fuzzer_t * fuzzer) if (fuzzer->state == _HF_STATE_DYNAMIC_PRE) { fuzzer->flipRate = 0.0f; + if (hfuzz->externalCommand) { + if (!fuzz_prepareFileExternally(hfuzz, fuzzer)) { + LOG_F("fuzz_prepareFileExternally() failed"); + } + } else { if (fuzz_prepareFile(hfuzz, fuzzer, false /* rewind */ ) == false) { fuzz_setState(hfuzz, _HF_STATE_DYNAMIC_MAIN); fuzzer->state = fuzz_getState(hfuzz); } } + } if (fuzzer->state == _HF_STATE_DYNAMIC_MAIN) { if (!fuzz_prepareFileDynamically(hfuzz, fuzzer)) { LOG_F("fuzz_prepareFileDynamically() failed");
nimble/ll: Fix return value
@@ -1685,7 +1685,7 @@ ble_ll_sched_aux_scan(struct ble_mbuf_hdr *ble_hdr, struct ble_ll_scan_sm *scansm, struct ble_ll_aux_data *aux_scan) { - int rc; + int rc = 1; os_sr_t sr; uint32_t off_ticks; uint32_t off_rem_usecs; @@ -1749,7 +1749,6 @@ ble_ll_sched_aux_scan(struct ble_mbuf_hdr *ble_hdr, * anything. We can make it smarter later on */ if (ble_ll_sched_is_overlap(sch, entry)) { - rc = -1; break; } }
Remove unnecesary close statement.
@@ -4388,6 +4388,8 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe node_loader_impl_exception(env, status); + /* Clear event loop */ + { /* Stop event loop */ uv_stop(node_impl->thread_loop); @@ -4405,6 +4407,9 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe fflush(stdout); } + /* Note: This evaluates to true always due to stdin and stdout handles, + which are closed anyway on thread join. So it is removed by now. */ + #if 0 /* TODO: Check how to delete properly all handles */ if (uv_loop_close(node_impl->thread_loop) == UV_EBUSY) { @@ -4413,6 +4418,8 @@ void node_loader_impl_destroy_safe(napi_env env, loader_impl_async_destroy_safe printf("NodeJS Loader Error: NodeJS event loop should not be busy\n"); fflush(stdout); } + #endif + } /* Close scope */ status = napi_close_handle_scope(env, handle_scope);
reset mask at reset detection
@@ -711,6 +711,11 @@ error_return_t MsgAlloc_IsReseted(void) PortMng_Init(); // We need to reset MsgAlloc MsgAlloc_Init(NULL); + ctx.Decay = 0; + for (uint16_t i = 0; i < MASK_SIZE; i++) + { + ctx.Mask[i] = 0; + } return SUCCEED; } return FAILED;
implement OP_OCLASS.
@@ -2424,6 +2424,21 @@ static inline void op_range_exc( mrbc_vm *vm, mrbc_value *regs EXT ) } +//================================================================ +/*! OP_OCLASS + + R[a] = ::Object +*/ +static inline void op_oclass( mrbc_vm *vm, mrbc_value *regs EXT ) +{ + FETCH_B(); + + mrbc_decref(&regs[a]); + regs[a].tt = MRBC_TT_CLASS; + regs[a].cls = mrbc_class_object; +} + + //================================================================ /*! OP_CLASS @@ -2747,7 +2762,7 @@ int mrbc_vm_run( struct VM *vm ) case OP_METHOD: op_method (vm, regs EXT); break; case OP_RANGE_INC: op_range_inc (vm, regs EXT); break; case OP_RANGE_EXC: op_range_exc (vm, regs EXT); break; - case OP_OCLASS: op_unsupported(vm, regs EXT); break; // not implemented. + case OP_OCLASS: op_oclass (vm, regs EXT); break; case OP_CLASS: op_class (vm, regs EXT); break; case OP_MODULE: op_unsupported(vm, regs EXT); break; // not implemented. case OP_EXEC: op_exec (vm, regs EXT); break;
Added missing dump option (parser)
@@ -12,7 +12,7 @@ p:flag("--emit-c", "Generate a .c file instead of an .so file") p:flag("--emit-asm", "Generate a .s file instead of an .so file") p:flag("--compile-c", "Compile a .c file generated by --emit-c") p:option("--dump", "Print the ast from a given compiler pass"):choices( - { "checker", "ir", "uninitialized", "constant_propagation" }) + {"parser", "checker", "ir", "uninitialized", "constant_propagation"}) local args = p:parse() -- For compilation errors that don't happen inside a source file.
timeout option in redisConnectWithOptions should be on connect only When connecting with a timeout, we shouldn't also call `redisSetTimeout` which will implement a timeout for commands. See related issue
@@ -790,9 +790,7 @@ redisContext *redisConnectWithOptions(const redisOptions *options) { // Unknown type - FIXME - FREE return NULL; } - if (options->timeout != NULL && (c->flags & REDIS_BLOCK) && c->fd != REDIS_INVALID_FD) { - redisContextSetTimeout(c, *options->timeout); - } + return c; }
Use path variables: cc2538
@@ -52,4 +52,4 @@ $(LDSCRIPT): $(SOURCE_LDSCRIPT) FORCE | $(OBJECTDIR) $(TRACE_CC) $(Q)$(CC) $(LDGENFLAGS) $< | grep -v '^\s*#\s*pragma\>' > $@ -include $(ARCH_PATH)/cpu/arm/cortex-m/cm3/Makefile.cm3 +include $(CONTIKI)/$(CONTIKI_NG_CM3_DIR)/Makefile.cm3
Narrower logging, more details.
@@ -668,21 +668,19 @@ struct ws_on_data_args_s { uint8_t is_text; }; void *ws_on_data_inGIL(void *args_) { - fprintf(stderr, "INFO: iodine entered GIL\n"); struct ws_on_data_args_s *a = args_; VALUE handler = get_handler(a->ws); if (!handler) { fprintf(stderr, "ERROR: iodine can't find Websocket handler!\n"); return NULL; } - fprintf(stderr, "INFO: iodine collected handler\n"); VALUE buffer = rb_ivar_get(handler, iodine_buff_var_id); - fprintf(stderr, "INFO: iodine collected buffer string\n"); if (a->is_text) rb_enc_associate(buffer, IodineUTF8Encoding); else rb_enc_associate(buffer, IodineBinaryEncoding); - fprintf(stderr, "INFO: iodine set encoding\n"); + fprintf(stderr, "INFO: iodine set encoding. Setting length to %lu\n", + a->length); rb_str_set_len(buffer, a->length); fprintf(stderr, "INFO: iodine calling Ruby handler\n"); rb_funcallv(handler, iodine_on_message_func_id, 1, &buffer);
SOVERSION bump to version 2.13.6
@@ -67,7 +67,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 13) -set(LIBYANG_MICRO_SOVERSION 5) +set(LIBYANG_MICRO_SOVERSION 6) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
Add NULL check in send_tcp function Pointer 'conn' which was dereferenced at api_msg.c:330 is compared to NULL value at api_msg.c:336. If conn is NULL, ERR_ARG will be returned.
@@ -327,6 +327,10 @@ static err_t sent_tcp(void *arg, struct tcp_pcb *pcb, u16_t len) LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); + if (conn == NULL) { + return ERR_ARG; + } + if (conn->state == NETCONN_WRITE) { do_writemore(conn); } else if (conn->state == NETCONN_CLOSE) {
common: drop unnecessary line ending CPRINTS() macro is already adding the newline character, no need to include it explicitly. BRANCH=none TEST=vefied that Coral EC does not print this newline any more
@@ -27,7 +27,7 @@ void tablet_set_mode(int mode) return; tablet_mode = mode; - CPRINTS("tablet mode %sabled\n", mode ? "en" : "dis"); + CPRINTS("tablet mode %sabled", mode ? "en" : "dis"); hook_notify(HOOK_TABLET_MODE_CHANGE); }
odissey: limit stream fill by readahead size
@@ -427,8 +427,15 @@ od_frontend_setup(od_client_t *client) return OD_FE_OK; } +static inline int +od_frontend_stream_hit_limit(od_client_t *client) +{ + od_instance_t *instance = client->system->instance; + return shapito_stream_used(&client->stream) >= instance->scheme.readahead; +} + static inline void -od_frontend_reset_stream(od_client_t *client) +od_frontend_stream_reset(od_client_t *client) { od_instance_t *instance = client->system->instance; shapito_stream_t *stream = &client->stream; @@ -506,7 +513,7 @@ od_frontend_remote_client(od_client_t *client) int request_count = 0; int terminate = 0; - od_frontend_reset_stream(client); + od_frontend_stream_reset(client); int rc; for (;;) { @@ -571,6 +578,10 @@ od_frontend_remote_client(od_client_t *client) request_count++; } + rc = od_frontend_stream_hit_limit(client); + if (rc) + break; + rc = machine_read_pending(client->io); if (rc < 0 || rc > 0) continue; @@ -605,7 +616,7 @@ od_frontend_remote_server(od_client_t *client) shapito_stream_t *stream = &client->stream; od_server_t *server = client->server; - od_frontend_reset_stream(client); + od_frontend_stream_reset(client); int rc; for (;;) { @@ -692,6 +703,10 @@ od_frontend_remote_server(od_client_t *client) break; } + rc = od_frontend_stream_hit_limit(client); + if (rc) + break; + rc = machine_read_pending(server->io); if (rc < 0 || rc > 0) continue;
system/trace: Check NOTERAM_GETTASKNAME existence directly
@@ -246,7 +246,7 @@ FAR static struct trace_dump_task_context_s *get_task_context(pid_t pid, (*tctxp)->syscall_nest = 0; (*tctxp)->name[0] = '\0'; -#if CONFIG_DRIVER_NOTERAM_TASKNAME_BUFSIZE > 0 +#ifdef NOTERAM_GETTASKNAME { struct noteram_get_taskname_s tnm; int res;
optimize luv_thread_dumped
@@ -214,23 +214,11 @@ static int luv_thread_arg_error(lua_State *L) { lua_typename(L, type), pos); } -// Copied from lstrlib.c in Lua 5.4.3 -// -// luaL_buffinit might push stuff onto the stack (this is undocumented as of now), -// so it must be called after lua_dump to ensure that the function to dump -// is still on the top of the stack -struct luv_thread_Writer { - int init; - luaL_Buffer B; -}; - static int thread_dump (lua_State *L, const void *b, size_t size, void *ud) { - struct luv_thread_Writer *state = (struct luv_thread_Writer *)ud; - if (!state->init) { - state->init = 1; - luaL_buffinit(L, &state->B); - } - luaL_addlstring(&state->B, (const char *)b, size); + luaL_Buffer *B = (luaL_Buffer *)ud; + (void)L; + + luaL_addlstring(B, (const char *)b, size); return 0; } @@ -238,15 +226,19 @@ static int luv_thread_dumped(lua_State* L, int idx) { if (lua_isstring(L, idx)) { lua_pushvalue(L, idx); } else { - int ret; - struct luv_thread_Writer state; - state.init = 0; + int ret, top; + luaL_Buffer B; + + // In Lua >= 5.4.3, luaL_buffinit pushes a value onto the stack, so it needs to be called + // here to ensure that the function is at the top of the stack during the lua_dump call + luaL_buffinit(L, &B); luaL_checktype(L, idx, LUA_TFUNCTION); lua_pushvalue(L, idx); - ret = lua_dump(L, thread_dump, &state, 1); - lua_pop(L, 1); + top = lua_gettop(L); + ret = lua_dump(L, thread_dump, &B, 1); + lua_remove(L, top); if (ret==0) { - luaL_pushresult(&state.B); + luaL_pushresult(&B); } else luaL_error(L, "Error: unable to dump given function"); }
Forgot to rename _ENTITY_ENTVAR_COLLECTION constant.
@@ -54,6 +54,7 @@ typedef enum _ENTITY_DIE_ON_LANDING, _ENTITY_DROP, _ENTITY_DUCK_STATE, + _ENTITY_ENTVAR_COLLECTION, _ENTITY_ESCAPE_COUNT, _ENTITY_EXISTS, _ENTITY_EXPLODE, @@ -142,7 +143,6 @@ typedef enum _ENTITY_TURN_STATE, _ENTITY_TURN_TIME, _ENTITY_UPDATE_MARK, - _ENTITY_VARIABLE_COLLECTION, _ENTITY_WALK_STATE, _ENTITY_WAYPOINT_COLLECTION, _ENTITY_WAYPOINT_COUNT,
s5j/serial: fix trivial coding style issues Fixes trivial coding style issues.
@@ -968,7 +968,9 @@ void up_lowputc(char ch) while (1) { /* Wait for the transmitter to be available */ while ((uart_getreg32(CONSOLE_DEV.priv, S5J_UART_UTRSTAT_OFFSET) & - UART_UTRSTAT_TX_BUF_MASK) != UART_UTRSTAT_TX_BUF_EMPTY); + UART_UTRSTAT_TX_BUF_MASK) != UART_UTRSTAT_TX_BUF_EMPTY) { + /* Polling */ + } /* * Disable interrupts so that the test and the transmission are
fix error omlink example
@@ -32,16 +32,7 @@ void setup() init_joint_angle.push_back(0.0*DEG2RAD); init_joint_angle.push_back(-90.0*DEG2RAD); init_joint_angle.push_back(-160.0*DEG2RAD); - - dxl_angle.push_back(init_joint_angle.at(0)); - dxl_angle.push_back(-init_joint_angle.at(1)); - dxl_angle.push_back(init_joint_angle.at(2)); - - manipulator.sendAllActuatorAngle(OMLINK, dxl_angle); - - dxl_angle.clear(); - - //manipulator.sendAllActuatorAngle(OMLINK, init_joint_angle); + manipulator.sendAllActuatorAngle(OMLINK, init_joint_angle); initOMLink(); previous_time[0] = (float)(millis()/1000.0f);
doc: Remove disabled source-package-test
@@ -95,7 +95,6 @@ build: * jenkins build [icc](https://build.libelektra.org/job/elektra-icc/) please * jenkins build [libelektra](https://build.libelektra.org/jenkins/job/libelektra/) please * jenkins build [local-installation](https://build.libelektra.org/job/elektra-local-installation/) please -* jenkins build [source-package-test](https://build.libelektra.org/job/elektra-source-package-test/) please Additionally `jenkins build all please` can be used to trigger all build jobs relevant for PR's.
Initial boot with brass.pill.
[mos ..^$] :: $init - :_ %_ ..^$ + :: + :: this used to start the initial merge, which is now + :: not a necessary part of the boot sequence. + :: + :- ~ + %_ ..^$ fat.ruf ?< (~(has by fat.ruf) p.q.hic) (~(put by fat.ruf) p.q.hic [-(hun hen)]:[*room .]) == - =+ [bos=(sein:title p.q.hic) can=(clan:title p.q.hic)] - %- zing ^- (list (list move)) - :~ ?: =(bos p.q.hic) ~ - [hen %pass /init-merge %c %merg p.q.hic %base bos %kids da+now %init]~ - :: - ~ - == :: $into =. hez.ruf `hen
ble_mesh: stack: Apply the errata E16350 from Bluetooth SIG
@@ -840,6 +840,7 @@ static void prov_start(const uint8_t *data) static void send_confirm(void) { + uint8_t *local_conf = NULL; PROV_BUF(cfm, 17); BT_DBG("ConfInputs[0] %s", bt_hex(link.conf_inputs, 64)); @@ -872,13 +873,21 @@ static void send_confirm(void) prov_buf_init(&cfm, PROV_CONFIRM); + local_conf = net_buf_simple_add(&cfm, 16); + if (bt_mesh_prov_conf(link.conf_key, link.rand, link.auth, - net_buf_simple_add(&cfm, 16))) { + local_conf)) { BT_ERR("Unable to generate confirmation value"); prov_send_fail_msg(PROV_ERR_UNEXP_ERR); return; } + if (!memcmp(link.conf, local_conf, 16)) { + BT_ERR("Confirmation value is identical to ours, rejecting."); + prov_send_fail_msg(PROV_ERR_NVAL_FMT); + return; + } + if (prov_send(&cfm)) { BT_ERR("Unable to send Provisioning Confirm"); return;
py/emitglue: Change type of bit-field to explicitly unsigned mp_uint_t. Some compilers can treat enum types as signed, in which case 3 bits is not enough to encode all mp_raw_code_kind_t values. So change the type to mp_uint_t.
@@ -40,7 +40,7 @@ typedef enum { } mp_raw_code_kind_t; typedef struct _mp_raw_code_t { - mp_raw_code_kind_t kind : 3; + mp_uint_t kind : 3; // of type mp_raw_code_kind_t mp_uint_t scope_flags : 7; mp_uint_t n_pos_args : 11; union {
Update: Memory.c: both eternal and event aspect is processed for input events, they get eternalized and eternals revises seperately
@@ -107,7 +107,7 @@ static bool Memory_containsEvent(Event *event) //Add event for cycling through the system (inference and context) //called by addEvent for eternal knowledge -static bool Memory_addCyclingEvent(Event *e, double priority) +static bool Memory_addCyclingEvent(Event *e, double priority, long currentTime) { if(Memory_containsEvent(e)) { @@ -117,7 +117,7 @@ static bool Memory_addCyclingEvent(Event *e, double priority) if(Memory_FindConceptByTerm(&e->term, &concept_i)) { Concept *c = concepts.items[concept_i].address; - if(e->type == EVENT_TYPE_BELIEF && e->occurrenceTime == OCCURRENCE_ETERNAL && c->belief.type != EVENT_TYPE_DELETED && c->belief.truth.confidence > e->truth.confidence) + if(e->type == EVENT_TYPE_BELIEF && e->occurrenceTime == OCCURRENCE_ETERNAL && c->belief.type != EVENT_TYPE_DELETED && ((e->occurrenceTime == OCCURRENCE_ETERNAL && c->belief.truth.confidence > e->truth.confidence) || (e->occurrenceTime != OCCURRENCE_ETERNAL && Truth_Projection(c->belief_spike.truth, c->belief_spike.occurrenceTime, currentTime).confidence > Truth_Projection(e->truth, e->occurrenceTime, currentTime).confidence))) { return false; //the belief has a higher confidence and was already revised up (or a cyclic transformation happened!), get rid of the event! } //more radical than OpenNARS! @@ -169,7 +169,6 @@ void Memory_addEvent(Event *event, long currentTime, double priority, bool input } if(event->type == EVENT_TYPE_BELIEF) { - bool revision_happened = false; if(!readded) { Memory_Conceptualize(&event->term); @@ -177,10 +176,17 @@ void Memory_addEvent(Event *event, long currentTime, double priority, bool input if(Memory_FindConceptByTerm(&event->term, &concept_i)) { Concept *c = concepts.items[concept_i].address; - c->belief = Inference_IncreasedActionPotential(&c->belief, event, currentTime, &revision_happened); + Event eternal_event = *event; + if(event->occurrenceTime != OCCURRENCE_ETERNAL) + { + eternal_event.occurrenceTime = OCCURRENCE_ETERNAL; + eternal_event.truth = Truth_Eternalize(event->truth); + c->belief_spike = Inference_IncreasedActionPotential(&c->belief_spike, event, currentTime, NULL); + } + bool revision_happened = false; + c->belief = Inference_IncreasedActionPotential(&c->belief, &eternal_event, currentTime, &revision_happened); if(revision_happened) { - revision_happened = true; Memory_addEvent(&c->belief, currentTime, priority, false, false, false, true); } } @@ -189,7 +195,7 @@ void Memory_addEvent(Event *event, long currentTime, double priority, bool input assert(false, "Concept creation failed, it should always be able to create one, even when full, by removing the worst!"); } } - if(Memory_addCyclingEvent(event, priority) && !readded) //task gets replaced with revised one, more radical than OpenNARS!! + if(Memory_addCyclingEvent(event, priority, currentTime) && !readded) //task gets replaced with revised one, more radical than OpenNARS!! { Memory_printAddedEvent(event, priority, input, derived, revised); }
OpenCanopy: Optimise cursor (re)drawing
@@ -678,10 +678,6 @@ GuiRedrawPointer ( STATIC UINT32 CursorOldY = 0; CONST GUI_IMAGE *CursorImage; - UINT32 MinX; - UINT32 DeltaX; - UINT32 MinY; - UINT32 DeltaY; UINT32 MaxWidth; UINT32 MaxHeight; @@ -694,51 +690,29 @@ GuiRedrawPointer ( ); ASSERT (CursorImage != NULL); - // - // TODO: Do we want to conditionally redraw? - // - - // - // Always drawing the cursor to the buffer increases consistency and is less - // error-prone to situational hiding. - // - // Restore the rectangle previously covered by the cursor. - // Cover the area of the new cursor too and do not request a draw of the new - // cursor to not need to merge the requests later. - // - if (CursorOldX < mScreenViewCursor.X) { - MinX = CursorOldX; - DeltaX = mScreenViewCursor.X - CursorOldX; - } else { - MinX = mScreenViewCursor.X; - DeltaX = CursorOldX - mScreenViewCursor.X; - } - - if (CursorOldY < mScreenViewCursor.Y) { - MinY = CursorOldY; - DeltaY = mScreenViewCursor.Y - CursorOldY; - } else { - MinY = mScreenViewCursor.Y; - DeltaY = CursorOldY - mScreenViewCursor.Y; - } - ASSERT (mScreenViewCursor.X < DrawContext->Screen->Width); ASSERT (mScreenViewCursor.Y < DrawContext->Screen->Height); - MaxWidth = MIN (CursorImage->Width, DrawContext->Screen->Width - mScreenViewCursor.X); - MaxHeight = MIN (CursorImage->Height, DrawContext->Screen->Height - mScreenViewCursor.Y); - // - // TODO: The cursor may jump long distances with touch control, split draws? + // Unconditionally draw the cursor to increase frametime consistency and + // prevent situational hiding. // + // + // Restore the rectangle previously covered by the cursor. + // GuiDrawScreen ( DrawContext, - MinX, - MinY, - CursorImage->Width + DeltaX, - CursorImage->Height + DeltaY + CursorOldX, + CursorOldY, + CursorImage->Width, + CursorImage->Height ); + // + // Draw the new cursor at the new position. + // + MaxWidth = MIN (CursorImage->Width, DrawContext->Screen->Width - mScreenViewCursor.X); + MaxHeight = MIN (CursorImage->Height, DrawContext->Screen->Height - mScreenViewCursor.Y); GuiDrawToBuffer ( CursorImage, 0xFF, @@ -750,6 +724,15 @@ GuiRedrawPointer ( MaxWidth, MaxHeight ); + // + // Queue a draw request for the newly drawn cursor. + // + GuiRequestDraw ( + mScreenViewCursor.X, + mScreenViewCursor.Y, + MaxWidth, + MaxHeight + ); CursorOldX = mScreenViewCursor.X; CursorOldY = mScreenViewCursor.Y;
Prepare debian changelog for v0.9.0 tag debian changelog for v0.9.0 tag
+bcc (0.9.0-1) unstable; urgency=low + + * Adds support for BTF + * Uses libbpf common library to wrap syscall API + * Many bugfixes and new tools + + -- Brenden Blanco <[email protected]> Thu, 07 Mar 2019 17:00:00 +0000 + bcc (0.8.0-1) unstable; urgency=low * Support for kernel up to 5.0
Fix a type fixed a typo pointed out by
@@ -19,7 +19,7 @@ tanasinn (Works with firefox) .br mlterm (Works on each of X, win32/cygwin and framebuffer version) .br -XTerm (configured with --enable-sixel-graphics and lanuched with "-ti 340" option) +XTerm (configured with --enable-sixel-graphics and launched with "-ti 340" option) .br yaft / yaftx (Works on framebuffer / X11 environment) .br
apps/speed.c: detect evp cipher 32-bit ctr overflow and reset iv
@@ -872,16 +872,23 @@ static int EVP_Update_loop(void *args) loopargs_t *tempargs = *(loopargs_t **) args; unsigned char *buf = tempargs->buf; EVP_CIPHER_CTX *ctx = tempargs->ctx; - int outl, count; + int outl, count, rc; #ifndef SIGALRM int nb_iter = save_count * 4 * lengths[0] / lengths[testnum]; #endif - if (decrypt) - for (count = 0; COND(nb_iter); count++) - EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); - else - for (count = 0; COND(nb_iter); count++) - EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); + if (decrypt) { + for (count = 0; COND(nb_iter); count++) { + rc = EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); + if (rc != 1) + EVP_CipherInit_ex(ctx, NULL, NULL, NULL, iv, -1); + } + } else { + for (count = 0; COND(nb_iter); count++) { + rc = EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[testnum]); + if (rc != 1) + EVP_CipherInit_ex(ctx, NULL, NULL, NULL, iv, -1); + } + } if (decrypt) EVP_DecryptFinal_ex(ctx, buf, &outl); else
Use storagePathP() instead of cfgOptionStr() to get base repo path. cfgOptionStr() may not have the correct value if the repo is remote. Use storagePathP() instead since it can ask the remote for the correct value when required.
@@ -6,6 +6,7 @@ Common Functions and Definitions for Repo Commands #include "command/repo/common.h" #include "common/debug.h" #include "config/config.h" +#include "storage/helper.h" /**********************************************************************************************************************************/ String * @@ -32,8 +33,11 @@ repoPathIsValid(const String *path) // Validate absolute paths if (strBeginsWith(path, FSLASH_STR)) { + // Get the repo path using repo storage in case it is remotely configured + const String *const repoPath = storagePathP(storageRepo(), NULL); + // If the path is exactly equal to the repo path then the relative path is empty - if (strEq(path, cfgOptionStr(cfgOptRepoPath))) + if (strEq(path, repoPath)) { MEM_CONTEXT_PRIOR_BEGIN() { @@ -44,8 +48,7 @@ repoPathIsValid(const String *path) // Else check that the file path begins with the repo path else { - if (!strEq(cfgOptionStr(cfgOptRepoPath), FSLASH_STR) && - !strBeginsWith(path, strNewFmt("%s/", strZ(cfgOptionStr(cfgOptRepoPath))))) + if (!strEq(repoPath, FSLASH_STR) && !strBeginsWith(path, strNewFmt("%s/", strZ(repoPath)))) { THROW_FMT( ParamInvalidError, "absolute path '%s' is not in base path '%s'", strZ(path), @@ -55,8 +58,7 @@ repoPathIsValid(const String *path) MEM_CONTEXT_PRIOR_BEGIN() { // Get the relative part of the path/file - result = strSub( - path, strEq(cfgOptionStr(cfgOptRepoPath), FSLASH_STR) ? 1 : strSize(cfgOptionStr(cfgOptRepoPath)) + 1); + result = strSub(path, strEq(repoPath, FSLASH_STR) ? 1 : strSize(repoPath) + 1); } MEM_CONTEXT_PRIOR_END(); }
set hcx-max = pmkideapolcount as default
@@ -1155,6 +1155,9 @@ static hashlist_t *zeigerbegin; static hashlist_t *zeigerend; static struct stat statinfo; +if(lcmax == 0) lcmax = pmkideapolcount; +if(lcmin > lcmax) return; + if(pmkideapoloutname != NULL) { if((fh_pmkideapol = fopen(pmkideapoloutname, "a")) == NULL) @@ -1165,8 +1168,6 @@ if(pmkideapoloutname != NULL) } qsort(hashlist, pmkideapolcount, HASHLIST_SIZE, sort_maclist_by_essid); -if(lcmax == 0) lcmax = pmkideapolcount; - zeigerbegin = hashlist; lc = 0; for(zeiger = hashlist +1; zeiger < hashlist +pmkideapolcount; zeiger++) @@ -2129,7 +2130,7 @@ if((pmkideapolcount > 0) && (essidoutname != NULL)) processessid(essidoutname); if((pmkideapolcount > 0) && (pmkideapoloutname != NULL)) { if((lcmin == 0) && (lcmax == 0)) writeeapolpmkidfile(pmkideapoloutname); - else if(lcmin <= lcmax) writelceapolpmkidfile(pmkideapoloutname, lcmin, lcmax); + else writelceapolpmkidfile(pmkideapoloutname, lcmin, lcmax); } if((pmkideapolcount > 0) && (infooutname != NULL)) writeinfofile(infooutname); if((pmkideapolcount > 0) && (flagessidgroup == true)) writeeapolpmkidessidgroups();
Docs (from facil.io)
@@ -1043,6 +1043,10 @@ ssize_t sock_write2_fn(sock_write_info_s options) { /* this extra work can be avoided if an error is already known to occur... * but the extra complexity and branching isn't worth it, considering the * common case should be that there's no expected error. + * + * It also important to point out that errors should handle deallocation, + * simplifying client-side error handling logic (this is a framework wide + * design choice where callbacks are passed). */ packet_s *packet = sock_packet_new(); packet->length = options.length;
Fix "wuffs gen" null pointer dereference
@@ -84,12 +84,14 @@ func doGenGenlib(wuffsRoot string, args []string, genlib bool) error { h := genHelper{ wuffsRoot: wuffsRoot, langs: langs, - ccompilers: *ccompilersFlag, cformatter: *cformatterFlag, genlinenum: *genlinenumFlag, skipgen: genlib && *skipgenFlag, skipgendeps: *skipgendepsFlag, } + if genlib { + h.ccompilers = *ccompilersFlag + } for _, arg := range args { recursive := strings.HasSuffix(arg, "/...")
fire and forget emulator
@@ -676,7 +676,8 @@ def logcat_process(filter = nil, device_flag = '-e', log_path = $applog_path) if log_pids.empty? puts 'Starting new logcat process' data = process_filter(filter).join(' ') - Thread.new { system("\"#{$adb}\" #{device_opts.join(' ')} logcat #{data} > \"#{log_path}\" ") } + pid = spawn("\"#{$adb}\" #{device_opts.join(' ')} logcat #{data} > \"#{log_path}\" ") + Process.detach(pid) end end end
Analysis workflow, run from other shell.
@@ -166,6 +166,20 @@ jobs: - uses: actions/checkout@v2 with: submodules: false + - name: pwsh_windows + if: ${{ matrix.test_windows == 'yes' }} + run: | + pwd + cd .. + mkdir openssl + echo "curl openssl" + curl -L -k -s -S -o openssl-1.1.1j.tar.gz https://www.openssl.org/source/openssl-1.1.1j.tar.gz + tar xzf openssl-1.1.1j.tar.gz + cd openssl-1.1.1j + ./Configure no-shared no-asm -DOPENSSL_NO_CAPIENG mingw64 --prefix="/d/a/unbound/openssl" + make + make install_sw + cd .. - name: test_windows if: ${{ matrix.test_windows == 'yes' }} shell: bash @@ -240,25 +254,23 @@ jobs: ls -l '/usr/share/perl5/vendor_perl' || echo nevermind echo '/usr/share/perl5/vendor_perl/Pod' ls -l '/usr/share/perl5/vendor_perl/Pod' || echo nevermind - echo which perl - which perl echo PATH="$PATH" export unboundpath=`pwd` echo unboundpath=${unboundpath} cd .. export prepath=`pwd` echo prepath=${prepath} - echo "curl cpanm" - curl -L -k -s -S -o cpanm https://cpanmin.us/ - echo "perl cpanm ExtUtils::Manifest" - perl cpanm ExtUtils::Manifest - echo "perl cpanm Pod::Usage" - perl cpanm Pod::Usage - mkdir openssl - echo "curl openssl" - curl -L -k -s -S -o openssl-1.1.1j.tar.gz https://www.openssl.org/source/openssl-1.1.1j.tar.gz - tar xzf openssl-1.1.1j.tar.gz - cd openssl-1.1.1j + #echo "curl cpanm" + #curl -L -k -s -S -o cpanm https://cpanmin.us/ + #echo "perl cpanm ExtUtils::Manifest" + #perl cpanm ExtUtils::Manifest + #echo "perl cpanm Pod::Usage" + #perl cpanm Pod::Usage + #mkdir openssl + #echo "curl openssl" + #curl -L -k -s -S -o openssl-1.1.1j.tar.gz https://www.openssl.org/source/openssl-1.1.1j.tar.gz + #tar xzf openssl-1.1.1j.tar.gz + #cd openssl-1.1.1j #export PERL5LIB="/c/Strawberry/perl/lib" #export PERL5LIB="/usr/share/perl5/lib:/usr/share/perl5/vendor:/usr/share/perl5/site" #echo PERL5LIB="$PERL5LIB" @@ -266,10 +278,10 @@ jobs: #cpan POD::Usage #echo "perl MCPAN" #perl -MCPAN -e "CPAN::Shell->force(qw(install POD::Usage));" - ./Configure no-shared no-asm -DOPENSSL_NO_CAPIENG mingw64 --prefix="/$prepath/openssl" - make - make install_sw - cd .. + #./Configure no-shared no-asm -DOPENSSL_NO_CAPIENG mingw64 --prefix="/$prepath/openssl" + #make + #make install_sw + #cd .. cd unbound ./configure --enable-debug --enable-static-exe --disable-flto --with-ssl=/$prepath/openssl make
add import statement to manual
@@ -173,7 +173,7 @@ have the same name. The body is a sequence of statements. Here is the complete syntax of Titan in extended BNF. As usual in extended BNF, {A} means 0 or more As, and \[A\] means an optional A. - program ::= {tlfunc | tlvar | tlrecord} + program ::= {tlfunc | tlvar | tlrecord | tlimport} tlfunc ::= [local] function Name '(' [parlist] ')' ':' type block end @@ -181,6 +181,8 @@ Here is the complete syntax of Titan in extended BNF. As usual in extended BNF, tlrecord ::= record Name recordfields end + tlimport ::= local Name '=' import LiteralString + parlist ::= Name ':' type {',' Name ':' type} type ::= integer | float | boolean | string | '{' type '}'
decision: add remark by
@@ -73,6 +73,7 @@ Improve documentation to make people more aware of these two problems: Upon returning from `kdbGet`/`kdbSet`, set the keyname of parentKey to the key that actually is parent of the data that was loaded. I.e. to the mountpoint of the backend that contains parentKey. +`parentKey` is already an inout-type argument, since we use both it's value and metadata to return some information. > @markus2330 and @atmaxinger find this behavior very unexpected
fixed problem with datetime extraction
@@ -397,8 +397,5 @@ static int pack_long(grib_accessor* a, const long* val, size_t *len) err=select_datetime(a); if (err) return err; - err=grib_set_long(a->parent->h,self->doExtractSubsets,1); - if (err) return err; - return err; }
Remove unused and legacy functions in oos_macpong.c
@@ -190,31 +190,14 @@ bool icmpv6rpl_daoSent(void) { return TRUE; } void icmpv6rpl_setMyDAGrank(dagrank_t rank) { return; } -void icmpv6rpl_killPreferredParent(void) { return; } void icmpv6rpl_updateMyDAGrankAndParentSelection(void) { return; } -void icmpv6rpl_indicateRxDIO(OpenQueueEntry_t* msg) { return; } void icmpv6echo_setIsReplyEnabled(bool isEnabled) { return; } - -void opentcp_init(void) { return; } void openudp_init(void) { return; } void opencoap_init(void) { return; } //===== L7 void openapps_init(void) { return; } -void ohlone_init(void) { return; } -void tcpecho_init(void) { return; } -void tcpinject_init(void) { return; } -void tcpinject_trigger(void) { return; } -void tcpprint_init(void) { return; } -void c6t_init(void) { return; } -void cinfo_init(void) { return; } -void cleds__init(void) { return; } -void cwellknown_init(void) { return; } - // TCP -void techo_init(void) { return; } - // UDP -void uecho_init(void) { return; }
windows/mpconfigport.h: Don't define restrict/inline/alignof for C++. The C++ standard forbids redefining keywords, like inline and alignof, so guard these definitions to avoid that, allowing to include the MicroPython headers by C++ code.
@@ -228,9 +228,11 @@ extern const struct _mp_obj_module_t mp_module_time; // CL specific definitions +#ifndef __cplusplus #define restrict #define inline __inline #define alignof(t) __alignof(t) +#endif #define PATH_MAX MICROPY_ALLOC_PATH_MAX #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
vell: Change battery/AC current sense value BRANCH=none TEST=On Vell. Battery charging current ramp to 6.4A.
/* Charger defines */ #define CONFIG_CHARGER_ISL9241 #define CONFIG_CHARGE_RAMP_SW -#define CONFIG_CHARGER_SENSE_RESISTOR 10 -#define CONFIG_CHARGER_SENSE_RESISTOR_AC 20 +#define CONFIG_CHARGER_SENSE_RESISTOR 5 +#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 /* Keyboard features */ #define CONFIG_KEYBOARD_FACTORY_TEST
added setPrioTile(..) method
@@ -98,14 +98,32 @@ public class Tile implements Comparable<Tile> * @param y * Y position in pixel */ - public static void copyTile(byte[] image8bpp, int imgW, byte[] tile8bpp, int x, int y, int size) + public static void setPrioTile(byte[] destImage8bpp, int imgW, int x, int y, int size) + { + int dstOff = (y * imgW) + x; + for (int j = 0; j < size; j++) + { + for (int i = 0; i < size; i++) + destImage8bpp[dstOff++] |= 0x80; + + dstOff += imgW - size; + } + } + + /** + * @param x + * X position in pixel + * @param y + * Y position in pixel + */ + public static void copyTile(byte[] destImage8bpp, int imgW, byte[] tile8bpp, int x, int y, int size) { int dstOff = (y * imgW) + x; int srcOff = 0; for (int j = 0; j < size; j++) { for (int i = 0; i < size; i++) - image8bpp[dstOff++] = tile8bpp[srcOff++]; + destImage8bpp[dstOff++] = tile8bpp[srcOff++]; dstOff += imgW - size; }
Log send error in client.
@@ -1205,6 +1205,16 @@ int quic_client(const char* ip_address_text, int server_port, const char * sni, if (ret == 0 && send_length > 0) { bytes_sent = sendto(fd, send_buffer, (int)send_length, 0, (struct sockaddr*)&server_address, server_addr_length); + + if (bytes_sent <= 0) + { + fprintf(stdout, "Cannot send packet to server, returns %d\n", bytes_sent); + + if (F_log != stdout && F_log != stderr) + { + fprintf(F_log, "Cannot send packet to server, returns %d\n", bytes_sent); + } + } } }
Doc: virtio-blk: add description of boot device option Add the description of option 'b' to indicate the boot device including the bootable image.
@@ -63,8 +63,11 @@ Usage: The device model configuration command syntax for virtio-blk is:: - -s <slot>,virtio-blk,<filepath>[,options] + -s <slot>,virtio-blk,[,b,]<filepath>[,options] +- ``b``: when using ``vsbl`` as the virtual bootloader, use this + immediately after ``virtio-blk`` to specify it as a bootable + device and the bootable image location. - ``filepath`` is the path of a file or disk partition - ``options`` include:
Fix field used for SVN Downgrade Opt-In, Secure Erase Policy Opt-In, and FW Activate Opt-In In a copy-paste-modify operation a field was missed in show-device for SVN Downgrade Opt-In, Secure Erase Policy Opt-In, and FW Activate Opt-In.
@@ -765,7 +765,7 @@ ShowDimms( pSVNDowngradeStr = CatSPrint(NULL, FORMAT_STR, UNKNOWN_ATTRIB_VAL); } else { - pSVNDowngradeStr = SVNDowngradeOptInToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].S3ResumeOptIn); + pSVNDowngradeStr = SVNDowngradeOptInToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].SVNDowngradeOptIn); } PRINTER_SET_KEY_VAL_WIDE_STR(pPrinterCtx, pPath, SVN_DOWNGRADE_OPT_IN_STR, pSVNDowngradeStr); FREE_POOL_SAFE(pSVNDowngradeStr); @@ -777,7 +777,7 @@ ShowDimms( pSecureErasePolicyStr = CatSPrint(NULL, FORMAT_STR, UNKNOWN_ATTRIB_VAL); } else { - pSecureErasePolicyStr = SecureErasePolicyOptInToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].S3ResumeOptIn); + pSecureErasePolicyStr = SecureErasePolicyOptInToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].SecureErasePolicyOptIn); } PRINTER_SET_KEY_VAL_WIDE_STR(pPrinterCtx, pPath, SEP_OPT_IN_STR, pSecureErasePolicyStr); FREE_POOL_SAFE(pSecureErasePolicyStr); @@ -800,7 +800,7 @@ ShowDimms( pFwActivateStr = CatSPrint(NULL, FORMAT_STR, UNKNOWN_ATTRIB_VAL); } else { - pFwActivateStr = FwActivateOptInToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].S3ResumeOptIn); + pFwActivateStr = FwActivateOptInToString(gNvmDimmCliHiiHandle, pDimms[DimmIndex].FwActivateOptIn); } PRINTER_SET_KEY_VAL_WIDE_STR(pPrinterCtx, pPath, FW_ACTIVATE_OPT_IN_STR, pFwActivateStr); FREE_POOL_SAFE(pFwActivateStr);
error: improved dump file error message
@@ -188,7 +188,11 @@ int unserialise (std::istream & is, ckdb::Key * errorKey, ckdb::KeySet * ks) } else { - ELEKTRA_SET_INSTALLATION_ERRORF (errorKey, "Wrong version detected in dumpfile: %s", command.c_str ()); + ELEKTRA_SET_VALIDATION_SYNTACTIC_ERRORF ( + errorKey, + "Unknown command detected in dumpfile: %s.\nMaybe you use a different file format? " + "Try to remount with another plugin (eg. dump, ini, ni, etc.)", + command.c_str ()); return -1; } }
Fix possible infinite loop in BN_mod_sqrt() The calculation in some cases does not finish for non-prime p. This fixes CVE-2022-0778. Based on patch by David Benjamin
@@ -14,7 +14,8 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks * algorithm (cf. Henri Cohen, "A Course in Algebraic Computational Number - * Theory", algorithm 1.5.1). 'p' must be prime! + * Theory", algorithm 1.5.1). 'p' must be prime, otherwise an error or + * an incorrect "result" will be returned. */ { BIGNUM *ret = in; @@ -303,17 +304,22 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) goto vrfy; } - /* find smallest i such that b^(2^i) = 1 */ - i = 1; + /* Find the smallest i, 0 < i < e, such that b^(2^i) = 1. */ + for (i = 1; i < e; i++) { + if (i == 1) { if (!BN_mod_sqr(t, b, p, ctx)) goto end; - while (!BN_is_one(t)) { - i++; - if (i == e) { - ERR_raise(ERR_LIB_BN, BN_R_NOT_A_SQUARE); + + } else { + if (!BN_mod_mul(t, t, t, p, ctx)) goto end; } - if (!BN_mod_mul(t, t, t, p, ctx)) + if (BN_is_one(t)) + break; + } + /* If not found, a is not a square or p is not prime. */ + if (i >= e) { + ERR_raise(ERR_LIB_BN, BN_R_NOT_A_SQUARE); goto end; }
messages: yank 1:1 DM invitations Fixes urbit/landscape#497
@@ -125,8 +125,10 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement { ); const ExtraControls = () => { - if (workspace === '/messages' && group.hidden) + if (workspace === '/messages') return ( + <> + {group.members.size >= 3 ? <Dropdown flexShrink={0} dropWidth='300px' @@ -142,21 +144,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement { color='washedGray' boxShadow='0px 0px 0px 3px' > - {group.members.size >= 3 ? ( <MessageInvite association={association} api={api} /> - ) : null} - {group.members.size === 2 ? ( - <NewChannel - api={props.api} - history={history} - workspace={{ type: 'messages' }} - borderRadius={2} - existingMembers={without( - Array.from(group.members), - window.ship - )} - /> - ) : null} </Col> } > @@ -164,6 +152,8 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement { + Add Ship </Text> </Dropdown> + : null } + </> ); if (canWrite) return (
Correctly handle unsupported client cert on Windows Server 2022
@@ -772,6 +772,10 @@ CxPlatTlsSetClientCertPolicy( "SetCredentialsAttributesW(SECPKG_ATTR_CLIENT_CERT_POLICY) failed"); } + if (SecStatus == SEC_E_UNSUPPORTED_FUNCTION) { + return QUIC_STATUS_NOT_SUPPORTED; + } + return SecStatusToQuicStatus(SecStatus); } @@ -1402,6 +1406,9 @@ CxPlatTlsSecConfigCreate( if (CredConfig->Flags & QUIC_CREDENTIAL_FLAG_REQUIRE_CLIENT_AUTHENTICATION) { Status = CxPlatTlsSetClientCertPolicy(AchContext->SecConfig); + if (QUIC_FAILED(Status)) { + goto Error; + } } QuicTraceLogVerbose(
Fix all.sh dependency on DTLS connection ID Ensure MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT is unset where MBEDTLS_SSL_DTLS_CONNECTION_ID is unset.
@@ -1238,6 +1238,7 @@ component_test_full_no_cipher () { scripts/config.py unset MBEDTLS_PSA_CRYPTO_STORAGE_C scripts/config.py unset MBEDTLS_SSL_DTLS_ANTI_REPLAY scripts/config.py unset MBEDTLS_SSL_DTLS_CONNECTION_ID + scripts/config.py unset MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 scripts/config.py unset MBEDTLS_SSL_SRV_C scripts/config.py unset MBEDTLS_USE_PSA_CRYPTO
Fix single precision Truncate___STATIC__R4__R4
float d = stack.Arg0().NumericByRefConst().r4; float res = 0.0; - float retVal = modff(d, &res); + modff(d, &res); - stack.SetResult_R4( retVal ); + stack.SetResult_R4( res ); NANOCLR_NOCLEANUP_NOLABEL();
Fix os table in sandbox being overwritten
@@ -402,7 +402,7 @@ void LuaSandbox::InitializeIOForSandbox(Sandbox& aSandbox, const std::string& ac // add in rename and remove repacements for os lib { const auto cOS = cGlobals["os"].get<sol::table>(); - sol::table osSB(luaView, sol::create); + sol::table osSB = sbEnv["os"].get<sol::table>(); osSB["rename"] = [cOS, cSBRootPath](const std::string& acOldPath, const std::string& acNewPath) -> std::tuple<sol::object, std::string> { const auto cAbsOldPath = absolute(cSBRootPath / acOldPath).make_preferred(); @@ -432,7 +432,6 @@ void LuaSandbox::InitializeIOForSandbox(Sandbox& aSandbox, const std::string& ac return std::make_tuple(cResult.get<sol::object>(), ""); return std::make_tuple(cResult.get<sol::object>(0), cResult.get<std::string>(1)); }; - sbEnv["os"] = osSB; } // add support functions for bindings
Fix test_nsalloc_realloc_long_context_in_dtd() to work in
@@ -11728,7 +11728,7 @@ START_TEST(test_nsalloc_realloc_long_context_in_dtd) "ABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDEFGHIJKLMNOPABCDEFGHIJKLMNOP" ":doc>"; ExtOption options[] = { - { "foo/First", "Hello world" }, + { XCS("foo/First"), "Hello world" }, { NULL, NULL } }; int i;
fsp: Skip sysdump retrieval only in MPIPL boot It seems we should continue to retrieval SYSDUMP except in MPIPL boot. Fixes: (fsp: Ignore platform dump notification on P9)
@@ -822,11 +822,19 @@ static bool fsp_sys_dump_notify(uint32_t cmd_sub_mod, struct fsp_msg *msg) */ static void check_ipl_sys_dump(void) { - struct dt_node *dump_node; + struct dt_node *dump_node, *opal_node; uint32_t dump_id, dump_size; - if (proc_gen >= proc_gen_p9) + if (proc_gen >= proc_gen_p9) { + opal_node = dt_find_by_path(dt_root, "ibm,opal"); + if (!opal_node) return; + dump_node = dt_find_by_path(opal_node, "dump"); + if (!dump_node) + return; + if (dt_find_property(dump_node, "mpipl-boot")) + return; + } dump_node = dt_find_by_path(dt_root, "ipl-params/platform-dump"); if (!dump_node)
Set writefds too (issue
@@ -204,7 +204,7 @@ char *ReadFromProcess(const char *command, unsigned timeout_ms) tv.tv_usec = (diff_ms % 1000) * 1000; /* Wait for data (or a timeout). */ - rc = select(fds[0] + 1, &fs, NULL, &fs, &tv); + rc = select(fds[0] + 1, &fs, &fs, &fs, &tv); if(rc == 0) { close(fds[0]); /* Timeout */
Additional safeguard in acp_remove_core
@@ -666,6 +666,7 @@ void cleaning_policy_acp_remove_core(ocf_cache_t cache, uint64_t i; ENV_BUG_ON(acp->chunks_total < acp->num_chunks[core_id]); + ENV_BUG_ON(!acp->chunk_info[core_id]); if (acp->state.in_progress && acp->state.chunk->core_id == core_id) { acp->state.in_progress = false;
Drawcia: Remove CONFIG_SYSTEM_UNLOCKED Drawcia has progressed enough in development that we no longer need to force an unlocked state on the EC. BRANCH=None TEST=make -j buildall
#undef GPIO_VOLUME_UP_L #define GPIO_VOLUME_UP_L GPIO_VOLUP_BTN_ODL_HDMI_HPD -/* System unlocked in early development */ -#define CONFIG_SYSTEM_UNLOCKED - /* Battery */ #define CONFIG_BATTERY_FUEL_GAUGE
vcl: fix event triggered after closing connections. Improve the accuracy of epoll event(EPOLLRDHUP). Type: fix
@@ -3089,8 +3089,22 @@ vcl_epoll_wait_handle_mq_event (vcl_worker_t * wrk, session_event_t * e, sid = s->session_index; session_events = s->vep.ev.events; add_event = 1; - events[*num_ev].events = EPOLLHUP | EPOLLRDHUP; + if (EPOLLRDHUP & session_events) + { + /* If app can distinguish between RDHUP and HUP, + * we make finer control */ + events[*num_ev].events = EPOLLRDHUP; + if (s->flags & VCL_SESSION_F_WR_SHUTDOWN) + { + events[*num_ev].events |= EPOLLHUP; + } + } + else + { + events[*num_ev].events = EPOLLHUP; + } session_evt_data = s->vep.ev.data.u64; + break; case SESSION_CTRL_EVT_RESET: if (!e->postponed)
mangoapp: reuse shutdown() helper Use the helper across the board, instead of open-coding it.
@@ -330,11 +330,8 @@ int main(int, char**) } // Cleanup - ImGui_ImplOpenGL3_Shutdown(); - ImGui_ImplGlfw_Shutdown(); - ImGui::DestroyContext(); + shutdown(window); - glfwDestroyWindow(window); glfwTerminate(); return 0;
gall: retry if agent fails first build
=/ tim (slav da+dat) =/ =beak [(slav %p her) desk da+tim] ?> ?=([?(%b %c) %writ *] sign-arvo) - ?^ p.sign-arvo + |^ ^+ mo-core + ?~ p.sign-arvo + (fail leaf+"gall: failed to build agent {<dap>}" ~) =/ cag=cage r.u.p.sign-arvo ?. =(%vase p.cag) - (mo-give %onto |+[leaf+"gall: invalid %writ {<p.cag>} for {<dap>}"]~) + (fail leaf+"gall: bad %writ {<p.cag>} for {<dap>}" ~) =/ res (mule |.(!<(agent !<(vase q.cag)))) ?: ?=(%| -.res) - (mo-give %onto |+[leaf+"gall: {<dap>}" p.res]) + (fail leaf+["gall: bad agent {<dap>}"] p.res) =. mo-core (mo-receive-core dap beak p.res) (mo-subscribe-to-agent-builds tim) - (mo-give %onto |+[leaf+"gall: failed to build agent {<dap>}"]~) + :: + ++ fail + |= =tang + ^+ mo-core + =. mo-core (mo-give %onto |+tang) + =/ =case [%da tim] + =/ =wire /sys/cor/[dap]/[her]/[desk]/(scot case) + (mo-pass wire %c %warp p.beak desk ~ %next %a case /app/[dap]/hoon) + -- :: +mo-handle-sys-lyv: handle notice that agents have been rebuilt :: ++ mo-handle-sys-lyv
Update xdagwallet.vcxproj.filters
<ClCompile Include="CEditWalletAddr.cpp" /> <ClCompile Include="CEditWalletAddrMine.cpp" /> <ClCompile Include="ToolTip.cpp" /> - <ClCompile Include="utils.c" /> </ItemGroup> <ItemGroup> <ClInclude Include="xdagwallet.h" /> <ClInclude Include="CEditWalletAddr.h" /> <ClInclude Include="CEditWalletAddrMine.h" /> <ClInclude Include="ToolTip.h" /> - <ClInclude Include="utils.h" /> </ItemGroup> <ItemGroup> <ResourceCompile Include="xdagwallet.rc" />
this shall be ready to go!
@@ -82,14 +82,14 @@ objects; #X obj 181 444 cyclone/!/; #X obj 181 464 cyclone/!/~; #X obj 180 539 cyclone/+=~; +#X text 64 176 You can also find alphanumeric versions of these objects +(whith the same name alias as in Max/MSP) as single binaries outside +this sub library. For more info on each operator \, check their help +file:, f 72; #X text 64 88 This is a single binary pack that contains the cyclone operators \, which are objects with non-alphanumeric names. Objects from cyclone are mostly a set of separate binaries. But you can't load non-alphanumeric objects that way in certain file systems \, so we need this sub library to load these 12 objects with such "weird" character -names. In the future \, all objects from cyclone will be loaded via +names. In the future \, all objects from cyclone shall be loaded via this library., f 72; -#X text 64 176 You can also find alphanumeric versions of these objects -(whith the same name alias as in Max/MSP) as single binaries outside -this sub library. For more info on each operator \, check their help -file:, f 72;
build/rtl8721csm: Enable error logs of binary manager Enable error logs of binary manager to make it easier to know the causes of operation failure.
@@ -1025,7 +1025,9 @@ CONFIG_DEBUG_ERROR=y # Subsystem Debug Options # # CONFIG_DEBUG_BINFMT is not set -# CONFIG_DEBUG_BINMGR is not set +# CONFIG_DEBUG_BINARY_COMPRESSION is not set +CONFIG_DEBUG_BINMGR=y +CONFIG_DEBUG_BINMGR_ERROR=y # CONFIG_DEBUG_FS is not set # CONFIG_DEBUG_LIB is not set # CONFIG_DEBUG_MM is not set
py/modio: Use correct config macro to enable resource_stream function.
@@ -131,7 +131,7 @@ STATIC const mp_obj_type_t bufwriter_type = { }; #endif // MICROPY_PY_IO_BUFFEREDWRITER -#if MICROPY_MODULE_FROZEN_STR +#if MICROPY_PY_IO_RESOURCE_STREAM STATIC mp_obj_t resource_stream(mp_obj_t package_in, mp_obj_t path_in) { VSTR_FIXED(path_buf, MICROPY_ALLOC_PATH_MAX); size_t len; @@ -179,7 +179,7 @@ STATIC mp_obj_t resource_stream(mp_obj_t package_in, mp_obj_t path_in) { mp_obj_t path_out = mp_obj_new_str(path_buf.buf, path_buf.len); return mp_builtin_open(1, &path_out, (mp_map_t*)&mp_const_empty_map); } -MP_DEFINE_CONST_FUN_OBJ_2(resource_stream_obj, resource_stream); +STATIC MP_DEFINE_CONST_FUN_OBJ_2(resource_stream_obj, resource_stream); #endif STATIC const mp_rom_map_elem_t mp_module_io_globals_table[] = {
Remove ocf_metadata_hash_entries_hash()
@@ -2347,18 +2347,6 @@ static void ocf_metadata_hash_set_hash(struct ocf_cache *cache, ocf_metadata_error(cache); } -/* - * Hash Table - Get Entries - */ -static ocf_cache_line_t ocf_metadata_hash_entries_hash( - struct ocf_cache *cache) -{ - struct ocf_metadata_hash_ctrl *ctrl - = (struct ocf_metadata_hash_ctrl *) cache->metadata.iface_priv; - - return ctrl->raw_desc[metadata_segment_hash].entries; -} - /******************************************************************************* * Cleaning Policy ******************************************************************************/ @@ -2767,7 +2755,6 @@ static const struct ocf_metadata_iface metadata_hash_iface = { */ .get_hash = ocf_metadata_hash_get_hash, .set_hash = ocf_metadata_hash_set_hash, - .entries_hash = ocf_metadata_hash_entries_hash, /* * Cleaning Policy
Don't clobber postmaster sigmask in dsm_impl_resize. Commit intended to block signals in regular backends that allocate DSM segments, but dsm_impl_resize() is also reached by dsm_postmaster_startup(). It's not OK to clobber the postmaster's signal mask, so only manipulate the signal mask when under the postmaster. Back-patch to all releases, like Discussion:
@@ -352,6 +352,7 @@ dsm_impl_posix_resize(int fd, off_t size) * allowed SIGUSR1 to interrupt us repeatedly (for example, due to recovery * conflicts), the retry loop might never succeed. */ + if (IsUnderPostmaster) PG_SETMASK(&BlockSig); /* Truncate (or extend) the file to the requested size. */ @@ -390,9 +391,12 @@ dsm_impl_posix_resize(int fd, off_t size) } #endif /* HAVE_POSIX_FALLOCATE && __linux__ */ + if (IsUnderPostmaster) + { save_errno = errno; PG_SETMASK(&UnBlockSig); errno = save_errno; + } return rc; }
fix omc example error
@@ -105,7 +105,7 @@ void initManipulator() chain.initKinematics(kinematics); #ifdef PLATFORM ////////////////////////////////////Actuator init chain.initActuator(actuator); - chain.setActuatorPositionControlMode(5, 200, 50); + chain.setActuatorControlMode(); uint32_t baud_rate = BAUD_RATE; void *p_baud_rate = &baud_rate;
HTTP parser: excluding leading and trailing tabs from field values. As required by RFC 7230.
@@ -618,7 +618,9 @@ nxt_http_parse_field_value(nxt_http_request_parse_t *rp, u_char **pos, return NXT_AGAIN; } - if (*p != ' ') { + ch = *p; + + if (ch != ' ' && ch != '\t') { break; } @@ -662,7 +664,8 @@ nxt_http_parse_field_value(nxt_http_request_parse_t *rp, u_char **pos, *pos = p; if (nxt_fast_path(p != start)) { - while (p[-1] == ' ') { + + while (p[-1] == ' ' || p[-1] == '\t') { p--; } }
nshlib/nsh_slcd.c: Use file descriptor zero for the NSH console.
@@ -93,7 +93,7 @@ static int nsh_clone_console(FAR struct console_stdio_s *pstate) /* Use /dev/console as console input */ - pstate->cn_confd = fd; + pstate->cn_confd = 0; /* Create a standard C stream on the console device */
core/cache: do split appoint + get processing
@@ -908,6 +908,39 @@ int kdbGet (KDB * handle, KeySet * ks, Key * parentKey) // set_bit (ks->flags, KS_FLAG_MMAP_ARRAY); ksAppend (ks, cache); // TODO: test ksAppend because correctness output_keyset (global); + + + // Appoint keys (some in the bypass) + if (splitAppoint (split, handle, ks) == -1) + { + clearError (parentKey); + ELEKTRA_SET_ERROR (38, parentKey, "error in splitAppoint"); + goto error; + } + + /* Now post-process the updated keysets */ + if (splitGet (split, parentKey, handle) == -1) + { + ELEKTRA_ADD_WARNING (108, parentKey, keyName (ksCurrent (ks))); + // continue, because sizes are already updated + } + +// splitMerge (split, ks); +// ksRewind (ks); + + keySetName (parentKey, keyName (initialParent)); + elektraGlobalGet (handle, ks, parentKey, POSTGETSTORAGE, INIT); + elektraGlobalGet (handle, ks, parentKey, POSTGETSTORAGE, MAXONCE); + elektraGlobalGet (handle, ks, parentKey, POSTGETSTORAGE, DEINIT); + splitUpdateFileName (split, handle, parentKey); + keyDel (initialParent); + keyDel (oldError); + splitDel (split); + errno = errnosave; +// ELEKTRA_LOG_DEBUG (">>>>>>>>>>>>>> PRINT RETURNED KEYSET"); +// output_keyset (ks); +// ELEKTRA_LOG_DEBUG (">>>>>>>>>>>>>> END RETURNED KEYSET"); + return 1; } // intentional fallthrough case 0: // We don't need an update so let's do nothing @@ -1023,9 +1056,9 @@ int kdbGet (KDB * handle, KeySet * ks, Key * parentKey) keyDel (oldError); splitDel (split); errno = errnosave; - ELEKTRA_LOG_DEBUG (">>>>>>>>>>>>>> PRINT RETURNED KEYSET"); - output_keyset (ks); - ELEKTRA_LOG_DEBUG (">>>>>>>>>>>>>> END RETURNED KEYSET"); +// ELEKTRA_LOG_DEBUG (">>>>>>>>>>>>>> PRINT RETURNED KEYSET"); +// output_keyset (ks); +// ELEKTRA_LOG_DEBUG (">>>>>>>>>>>>>> END RETURNED KEYSET"); return 1; error:
Drop unneeded tox steps.
@@ -24,10 +24,6 @@ jobs: run: sudo apt install -y apache2-dev - name: "Update pip" run: python -m pip install --upgrade pip setuptools - #- name: "Install tox dependencies" - # run: python -m pip install --upgrade tox tox-gh-actions - #- name: "Run tox for ${{ matrix.python-version }}" - # run: "python -m tox -vvv" - name: "Install mod_wsgi-express" run: python -m pip install . - name: "Run mod_wsgi-express test"
Add more tests for Julian <-> datetime conversion
@@ -181,12 +181,47 @@ static void Test3() } } +static void Test4() +{ + const long iyear = 1582; + + TestDateTime(iyear, 9, 1, 1, 0, 0); + TestDateTime(iyear, 9, 2, 1, 0, 0); + TestDateTime(iyear, 9, 3, 1, 0, 0); + TestDateTime(iyear, 9, 4, 1, 0, 0); + TestDateTime(iyear, 9, 4, 16, 0, 0); + + /* TODO */ + /* TestDateTime(iyear, 10, 5, 1, 0, 0); */ + TestDateTime(iyear, 10, 1, 1, 0, 0); + TestDateTime(iyear, 10, 2, 1, 0, 0); + TestDateTime(iyear, 10, 3, 1, 0, 0); + TestDateTime(iyear, 10, 4, 1, 0, 0); + TestDateTime(iyear, 10, 15, 1, 0, 0); + + TestDateTime(iyear, 11, 1, 1, 0, 0); + TestDateTime(iyear, 11, 2, 1, 0, 0); + TestDateTime(iyear, 11, 3, 1, 0, 0); + TestDateTime(iyear, 11, 4, 1, 0, 0); + TestDateTime(iyear, 11, 5, 1, 0, 0); + TestDateTime(iyear, 11, 5, 15, 0, 0); + + /* TODO + * for (imnth = 1; imnth <= 12; imnth += 1) { + * for (iday = 1; iday <= 28; iday += 1) { + * TestDateTime(iyear, imnth, iday, 1, 0, 0); + * } + * } + */ +} + int main(int argc, char* argv[]) { Test0(); Test1(); Test2(); Test3(); + Test4(); printf("All OK\n"); return 0; }
doc: updated man pages for the Qt-Gui
.\" generated with Ronn-NG/v0.10.1 .\" http://github.com/apjanke/ronn-ng/tree/0.10.1.pre1 -.TH "README" "" "April 2021" "" +.TH "README" "" "December 2021" "" .SH "Introduction" The tool \fBqt\-gui\fR offers a graphical interface for users of Elektra\. It allows users to create, manage, edit, and delete keys stored in the global key database (KDB)\. .SH "Compiling and Installation" @@ -25,7 +25,20 @@ Optional dependencies are (are automatically deactivated if dependencies are not \fBQt5DBus\fR so that \fBqt\-gui\fR will be notified on changes\. .IP "" 0 .P -I was able to install the correct dependencies on my system, running Kubuntu 14\.10 using the command: \fBsudo apt\-get install qt5\-default qml\-module\-qtquick\-controls qml\-module\-qtquick\-dialogs qml\-module\-qtquick\-layouts qml\-module\-qtgraphicaleffects libdrm\-dev libmarkdown2\-dev libqt5svg5\-dev\fR +On Ubuntu you can install the dependencies with +.IP "" 4 +.nf +sudo apt\-get install \e + qt5\-default \e + qml\-module\-qtquick\-controls \e + qml\-module\-qtquick\-dialogs \e + qml\-module\-qtquick\-layouts \e + qml\-module\-qtgraphicaleffects \e + libdrm\-dev \e + libmarkdown2\-dev \e + libqt5svg5\-dev +.fi +.IP "" 0 .SS "Change Notification" It is recommended to use the viewer mode if DBus notifications are expected\. Use "Settings \-> Viewermode" to activate the viewermode\. .P @@ -56,4 +69,24 @@ The following command will launch the Qt\-GUI: kdb qt\-gui .fi .IP "" 0 +.P +After that a window will open that looks something like that: +.P +.P +You can mount a backend by going to \fIDatabase\fR \-\-> \fIMount Backend\|\.\|\.\|\.\fR +.P +.P +This will open the mounting wizard where you can add a path: +.P +.P +Next you can browse through the available backends and read their documentation\. +.P +.P +After you are done reading the documentation you can close the window again\. +.P +If you want to add a new key to the database you can choose a namespace in the left panel then click on Edit \-\-> New \-\-> Key\. This will open a new window that looks like this: +.P +.P +After entering the key information, you can view it in the list view\. Just click on the namespace you chose and select the key\. +.P
Add tests for peg/find and peg/find-all
@@ -332,4 +332,10 @@ neldb\0\0\0\xD8\x05printG\x01\0\xDE\xDE\xDE'\x03\0marshal_tes/\x02 (assert (= :keyword (keyword/slice "some_keyword_slice" 5 12)) "keyword slice") (assert (= 'symbol (symbol/slice "some_symbol_slice" 5 11)) "symbol slice") +# Peg find and find-all +(def p "/usr/local/bin/janet") +(assert (= (peg/find '"n/" p) 13) "peg find 1") +(assert (not (peg/find '"t/" p)) "peg find 2") +(assert (deep= (peg/find-all '"/" p) @[0 4 10 14]) "peg find-all") + (end-suite)
esp_wifi: update esp_wifi_internal_set_fix_rate usage
@@ -251,6 +251,7 @@ esp_err_t esp_wifi_internal_set_sta_ip(void); * * @attention 1. If fixed rate is enabled, both management and data frame are transmitted with fixed rate * @attention 2. Make sure that the receiver is able to receive the frame with the fixed rate if you want the frame to be received + * @attention 3. Not support to set fix rate for espnow and 80211_tx * * @param ifx : wifi interface * @param en : false - disable, true - enable
Refactor to catch errors
@@ -51,13 +51,17 @@ def ACCTest(String label, String compiler, String build_type, List extra_cmake_a if (fresh_install) { sh """ sudo bash scripts/ansible/install-ansible.sh - # Run ACC Playbook - for i in 1 2 3 4 5 - do - sudo \$(which ansible-playbook) scripts/ansible/oe-contributors-acc-setup.yml && break - sleep 60 - done """ + retry(5) { + ret = sh( + script: 'sudo ansible-playbook scripts/ansible/oe-contributors-acc-setup.yml', + returnStatus: true + ) + if (ret != 0) { + sleep time: 60, unit: 'SECONDS' + error "Failed OE Ansible setup. Retrying..." + } + } } sh """ sudo apt list --installed | grep sgx
Verify input data lengths.
@@ -100,7 +100,8 @@ void mbedtls_ccm_free( mbedtls_ccm_context *ctx ) #define CCM_STATE__CLEAR 0 #define CCM_STATE__STARTED (1 << 0) #define CCM_STATE__LENGHTS_SET (1 << 1) -#define CCM_STATE__ERROR (1 << 2) +#define CCM_STATE__AUTH_DATA_FINISHED (1 << 2) +#define CCM_STATE__ERROR (1 << 4) /* * Encrypt or decrypt a partial block with CTR @@ -266,13 +267,27 @@ int mbedtls_ccm_update_ad( mbedtls_ccm_context *ctx, if( ctx->add_len > 0 && add_len > 0 ) { + if( ctx->state & CCM_STATE__AUTH_DATA_FINISHED ) + { + return ret; + } + if( ctx->processed == 0 ) { + if ( add_len > ctx->add_len ) + { + return MBEDTLS_ERR_CCM_BAD_INPUT; + } + ctx->y[0] ^= (unsigned char)( ( ctx->add_len >> 8 ) & 0xFF ); ctx->y[1] ^= (unsigned char)( ( ctx->add_len ) & 0xFF ); ctx->processed += 2; } + else if ( ctx->processed - 2 + add_len > ctx->add_len ) + { + return MBEDTLS_ERR_CCM_BAD_INPUT; + } while( add_len > 0 ) { @@ -299,10 +314,13 @@ int mbedtls_ccm_update_ad( mbedtls_ccm_context *ctx, } } } - } if( ctx->processed - 2 == ctx->add_len ) + { + ctx->state |= CCM_STATE__AUTH_DATA_FINISHED; ctx->processed = 0; // prepare for mbedtls_ccm_update() + } + } return (0); } @@ -321,6 +339,11 @@ int mbedtls_ccm_update( mbedtls_ccm_context *ctx, return ret; } + if( ctx->processed + input_len > ctx->plaintext_len ) + { + return MBEDTLS_ERR_CCM_BAD_INPUT; + } + if( output_size < input_len ) return( MBEDTLS_ERR_CCM_BAD_INPUT ); *output_len = input_len; @@ -402,6 +425,16 @@ int mbedtls_ccm_finish( mbedtls_ccm_context *ctx, return ret; } + if( ctx->add_len > 0 && !( ctx->state & CCM_STATE__AUTH_DATA_FINISHED ) ) + { + return ret; + } + + if( ctx->plaintext_len > 0 && ctx->processed != ctx->plaintext_len ) + { + return ret; + } + /* * Authentication: reset counter and crypt/mask internal tag */
.github/workflows/ports_unix.yml: reproducible: Update for Pycopy.
@@ -35,7 +35,7 @@ jobs: env: SOURCE_DATE_EPOCH: 1234567890 - name: Check reproducible build date - run: echo | ports/unix/micropython-minimal -i | grep 'on 2009-02-13;' + run: echo | ports/unix/pycopy-minimal -i | grep 'on 2009-02-13;' standard: runs-on: ubuntu-latest
Deny pgx v3 for cloud/mdb
@@ -85,6 +85,8 @@ ALLOW .* -> vendor/github.com/jackc/pgx/v4 ALLOW .* -> vendor/github.com/jackc/pgconn ALLOW .* -> vendor/github.com/jackc/pgtype # v3 is to be deprecated in the future +# deny v3 for MDB, responsible: @sidh +DENY cloud/mdb -> vendor/github.com/jackc/pgx ALLOW .* -> vendor/github.com/jackc/pgx # database/sql wrapper with a lot of helper functions
NULL sample_buf to prevent re-use after free
@@ -1996,6 +1996,7 @@ static ACVP_RESULT acvp_get_result_test_session(ACVP_CTX *ctx, char *session_url ACVP_LOG_ERR("%s", ctx->sample_buf); } free(ctx->sample_buf); + ctx->sample_buf = NULL; } } }
Fix external_entity_param() to work for builds
@@ -4263,14 +4263,14 @@ external_entity_param(XML_Parser parser, if (ext_parser == NULL) fail("Could not create external entity parser"); - if (!strcmp(systemId, "004-1.ent")) { + if (!xcstrcmp(systemId, XCS("004-1.ent"))) { if (_XML_Parse_SINGLE_BYTES(ext_parser, text1, strlen(text1), XML_TRUE) != XML_STATUS_ERROR) fail("Inner DTD with invalid tag not rejected"); if (XML_GetErrorCode(ext_parser) != XML_ERROR_EXTERNAL_ENTITY_HANDLING) xml_failure(ext_parser); } - else if (!strcmp(systemId, "004-2.ent")) { + else if (!xcstrcmp(systemId, XCS("004-2.ent"))) { if (_XML_Parse_SINGLE_BYTES(ext_parser, text2, strlen(text2), XML_TRUE) != XML_STATUS_ERROR) fail("Invalid tag in external param not rejected");
chat: equally size both code + s3 buttons
@@ -387,7 +387,7 @@ export class ChatInput extends Component { </div> <div style={{ height: '16px', width: '16px', flexBasis: 16, marginTop: 10 }}> <img - style={{ filter: state.code && 'invert(100%)', height: '100%', width: '100%' }} + style={{ filter: state.code && 'invert(100%)', height: '14px', width: '14px' }} onClick={this.toggleCode} src="/~chat/img/CodeEval.png" className="contrast-10-d bg-white bg-none-d ba b--gray1-d br1"
build: bump to v2.0.2
@@ -4,7 +4,7 @@ project(fluent-bit) # Fluent Bit Version set(FLB_VERSION_MAJOR 2) set(FLB_VERSION_MINOR 0) -set(FLB_VERSION_PATCH 1) +set(FLB_VERSION_PATCH 2) set(FLB_VERSION_STR "${FLB_VERSION_MAJOR}.${FLB_VERSION_MINOR}.${FLB_VERSION_PATCH}") set(CMAKE_POSITION_INDEPENDENT_CODE ON)
[build/scripts] support recursive dir copying in fs_tools (ignoring symlinks)
@@ -9,6 +9,9 @@ if __name__ == '__main__': if mode == 'copy': shutil.copy(args[0], args[1]) + elif mode == 'copy_tree_no_link': + dst = args[1] + shutil.copytree(args[0], dst, ignore=lambda dirname, names: [n for n in names if os.path.islink(os.path.join(dirname, n))]) elif mode == 'copy_files': src = args[0] dst = args[1]
added action name into the bitstream file name
set root_dir $::env(SNAP_HARDWARE_ROOT) set logs_dir $::env(LOGS_DIR) set img_dir $::env(IMG_DIR) +set action_root $::env(ACTION_ROOT) set sdram_used $::env(SDRAM_USED) set nvme_used $::env(NVME_USED) set bram_used $::env(BRAM_USED) @@ -43,7 +44,15 @@ set ::env(WIDTHCOL4) $widthCol4 ## ## generating bitstream name set IMAGE_NAME [exec cat $root_dir/.bitstream_name.txt] + +# append action name +set ACTION_NAME [lrange [file split $action_root] end end] +append IMAGE_NAME [format {_%s} $ACTION_NAME] + +# append nvme append IMAGE_NAME [expr {$nvme_used == "TRUE" ? "_NVME" : ""}] + +# append ram_type and timing information if { $bram_used == "TRUE" } { set RAM_TYPE BRAM } elseif { $sdram_used == "TRUE" } { @@ -53,7 +62,6 @@ if { $bram_used == "TRUE" } { } append IMAGE_NAME [format {_%s_%s_%s} $RAM_TYPE $fpgacard $::env(TIMING_WNS)] - ## ## writing bitstream set step write_bitstream
simd128: any_true implementations for Arm
@@ -3371,22 +3371,31 @@ simde_wasm_v128_any_true (simde_v128_t a) { return wasm_v128_any_true(a); #else simde_v128_private a_ = simde_v128_to_private(a); - int_fast32_t r = 0; + simde_bool r = 0; #if defined(SIMDE_X86_SSE4_1_NATIVE) r = !_mm_test_all_zeros(a_.sse_m128i, _mm_set1_epi32(~INT32_C(0))); #elif defined(SIMDE_X86_SSE2_NATIVE) r = _mm_movemask_epi8(_mm_cmpeq_epi8(a_.sse_m128i, _mm_setzero_si128())) != 0xffff; + #elif defined(SIMDE_ARM_NEON_A64V8_NATIVE) + r = !!vmaxvq_u32(a_.neon_u32); + #elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) + uint32x2_t tmp = vpmax_u32(vget_low_u32(a_.u32), vget_high_u32(a_.u32)); + r = vget_lane_u32(tmp, 0); + r |= vget_lane_u32(tmp, 1); + r = !!r; #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) r = HEDLEY_STATIC_CAST(simde_bool, vec_any_ne(a_.altivec_i32, vec_splats(0))); #else - SIMDE_VECTORIZE_REDUCTION(|:r) + int_fast32_t ri = 0; + SIMDE_VECTORIZE_REDUCTION(|:ri) for (size_t i = 0 ; i < (sizeof(a_.i32f) / sizeof(a_.i32f[0])) ; i++) { - r |= (a_.i32f[i]); + ri |= (a_.i32f[i]); } + r = !!ri; #endif - return HEDLEY_STATIC_CAST(simde_bool, r); + return r; #endif } #if defined(SIMDE_WASM_SIMD128_ENABLE_NATIVE_ALIASES)
Change the way Elektra is installed
@@ -82,10 +82,10 @@ docker run -it --rm \ After starting the container, you should be automatically inside it in the working directory `/home/jenkins/workspace`. -Create folder for building the project and `cd` to it like this: +Create folder for building the project, `cd` to it and create another folder where Elektra will be installed like this: ```sh -mkdir build-docker && cd build-docker +mkdir build-docker && cd build-docker && mkdir install ``` Build it with @@ -99,7 +99,8 @@ Build it with -DKDB_DB_HOME="$PWD" \ -DKDB_DB_SYSTEM="$PWD/.config/kdb/system" \ -DKDB_DB_SPEC="$PWD/.config/kdb/system" \ --DINSTALL_SYSTEM_FILES="OFF" +-DINSTALL_SYSTEM_FILES="OFF" \ +-DCMAKE_INSTALL_PREFIX="$PWD/install" ``` and then with @@ -118,6 +119,12 @@ Just run this command: make install ``` +After Elektra has been installed we need to add it to the PATH variable, meaning you and the tests can interact with Elektra by typing/executing `kdb` in the command line. + +```sh +export PATH="$PWD/install/bin:$PATH" +``` + ### 4. Run Tests Finally run the tests. There are two sets of tests. Run the first one with this command:
Enable ThreadSanitizer in CI tests Adds an entry with -fsanitize=thread to the Travis CI build matrix.
@@ -19,7 +19,13 @@ matrix: include: - compiler: clang + env: KVZ_TEST_VALGRIND=1 + + - compiler: clang + env: CFLAGS='-fsanitize=thread' + - compiler: gcc-4.8 + env: KVZ_TEST_VALGRIND=1 # We have some Mac specific code and Mac sometimes has odd build issues. - os: osx @@ -29,6 +35,7 @@ matrix: - ./autogen.sh - ./configure --enable-werror - make --jobs=2 V=1 + - make check TESTS=kvazaar_tests install: bash .travis-install.bash @@ -36,7 +43,7 @@ script: - ./autogen.sh - ./configure --enable-werror - make --jobs=2 V=1 - - make check KVZ_TEST_VALGRIND=1 VERBOSE=1 + - make check VERBOSE=1 after_script: # Disable errors to work around Travis not knowing how to fix their stuff.
Add test for EVP_PKEY_Q_keygen Test for
@@ -442,6 +442,19 @@ static int test_ecx_tofrom_data_select(void) } #endif +#ifndef OPENSSL_NO_SM2 +static int test_sm2_tofrom_data_select(void) +{ + int ret; + EVP_PKEY *key = NULL; + + ret = TEST_ptr(key = EVP_PKEY_Q_keygen(mainctx, NULL, "SM2")) + && TEST_true(do_pkey_tofrom_data_select(key, "SM2")); + EVP_PKEY_free(key); + return ret; +} +#endif + static int test_rsa_tofrom_data_select(void) { int ret; @@ -1181,6 +1194,9 @@ int setup_tests(void) #else ADD_ALL_TESTS(test_d2i_PrivateKey_ex, 1); #endif +#ifndef OPENSSL_NO_SM2 + ADD_TEST(test_sm2_tofrom_data_select); +#endif #ifndef OPENSSL_NO_DSA ADD_TEST(test_dsa_todata); ADD_TEST(test_dsa_tofrom_data_select);
util/gen_emmc_transfer_data.c: Format with clang-format BRANCH=none TEST=none
@@ -46,8 +46,7 @@ void header_format(FILE *fin, FILE *fout) "#define __CROS_EC_BOOTBLOCK_DATA_H\n" "\n" "#include <stdint.h>\n" - "\n" - ); + "\n"); fprintf(fout, "static const uint8_t %s[] __attribute__((aligned(4))) =\n" @@ -69,13 +68,14 @@ void header_format(FILE *fin, FILE *fout) fprintf(fout, "\t/* Block %d (%ld) */\n", blk, cnt); fprintf(fout, "\t0xff, 0xfe, /* idle, start bit. */"); for (j = 0; j < sizeof(data); j++) { - fprintf(fout, "%s0x%02x,", - (j % 8) == 0 ? "\n\t" : " ", data[j]); + fprintf(fout, "%s0x%02x,", (j % 8) == 0 ? "\n\t" : " ", + data[j]); crc16 = crc16_arg(data[j], crc16); } fprintf(fout, "\n"); - fprintf(fout, "\t0x%02x, 0x%02x, 0xff," + fprintf(fout, + "\t0x%02x, 0x%02x, 0xff," " /* CRC, end bit, idle */\n", crc16 >> 8, crc16 & 0xff); } @@ -96,16 +96,14 @@ int main(int argc, char **argv) FILE *fout = NULL; const char short_opts[] = "i:ho:"; - const struct option long_opts[] = { - { "input", 1, NULL, 'i' }, + const struct option long_opts[] = { { "input", 1, NULL, 'i' }, { "help", 0, NULL, 'h' }, { "out", 1, NULL, 'o' }, - { NULL } - }; + { NULL } }; const char usage[] = "USAGE: %s [-i <input>] -o <output>\n"; - while ((nopt = getopt_long(argc, argv, short_opts, long_opts, - NULL)) != -1) { + while ((nopt = getopt_long(argc, argv, short_opts, long_opts, NULL)) != + -1) { switch (nopt) { case 'i': /* -i or --input*/ input_name = optarg;
Connect debug clocks when debug is tied off
@@ -256,8 +256,9 @@ class WithTiedOffDebug extends OverrideIOBinder({ Debug.tieoffDebug(debugPortOpt, resetctrlOpt, Some(psdPort))(system.p) // tieoffDebug doesn't actually tie everything off :/ debugPortOpt.foreach { d => - d.clockeddmi.foreach({ cdmi => cdmi.dmi.req.bits := DontCare }) + d.clockeddmi.foreach({ cdmi => cdmi.dmi.req.bits := DontCare; cdmi.dmiClock := th.clock }) d.dmactiveAck := DontCare + d.clock := th.clock } Nil }