message
stringlengths
6
474
diff
stringlengths
8
5.22k
build-homepage: exclude interpreter plugins
@@ -9,17 +9,19 @@ set -x ROOT_DIR=$PWD # build the applications -mkdir -p build -cd build +rm -rf build && mkdir -p build && cd build +# concrete install location is configurable +if [ -z "${INSTALL_PATH}" ] ; then INSTALL_PATH="/usr/local/elektra_backend" +fi C_FLAGS='-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-protector-strong -Wstack-protector -fPIE -pie' LD_FLAGS='-Wl,-z,now -Wl,-z,relro' cmake -DENABLE_ASAN=ON -DBUILD_FULL=OFF -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DBUILD_DOCUMENTATION=OFF \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PATH}" -DINSTALL_SYSTEM_FILES=OFF \ - -DPLUGINS='ALL;-fstab;-semlock;file;-xerces' \ + -DPLUGINS='ALL;-fstab;-semlock;file;-xerces;-ruby;-lua;-python;-python2' \ -DTOOLS='kdb;rest-backend;rest-frontend' \ -DCMAKE_C_FLAGS="$C_FLAGS" \ -DCMAKE_CXX_FLAGS="$C_FLAGS" \ @@ -32,8 +34,8 @@ make -j 3 make run_nokdbtests # rotate backup of previous website -rm -rf /usr/local/share/elektra/tool_data_backup -cp -ra /usr/local/share/elektra/tool_data /usr/local/share/elektra/tool_data_backup +rm -rf ${INSTALL_PATH}/share/elektra/tool_data_backup +cp -ra ${INSTALL_PATH}/share/elektra/tool_data ${INSTALL_PATH}/share/elektra/tool_data_backup # if tests were ok, we can install make install
DOC: Fix example in OSSL_PARAM_int.pod This fixes an incorrect NULL check. Fixes
@@ -362,11 +362,11 @@ could fill in the parameters like this: OSSL_PARAM *p; - if ((p = OSSL_PARAM_locate(params, "foo")) == NULL) + if ((p = OSSL_PARAM_locate(params, "foo")) != NULL) OSSL_PARAM_set_utf8_ptr(p, "foo value"); - if ((p = OSSL_PARAM_locate(params, "bar")) == NULL) + if ((p = OSSL_PARAM_locate(params, "bar")) != NULL) OSSL_PARAM_set_utf8_ptr(p, "bar value"); - if ((p = OSSL_PARAM_locate(params, "cookie")) == NULL) + if ((p = OSSL_PARAM_locate(params, "cookie")) != NULL) OSSL_PARAM_set_utf8_ptr(p, "cookie value"); =head1 SEE ALSO
Send queue implementation
@@ -19,6 +19,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ using System; +using System.Collections.Concurrent; +using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; @@ -56,9 +58,10 @@ namespace MiningCore.JsonRpc private readonly ILogger logger = LogManager.GetCurrentClassLogger(); private readonly JsonSerializerSettings serializerSettings; - private Tcp upstream; - private Loop loop; private const int MaxRequestLength = 8192; + private object queueLock = new object(); + private Queue<byte[]> sendQueue; + private Async sendQueueDrainer; #region Implementation of IJsonRpcConnection @@ -66,15 +69,19 @@ namespace MiningCore.JsonRpc { Contract.RequiresNonNull(tcp, nameof(tcp)); - this.loop = loop; - upstream = tcp; + // cached properties ConnectionId = connectionId; + RemoteEndPoint = tcp.GetPeerEndPoint(); + + // initialize send queue + sendQueue = new Queue<byte[]>(); + sendQueueDrainer = loop.CreateAsync(handle => DrainSendQueue(tcp)); var incomingLines = Observable.Create<string>(observer => { var sb = new StringBuilder(); - this.upstream.OnRead((handle, buffer) => + tcp.OnRead((handle, buffer) => { // onAccept var data = buffer.ReadString(Encoding.UTF8); @@ -112,17 +119,22 @@ namespace MiningCore.JsonRpc // onCompleted observer.OnCompleted(); - if (upstream.IsValid) - upstream.CloseHandle(); + // release handles + handle.CloseHandle(); + + lock (queueLock) + { + sendQueueDrainer.CloseHandle(); + } }); return Disposable.Create(() => { - if (upstream.IsValid) + if (tcp.IsValid) { logger.Debug(() => $"[{ConnectionId}] Last subscriber disconnected from receiver stream"); - upstream.Shutdown(); + tcp.Shutdown(); } }); }); @@ -152,7 +164,7 @@ namespace MiningCore.JsonRpc SendInternal(Encoding.UTF8.GetBytes(json + '\n')); } - public IPEndPoint RemoteEndPoint => upstream?.GetPeerEndPoint(); + public IPEndPoint RemoteEndPoint { get; private set; } public string ConnectionId { get; private set; } #endregion @@ -161,17 +173,35 @@ namespace MiningCore.JsonRpc { Contract.RequiresNonNull(data, nameof(data)); - var marshaller = loop.CreateAsync(handle => + lock (queueLock) { - if (upstream.IsValid && !upstream.IsClosing && upstream.IsWritable) + if (sendQueueDrainer.IsValid) { - upstream.QueueWrite(data); + sendQueue.Enqueue(data); + sendQueueDrainer.Send(); + } + } } - handle.Dispose(); - }); + private void DrainSendQueue(Tcp tcp) + { + try + { + byte[] data; + lock (queueLock) + { + while (sendQueue.TryDequeue(out data) && + tcp.IsValid && !tcp.IsClosing && tcp.IsWritable) + { + tcp.QueueWrite(data); + } + } + } - marshaller.Send(); + catch (Exception ex) + { + logger.Error(ex); + } } } }
atsam3u - Remove SWD clock speed customization Remove the atsam3u clock speed customization. With sequential code optimization turned on each instruction takes the same number of clock cycles as that of a a normal cortex-m4 device.
// Clock Macros -#if defined(INTERFACE_SAM3U2C) - #define MAX_SWJ_CLOCK(delay_cycles) \ - (CPU_CLOCK / ((delay_cycles + IO_PORT_WRITE_CYCLES) * 20/*14*/)) - #define CLOCK_DELAY(swj_clock) \ - ((CPU_CLOCK / (swj_clock * /*20*/14)) - IO_PORT_WRITE_CYCLES) -#else #define MAX_SWJ_CLOCK(delay_cycles) \ (CPU_CLOCK/2 / (IO_PORT_WRITE_CYCLES + delay_cycles)) + #define CLOCK_DELAY(swj_clock) \ ((CPU_CLOCK/2 / swj_clock) - IO_PORT_WRITE_CYCLES) -#endif DAP_Data_t DAP_Data; // DAP Data
sub shm BUGFIX no mem error is no longer special
@@ -185,12 +185,7 @@ sr_shmsub_notify_finish_wrunlock(sr_sub_shm_t *sub_shm, size_t shm_struct_size, err_xpath = ptr; - if (err_code == SR_ERR_NOMEM) { - /* exception for this error */ - sr_errinfo_new(cb_err_info, err_code, NULL, NULL); - } else { sr_errinfo_new(cb_err_info, err_code, err_xpath[0] ? err_xpath : NULL, err_msg[0] ? err_msg : sr_strerror(err_code)); - } } else if (sub_shm->event == SR_SUB_EV_SUCCESS) { /* we were notified about the success and can clear it now */ sub_shm->event = SR_SUB_EV_NONE;
Fix interfaces order.
@@ -2175,15 +2175,6 @@ const U8 USBD_ConfigDescriptor[] = { MSC_EP #endif -#if (USBD_HID_ENABLE) - HID_DESC -#if (USBD_HID_EP_INTOUT != 0) - HID_EP_INOUT -#else - HID_EP -#endif -#endif - #if (USBD_CDC_ACM_ENABLE) #if (USBD_MULTI_IF) CDC_ACM_DESC_IAD(USBD_CDC_ACM_CIF_NUM, 2) @@ -2194,6 +2185,15 @@ const U8 USBD_ConfigDescriptor[] = { CDC_ACM_EP_IF1 #endif +#if (USBD_HID_ENABLE) + HID_DESC +#if (USBD_HID_EP_INTOUT != 0) + HID_EP_INOUT +#else + HID_EP +#endif +#endif + #if (USBD_WEBUSB_ENABLE) WEBUSB_DESC #endif @@ -2239,6 +2239,16 @@ const U8 USBD_ConfigDescriptor_HS[] = { MSC_EP_HS #endif +#if (USBD_CDC_ACM_ENABLE) +#if (USBD_MULTI_IF) + CDC_ACM_DESC_IAD(USBD_CDC_ACM_CIF_NUM, 2) +#endif + CDC_ACM_DESC_IF0 + CDC_ACM_EP_IF0_HS + CDC_ACM_DESC_IF1 + CDC_ACM_EP_IF1_HS +#endif + #if (USBD_HID_ENABLE) HID_DESC #if (USBD_HID_EP_INTOUT != 0) @@ -2252,16 +2262,6 @@ const U8 USBD_ConfigDescriptor_HS[] = { WEBUSB_DESC #endif -#if (USBD_CDC_ACM_ENABLE) -#if (USBD_MULTI_IF) - CDC_ACM_DESC_IAD(USBD_CDC_ACM_CIF_NUM, 2) -#endif - CDC_ACM_DESC_IF0 - CDC_ACM_EP_IF0_HS - CDC_ACM_DESC_IF1 - CDC_ACM_EP_IF1_HS -#endif - /* Terminator */ \ 0 /* bLength */ \ };
Completions: Add storage suggestion for `import`
@@ -145,7 +145,7 @@ function __fish_kdb_subcommand_fstab_needs_filesystem -d 'Check if the subcomman end function __fish_kdb_subcommand_needs_storage_plugin -d 'Check if the current subcommand need a storage plugin completion' - set -l subcommands editor export + set -l subcommands editor export import not __fish_kdb_subcommand_includes $subcommands and return 1
router_set_statistics: suggest new style config
@@ -906,12 +906,12 @@ router_add_stubroute( return NULL; } -char * +inline char * router_set_statistics(router *rtr, destinations *dsts) { if (rtr->collector.stub != NULL) return ra_strdup(rtr->a, - "duplicate 'send statistics to' not allowed, " + "duplicate 'statistics send to' not allowed, " "use multiple destinations instead"); return router_add_stubroute(rtr, STATSTUB, NULL, dsts);
nshlib: remove the dependency of date on RTC
@@ -259,8 +259,8 @@ config NSH_DISABLE_CMP config NSH_DISABLE_DATE bool "Disable date" - default n if RTC - default y if !RTC + default y if DEFAULT_SMALL + default n if !DEFAULT_SMALL config NSH_DISABLE_DD bool "Disable dd"
Clarify Autotools instructions.
-Building Libtcod 1.6 on Linux or MacOS -====================================== +Building Libtcod using Autotools +================================ The following instructions have been tested on 32 and 64-bit versions of Ubuntu 14.04 and Fedora 22. @@ -40,8 +40,8 @@ Download the supported SDL2 revision, build and install it if you must: This will place the libraries at `/usr/local/lib/` and the development headers at `/usr/local/include/SDL2/`. -Building Libtcod 1.6 --------------------- +Building Libtcod +---------------- Download the latest libtcod version, build it and install it: $ hg clone https://bitbucket.org/libtcod/libtcod @@ -49,8 +49,9 @@ Download the latest libtcod version, build it and install it: $ autoreconf -i $ ./configure CFLAGS='-O2' $ make + $ sudo make install -This will place the libraries in the top level of the libtcod checkout -directory. +This will place libtcod static and shared libraries in the `/usr/local/lib` +directory, and header files in the `/usr/local/include/libtcod` directory. Note that the same makefile is used for 32 and 64 bit distributions.
apps/btc/sign: reword comment
@@ -804,8 +804,8 @@ app_btc_result_t app_btc_sign_output( // A locktime of 0 will also not be verified, as it's certainly in the past and can't do any // harm. if (_init_request.locktime > 0) { - // This is not a security feature, a transaction that is not rbf or has a locktime of 0 - // will not be verified. + // This is not a security feature, the extra locktime/RBF user confirmation is skipped + // if the tx is not rbf or has a locktime of 0. if (_locktime_applies || _rbf == CONFIRM_LOCKTIME_RBF_ON) { // The RBF nsequence bytes are often set in conjunction with a locktime, // so verify both simultaneously.
OcAppleDiskImageLib: Fix security issues
@@ -67,10 +67,12 @@ STATIC BOOLEAN InternalSwapBlockData ( IN OUT APPLE_DISK_IMAGE_BLOCK_DATA *BlockData, + IN UINT32 MaxSize, IN UINT64 DataForkOffset, IN UINT64 DataForkSize ) { + UINT32 ChunksSize; UINT64 MaxOffset; BOOLEAN Result; APPLE_DISK_IMAGE_CHUNK *Chunk; @@ -79,6 +81,19 @@ InternalSwapBlockData ( UINT64 ChunkSectorTop; UINT64 OffsetTop; + ASSERT (MaxSize >= sizeof (*BlockData)); + + BlockData->ChunkCount = SwapBytes32 (BlockData->ChunkCount); + + Result = OcOverflowMulU32 ( + BlockData->ChunkCount, + sizeof (*BlockData->Chunks), + &ChunksSize + ); + if (Result || (ChunksSize > (MaxSize - sizeof (*BlockData)))) { + return FALSE; + } + MaxOffset = (DataForkOffset + DataForkSize); BlockData->Version = SwapBytes32 (BlockData->Version); @@ -111,8 +126,6 @@ InternalSwapBlockData ( ); } - BlockData->ChunkCount = SwapBytes32 (BlockData->ChunkCount); - for (Index = 0; Index < BlockData->ChunkCount; ++Index) { Chunk = &BlockData->Chunks[Index]; @@ -171,7 +184,7 @@ InternalParsePlist ( UINT32 BlockDictChildDataSize; UINT32 NumDmgBlocks; - UINTN DmgBlocksSize; + UINT32 DmgBlocksSize; APPLE_DISK_IMAGE_BLOCK_DATA **DmgBlocks; APPLE_DISK_IMAGE_BLOCK_DATA *Block; @@ -230,7 +243,7 @@ InternalParsePlist ( goto DONE_ERROR; } - Result = OcOverflowMulUN (NumDmgBlocks, sizeof (*DmgBlocks), &DmgBlocksSize); + Result = OcOverflowMulU32 (NumDmgBlocks, sizeof (*DmgBlocks), &DmgBlocksSize); if (Result) { return FALSE; } @@ -255,7 +268,7 @@ InternalParsePlist ( } Result = PlistDataSize (BlockDictChildValue, &BlockDictChildDataSize); - if (!Result) { + if (!Result || (BlockDictChildDataSize < sizeof (*Block))) { goto DONE_ERROR; } @@ -265,18 +278,23 @@ InternalParsePlist ( goto DONE_ERROR; } + DmgBlocks[Index] = Block; + Result = PlistDataValue ( BlockDictChildValue, (UINT8 *)Block, &BlockDictChildDataSize ); if (!Result) { - FreePool (Block); goto DONE_ERROR; } - InternalSwapBlockData (Block, DataForkOffset, DataForkSize); - DmgBlocks[Index] = Block; + InternalSwapBlockData ( + Block, + BlockDictChildDataSize, + DataForkOffset, + DataForkSize + ); } *BlockCount = NumDmgBlocks;
Makefile: Make sure providers/fipsmodule.cnf is re-built also for run_tests
@@ -119,7 +119,7 @@ IF[{- !$disabled{fips} -}] # the generated commands in build templates are expected to catch that, # and thereby keep control over the exact output file location. IF[{- !$disabled{tests} -}] - DEPEND[|tests|]=fipsmodule.cnf + DEPEND[|run_tests|]=fipsmodule.cnf GENERATE[fipsmodule.cnf]=../apps/openssl fipsinstall \ -module providers/$(FIPSMODULENAME) -provider_name fips \ -mac_name HMAC -section_name fips_sect
Makefile: add BOARD_CONFIG to CFLAGS
@@ -26,6 +26,7 @@ TARGET ?= ia32-generic include ../phoenix-rtos-build/Makefile.common include ../phoenix-rtos-build/Makefile.$(TARGET_SUFF) +CFLAGS += $(BOARD_CONFIG) CFLAGS += -I. -DHAL=\"hal/$(TARGET_SUFF)/hal.h\" -DVERSION=\"$(VERSION)\" EXTERNAL_HEADERS_DIR := ./include
set DDR_CLK_EDGE to SAME_EDGE in axis_red_pitaya_dac
@@ -53,18 +53,68 @@ module axis_red_pitaya_dac # int_rst_reg <= ~locked | ~s_axis_tvalid; end - ODDR ODDR_rst(.Q(dac_rst), .D1(int_rst_reg), .D2(int_rst_reg), .C(aclk), .CE(1'b1), .R(1'b0), .S(1'b0)); - ODDR ODDR_sel(.Q(dac_sel), .D1(1'b0), .D2(1'b1), .C(aclk), .CE(1'b1), .R(1'b0), .S(1'b0)); - ODDR ODDR_wrt(.Q(dac_wrt), .D1(1'b0), .D2(1'b1), .C(wrt_clk), .CE(1'b1), .R(1'b0), .S(1'b0)); - ODDR ODDR_clk(.Q(dac_clk), .D1(1'b0), .D2(1'b1), .C(ddr_clk), .CE(1'b1), .R(1'b0), .S(1'b0)); + ODDR #( + .DDR_CLK_EDGE("SAME_EDGE"), + .INIT(1'b0) + ) ODDR_rst ( + .Q(dac_rst), + .D1(int_rst_reg), + .D2(int_rst_reg), + .C(aclk), + .CE(1'b1), + .R(1'b0), + .S(1'b0) + ); + + ODDR #( + .DDR_CLK_EDGE("SAME_EDGE"), + .INIT(1'b0) + ) ODDR_sel ( + .Q(dac_sel), + .D1(1'b1), + .D2(1'b0), + .C(aclk), + .CE(1'b1), + .R(1'b0), + .S(1'b0) + ); + + ODDR #( + .DDR_CLK_EDGE("SAME_EDGE"), + .INIT(1'b0) + ) ODDR_wrt ( + .Q(dac_wrt), + .D1(1'b1), + .D2(1'b0), + .C(wrt_clk), + .CE(1'b1), + .R(1'b0), + .S(1'b0) + ); + + ODDR #( + .DDR_CLK_EDGE("SAME_EDGE"), + .INIT(1'b0) + ) ODDR_clk ( + .Q(dac_clk), + .D1(1'b1), + .D2(1'b0), + .C(ddr_clk), + .CE(1'b1), + .R(1'b0), + .S(1'b0) + ); generate for(j = 0; j < DAC_DATA_WIDTH; j = j + 1) begin : DAC_DAT - ODDR ODDR_inst( + ODDR #( + .DDR_CLK_EDGE("SAME_EDGE"), + .INIT(1'b0) + ) ODDR_inst ( .Q(dac_dat[j]), - .D1(int_dat_a_reg[j]), - .D2(int_dat_b_reg[j]), + .D1(int_dat_b_reg[j]), + .D2(int_dat_a_reg[j]), .C(aclk), .CE(1'b1), .R(1'b0),
ENHANCE: Disable printing the increment of space shortage level.
@@ -242,6 +242,7 @@ static void do_slabs_check_space_shortage_level(struct default_engine *engine) } else { ssl = MAX_SPACE_SHORTAGE_LEVEL; } + /*** Disable printing the increment of space shortage level *** if (ssl > sm_anchor.space_shortage_level) { logger->log(EXTENSION_LOG_INFO, NULL, "Space shortage level increases: %d => %d " @@ -251,6 +252,7 @@ static void do_slabs_check_space_shortage_level(struct default_engine *engine) (unsigned long long)sm_anchor.free_avail_space, (unsigned long long)sm_anchor.free_chunk_space); } + ***************************************************************/ sm_anchor.space_shortage_level = ssl; } else { sm_anchor.space_shortage_level = 0;
Reorder controller and HID initialization This allows to merge two "#ifdef HAVE_AOA_HID" blocks to simplify.
@@ -455,34 +455,10 @@ scrcpy(struct scrcpy_options *options) { } acksync = &s->acksync; - } -#endif - if (!controller_init(&s->controller, s->server.control_socket, - acksync)) { - goto end; - } - controller_initialized = true; - - if (!controller_start(&s->controller)) { - goto end; - } - controller_started = true; - if (options->turn_screen_off) { - struct control_msg msg; - msg.type = CONTROL_MSG_TYPE_SET_SCREEN_POWER_MODE; - msg.set_screen_power_mode.mode = SCREEN_POWER_MODE_OFF; - - if (!controller_push_msg(&s->controller, &msg)) { - LOGW("Could not request 'set screen power mode'"); - } - } - -#ifdef HAVE_AOA_HID - if (options->keyboard_input_mode == SC_KEYBOARD_INPUT_MODE_HID) { bool aoa_hid_ok = false; - bool ok = sc_aoa_init(&s->aoa, serial, acksync); + ok = sc_aoa_init(&s->aoa, serial, acksync); if (!ok) { goto aoa_hid_end; } @@ -524,6 +500,28 @@ aoa_hid_end: sc_mouse_inject_init(&s->mouse_inject, &s->controller); mp = &s->mouse_inject.mouse_processor; + + if (!controller_init(&s->controller, s->server.control_socket, + acksync)) { + goto end; + } + controller_initialized = true; + + if (!controller_start(&s->controller)) { + goto end; + } + controller_started = true; + + if (options->turn_screen_off) { + struct control_msg msg; + msg.type = CONTROL_MSG_TYPE_SET_SCREEN_POWER_MODE; + msg.set_screen_power_mode.mode = SCREEN_POWER_MODE_OFF; + + if (!controller_push_msg(&s->controller, &msg)) { + LOGW("Could not request 'set screen power mode'"); + } + } + } if (options->display) {
fix AtkImageNode.LoadIconTexture signature
@@ -45,7 +45,7 @@ public unsafe partial struct AtkImageNode Marshal.FreeHGlobal(ptr); } - [MemberFunction("E8 ? ? ? ? 8D 4D 09")] + [MemberFunction("E8 ? ? ? ? 8D 43 76")] public partial void LoadIconTexture(int iconId, int version); [MemberFunction("E8 ? ? ? ? 85 FF 78 1E")]
Replace the deprecated std::result_of with std::invoke_result
@@ -38,8 +38,7 @@ template <typename F, typename... T> struct Defer { Defer(Defer &&o) noexcept : f(std::move(o.f)) {} ~Defer() { f(); } - using ResultType = typename std::result_of<typename std::decay<F>::type( - typename std::decay<T>::type...)>::type; + using ResultType = std::invoke_result_t<F, T...>; std::function<ResultType()> f; };
Improve macro expansion help message
"the string representation of Mbed TLS compile time configurations.\n\n" \ "If \"--all\" and \"--any\" are not used, then, if all given arguments\n" \ "are defined in the Mbed TLS build, 0 is returned; otherwise 1 is\n" \ - "returned. If only one argument is given, the macro expansion of that\n" \ - "configuration will be printed (if any).\n" \ + "returned. Macro expansions of configurations will be printed (if any).\n" \ "-l\tPrint all available configuration.\n" \ "-all\tReturn 0 if all configurations are defined. Otherwise, return 1\n" \ "-any\tReturn 0 if any configuration is defined. Otherwise, return 1\n" \
move PERF_COUNTER_TOTAL after usb_detect
@@ -260,19 +260,6 @@ int main() { perf_counter_start(PERF_COUNTER_BLACKBOX); blackbox_update(); perf_counter_end(PERF_COUNTER_BLACKBOX); - - if (usb_detect()) { - flags.usb_active = 1; -#ifndef ALLOW_USB_ARMING - if (rx_aux_on(AUX_ARMING)) - flags.arm_safety = 1; //final safety check to disallow arming during USB operation -#endif - usb_configurator(); - } else { - flags.usb_active = 0; - extern usb_motor_test_t usb_motor_test; - usb_motor_test.active = 0; - } #endif state.cpu_load = (timer_micros() - lastlooptime); @@ -321,6 +308,21 @@ int main() { perf_counter_end(PERF_COUNTER_TOTAL); perf_counter_update(); +#ifdef STM32F4 + if (usb_detect()) { + flags.usb_active = 1; +#ifndef ALLOW_USB_ARMING + if (rx_aux_on(AUX_ARMING)) + flags.arm_safety = 1; //final safety check to disallow arming during USB operation +#endif + usb_configurator(); + } else { + flags.usb_active = 0; + extern usb_motor_test_t usb_motor_test; + usb_motor_test.active = 0; + } +#endif + while ((timer_micros() - time) < state.looptime_autodetect) __NOP();
Align pg_basebackup create replication slots with postgres
@@ -1690,51 +1690,6 @@ build_exclude_list(char **exclude_list, int num) return buf.data; } -static void -create_replication_slot(const char *slot_name) -{ - PGresult *res; - char *create_slot_command; - bool is_result_an_error; - bool is_unexpected_number_of_tuples; - bool is_unexpected_number_of_fields; - - const int expected_number_of_tuples = 1; - const int expected_number_of_fields = 4; - - create_slot_command = psprintf("CREATE_REPLICATION_SLOT \"%s\" PHYSICAL", - slot_name); - - res = PQexec(conn, create_slot_command); - - is_result_an_error = PQresultStatus(res) != PGRES_TUPLES_OK; - - if (is_result_an_error) - { - fprintf(stderr, _("%s: could not send replication command \"%s\": %s"), - progname, create_slot_command, PQerrorMessage(conn)); - disconnect_and_exit(1); - } - - is_unexpected_number_of_tuples = PQntuples(res) != - expected_number_of_tuples; - - is_unexpected_number_of_fields = PQnfields(res) != - expected_number_of_fields; - - if (is_unexpected_number_of_tuples || is_unexpected_number_of_fields) - { - fprintf(stderr, - _("%s: could not create replication slot \"%s\": got %d rows and %d fields, expected %d rows and %d fields\n"), - progname, slot_name, PQntuples(res), PQnfields(res), - expected_number_of_tuples, expected_number_of_fields); - disconnect_and_exit(1); - } - - Assert(strncmp(slot_name, PQgetvalue(res, 0, 0), strlen(slot_name)) == 0); - PQclear(res); -} - static void BaseBackup(void) { @@ -1805,7 +1760,7 @@ BaseBackup(void) */ if (replication_slot) { - create_replication_slot(replication_slot); + CreateReplicationSlot(conn, replication_slot, NULL, NULL, true); } /*
fs/stdio : change return value as same as close if flush returns -ENOSPC If flush failed during fclose, it doesn't return close's result. But if disk is full, there's no way write contents anymore, so File should be closed
@@ -112,9 +112,10 @@ int fclose(FAR FILE *stream) /* If close() returns an error but flush() did not then make sure * that we return the close() error condition. + * Also If flush returns error but storage is full, we return close status. */ - if (ret == OK) { + if (ret == OK || ret == -ENOSPC) { ret = status; err = errno; }
Temporarily revert wrapping the root tuple This change reverts wrapping the root tuple because tfs code will call destroy on the wrapped tuple and thus the root tuple when switching to a new log and cleaning up.
@@ -52,8 +52,6 @@ extern filesystem_complete bootfs_handler(kernel_heaps kh, tuple root, boolean klibs_in_bootfs, boolean ingest_kernel_syms); -static tuple_notifier wrapped_root; - closure_function(3, 2, void, fsstarted, u8 *, mbr, block_io, r, block_io, w, filesystem, fs, status, s) @@ -75,10 +73,7 @@ closure_function(3, 2, void, fsstarted, root_fs = fs; storage_set_root_fs(fs); - wrapped_root = tuple_notifier_wrap(filesystem_getroot(fs)); - assert(wrapped_root != INVALID_ADDRESS); - - tuple root = (tuple)wrapped_root; + tuple root = filesystem_getroot(root_fs); tuple mounts = get_tuple(root, sym(mounts)); if (mounts) storage_set_mountpoints(mounts); @@ -160,13 +155,14 @@ KLIB_EXPORT(get_kernel_heaps); tuple get_root_tuple(void) { - return (tuple)wrapped_root; + return filesystem_getroot(root_fs); } KLIB_EXPORT(get_root_tuple); void register_root_notify(symbol s, set_value_notify n) { - tuple_notifier_register_set_notify(wrapped_root, s, n); + // XXX to be restored when root fs tuple is separated from root tuple + //tuple_notifier_register_set_notify(wrapped_root, s, n); } KLIB_EXPORT(register_root_notify);
uip-ds6-nbr: check memb availability before adding an nbr_table entry
@@ -136,6 +136,13 @@ uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr, return NULL; } + /* firstly, allocate memory for a new nbr cache entry */ + if((nbr = (uip_ds6_nbr_t *)memb_alloc(&uip_ds6_nbr_memb)) == NULL) { + LOG_ERR("%s: cannot allocate a new uip_ds6_nbr\n", __func__); + return NULL; + } + + /* secondly, get or allocate nbr_entry for the link-layer address */ nbr_entry = nbr_table_get_from_lladdr(uip_ds6_nbr_entries, (const linkaddr_t *)lladdr); if(nbr_entry == NULL) { @@ -143,15 +150,16 @@ uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr, nbr_table_add_lladdr(uip_ds6_nbr_entries, (linkaddr_t*)lladdr, reason, data)) == NULL) { LOG_ERR("%s: cannot allocate a new uip_ds6_nbr_entry\n", __func__); - return NULL; + /* return from this function later */ } else { LIST_STRUCT_INIT(nbr_entry, uip_ds6_nbrs); } } - if(list_length(nbr_entry->uip_ds6_nbrs) < UIP_DS6_NBR_MAX_6ADDRS_PER_NBR) { - /* it has room to add another IPv6 address */ - } else { + /* free nbr and return if nbr_entry is not available */ + if((nbr_entry == NULL) || + (list_length(nbr_entry->uip_ds6_nbrs) == UIP_DS6_NBR_MAX_6ADDRS_PER_NBR)) { + if(list_length(nbr_entry->uip_ds6_nbrs) == UIP_DS6_NBR_MAX_6ADDRS_PER_NBR) { /* * it's already had the maximum number of IPv6 addresses; cannot * add another. @@ -159,15 +167,13 @@ uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr, LOG_ERR("%s: no room in nbr_entry for ", __func__); LOG_ERR_LLADDR((const linkaddr_t *)lladdr); LOG_ERR_("\n"); - return NULL; - } - - if((nbr = (uip_ds6_nbr_t *)memb_alloc(&uip_ds6_nbr_memb)) == NULL) { - LOG_ERR("%s: cannot allocate a new uip_ds6_nbr\n", __func__); - if(list_length(nbr_entry->uip_ds6_nbrs) == 0) { - nbr_table_remove(uip_ds6_nbr_entries, nbr_entry); } + /* free the newly allocated memory in this function call */ + memb_free(&uip_ds6_nbr_memb, nbr); + return NULL; } else { + /* everything is fine; nbr is ready to be used */ + /* it has room to add another IPv6 address */ add_uip_ds6_nbr_to_nbr_entry(nbr, nbr_entry); } #else
better handling of stdout
@@ -617,20 +617,20 @@ static void writeinfofile(char *infooutname) static hashlist_t *zeiger; static FILE *fh; -if(strcmp(infooutname, "stdout") == 0) fh = stdout; -else - { - if(infooutname != NULL) +if(strcmp(infooutname, "stdout") != 0) { if((fh = fopen(infooutname, "a+")) == NULL) { printf("error opening file %s: %s\n", infooutname, strerror(errno)); return; } + for(zeiger = hashlist; zeiger < hashlist +pmkideapolcount; zeiger++) writepmkideapolhashlineinfo(fh, zeiger); + fclose(fh); } +else + { + for(zeiger = hashlist; zeiger < hashlist +pmkideapolcount; zeiger++) writepmkideapolhashlineinfo(stdout, zeiger); } -for(zeiger = hashlist; zeiger < hashlist +pmkideapolcount; zeiger++) writepmkideapolhashlineinfo(fh, zeiger); -if(fh != stdout) fclose(fh); return; } /*===========================================================================*/
build: update codeowners * Added myself as a reviewer for: /.github /appveyor.yml /dockerfiles/ /src/flb_lib.c
# Build System & Portability # -------------------------- -/CMakeLists.txt @fujimotos -/cmake/ @fujimotos +/CMakeLists.txt @fujimotos @niedbalski +/cmake/ @fujimotos @niedbalski + +# CI +# ------------------------- +/.github/ @niedbalski +/appveyor.yml @niedbalski +/dockerfiles/ @niedbalski # Core: Signv4 # ------------ /src/flb_signv4.c @pettitwesley +/src/flb_lib.c @edsiper @niedbalski # Core: Stream Processor # ----------------
show game menu Pause Menu pressed on XBox One controller
@@ -772,9 +772,12 @@ static void processJoysticks() gamepad->x = SDL_JoystickGetButton(joystick, 2); gamepad->y = SDL_JoystickGetButton(joystick, 3); - for(s32 i = 5; i < numButtons; i++) + if(numButtons >= 8) { - s32 back = SDL_JoystickGetButton(joystick, i); + // !TODO: We have to find a better way to handle gamepad MENU button + // atm we show game menu for only Pause Menu button on XBox one controller + // issue #1220 + s32 back = SDL_JoystickGetButton(joystick, 7); if(back) {
Remove event note mask for now. This should be part of something bigger maybe and would need more thought.
@@ -70,12 +70,6 @@ enum { // Uses the note_expression attribute. CLAP_EVENT_NOTE_EXPRESSION, - // Sent by the host to the plugin. - // Indicate the current root note, and the set of notes which belongs to the scale or chord. - // - // uses the note_mask attribute - CLAP_EVENT_NOTE_MASK, - // PARAM_VALUE sets the parameter's value; uses param_value attribute // PARAM_MOD sets the parameter's modulation amount; uses param_mod attribute // @@ -208,22 +202,6 @@ typedef struct clap_event_transport { alignas(2) int16_t tsig_denom; // time signature denominator } clap_event_transport_t; -typedef struct clap_event_note_mask { - alignas(4) clap_event_header_t header; - - alignas(2) uint16_t port_index; - - // bitset of active keys: - // - 11 bits - // - root note is not part of the bitset - // - bit N is: root note + N + 1 - // 000 0100 0100 -> minor chord - // 000 0100 1000 -> major chord - // 010 1011 0101 -> locrian scale - alignas(2) uint16_t note_mask; - alignas(1) uint8_t root_note; // 0..11, 0 for C -} clap_event_note_mask_t; - typedef struct clap_event_midi { alignas(4) clap_event_header_t header;
Add ROTATE inline asm support for SM3 And move ROTATE inline asm to header. Now this benefits SM3, SHA (when with Zbb only and no Zknh) and other hash functions
# define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) +#ifndef PEDANTIC +# if defined(__GNUC__) && __GNUC__>=2 && \ + !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) +# if defined(__riscv_zbb) || defined(__riscv_zbkb) +# if __riscv_xlen == 64 +# undef ROTATE +# define ROTATE(x, n) ({ MD32_REG_T ret; \ + asm ("roriw %0, %1, %2" \ + : "=r"(ret) \ + : "r"(x), "i"(32 - (n))); ret;}) +# endif +# if __riscv_xlen == 32 +# undef ROTATE +# define ROTATE(x, n) ({ MD32_REG_T ret; \ + asm ("rori %0, %1, %2" \ + : "=r"(ret) \ + : "r"(x), "i"(32 - (n))); ret;}) +# endif +# endif +# endif +#endif + # if defined(DATA_ORDER_IS_BIG_ENDIAN) # define HOST_c2l(c,l) (l =(((unsigned long)(*((c)++)))<<24), \
README.md: Use version 2.05.14
@@ -34,11 +34,11 @@ https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices ### Install deCONZ 1. Download deCONZ package - wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.12-qt5.deb + wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.14-qt5.deb 2. Install deCONZ package - sudo dpkg -i deconz-2.05.12-qt5.deb + sudo dpkg -i deconz-2.05.14-qt5.deb **Important** this step might print some errors *that's ok* and will be fixed in the next step. @@ -53,11 +53,11 @@ The deCONZ package already contains the REST API plugin, the development package 1. Download deCONZ development package - wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.12.deb + wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.14.deb 2. Install deCONZ development package - sudo dpkg -i deconz-dev-2.05.12.deb + sudo dpkg -i deconz-dev-2.05.14.deb 3. Install missing dependencies @@ -72,7 +72,7 @@ The deCONZ package already contains the REST API plugin, the development package 2. Checkout related version tag cd deconz-rest-plugin - git checkout -b mybranch V2_05_12 + git checkout -b mybranch V2_05_14 3. Compile the plugin
Fix bug that hs_sent is not incremented
@@ -7369,7 +7369,7 @@ static ngtcp2_ssize conn_write_handshake(ngtcp2_conn *conn, uint8_t *dest, res += nwrite; dest += nwrite; if (destlen <= (size_t)nwrite) { - return nwrite; + goto server_wait_handshake_done; } destlen -= (size_t)nwrite; origlen -= (size_t)nwrite; @@ -7393,6 +7393,8 @@ static ngtcp2_ssize conn_write_handshake(ngtcp2_conn *conn, uint8_t *dest, } res += nwrite; + + server_wait_handshake_done: conn->hs_sent += (size_t)res; return res; }
VERSION bump to version 1.3.29
@@ -30,7 +30,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 3) -set(SYSREPO_MICRO_VERSION 28) +set(SYSREPO_MICRO_VERSION 29) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
revert the changes in CMakeLists.txt When we do not regenerate the generated_raw_tracer.cc, h2olog tests fails, but it's totally fine. cf.
@@ -926,13 +926,18 @@ IF (WITH_H2OLOG) "include/h2o/version.h" ) - SET(H2OLOG_RAW_TRACER_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/h2olog/generated_raw_tracer.cc") + SET(H2OLOG_GEN_DEPS + "h2o-probes.d" + "deps/quicly/quicly-probes.d" + "deps/quicly/include/quicly.h" + ) ADD_CUSTOM_COMMAND( - OUTPUT "${H2OLOG_RAW_TRACER_FILE}" - COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/src/h2olog/misc/gen_raw_tracer.py" "${CMAKE_CURRENT_SOURCE_DIR}" "${H2OLOG_RAW_TRACER_FILE}" + OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/h2olog/generated_raw_tracer.cc" + COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/src/h2olog/misc/gen_raw_tracer.py" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/src/h2olog/generated_raw_tracer.cc" + DEPENDS ${H2OLOG_GEN_DEPS} "${CMAKE_CURRENT_SOURCE_DIR}/src/h2olog/misc/gen_raw_tracer.py" ) - LIST(APPEND H2OLOG_SOURCE_FILES "${H2OLOG_RAW_TRACER_FILE}") + LIST(APPEND H2OLOG_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/h2olog/generated_raw_tracer.cc") LINK_DIRECTORIES("${LIBBCC_LIBRARY_DIRS}") ADD_EXECUTABLE(h2olog ${H2OLOG_SOURCE_FILES})
publish: ignore updates from old version
=^ cards state (handle-invite-update:main !<(invite-update q.cage.sin)) [cards this] + :: + [%collection *] + [~ this] == == ::
[numerics] copy matrix for preserving original one in NM_inv
@@ -1964,6 +1964,8 @@ void NM_gemm(const double alpha, NumericsMatrix* A, NumericsMatrix* B, assert(A->matrix1); assert(B->matrix1); assert(C->matrix1); + + SBM_alloc_for_gemm(A->matrix1, B->matrix1, C->matrix1); SBM_gemm(alpha, A->matrix1, B->matrix1, beta, C->matrix1); NM_clearDense(C); @@ -2433,10 +2435,12 @@ int NM_inv(NumericsMatrix* A, NumericsMatrix* Ainv) { b[i]=0.0; } - int info =-1; - // get internal data (allocation of needed) - NM_internalData(A); + + NumericsMatrix* Atmp = NM_new(); + NM_copy(A,Atmp); + + int info =-1; switch (A->storageType) { @@ -2456,28 +2460,26 @@ int NM_inv(NumericsMatrix* A, NumericsMatrix* Ainv) NM_triplet_alloc(Ainv, A->size0); Ainv->matrix2->origin = NS_TRIPLET; - for( int col_rhs =0; col_rhs < A->size1; col_rhs++ ) { if (col_rhs >0) b[col_rhs-1] = 0.0; b[col_rhs] = 1.0; - info = NM_gesv_expert(A, b, 0); - - DEBUG_EXPR(NM_dense_display(b,A->size1,1,1);); + //info = NM_gesv_expert(Atmp, b, NM_PRESERVE); + info = NM_gesv_expert(Atmp, b, NM_KEEP_FACTORS); for (int i = 0; i < A->size0; ++i) { CHECK_RETURN(cs_zentry(Ainv->matrix2->triplet, i, col_rhs, b[i])); } } - NM_display(Ainv); break; } default: assert (0 && "NM_inv : unknown storageType"); } - + NM_free(Atmp); + free(Atmp); free(b); DEBUG_END("NM_inv(NumericsMatrix* A, double *b, unsigned keep)\n"); return (int)info;
adding notification <n> to config wizard spec
@@ -88,6 +88,15 @@ The following table lists the Configuration Wizard Annotations: <td>yes</td> <td>Heading, Enable, or Comment end.</td> </tr> + <tr> + <td>\<n></td> + <td>yes</td> + <td>Notification text displayed + \code + // <n> This is shown as plain text + \endcode + </td> + </tr> <tr> <td>\<i></td> <td>yes</td>
Add quick reference table for HTTP response object
@@ -56,6 +56,21 @@ The Response object returned has 3 public properties, "content", "headers" and " HTTP request as a string, "headers" is a list of all the response headers and "statusCode" is a number denoting the status code from the response +#### Quick Reference Table +##### Properties + +| Property | Description | +|------------|--------------------------------------------------------| +| content | Raw string content returned from the HTTP request | +| headers | A list of headers returned from the HTTP request | +| statusCode | The status code returned from the HTTP request | + +##### Methods + +| Method | Description | +|------------|--------------------------------------------------------| +| json | Convert the content property to JSON | + Example response from [httpbin.org](https://httpbin.org) ```json
Fix font alpha;
@@ -20,5 +20,5 @@ void main() { float screenPxDistance = screenPxRange() * (sdf - .5); float alpha = clamp(screenPxDistance + .5, 0., 1.); if (alpha <= 0.) discard; - PixelColors[0] = vec4(FragColor.rgb, alpha); + PixelColors[0] = vec4(FragColor.rgb, FragColor.a * alpha); }
options/linux: Add constants for weston
@@ -157,12 +157,16 @@ struct input_absinfo { #define KEY_RIGHTMETA 126 #define KEY_COMPOSE 127 +#define KEY_BRIGHTNESSDOWN 224 +#define KEY_BRIGHTNESSUP 225 + //---------------------------------- // BUTTON Codes //---------------------------------- #define BTN_LEFT 0x110 #define BTN_RIGHT 0x111 +#define BTN_MIDDLE 0x112 #define BTN_TOUCH 0x14A //----------------------------------
Test: Make host calls for power supply mockable Add test_mockable for power supply ready and reset so tests may detect when Vbus is applied and removed. BRANCH=None TEST=make -j buildall
@@ -26,13 +26,13 @@ const uint32_t pd_snk_pdo[] = { }; const int pd_snk_pdo_cnt = ARRAY_SIZE(pd_snk_pdo); -int pd_set_power_supply_ready(int port) +test_mockable int pd_set_power_supply_ready(int port) { /* Not implemented */ return EC_SUCCESS; } -void pd_power_supply_reset(int port) +test_mockable void pd_power_supply_reset(int port) { /* Not implemented */ }
Re-order switch cases for consistency
@@ -234,6 +234,11 @@ func (g *gen) visitVars(b *buffer, block []*a.Node, depth uint32, f func(*gen, * for _, o := range block { switch o.Kind() { + case a.KIOBind: + if err := g.visitVars(b, o.AsIOBind().Body(), depth, f); err != nil { + return err + } + case a.KIf: for o := o.AsIf(); o != nil; o = o.ElseIf() { if err := g.visitVars(b, o.BodyIfTrue(), depth, f); err != nil { @@ -244,11 +249,6 @@ func (g *gen) visitVars(b *buffer, block []*a.Node, depth uint32, f func(*gen, * } } - case a.KIOBind: - if err := g.visitVars(b, o.AsIOBind().Body(), depth, f); err != nil { - return err - } - case a.KIterate: if err := g.visitVars(b, o.AsIterate().Variables(), depth, f); err != nil { return err
Memory sanitizer sometimes doesn't generate correct shadow for parameters of const functions. This compiler bug happens in test library/containers/intrusive_hash/ut.
@@ -543,7 +543,8 @@ Y_HIDDEN void _YandexAbort(); #define Y_PRAGMA_NO_DEPRECATED #endif -#if defined(__clang__) || defined(__GNUC__) +// Memory sanitizer sometimes doesn't correctly set parameter shadow of constant functions. +#if (defined(__clang__) || defined(__GNUC__)) && !defined(_msan_enabled_) /** * @def Y_CONST_FUNCTION methods and functions, marked with this method are promised to:
VERSION bump to version 1.4.55
@@ -37,7 +37,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 4) -set(SYSREPO_MICRO_VERSION 54) +set(SYSREPO_MICRO_VERSION 55) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Create Sources from AudioStreams;
@@ -62,12 +62,19 @@ int l_lovrAudioIsSpatialized(lua_State* L) { } int l_lovrAudioNewSource(lua_State* L) { + void** type; + AudioStream* stream; + if ((type = luax_totype(L, 1, AudioStream)) != NULL) { + stream = *type; + } else { Blob* blob = luax_readblob(L, 1, "Source"); - AudioStream* stream = lovrAudioStreamCreate(blob, 4096); + stream = lovrAudioStreamCreate(blob, 4096); + lovrRelease(&blob->ref); + } + Source* source = lovrSourceCreate(stream); luax_pushtype(L, Source, source); lovrRelease(&source->ref); - lovrRelease(&blob->ref); return 1; }
Add resource files include and pre-processor defines for the VS generator
@@ -493,6 +493,39 @@ function _make_source_options_cl(vcxprojfile, flags, condition) end end +-- make source options for cl +function _make_resource_options_cl(vcxprojfile, flags, condition) + + -- exists condition? + condition = condition or "" + + -- get flags string + local flagstr = os.args(flags) + + -- make PreprocessorDefinitions + local defstr = "" + for _, flag in ipairs(flags) do + flag:gsub("^[%-/]D(.*)", + function (def) + defstr = defstr .. vsutils.escape(def) .. ";" + end + ) + end + defstr = defstr .. "%%(PreprocessorDefinitions)" + vcxprojfile:print("<PreprocessorDefinitions%s>%s</PreprocessorDefinitions>", condition, defstr) + + -- make AdditionalIncludeDirectories + if flagstr:find("[%-/]I") then + local dirs = {} + for _, flag in ipairs(flags) do + flag:gsub("^[%-/]I(.*)", function (dir) table.insert(dirs, vsutils.escape(dir)) end) + end + if #dirs > 0 then + vcxprojfile:print("<AdditionalIncludeDirectories%s>%s</AdditionalIncludeDirectories>", condition, table.concat(dirs, ";")) + end + end +end + -- make source options for cuda function _make_source_options_cuda(vcxprojfile, flags, opt) @@ -877,6 +910,12 @@ function _make_common_item(vcxprojfile, vsinfo, target, targetinfo) vcxprojfile:leave("</ClCompile>") + vcxprojfile:enter("<ResourceCompile>") + -- make resource options + _make_resource_options_cl(vcxprojfile, targetinfo.commonflags.cl) + + vcxprojfile:leave("</ResourceCompile>") + local cuda = _check_cuda(target) if cuda then -- for CUDA linker?
ames: adds port printfs for all ships
@@ -417,13 +417,17 @@ _ames_io_start(u3_pier* pir_u) c3_c* imp_c = u3r_string(imp); c3_y num_y = (c3_y)pir_u->who_d[0]; + if ( 0 != por_s ) { + u3l_log("ames: czar: -p %d ignored\n", por_s); + } + por_s = _ames_czar_port(num_y); if ( c3y == u3_Host.ops_u.net ) { - u3l_log("ames: czar: %s on %d\n", imp_c, por_s); + u3l_log("ames: czar: %s live on %d\n", imp_c, por_s); } else { - u3l_log("ames: czar: %s on %d (localhost only)\n", imp_c, por_s); + u3l_log("ames: czar: %s live on %d (localhost only)\n", imp_c, por_s); } u3z(imp); @@ -465,7 +469,13 @@ _ames_io_start(u3_pier* pir_u) sam_u->por_s = ntohs(add_u.sin_port); } - // u3l_log("ames: on localhost, UDP %d.\n", sam_u->por_s); + if ( c3y == u3_Host.ops_u.net ) { + u3l_log("ames: live on %d\n", por_s); + } + else { + u3l_log("ames: live on %d (localhost only)\n", por_s); + } + uv_udp_recv_start(&sam_u->wax_u, _ames_alloc, _ames_recv_cb); sam_u->liv = c3y;
tests/malloc: just malloc 256MB for 32-bit machines
@@ -40,7 +40,7 @@ int main(void) #if (UINTPTR_MAX == UINT64_MAX) test_malloc(512*1024*1024ULL); #else - test_malloc(400*1024*1024ULL); + test_malloc(256*1024*1024ULL); #endif printf("malloctest done.\n");
Fix WW4 builds on OBS
%include %{_sourcedir}/OHPC_macros -%define debug_package %{nil} +%global debug_package %{nil} # Base package name -%define pname warewulf +%global pname warewulf # Group for warewulfd and other WW operations %global wwgroup warewulf +# Service directories (normally defaults to /var/lib/*) +%global tftpdir /srv/tftpboot +%global srvdir /srv +%global statedir /srv + Name: %{pname}%{PROJ_DELIM} Summary: A provisioning system for large clusters of bare metal and/or virtual systems Version: 4.3.0 @@ -38,10 +43,8 @@ Conflicts: warewulf-vnfs Conflicts: warewulf-provision Conflicts: warewulf-ipmi -BuildRequires: make -BuildRequires: /etc/os-release - %if 0%{?suse_version} || 0%{?sle_version} +BuildRequires: distribution-release BuildRequires: systemd-rpm-macros BuildRequires: go BuildRequires: firewall-macros @@ -52,16 +55,15 @@ Requires: nfs-kernel-server Requires: firewalld %else # Assume Fedora-based OS if not SUSE-based +BuildRequires: system-release BuildRequires: systemd BuildRequires: golang BuildRequires: firewalld-filesystem Requires: tftp-server Requires: nfs-utils %endif +BuildRequires: make Requires: dhcp-server -%global tftpdir /srv/tftpboot -%global srvdir /srv -%global statedir /srv %description Warewulf is a stateless and diskless container operating system provisioning
sp: process time functions on aggregation processor
@@ -190,6 +190,10 @@ static int sp_cmd_aggregated_keys(struct flb_sp_cmd *cmd) mk_list_foreach(head, &cmd->keys) { key = mk_list_entry(head, struct flb_sp_cmd_key, _head); + if (key->time_func > 0) { + continue; + } + if (key->aggr_func > 0) { /* AVG, SUM or COUNT */ aggr++; } @@ -1127,6 +1131,14 @@ static int sp_process_data_aggr(char *buf_data, size_t buf_size, /* Packaging results */ ckey = mk_list_entry_first(&cmd->keys, struct flb_sp_cmd_key, _head); for (i = 0; i < map_entries; i++) { + /* Check if there is a defined function */ + if (ckey->time_func > 0) { + flb_sp_func_time(&mp_pck, ckey); + ckey = mk_list_entry_next(&ckey->_head, struct flb_sp_cmd_key, + _head, &cmd->keys); + continue; + } + /* Pack key */ if (ckey->alias) { msgpack_pack_str(&mp_pck, flb_sds_len(ckey->alias)); @@ -1314,7 +1326,6 @@ static int sp_process_data(char *buf_data, size_t buf_size, continue; } - /* Lookup selection key in the incoming map */ for (i = 0; i < map_size; i++) { key = map.via.map.ptr[i].key;
doc: prettify OPAL_PCI_SET_PE
+.. _OPAL_PCI_SET_PE: + OPAL_PCI_SET_PE =============== -:: + +.. code-block:: c #define OPAL_PCI_SET_PE 31 + int64_t opal_pci_set_pe(uint64_t phb_id, uint64_t pe_number, + uint64_t bus_dev_func, uint8_t bus_compare, + uint8_t dev_compare, uint8_t func_compare, + uint8_t pe_action); + **NOTE:** The following two paragraphs come from some old documentation and have not been checked for accuracy. Same goes for bus_compare, dev_compare and func_compare documentation. Do *NOT* assume this documentation is correct @@ -21,12 +29,6 @@ argument, for OPAL to correlate the RID (bus/dev/func) domain of the PE. If a PE domain is changed, the host must call this to reset the PE bus/dev/func domain and then call all other OPAL calls that map PHB IODA resources to update those domains within PHB facilities. -:: - - static int64_t opal_pci_set_pe(uint64_t phb_id, uint64_t pe_number, - uint64_t bus_dev_func, uint8_t bus_compare, - uint8_t dev_compare, uint8_t func_compare, - uint8_t pe_action) ``phb_id`` is the value from the PHB node ibm,opal-phbid property. @@ -75,17 +77,17 @@ update those domains within PHB facilities. OPAL_MAP_PE = 1 }; -Return value: +Returns +------- -OPAL_PARAMETER +:ref:`OPAL_PARAMETER` If one of the following: + - invalid phb - invalid pe_action - invalid bus_dev_func - invalid bus_compare - -OPAL_UNSUPPORTED +:ref:`OPAL_UNSUPPORTED` PHB does not support set_pe operation - -OPAL_SUCCESS - if opreation was successful +:ref:`OPAL_SUCCESS` + if operation was successful
Fix defense vs. noblock logic.
@@ -19460,6 +19460,7 @@ void set_opponent(entity *ent, entity *other) // block attack. Return true of block is possible eligible. int check_blocking_eligible(entity *ent, entity *other, s_collision_attack *attack) { + printf("\n\n debug_trace: check_blocking_eligible"); // If guardpoints are set, then find out if they've been depleted. if(ent->modeldata.guardpoints.max) { @@ -19468,37 +19469,41 @@ int check_blocking_eligible(entity *ent, entity *other, s_collision_attack *atta return 0; } } - + printf("\n\n debug_trace: guardpoints pass"); // Grappling? if(ent->link) { return 0; } - + printf("\n\n debug_trace: link pass"); // Airborne? if(inair(ent)) { return 0; } - + printf("\n\n debug_trace: inair pass"); // Frozen? if(ent->frozen) { return 0; } - + printf("\n\n debug_trace: frozen pass"); // Falling? if(ent->falling) { return 0; } - + printf("\n\n debug_trace: falling pass"); // Attack block breaking exceeds block power? + if(ent->defense[attack->attack_type].blockpower) + { if(attack->no_block >= ent->defense[attack->attack_type].blockpower) { return 0; } + } + printf("\n\n debug_trace: defense pass"); // Attack from behind? Can't block that if // we don't have blockback flag enabled. if(ent->direction == other->direction) @@ -19508,7 +19513,7 @@ int check_blocking_eligible(entity *ent, entity *other, s_collision_attack *atta return 0; } } - + printf("\n\n debug_trace: direction pass"); // if there is a blocking threshold? Verify it vs. attack force. if(ent->modeldata.thold) { @@ -19518,6 +19523,7 @@ int check_blocking_eligible(entity *ent, entity *other, s_collision_attack *atta return 0; } } + printf("\n\n debug_trace: model thold pass"); // is there a blocking threshhold for the attack type? // Verify it vs. attack force. @@ -19528,6 +19534,7 @@ int check_blocking_eligible(entity *ent, entity *other, s_collision_attack *atta return 0; } } + printf("\n\n debug_trace: defense thold pass"); // If we made it through all that, then entity can block. Return true. return 1;
docs/usage: fix the markdown
@@ -255,8 +255,8 @@ Examples: * **SIGSEGV**,**SIGILL**,**SIGBUS**,**SIGABRT**,**SIGFPE** - Description of the signal which terminated the process (when using ptrace() API, it's a signal which was delivered to the process, even if silently discarded) * **PC.0x8056ad7** - Program Counter (PC) value (ptrace() API only), for x86 it's a value of the EIP register (RIP for x86-64) * **STACK.13599d485** - Stack signature (based on stack-tracing) - * **ADDR.0x30333037** - Value of the _siginfo`_`t.si`_`addr_ (see _man 2 signaction_ for more details) (most likely meaningless for SIGABRT) - * **INSTR.mov____0x10(%rbx),%rax`** - Disassembled instruction which was found under the last known PC (Program Counter) (x86, x86-64 architectures only, meaningless for SIGABRT) + * **ADDR.0x30333037** - Value of the ```_siginfo_t.si_addr_``` (see _man 2 signaction_ for more details) (most likely meaningless for SIGABRT) + * **INSTR.mov____0x10(%rbx),%rax** - Disassembled instruction which was found under the last known PC (Program Counter) (x86, x86-64 architectures only, meaningless for SIGABRT) # FAQ # @@ -267,7 +267,7 @@ Examples: * A: The ptrace() API is more flexible when it comes to analyzing a process' crash. wait3/4() syscalls are only able to determine the type of signal which crashed an application and limited resource usage information (see _man wait4_). * Q: **Why isn't there any support for the ptrace() API when compiling under FreeBSD or Mac OS X operating systems**? - * A: These operating systems lack some specific ptrace() operations, including **PT`_`GETREGS** (Mac OS X) and **PT`_`GETSIGINFO**, both of which honggfuzz depends on. If you have any ideas on how to get around this limitation, send us an email or patch. + * A: These operating systems lack some specific ptrace() operations, including ```PT_GETREGS``` (Mac OS X) and ```PT_GETSIGINFO```, both of which honggfuzz depends on. If you have any ideas on how to get around this limitation, send us an email or patch. # LICENSE #
CoreValidation: Fixed compilation error for GCC. Using ~v within the ASSERT_TRUE macro leads to an "comparison of promoted ~unsigned with unsigned" warning. On Cortex-M this finally fails with an error.
@@ -321,7 +321,9 @@ void TC_CoreInstr_Exclusives (void) { const uint32_t result = __STREXB(v+1U, &TC_CoreInstr_Exclusives_byte); ASSERT_TRUE(result == 1U); - ASSERT_TRUE(TC_CoreInstr_Exclusives_byte == (uint8_t)~v); + + const uint8_t iv = ~v; + ASSERT_TRUE(iv == TC_CoreInstr_Exclusives_byte); } while(0); do { @@ -332,7 +334,9 @@ void TC_CoreInstr_Exclusives (void) { const uint32_t result = __STREXH(v+1U, &TC_CoreInstr_Exclusives_hword); ASSERT_TRUE(result == 1U); - ASSERT_TRUE(TC_CoreInstr_Exclusives_hword == (uint16_t)~v); + + const uint16_t iv = ~v; + ASSERT_TRUE(iv == TC_CoreInstr_Exclusives_hword); } while(0); do { @@ -343,7 +347,9 @@ void TC_CoreInstr_Exclusives (void) { const uint32_t result = __STREXW(v+1U, &TC_CoreInstr_Exclusives_word); ASSERT_TRUE(result == 1U); - ASSERT_TRUE(TC_CoreInstr_Exclusives_word == ~v); + + const uint32_t iv = ~v; + ASSERT_TRUE(iv == TC_CoreInstr_Exclusives_word); } while(0); TC_CoreInstr_ExclusivesIRQDisable();
Add test case for uppercase atoms. Related to
@@ -167,6 +167,12 @@ void test_heuristic_quality() .bytes = {0x61, 0x62, 0x63, 0x64}, .mask = {0xFF, 0xFF, 0xFF, 0xFF}}; + // ABCD + YR_ATOM a41424344 = { + .length = 4, + .bytes = {0x41, 0x42, 0x43, 0x44}, + .mask = {0xFF, 0xFF, 0xFF, 0xFF}}; + // abc. YR_ATOM a6162632E = { .length = 4, @@ -195,6 +201,8 @@ void test_heuristic_quality() int qCCCCCCCC = yr_atoms_heuristic_quality(&c, &aCCCCCCCC); int qFFFFFFFF = yr_atoms_heuristic_quality(&c, &aFFFFFFFF); int q61626364 = yr_atoms_heuristic_quality(&c, &a61626364); + int q41424344 = yr_atoms_heuristic_quality(&c, &a41424344); + int q6162632E = yr_atoms_heuristic_quality(&c, &a6162632E); a010203.mask[1] = 0x00; @@ -239,6 +247,7 @@ void test_heuristic_quality() assert_true_expr(q01020102 > q010203); assert_true_expr(q01020304 > q61626364); assert_true_expr(q010203 < q61626364); + assert_true_expr(q41424344 == q61626364); assert_true_expr(q6162632E > q61626364); // Byte sequences like 90 90 90 90 and CC CC CC CC are using as function
decisions: add keyMeta proposal
@@ -33,8 +33,7 @@ Binary data is not a core feature, if needed the plugin system can also work wit Remove: -- keyGetMeta (@kodebach) -- keySetMeta (@kodebach) +- keyGetMeta - keyRewindMeta - keyNextMeta - keyCurrentMeta @@ -59,6 +58,11 @@ Remove: - keySetBinary ([Binary](binary.md)) - ksCut (maybe later introduce ksFindHierarchy, ksRemoveRange, ksCopyRange) +Change: + +- keyMeta might return null or a keyset that contains at least one meta:/ key +- keySetMeta sets a keyset that only contains meta:/ keys and at least one + Rename: - keyGetValueSize -> keyValueSize
Use system sleep() function The local `sleep` var in `hare_id` was assigned but never used. Tested this, works fine on macOS.
@@ -15,7 +15,7 @@ local hare_id = uv.new_thread(function(step,...) end while (step>0) do step = step - 1 - uv.sleep(math.random(1000)) + sleep(math.random(1000)) print("Hare ran another step") end print("Hare done running!")
CircleCI: Separate build jobs for readability Separate build jobs to show each build result in PR check list
@@ -15,11 +15,13 @@ aliases: command: | docker exec ${BUILDER} arm-none-eabi-gcc --version - run-test: &run-test + build-job: &build-job run: name: TizenRT Build Test command: | - docker exec -it ${BUILDER} bash -c "cd tools; ./build_test.sh" + docker exec -it ${BUILDER} bash -c "cd tools; ./configure.sh ${CIRCLE_JOB}" + docker exec -it ${BUILDER} bash -c "make" + jobs: checkout_code: @@ -32,20 +34,92 @@ jobs: paths: - ./ - build_test: + artik055s/audio: + machine: true + working_directory: ~/TizenRT + steps: + - attach_workspace: + at: ~/TizenRT + - *docker-cp + - *build-job + + artik053/st_things: + machine: true + working_directory: ~/TizenRT + steps: + - attach_workspace: + at: ~/TizenRT + - *docker-cp + - *build-job + + artik053/tc: + machine: true + working_directory: ~/TizenRT + steps: + - attach_workspace: + at: ~/TizenRT + - *docker-cp + - *build-job + + qemu/build_test: machine: true working_directory: ~/TizenRT steps: - attach_workspace: at: ~/TizenRT - *docker-cp - - *run-test + - *build-job + + esp_wrover_kit/hello_with_tash: + machine: true + working_directory: ~/TizenRT + steps: + - attach_workspace: + at: ~/TizenRT + - *docker-cp + - *build-job + + imxrt1020-evk/loadable_elf_apps: + machine: true + working_directory: ~/TizenRT + steps: + - attach_workspace: + at: ~/TizenRT + - *docker-cp + - *build-job + + rtl8721csm/loadable_apps: + machine: true + working_directory: ~/TizenRT + steps: + - attach_workspace: + at: ~/TizenRT + - *docker-cp + - *build-job workflows: version: 2 build-tizenrt: jobs: - checkout_code - - build_test: + - artik055s/audio: + requires: + - checkout_code + - artik053/st_things: + requires: + - checkout_code + - artik053/tc: + requires: + - checkout_code + - qemu/build_test: + requires: + - checkout_code + - esp_wrover_kit/hello_with_tash: + requires: + - checkout_code + - imxrt1020-evk/loadable_elf_apps: + requires: + - checkout_code + - rtl8721csm/loadable_apps: requires: - checkout_code
phb4: Use the return value of phb4_fenced() in phb4_get_diag_data() phb4_get_diag_data() checks the flags for the PHB4_AIB_FENCED after having called phb4_fenced(). This information is returned by phb4_fenced(). This patch was prompted by an unused return value warning in Coverity. Fixes: CID 163734
@@ -3755,6 +3755,7 @@ static int64_t phb4_get_diag_data(struct phb *phb, void *diag_buffer, uint64_t diag_buffer_len) { + bool fenced; struct phb4 *p = phb_to_phb4(phb); struct OpalIoPhb4ErrorData *data = diag_buffer; @@ -3767,10 +3768,10 @@ static int64_t phb4_get_diag_data(struct phb *phb, * Dummy check for fence so that phb4_read_phb_status knows * whether to use ASB or AIB */ - phb4_fenced(p); + fenced = phb4_fenced(p); phb4_read_phb_status(p, data); - if (!(p->flags & PHB4_AIB_FENCED)) + if (!fenced) phb4_eeh_dump_regs(p); /*
typo from previous commit: operator= wasn't returning a value
@@ -117,6 +117,8 @@ BaseExc::operator = (const BaseExc& be) throw () _message = be._message; _stackTrace = be._stackTrace; } + + return *this; } BaseExc & @@ -127,6 +129,7 @@ BaseExc::operator = (BaseExc&& be) throw () _message = std::move (be._message); _stackTrace = std::move (be._stackTrace); } + return *this; } const char *
Avoid inconsistent type declaration Clang 3.3 correctly complains that a variable of type enum MultiXactStatus cannot hold a value of -1, which makes sense. Change the declared type of the variable to int instead, and apply casting as necessary to avoid the warning. Per notice from Andres Freund
@@ -123,12 +123,15 @@ static bool ConditionalMultiXactIdWait(MultiXactId multi, * update them). This table (and the macros below) helps us determine the * heavyweight lock mode and MultiXactStatus values to use for any particular * tuple lock strength. + * + * Don't look at lockstatus/updstatus directly! Use get_mxact_status_for_lock + * instead. */ static const struct { LOCKMODE hwlock; - MultiXactStatus lockstatus; - MultiXactStatus updstatus; + int lockstatus; + int updstatus; } tupleLockExtraInfo[MaxLockTupleMode + 1] = @@ -4386,7 +4389,7 @@ simple_heap_update(Relation relation, ItemPointer otid, HeapTuple tup) static MultiXactStatus get_mxact_status_for_lock(LockTupleMode mode, bool is_update) { - MultiXactStatus retval; + int retval; if (is_update) retval = tupleLockExtraInfo[mode].updstatus; @@ -4397,7 +4400,7 @@ get_mxact_status_for_lock(LockTupleMode mode, bool is_update) elog(ERROR, "invalid lock tuple mode %d/%s", mode, is_update ? "true" : "false"); - return retval; + return (MultiXactStatus) retval; }
evp: fix coverity unchecked return value
@@ -846,8 +846,9 @@ static const ECX_KEY *evp_pkey_get0_ECX_KEY(const EVP_PKEY *pkey, int type) static ECX_KEY *evp_pkey_get1_ECX_KEY(EVP_PKEY *pkey, int type) { ECX_KEY *ret = (ECX_KEY *)evp_pkey_get0_ECX_KEY(pkey, type); - if (ret != NULL) - ossl_ecx_key_up_ref(ret); + + if (ret != NULL && !ossl_ecx_key_up_ref(ret)) + ret = NULL; return ret; }
x64 compilation is fixed.
Release/ Debug/ .vs/ + +/win32/xdagwin/cheatcoin.VC.db +/win32/xdagwin/xdag/cheatcoin.vcxproj.user +/win64/xdagwin/xdag.VC.db +/win64/xdagwin/xdag.VC.VC.opendb +/win64/xdagwin/xdag/xdag.vcxproj.user +/win64/xdagwin/xdagwallet/xdagwallet.vcxproj.user
travis: limit max Android emulator level to 25 as it is max available for ARM EABI
@@ -11,5 +11,9 @@ unzip -q $HOME/emdk.zip -d $ANDROID_HOME/add-ons #genearate keystore cd $HOME/.android && printf "android\nandroid\nTRAVIS-CI\nCI-SYSTEM\nTAU\nUNIVERSE\nUNIVERSE\nUN\nyes\n\n" | keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 10000 #download -echo yes | $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-${RHO_ANDROID_LEVEL:-26};default;armeabi-v7a" -echo yes | $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-${RHO_ANDROID_LEVEL:-26};google_apis;armeabi-v7a" + +EMULEVEL=${RHO_ANDROID_LEVEL:-26} +EMULEVEL=$((EMULEVEL>25?25:EMULEVEL)) + +echo yes | $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-${EMULEVEL};default;armeabi-v7a" +echo yes | $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-${EMULEVEL};google_apis;armeabi-v7a"
Add u32x4_extend_to_u64x2 for aarch64 using NEON intrinsics This is used in vlib_get_buffers_with_offset. Verified-by: Lijian Zhang
@@ -140,6 +140,12 @@ u32x4_hadd (u32x4 v1, u32x4 v2) return (u32x4) vpaddq_u32 (v1, v2); } +static_always_inline u64x2 +u32x4_extend_to_u64x2 (u32x4 v) +{ + return vmovl_u32 (vget_low_u32 (v)); +} + #define CLIB_HAVE_VEC128_UNALIGNED_LOAD_STORE #define CLIB_VEC128_SPLAT_DEFINED #endif /* included_vector_neon_h */
CCode: Use escaped character in MSR test
@@ -51,9 +51,9 @@ kdb get user/tests/ccode/tab #> Tab Fabulous # The plugin also escapes special characters inside key names -kdb set 'user/tests/ccode/tab/t a b' 'Escaped Tabs' +kdb set 'user/tests/ccode/tab/t\ta b' 'Escaped Tabs' grep 'tab/' `kdb file user/tests/ccode` | sed 's/[[:space:]]*//' -#> tab/t\ta\tb = Escaped Tabs +#> tab/t\\ta\tb = Escaped Tabs # Undo modifications to database kdb rm -r user/tests/ccode
Raise example/crc32's buffer size from 16K to 32K This matches the 32K buffer size used by as shipped as /usr/bin/crc32 on Debian
@@ -37,7 +37,7 @@ for a C++ compiler $CXX, such as clang++ or g++. #include "../../gen/c/std/crc32.c" #ifndef SRC_BUFFER_SIZE -#define SRC_BUFFER_SIZE (16 * 1024) +#define SRC_BUFFER_SIZE (32 * 1024) #endif uint8_t src_buffer[SRC_BUFFER_SIZE];
doc: update pull request guidelines
@@ -17,21 +17,21 @@ Check relevant points but **please do not remove entries**. For docu fixes, spell checking, and similar none of these points below need to be checked. -- [ ] I added unit tests -- [ ] I ran all tests locally and everything went fine -- [ ] affected documentation is fixed -- [ ] I added code comments, logging, and assertions (see [Coding Guidelines](https://master.libelektra.org/doc/CODING.md)) -- [ ] meta data is updated (e.g. README.md of plugins and [METADATA.ini](https://master.libelektra.org/doc/METADATA.ini)) +- [ ] I added unit tests for my code +- [ ] I fixed all affected documentation +- [ ] I added code comments, logging, and assertions as appropriate (see [Coding Guidelines](https://master.libelektra.org/doc/CODING.md)) +- [ ] I updated all meta data (e.g. README.md of plugins and [METADATA.ini](https://master.libelektra.org/doc/METADATA.ini)) +- [ ] I mentioned every code not directly written by me in [THIRD-PARTY-LICENSES](doc/THIRD-PARTY-LICENSES) ## Review Reviewers will usually check the following: +- [ ] Documentation is introductory, concise and good to read +- [ ] Examples are well chosen and understandable - [ ] Code is conforming to [our Coding Guidelines](https://master.libelektra.org/doc/CODING.md) - [ ] APIs are conforming to [our Design Guidelines](https://master.libelektra.org/doc/DESIGN.md) - [ ] Code is consistent to [our Design Decisions](https://master.libelektra.org/doc/decisions) -- [ ] Documentation is concise and good to read -- [ ] Examples are well chosen and understandable ## Labels
roll-tm.c: removing unused define
@@ -456,7 +456,6 @@ static uint16_t last_seq; /*---------------------------------------------------------------------------*/ /* uIPv6 Pointers */ /*---------------------------------------------------------------------------*/ -#define UIP_DATA_BUF ((uint8_t *)&uip_buf[uip_l2_l3_hdr_len + UIP_UDPH_LEN]) #define UIP_EXT_BUF ((struct uip_ext_hdr *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN]) #define UIP_EXT_BUF_NEXT ((uint8_t *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN + HBHO_TOTAL_LEN]) #define UIP_EXT_OPT_FIRST ((struct hbho_mcast *)&uip_buf[UIP_LLH_LEN + UIP_IPH_LEN + 2])
NPU2: fix missing unlock Found by coccinelle using a slightly modified spatch
@@ -1865,8 +1865,8 @@ static int opal_npu_destroy_context(uint64_t phb_id, uint64_t pid, uint64_t bdf) /* And zero the entry */ npu2_write(p, NPU2_XTS_PID_MAP + id*0x20, 0); - unlock(&p->lock); out: + unlock(&p->lock); return rc; } opal_call(OPAL_NPU_DESTROY_CONTEXT, opal_npu_destroy_context, 3);
hoon: refactors nock %6 in +mink
[%6 test=* yes=* no=*] =/ result $(formula test.formula) ?. ?=(%0 -.result) result - ?: =(& product.result) - $(formula yes.formula) - ?: =(| product.result) - $(formula no.formula) + ?+ product.result [%2 trace] + %& $(formula yes.formula) + %| $(formula no.formula) + == :: [%7 subject=* next=*] =/ subject $(formula subject.formula)
CodeQL clean up codeql_db directory
@@ -6,6 +6,7 @@ for /d %%x in (objfre_*) do rmdir /S /Q %%x for /d %%x in (objchk_*) do rmdir /S /Q %%x rmdir /S /Q .\sdv rmdir /S /Q .\sdv.temp +rmdir /S /Q .\codeql_db del /F *.log *.wrn *.err *.sdf *.sdv *.xml del viogpudo.dvl.xml
phb4: Force verbose EEH logging Force verbose EEH. This is a heavy handed and we should turn if off later as things stabilise, but is useful for now. Acked-by: Russell Currey
@@ -4565,6 +4565,8 @@ void probe_phb4(void) struct dt_node *np; verbose_eeh = nvram_query_eq("pci-eeh-verbose", "true"); + /* REMOVEME: force this for now until we stabalise PCIe */ + verbose_eeh = 1; if (verbose_eeh) prlog(PR_INFO, "PHB4: Verbose EEH enabled\n");
Windows: disable test which changes ECCODES_DEFINITION_PATH
@@ -95,7 +95,6 @@ list( APPEND tests_data_reqd bufr_extract_headers bufr_ecc-673 bufr_ecc-428 - bufr_ecc-197 bufr_ecc-286 bufr_ecc-288 bufr_ecc-313 @@ -257,6 +256,13 @@ ecbuild_add_test( TARGET eccodes_t_tools_data_from_stdin TEST_DEPENDS eccodes_download_bufrs ) +ecbuild_add_test( TARGET eccodes_t_bufr_ecc-197 + TYPE SCRIPT + CONDITION NOT ECCODES_ON_WINDOWS AND ENABLE_EXTRA_TESTS + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bufr_ecc-197.sh + TEST_DEPENDS eccodes_download_bufrs +) + if( ENABLE_EXTRA_TESTS AND HAVE_ECCODES_THREADS ) ecbuild_add_executable( TARGET grib_encode_pthreads
Update astc_compute_variance.cpp Avoid mixed type comparison of float and double.
@@ -115,10 +115,10 @@ static void compute_pixel_region_variance(const astc_codec_image * img, float rg if (!powers_are_1) { - d.x = pow(MAX(d.x, 1e-6f), (double)rgb_power_to_use); - d.y = pow(MAX(d.y, 1e-6f), (double)rgb_power_to_use); - d.z = pow(MAX(d.z, 1e-6f), (double)rgb_power_to_use); - d.w = pow(MAX(d.w, 1e-6f), (double)alpha_power_to_use); + d.x = pow(MAX(d.x, 1e-6), (double)rgb_power_to_use); + d.y = pow(MAX(d.y, 1e-6), (double)rgb_power_to_use); + d.z = pow(MAX(d.z, 1e-6), (double)rgb_power_to_use); + d.w = pow(MAX(d.w, 1e-6), (double)alpha_power_to_use); } varbuf1[z][y][x] = d;
Update textpad for gui_text_input_t API changes
#include <libgui/libgui.h> -static Rect _input_sizer(text_input_t* text_view, Size window_size) { +static Rect _input_sizer(gui_text_input_t* text_input, Size window_size) { return rect_make(point_zero(), window_size); } @@ -19,10 +19,8 @@ int main(int argc, char** argv) { Size window_size = window->size; Rect notepad_frame = rect_make(point_zero(), window_size); - text_input_t* input = gui_text_input_create( + gui_text_input_t* input = gui_text_input_create( window, - notepad_frame, - color_white(), (gui_window_resized_cb_t)_input_sizer );
driver/retimer/nb7v904m.c: Format with clang-format BRANCH=none TEST=none
@@ -21,18 +21,12 @@ int nb7v904m_lpm_disable = 0; static int nb7v904m_write(const struct usb_mux *me, int offset, int data) { - return i2c_write8(me->i2c_port, - me->i2c_addr_flags, - offset, data); - + return i2c_write8(me->i2c_port, me->i2c_addr_flags, offset, data); } static int nb7v904m_read(const struct usb_mux *me, int offset, int *regval) { - return i2c_read8(me->i2c_port, - me->i2c_addr_flags, - offset, regval); - + return i2c_read8(me->i2c_port, me->i2c_addr_flags, offset, regval); } static int set_low_power_mode(const struct usb_mux *me, bool enable) @@ -110,7 +104,8 @@ int nb7v904m_tune_usb_flat_gain(const struct usb_mux *me, uint8_t gain_a, /* Set Loss Profile Matching : This must be called on board_init context */ int nb7v904m_set_loss_profile_match(const struct usb_mux *me, uint8_t loss_a, - uint8_t loss_b, uint8_t loss_c, uint8_t loss_d) + uint8_t loss_b, uint8_t loss_c, + uint8_t loss_d) { int rv = EC_SUCCESS; @@ -168,8 +163,8 @@ static int nb7v904m_set_mux(const struct usb_mux *me, mux_state_t mux_state, /* Clear operation mode field */ rv = nb7v904m_read(me, NB7V904M_REG_GEN_DEV_SETTINGS, &regval); if (rv) { - CPRINTS("C%d %s: Failed to obtain dev settings!", - me->usb_port, __func__); + CPRINTS("C%d %s: Failed to obtain dev settings!", me->usb_port, + __func__); return rv; } regval &= ~NB7V904M_OP_MODE_MASK; @@ -193,8 +188,8 @@ static int nb7v904m_set_mux(const struct usb_mux *me, mux_state_t mux_state, if (mux_state & USB_PD_MUX_DP_ENABLED) { /* Connect AUX */ - rv = nb7v904m_write(me, NB7V904M_REG_AUX_CH_CTRL, flipped ? - NB7V904M_AUX_CH_FLIPPED : + rv = nb7v904m_write(me, NB7V904M_REG_AUX_CH_CTRL, + flipped ? NB7V904M_AUX_CH_FLIPPED : NB7V904M_AUX_CH_NORMAL); /* Enable all channels for DP */ regval |= NB7V904M_CH_EN_MASK;
return-type error does not know that you don't return from assert(0)
@@ -314,6 +314,7 @@ uint32_t kvz_get_coeff_cost(const encoder_state_t * const state, // earlier (configuration validation I guess)? if (save_cccs) { assert(0 && "Fast RD sampling does not work with fast-residual-cost"); + return UINT32_MAX; // Hush little compiler don't you cry, not really gonna return anything after assert(0) } else { uint64_t weights = kvz_fast_coeff_get_weights(state); uint32_t fast_cost = kvz_fast_coeff_cost(coeff, width, weights);
Repair and cleanup
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26724.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiningForce.Web", "MiningForce.Web\MiningForce.Web.csproj", "{933BBE7C-2896-4A94-B5B9-71935CA84D69}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MiningCore.Web", "MiningCore.Web\MiningCore.Web.csproj", "{933BBE7C-2896-4A94-B5B9-71935CA84D69}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution
SOVERSION bump to version 5.6.25
@@ -54,7 +54,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_ # with backward compatible change and micro version is connected with any internal change of the library. set(SYSREPO_MAJOR_SOVERSION 5) set(SYSREPO_MINOR_SOVERSION 6) -set(SYSREPO_MICRO_SOVERSION 24) +set(SYSREPO_MICRO_SOVERSION 25) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
chip/ish/hbm.h: Format with clang-format BRANCH=none TEST=none
@@ -55,8 +55,7 @@ enum HECI_BUS_MSG { (HECI_MSG_REPONSE_FLAG | HECI_BUS_MSG_RESET_REQ), HECI_BUS_MSG_ADD_CLIENT_RESP = (HECI_MSG_REPONSE_FLAG | HECI_BUS_MSG_ADD_CLIENT_REQ), - HECI_BUS_MSG_DMA_RESP = - (HECI_MSG_REPONSE_FLAG | HECI_BUS_MSG_DMA_REQ), + HECI_BUS_MSG_DMA_RESP = (HECI_MSG_REPONSE_FLAG | HECI_BUS_MSG_DMA_REQ), HECI_BUS_MSG_DMA_ALLOC_RESP = (HECI_MSG_REPONSE_FLAG | HECI_BUS_MSG_DMA_ALLOC_NOTIFY), HECI_BUS_MSG_DMA_XFER_RESP =
Improve documentation about PSK configuration
@@ -2682,6 +2682,9 @@ int mbedtls_ssl_conf_own_cert( mbedtls_ssl_config *conf, * \note This is mainly useful for clients. Servers will usually * want to use \c mbedtls_ssl_conf_psk_cb() instead. * + * \note A PSK set by \c mbedtls_ssl_set_hs_psk() in the PSK callback + * takes precedence over a PSK configured by this function. + * * \warning Currently, clients can only register a single pre-shared key. * Calling this function or mbedtls_ssl_conf_psk_opaque() more * than once will overwrite values configured in previous calls. @@ -2715,6 +2718,10 @@ int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf, * \note This is mainly useful for clients. Servers will usually * want to use \c mbedtls_ssl_conf_psk_cb() instead. * + * \note An opaque PSK set by \c mbedtls_ssl_set_hs_psk_opaque() in + * the PSK callback takes precedence over an opaque PSK + * configured by this function. + * * \warning Currently, clients can only register a single pre-shared key. * Calling this function or mbedtls_ssl_conf_psk() more than * once will overwrite values configured in previous calls. @@ -2752,6 +2759,9 @@ int mbedtls_ssl_conf_psk_opaque( mbedtls_ssl_config *conf, * \note This should only be called inside the PSK callback, * i.e. the function passed to \c mbedtls_ssl_conf_psk_cb(). * + * \note A PSK set by this function takes precedence over a PSK + * configured by \c mbedtls_ssl_conf_psk(). + * * \param ssl The SSL context to configure a PSK for. * \param psk The pointer to the pre-shared key. * \param psk_len The length of the pre-shared key in bytes. @@ -2769,6 +2779,9 @@ int mbedtls_ssl_set_hs_psk( mbedtls_ssl_context *ssl, * \note This should only be called inside the PSK callback, * i.e. the function passed to \c mbedtls_ssl_conf_psk_cb(). * + * \note An opaque PSK set by this function takes precedence over an + * opaque PSK configured by \c mbedtls_ssl_conf_psk_opaque(). + * * \param ssl The SSL context to configure a PSK for. * \param psk The identifier of the key slot holding the PSK. * For the duration of the current handshake, the key slot @@ -2807,9 +2820,14 @@ int mbedtls_ssl_set_hs_psk_opaque( mbedtls_ssl_context *ssl, * on the SSL context to set the correct PSK and return \c 0. * Any other return value will result in a denied PSK identity. * - * \note If you set a PSK callback using this function, then you - * don't need to set a PSK key and identity using - * \c mbedtls_ssl_conf_psk(). + * \note A dynamic PSK (i.e. set by the PSK callback) takes + * precedence over a static PSK (i.e. set by + * \c mbedtls_ssl_conf_psk() or + * \c mbedtls_ssl_conf_psk_opaque()). + * This means that if you set a PSK callback using this + * function, you don't need to set a PSK using + * \c mbedtls_ssl_conf_psk() or + * \c mbedtls_ssl_conf_psk_opaque()). * * \param conf The SSL configuration to register the callback with. * \param f_psk The callback for selecting and setting the PSK based
Don't add zlib & snappy linker flags when bundling
@@ -69,7 +69,14 @@ AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar]) m4_include([build/autotools/SetupAutomake.m4]) # Substitute our dependencies into the pkg-config files. -AC_SUBST(MONGOC_LIBS, "${SASL_LIBS} ${SSL_LIBS} ${SHM_LIB} ${ZLIB_LIBS} ${SNAPPY_LIBS}") +MONGOC_LIBS="${SASL_LIBS} ${SSL_LIBS} ${SHM_LIB}" +if test "x$with_zlib" != "xbundled"; then + MONGOC_LIBS="${MONGOC_LIBS} ${ZLIB_LIBS}" +fi +if test "x$with_snappy" != "xbundled"; then + MONGOC_LIBS="${MONGOC_LIBS} ${SNAPPY_LIBS}" +fi +AC_SUBST(MONGOC_LIBS) AC_CONFIG_FILES([ Makefile
removes :dns prohibition against binding yourself
=/ rac (clan:title him.com) ?: ?=(%czar rac) ~|(%bind-galazy !!) - ?: ?& =(for.com him.com) - !?=(%king rac) - == - ~|(%bind-yoself !!) ?: ?& ?=(%king rac) ?=(%indirect -.tar.com) == :: [%bond for=ship him=ship turf] :: %bond - ?: =(for.com him.com) - ~|(%bond-yoself !!) + ?: ?& =(our.bow for.com) + !=(our.bow src.bow) + == + ~& [%bound-him him.com dom.com] + abet:(check-bond:(tell him.com) dom.com) ?: =(our.bow him.com) ~& [%bound-us dom.com] :- [[ost.bow %rule /bound %turf %put dom.com] ~] this(dom (~(put in dom) dom.com)) - ?: =(our.bow for.com) - ~& [%bound-him him.com dom.com] - abet:(check-bond:(tell him.com) dom.com) ~& [%strange-bond com] [~ this] :: manually set our ip, request direct binding
system/libuv: Include nuttx/tls.h to call task local storage api
@@ -261,7 +261,7 @@ new file mode 100644 index 00000000..728b57f6 --- /dev/null +++ b/src/unix/nuttx.c -@@ -0,0 +1,284 @@ +@@ -0,0 +1,286 @@ +/* Copyright Xiaomi, Inc. and other Node contributors. All rights reserved. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to @@ -298,6 +298,8 @@ index 00000000..728b57f6 +#include <sys/sysinfo.h> +#include <unistd.h> + ++#include <nuttx/tls.h> ++ +int uv_exepath(char* buffer, size_t* size) { + return UV_ENOTSUP; +}
VERSION bump to version 0.11.35
@@ -32,7 +32,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0") # set version set(LIBNETCONF2_MAJOR_VERSION 0) set(LIBNETCONF2_MINOR_VERSION 11) -set(LIBNETCONF2_MICRO_VERSION 34) +set(LIBNETCONF2_MICRO_VERSION 35) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
migration: install %talk
/+ gladio |% +$ card card:agent:gall ++$ ota-host ~zod :: +$ versioned-state $% state-zero :_ cards :~ [%pass /pyre/export %agent [our dap]:bowl %poke noun+!>(%export)] [%pass /pyre/migrate %agent [our dap]:bowl %poke noun+!>(%migrate)] - [%pass / %agent [our %hood]:bowl %poke %kiln-install !>([%groups ~zod %groups])] + [%pass / %agent [our %hood]:bowl %poke %kiln-install !>([%groups ota-host %groups])] + [%pass / %agent [our %hood]:bowl %poke %kiln-install !>([%talk ota-host %talk])] == == ::
Improve handling when neither INET nor INET6 is defined.
@@ -106,9 +106,9 @@ sctp_userspace_get_mtu_from_ifn(uint32_t if_index) if (if_index == 0xffffffff) { mtu = 1280; -#if defined(INET) || defined(INET6) } else { mtu = 0; +#if defined(INET) || defined(INET6) memset(&ifr, 0, sizeof(struct ifreq)); if (if_indextoname(if_index, ifr.ifr_name) != NULL) { /* TODO can I use the raw socket here and not have to open a new one with each query? */ @@ -162,9 +162,9 @@ sctp_userspace_get_mtu_from_ifn(uint32_t if_index) if (if_index == 0xffffffff) { mtu = 1280; -#if defined(INET) || defined(INET6) } else { mtu = 0; +#if defined(INET) || defined(INET6) AdapterAddrsSize = 0; pAdapterAddrs = NULL; if ((Err = GetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &AdapterAddrsSize)) != 0) {
ci: Fix docs build The docs build uses the Fedora32 container environment, but we didn't update the script when we moved to Fedora 32. Do that.
@@ -7,12 +7,6 @@ set -vx MAKE_J=$(grep -c processor /proc/cpuinfo) export CROSS="ccache powerpc64-linux-gnu-" -# There's a bug in dtc v1.4.7 packaged on fedora 28 that makes our device tree -# tests fail, so for the moment, build a slightly older DTC -git clone --depth=1 -b v1.4.4 https://git.kernel.org/pub/scm/utils/dtc/dtc.git -(cd dtc; make -j${MAKE_J}) -export PATH=`pwd`/dtc:$PATH - make -j${MAKE_J} SKIBOOT_GCOV=1 coverage-report pip install -r doc/requirements.txt
Testing with proj command line tool (if available)
. ./include.sh files=" - regular_latlon_surface.grib1 mercator.grib2 satellite.grib " +# Decide if we have the proj commandline tool +PROJ_NAME="proj" +PROJ_TOOL="" +if command -v $PROJ_NAME >/dev/null 2>&1; then + PROJ_TOOL=$PROJ_NAME +fi + for f in `echo $files`; do file=${data_dir}/$f ps=`${tools_dir}/grib_get -wcount=1 -p projString $file` @@ -26,6 +32,10 @@ for f in `echo $files`; do *+proj=*) echo OK;; *) echo "File: $file. Invalid proj string: |$ps|"; exit 1;; esac + if test "x$PROJ_TOOL" != "x"; then + ${tools_dir}/grib_get -p longitudeOfFirstGridPointInDegrees,latitudeOfFirstGridPointInDegrees $file |\ + $PROJ_TOOL $ps + fi done # Reminder
tests: fix error in VppDiedError exception Discovered running test-debug job in CI. fix missing paren () around format value. Type: test
@@ -114,8 +114,8 @@ class VppDiedError(Exception): msg = "VPP subprocess died %sunexpectedly with return code: %d%s." % ( in_msg, self.rv, - ' [%s]' % self.signal_name if - self.signal_name is not None else '') + ' [%s]' % (self.signal_name if + self.signal_name is not None else '')) super(VppDiedError, self).__init__(msg)
Skip handshake tests for ciphers that are not FIPS compatible when in FIPS mode
@@ -193,6 +193,8 @@ def main(): for permutation in itertools.permutations(rsa_signatures, size): # Try an ECDHE cipher suite and a DHE one for cipher in filter(lambda x: x.openssl_name == "ECDHE-RSA-AES128-GCM-SHA256" or x.openssl_name == "DHE-RSA-AES128-GCM-SHA256", ALL_TEST_CIPHERS): + if fips_mode and cipher.openssl_fips_compatible == False: + continue complete_priority_str = cipher.gnutls_priority_str + ":+VERS-TLS1.2:+" + ":+".join(permutation) async_result = threadpool.apply_async(handshake,(host, port + port_offset, cipher.openssl_name, S2N_TLS12, complete_priority_str, permutation, 0, fips_mode)) port_offset += 1 @@ -213,6 +215,8 @@ def main(): results = [] for permutation in itertools.permutations(ecdsa_signatures, size): for cipher in filter(lambda x: x.openssl_name == "ECDHE-ECDSA-AES128-SHA", ALL_TEST_CIPHERS): + if fips_mode and cipher.openssl_fips_compatible == False: + continue complete_priority_str = cipher.gnutls_priority_str + ":+VERS-TLS1.2:+" + ":+".join(permutation) async_result = threadpool.apply_async(handshake,(host, port + port_offset, cipher.openssl_name, S2N_TLS12, complete_priority_str, permutation, 0, fips_mode)) port_offset += 1
Base 666: Fix warnings reported by OCLint
@@ -12,6 +12,7 @@ cd "@CMAKE_SOURCE_DIR@" || exit oclint -p "@PROJECT_BINARY_DIR@" -enable-global-analysis -enable-clang-static-analyzer \ "@CMAKE_SOURCE_DIR@/src/libs/ease/keyname.c" \ "@CMAKE_SOURCE_DIR@/src/libs/utility/text.c" \ + "@CMAKE_SOURCE_DIR@/src/plugins/base666/"*.{c,cpp} \ "@CMAKE_SOURCE_DIR@/src/plugins/camel/camel.c" \ "@CMAKE_SOURCE_DIR@/src/plugins/mini/mini.c" \ "@CMAKE_SOURCE_DIR@/src/plugins/yamlcpp/"*.{c,cpp}
Reduce params number in setup_loader
@@ -427,13 +427,13 @@ do_musl(char *exld, char *ldscope) * Returns 0 if musl was not detected and 1 if it was. */ static int -setup_loader(char *exe, char *ldscope) +setup_loader(char *ldscope) { int ret = 0; // not musl char *ldso = NULL; - if (((ldso = get_loader(exe)) != NULL) && + if (((ldso = get_loader(EXE_TEST_FILE)) != NULL) && (strstr(ldso, LIBMUSL) != NULL)) { // we are using the musl ld.so do_musl(ldso, ldscope); @@ -1034,7 +1034,7 @@ main(int argc, char **argv, char **env) fprintf(stderr, "error: failed to get a loader path\n"); return EXIT_FAILURE; } - setup_loader(EXE_TEST_FILE, loader); + setup_loader(loader); // set SCOPE_EXEC_PATH to path to `ldscope` if not set already if (getenv("SCOPE_EXEC_PATH") == 0) {
fix: discord::guild::member::get_list endpoint
@@ -169,7 +169,7 @@ get_list(client *client, const uint64_t guild_id) &resp_handle, NULL, HTTP_GET, - "/guilds/%llu?limit=100", guild_id); + "/guilds/%llu/members?limit=100", guild_id); return new_members; }
updating consulting patch to reflect error messages now residing in MessageT.lua
---- Lmod-5.8/src/MasterControl.lua 2014-11-04 10:46:44.000000000 -0800 -+++ Lmod-5.8.patch/src/MasterControl.lua 2014-11-19 13:08:14.098359300 -0800 -@@ -1018,8 +1018,7 @@ - LmodError("You can only have one ",name," module loaded at a time.\n", - "You already have ", oldName," loaded.\n", - "To correct the situation, please enter the following command:\n\n", -- " module swap ",oldName, " ", mFull,"\n\n", -- "Please submit a consulting ticket if you require additional assistance.\n") -+ " module swap ",oldName, " ", mFull,"\n") - end - end - mt:setfamily(name,sn) +--- Lmod-7.4.8/src/MessageT.lua.orig 2017-04-25 17:10:46.000000000 -0500 ++++ Lmod-7.4.8/src/MessageT.lua 2017-04-25 17:11:26.000000000 -0500 +@@ -27,7 +27,6 @@ + + $ module swap %{oldName} %{fullName} + +-Please submit a consulting ticket if you require additional assistance. + ]==], + e_setStandardPaths = "Unknown Key: \"%{key}\" in setStandardPaths\n", + e_No_Matching_Mods = "No matching modules found\n",
split boot into stages
@@ -174,7 +174,7 @@ void kernel_bootmod_init(multiboot* mboot_ptr) { boot_modules_count = mboot_ptr->mods_count; } -void kernel_main(multiboot* mboot_ptr, uint32_t initial_stack) { +bool boot_stage1(multiboot* mboot_ptr, uint32_t initial_stack) { initial_esp = initial_stack; kernel_process_multiboot(mboot_ptr); @@ -208,6 +208,11 @@ void kernel_main(multiboot* mboot_ptr, uint32_t initial_stack) { } paging_install(); + printf_info("boot phase 1 ok, rtc,pit,paging set up"); + return true; +} + +bool boot_stage2(void) { //map ramdisk to 0xE0001000 //heap max addr is at 0xDFFFF000, so this is placed just after that //relocated stack is 0xE0000000 @@ -229,6 +234,11 @@ void kernel_main(multiboot* mboot_ptr, uint32_t initial_stack) { pci_install(); ide_initialize(0x1F0, 0x3F6, 0x170, 0x376, 0x000); + printf_info("boot phase 2 ok, processes,syscalls,initrd,drivers set up"); + return true; +} + +bool boot_stage3(void) { bool tests_succeeded = run_module_tests(); ASSERT(tests_succeeded, "At least one kernel module test failed, halting"); @@ -256,9 +266,26 @@ void kernel_main(multiboot* mboot_ptr, uint32_t initial_stack) { waitpid(pid, &stat, 0); printf("%s returned %d\n", argv[0], stat); + printf_info("boot stage 3 returned?"); + return true; +} + +void kernel_main(multiboot* mboot_ptr, uint32_t initial_stack) { + if (!boot_stage1(mboot_ptr, initial_stack)) { + ASSERT(0, "boot stage 1 failed"); + } + if (!boot_stage2()) { + ASSERT(0, "boot stage 2 failed"); + } + SPIN_NOMULTI; + if (!boot_stage3()) { + ASSERT(0, "boot stage 3 failed"); + } + + //wait for all children processes to finish wait(NULL); - //done bootstrapping, kill process + //all tasks have died, kill kernel _kill(); //this should never be reached as the above call never returns
Fizz: Enable vboot EC This patch enables vboot ec for Fizz. BRANCH=none TEST=Boot Fizz
#define CONFIG_SPI_FLASH_REGS #define CONFIG_SPI_FLASH_W25X40 #define CONFIG_UART_HOST 0 -#define CONFIG_VBOOT_HASH -#define CONFIG_VSTORE -#define CONFIG_VSTORE_SLOT_COUNT 1 #define CONFIG_WATCHDOG_HELP #define CONFIG_WIRELESS #define CONFIG_WIRELESS_SUSPEND \ /* Charger */ #define CONFIG_CHARGE_MANAGER #define CONFIG_CHARGE_RAMP_HW /* This, or just RAMP? */ +#define CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 20000 #define CONFIG_CHARGER_ISL9238 #define CONFIG_CHARGER_INPUT_CURRENT 512 #define I2C_ADDR_TCPC0 0x16 /* Verify and jump to RW image on boot */ +#define CONFIG_VBOOT_EC +#define CONFIG_VBOOT_HASH +#define CONFIG_VSTORE +#define CONFIG_VSTORE_SLOT_COUNT 1 #define CONFIG_RWSIG #define CONFIG_RWSIG_TYPE_RWSIG #define CONFIG_RSA
host/mesh: Missed IV update cannot be captured It seems that if the IV update is missed, a node cannot recover it until the IV index has increased to a value greater than Node's Last known IV + 1. This is port of
@@ -85,6 +85,15 @@ struct bt_mesh_net bt_mesh = { .local_queue = STAILQ_HEAD_INITIALIZER(bt_mesh.local_queue), }; +/* Mesh Profile Specification 3.10.6 + * The node shall not execute more than one IV Index Recovery within a period of + * 192 hours. + * + * Mark that the IV Index Recovery has been done to prevent two recoveries to be + * done before a normal IV Index update has been completed within 96h+96h. + */ +static bool ivi_was_recovered; + static struct os_mbuf_pool loopback_os_mbuf_pool; static struct os_mempool loopback_buf_mempool; os_membuf_t loopback_mbuf_membuf[ @@ -259,24 +268,24 @@ bool bt_mesh_net_iv_update(uint32_t iv_index, bool iv_update) return false; } - if (iv_index > bt_mesh.iv_index + 1) { + if ((iv_index > bt_mesh.iv_index + 1) || + (iv_index == bt_mesh.iv_index + 1 && !iv_update)) { + if (ivi_was_recovered) { + BT_ERR("IV Index Recovery before minimum delay"); + return false; + } + /* The Mesh profile specification allows to initiate an + * IV Index Recovery procedure if previous IV update has + * been missed. This allows the node to remain + * functional. + */ BT_WARN("Performing IV Index Recovery"); + ivi_was_recovered = true; bt_mesh_rpl_clear(); bt_mesh.iv_index = iv_index; bt_mesh.seq = 0; goto do_update; } - - if (iv_index == bt_mesh.iv_index + 1 && !iv_update) { - BT_WARN("Ignoring new index in normal mode"); - return false; - } - - if (!iv_update) { - /* Nothing to do */ - BT_DBG("Already in Normal state"); - return false; - } } if (!(IS_ENABLED(CONFIG_BT_MESH_IV_UPDATE_TEST) && @@ -294,21 +303,22 @@ bool bt_mesh_net_iv_update(uint32_t iv_index, bool iv_update) return false; } -do_update: - atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS, iv_update); - bt_mesh.ivu_duration = 0U; - if (iv_update) { bt_mesh.iv_index = iv_index; BT_DBG("IV Update state entered. New index 0x%08x", (unsigned) bt_mesh.iv_index); bt_mesh_rpl_reset(); + ivi_was_recovered = false; } else { BT_DBG("Normal mode entered"); bt_mesh.seq = 0; } +do_update: + atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS, iv_update); + bt_mesh.ivu_duration = 0U; + k_work_reschedule(&bt_mesh.ivu_timer, BT_MESH_IVU_TIMEOUT); /* Notify other modules */
VERSION bump to version 1.3.67
@@ -31,7 +31,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 3) -set(SYSREPO_MICRO_VERSION 66) +set(SYSREPO_MICRO_VERSION 67) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library