message
stringlengths
6
474
diff
stringlengths
8
5.22k
always enable msp protocol
#include "drv_usb.h" #include "project.h" -#if defined(F405) && defined(USE_SERIAL_4WAY_BLHELI_INTERFACE) +#if defined(F405) #define MSP_API_VERSION 1 //out message #define MSP_FC_VARIANT 2 //out message @@ -137,6 +137,7 @@ void usb_process_msp() { send_msp(code, data, 12); break; } +#ifdef defined(USE_SERIAL_4WAY_BLHELI_INTERFACE) case MSP_SET_4WAY_IF: { uint8_t data[1] = {4}; send_msp(code, data, 1); @@ -149,6 +150,7 @@ void usb_process_msp() { lastlooptime = gettime(); break; } +#endif default: break; }
opae.admin: log exceptions when calling `setpci` getting/setting aer involves calling `setpci`. This change makes it so that getting/setting aer will log the error but not crash the caller.
@@ -27,6 +27,7 @@ import glob import os import re from contextlib import contextmanager +from subprocess import CalledProcessError from opae.admin.utils.process import call_process, DRY_RUN from opae.admin.utils.log import loggable, LOG @@ -266,13 +267,19 @@ class pci_node(sysfs_node): @property def aer(self): + try: return (int(call_process(self._aer_cmd1), 16), int(call_process(self._aer_cmd2), 16)) + except CalledProcessError as err: + self.log.exception('error getting aer: %s', err) @aer.setter def aer(self, values): + try: call_process('{}={:#08x}'.format(self._aer_cmd1, values[0])) call_process('{}={:#08x}'.format(self._aer_cmd2, values[1])) + except CalledProcessError as err: + self.log.exception('error setting aer: %s', err) class class_node(sysfs_node):
SensorAPI: Send sensor data over OIC use valid URIs as per spec
#include <oic/oc_ri.h> #include <oic/oc_api.h> +static const char g_s_oic_dn[] = "x.mynewt.sensors.r."; + static int sensor_oic_encode(struct sensor* sensor, void *arg, void *databuf) { @@ -456,19 +458,13 @@ sensor_oic_get_data(oc_request_t *request, oc_interface_mask_t interface) int rc; struct sensor *sensor; struct sensor_listener listener; - char *devname; + char devname[COAP_MAX_URI] = {0}; char *typename; sensor_type_t type; - const char s[2] = "/"; - char tmpstr[COAP_MAX_URI]; - memcpy(tmpstr, (char *)&(request->resource->uri.os_str[1]), + memcpy(devname, (char *)&(request->resource->uri.os_str[1]), request->resource->uri.os_sz - 1); - /* Parse the sensor device name from the uri */ - devname = strtok(tmpstr, s); - typename = strtok(NULL, s); - /* Look up sensor by name */ sensor = sensor_mgr_find_next_bydevname(devname, NULL); if (!sensor) { @@ -476,6 +472,11 @@ sensor_oic_get_data(oc_request_t *request, oc_interface_mask_t interface) goto err; } + if (memcmp(g_s_oic_dn, request->resource->types.oa_arr.s, + sizeof(g_s_oic_dn) - 1)) { + goto err; + } + oc_rep_start_root_object(); switch (interface) { @@ -485,6 +486,8 @@ sensor_oic_get_data(oc_request_t *request, oc_interface_mask_t interface) /* Register a listener and then trigger/read a bunch of samples */ memset(&listener, 0, sizeof(listener)); + typename = + &(request->resource->types.oa_arr.s[sizeof(g_s_oic_dn) - 1]); rc = sensor_typename_to_type(typename, &type, sensor); if (rc) { /* Type either not supported by sensor or not found */ @@ -561,15 +564,13 @@ sensor_oic_init(void) } memset(tmpstr, 0, sizeof(tmpstr)); - snprintf(tmpstr, sizeof(tmpstr), "/%s/%s", - sensor->s_dev->od_name, typename); + snprintf(tmpstr, sizeof(tmpstr), "/%s", sensor->s_dev->od_name); + res = oc_new_resource(tmpstr, 1, 0); memset(tmpstr, 0, sizeof(tmpstr)); - snprintf(tmpstr, sizeof(tmpstr), "sensors.r.%s", sensor->s_dev->od_name); - + snprintf(tmpstr, sizeof(tmpstr), "x.mynewt.sensors.r.%s", typename); oc_resource_bind_resource_type(res, tmpstr); - oc_resource_bind_resource_interface(res, OC_IF_R); oc_resource_set_default_interface(res, OC_IF_R);
EGL context creation fixes;
@@ -90,7 +90,7 @@ bool lovrPlatformCreateWindow(WindowFlags* flags) { EGL_NONE }; - EGLconfig config = 0; + EGLConfig config = 0; for (EGLint i = 0; i < configCount && !config; i++) { EGLint value, mask; @@ -121,7 +121,7 @@ bool lovrPlatformCreateWindow(WindowFlags* flags) { EGL_NONE }; - if ((state.context = eglCreateContext(state.display, configs[i], EGL_NO_CONTEXT, contextAttributes)) == EGL_NO_CONTEXT) { + if ((state.context = eglCreateContext(state.display, config, EGL_NO_CONTEXT, contextAttributes)) == EGL_NO_CONTEXT) { return false; } @@ -132,13 +132,13 @@ bool lovrPlatformCreateWindow(WindowFlags* flags) { }; if ((state.surface = eglCreatePbufferSurface(state.display, config, surfaceAttributes)) == EGL_NO_SURFACE) { - eglDestroyContext(state.context); + eglDestroyContext(state.display, state.context); return false; } if (eglMakeCurrent(state.display, state.surface, state.surface, state.context) == EGL_FALSE) { - eglDestroySurface(state.surface); - eglDestroyContext(state.context); + eglDestroySurface(state.display, state.surface); + eglDestroyContext(state.display, state.context); } #endif return true;
tls: fix tlsopenssl for remaining buffer Type: fix 1. added additional checks for pending data in openssl_ctx_read_tls(). 2. fixed read/write typo issues.
@@ -475,7 +475,7 @@ openssl_ctx_read_tls (tls_ctx_t *ctx, session_t *tls_session) { openssl_ctx_t *oc = (openssl_ctx_t *) ctx; session_t *app_session; - int read, wrote = 0; + int read; svm_fifo_t *f; if (PREDICT_FALSE (SSL_in_init (oc->ssl))) @@ -493,10 +493,11 @@ openssl_ctx_read_tls (tls_ctx_t *ctx, session_t *tls_session) if (read && app_session->session_state >= SESSION_STATE_READY) tls_notify_app_enqueue (ctx, app_session); - if (SSL_pending (oc->ssl) > 0) + if ((SSL_pending (oc->ssl) > 0) || + svm_fifo_max_dequeue_cons (tls_session->rx_fifo)) tls_add_vpp_q_builtin_rx_evt (tls_session); - return wrote; + return read; } static inline int
http3: Use a temporary buffer when iterating over connection list `conn` (which includes `node`) might be freed in the loop. This error was introduced when bringing a similar logic from HTTP/2 code. HTTP/2 code is fine.
@@ -1511,7 +1511,7 @@ static void graceful_shutdown_close_stragglers(h2o_timer_t *entry) h2o_linklist_t *node, *next; /* We've sent two GOAWAY frames, close the remaining connections */ - for (node = ctx->http3._conns.next; node != &ctx->http3._conns; node = node->next) { + for (node = ctx->http3._conns.next; node != &ctx->http3._conns; node = next) { struct st_h2o_http3_server_conn_t *conn = H2O_STRUCT_FROM_MEMBER(struct st_h2o_http3_server_conn_t, _conns, node); next = node->next; h2o_quic_close_connection(&conn->h3.super, 0, "shutting down");
Version of FoldCase that is actually branch-free on MSVC
@@ -78,8 +78,9 @@ void Log(LogLevel level, const char* fmt, ...); inline int FoldCase(int c) { - int y = c | 0x20; - return (c >= 'A' && c <= 'Z') ? y : c; + // This generates branch-free code on GCC, Clang and MSVC + int adjust = (c >= 'A' && c <= 'Z') ? 0x20 : 0; + return c | adjust; } // Compute 32-bit DJB-2 hash of a string.
no $INCLUDE in this test.
@@ -34,14 +34,8 @@ example 3600 IN SOA dns.example.de. hostmaster.dns.example.de. ( 3600 IN NS ns2.example.com. $ORIGIN example.com. www 3600 IN A 1.2.3.4 -mail 3600 IN A 1.2.3.5 - 3600 IN AAAA ::5 ns1 3600 IN A 1.2.3.4 ns2 3600 IN AAAA ::2 -$INCLUDE_TEMPFILE example.inc -TEMPFILE_END -TEMPFILE_CONTENTS example.inc -other 7200 IN A 1.2.3.6 TEMPFILE_END stub-zone:
Add text/vtt for WebVTT.
@@ -103,6 +103,7 @@ MIMEMAP("ts", "video/mp2t") MIMEMAP("ttc", "font/collection") MIMEMAP("ttf", "font/ttf") MIMEMAP("txt", "text/plain") +MIMEMAP("vtt", "text/vtt") MIMEMAP("war", "application/java-archive") MIMEMAP("wasm", "application/wasm") MIMEMAP("wbmp", "image/vnd.wap.wbmp")
Fix pipeline error on type mismatch
@@ -190,7 +190,7 @@ oc_locn_t oc_str_to_enum_locn(oc_string_t locn_str, bool *oc_defined) { oc_locn_t locn = OCF_LOCN_UNKNOWN; - for (int i = 0; i < (sizeof(oc_locns) / sizeof(char *)); i++) { + for (int i = 0; i < (int)(sizeof(oc_locns) / sizeof(char *)); i++) { if (strcmp(oc_string(locn_str), oc_locns[i]) == 0) { locn = i + 1; *oc_defined = true;
Ensure that the requested memory size cannot exceed the limit imposed by a size_t variable.
@@ -207,6 +207,8 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, if (maxmem == 0) maxmem = SCRYPT_MAX_MEM; + if (maxmem > SIZE_MAX) + maxmem = SIZE_MAX; if (Blen + Vlen > maxmem) { EVPerr(EVP_F_EVP_PBE_SCRYPT, EVP_R_MEMORY_LIMIT_EXCEEDED);
fancybar patch applied
@@ -784,10 +784,10 @@ dirtomon(int dir) void drawbar(Monitor *m) { - int x, w, sw = 0, stw = 0; + int x, w, sw = 0, tw = 0, stw = 0, mw, ew = 0; int boxs = drw->fonts->h / 9; int boxw = drw->fonts->h / 6 + 2; - unsigned int i, occ = 0, urg = 0; + unsigned int i, occ = 0, urg = 0, n = 0; Client *c; if(showsystray && m == systraytomon(m)) @@ -802,6 +802,8 @@ drawbar(Monitor *m) resizebarwin(m); for (c = m->clients; c; c = c->next) { + if (ISVISIBLE(c)) + n++; occ |= c->tags; if (c->isurgent) urg |= c->tags; @@ -821,17 +823,41 @@ drawbar(Monitor *m) drw_setscheme(drw, scheme[SchemeNorm]); x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); - if ((w = m->ww - sw - stw - x) > bh) { - if (m->sel) { - drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); - drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); - if (m->sel->isfloating) - drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0); - } else { + if ((w = m->ww - sw - x) > bh) { + if (n > 0) { + tw = TEXTW(m->sel->name) + lrpad; + mw = (tw >= w || n == 1) ? 0 : (w - tw) / (n - 1); + + i = 0; + for (c = m->clients; c; c = c->next) { + if (!ISVISIBLE(c) || c == m->sel) + continue; + tw = TEXTW(c->name); + if(tw < mw) + ew += (mw - tw); + else + i++; + } + if (i > 0) + mw += ew / i; + + for (c = m->clients; c; c = c->next) { + if (!ISVISIBLE(c)) + continue; + tw = MIN(m->sel == c ? w : mw, TEXTW(c->name)); + + drw_setscheme(drw, scheme[m->sel == c ? SchemeSel : SchemeNorm]); + if (tw > 0) /* trap special handling of 0 in drw_text */ + drw_text(drw, x, 0, tw, bh, lrpad / 2, c->name, 0); + if (c->isfloating) + drw_rect(drw, x + boxs, boxs, boxw, boxw, c->isfixed, 0); + x += tw; + w -= tw; + } + } drw_setscheme(drw, scheme[SchemeNorm]); drw_rect(drw, x, 0, w, bh, 1, 1); } - } drw_map(drw, m->barwin, 0, 0, m->ww - stw, bh); }
macOS: remove augeas, oclint from arm builds on cirrus due to incompatibility
@@ -111,7 +111,6 @@ task: brew install openjdk \ antlr \ antlr4-cpp-runtime \ - augeas \ bison \ clang-format \ dbus \ @@ -142,7 +141,6 @@ task: yajl \ yaml-cpp \ zeromq - brew install --cask oclint - > # Try to install `checkbashisms` (The file server that hosts the package is unfortunately quite unreliable.) brew install checkbashisms || >&2 printf 'Warning: Unable to install `checkbashims`\n'
ExUtilInitCommandLineArguments: fix leak on error argv_data would leak if the argv_ allocation failed or the MAX_ARGC cap was hit Tested: for i in `seq 1 171`; do export MALLOC_FAIL_AT=$i ./examples/img2webp jpeg_file -o /dev/null ./examples/img2webp -mixed jpeg_file -o /dev/null done
@@ -103,7 +103,10 @@ int ExUtilInitCommandLineArguments(int argc, const char* argv[], } args->own_argv_ = 1; args->argv_ = (const char**)WebPMalloc(MAX_ARGC * sizeof(*args->argv_)); - if (args->argv_ == NULL) return 0; + if (args->argv_ == NULL) { + ExUtilDeleteCommandLineArguments(args); + return 0; + } argc = 0; for (cur = strtok((char*)args->argv_data_.bytes, sep); @@ -111,6 +114,7 @@ int ExUtilInitCommandLineArguments(int argc, const char* argv[], cur = strtok(NULL, sep)) { if (argc == MAX_ARGC) { fprintf(stderr, "ERROR: Arguments limit %d reached\n", MAX_ARGC); + ExUtilDeleteCommandLineArguments(args); return 0; } assert(strlen(cur) != 0);
make TSCH joining attempts to print fewer errors; increase the time discrepancy allowance for the joining timestamp
@@ -550,7 +550,7 @@ tsch_associate(const struct input_packet *input_eb, rtimer_clock_t timestamp) if(input_eb == NULL || tsch_packet_parse_eb(input_eb->payload, input_eb->len, &frame, &ies, &hdrlen, 0) == 0) { - LOG_ERR("! failed to parse EB (len %u)\n", input_eb->len); + LOG_DBG("! failed to parse EB (len %u)\n", input_eb->len); return 0; } @@ -769,6 +769,7 @@ PT_THREAD(tsch_scan(struct pt *pt)) /* Read packet */ input_eb.len = NETSTACK_RADIO.read(input_eb.payload, TSCH_PACKET_MAX_LEN); + if(input_eb.len > 0) { /* Save packet timestamp */ NETSTACK_RADIO.get_object(RADIO_PARAM_LAST_PACKET_TIMESTAMP, &t0, sizeof(rtimer_clock_t)); t1 = RTIMER_NOW(); @@ -777,7 +778,7 @@ PT_THREAD(tsch_scan(struct pt *pt)) LOG_INFO("scan: received packet (%u bytes) on channel %u\n", input_eb.len, current_channel); /* Sanity-check the timestamp */ - if(ABS(RTIMER_CLOCK_DIFF(t0, t1)) < tsch_timing[tsch_ts_timeslot_length]) { + if(ABS(RTIMER_CLOCK_DIFF(t0, t1)) < 2ul * RTIMER_SECOND) { tsch_associate(&input_eb, t0); } else { LOG_WARN("scan: dropping packet, timestamp too far from current time %u %u\n", @@ -786,6 +787,7 @@ PT_THREAD(tsch_scan(struct pt *pt)) ); } } + } if(tsch_is_associated) { /* End of association, turn the radio off */
Initialize the local variable to fix the BLE_Unit_MQTT_Serialize hang-up issue during run time.
@@ -653,9 +653,9 @@ static void prvCreatePUBLISHPacket( uint8_t * pBuffer, TEST( BLE_Unit_MQTT_Serialize, DeserializePUBLISH ) { MQTTBLEStatus_t status; - uint8_t buffer[ TEST_MESG_LEN ]; + uint8_t buffer[ TEST_MESG_LEN ] = { 0 }; size_t length = TEST_MESG_LEN; - MQTTBLEPublishInfo_t publishInfo; + MQTTBLEPublishInfo_t publishInfo = { 0 }; uint16_t packetIdentifier; @@ -761,7 +761,7 @@ TEST( BLE_Unit_MQTT_Serialize, DeserializePUBLISH_QOS0 ) MQTTBLEStatus_t status = MQTTBLESuccess; uint8_t buffer[ TEST_MESG_LEN ] = { 0 }; size_t length = TEST_MESG_LEN; - MQTTBLEPublishInfo_t publishInfo; + MQTTBLEPublishInfo_t publishInfo = { 0 }; uint16_t packetIdentifier; @@ -840,7 +840,7 @@ static void prvCreateSUBACKPacket( uint8_t * pBuffer, TEST( BLE_Unit_MQTT_Serialize, DeserializeSUBACK ) { MQTTBLEStatus_t status; - uint8_t buffer[ TEST_MESG_LEN ]; + uint8_t buffer[ TEST_MESG_LEN ] = { 0 }; size_t length = TEST_MESG_LEN; uint16_t packetIdentifier; uint8_t statusCode; @@ -853,6 +853,7 @@ TEST( BLE_Unit_MQTT_Serialize, DeserializeSUBACK ) TEST_ASSERT_EQUAL( TEST_QOS1, statusCode ); /** Malformed message **/ + memset( buffer, 0x00, TEST_MESG_LEN ); length = TEST_MESG_LEN; prvCreateSUBACKPacket( buffer, &length, TEST_QOS1, TEST_PACKET_IDENTIFIER, 2 ); buffer[ 0 ] = 0x00;
ble_mesh: correct the return type [Zephyr]
@@ -741,7 +741,7 @@ static bool model_has_dst(struct bt_mesh_model *model, u16_t dst) if (BLE_MESH_ADDR_IS_UNICAST(dst)) { return (dev_comp->elem[model->elem_idx].addr == dst); } else if (BLE_MESH_ADDR_IS_GROUP(dst) || BLE_MESH_ADDR_IS_VIRTUAL(dst)) { - return bt_mesh_model_find_group(model, dst); + return !!bt_mesh_model_find_group(model, dst); } return (model->elem_idx == 0 && bt_mesh_fixed_group_match(dst));
CI: Cleanup copyright-ignore from pppos files
@@ -3190,23 +3190,6 @@ examples/protocols/openssl_client/main/openssl_client_example_main.c examples/protocols/openssl_server/example_test.py examples/protocols/openssl_server/main/openssl_server_example.h examples/protocols/openssl_server/main/openssl_server_example_main.c -examples/protocols/pppos_client/components/modem/include/bg96.h -examples/protocols/pppos_client/components/modem/include/esp_modem.h -examples/protocols/pppos_client/components/modem/include/esp_modem_compat.h -examples/protocols/pppos_client/components/modem/include/esp_modem_dce.h -examples/protocols/pppos_client/components/modem/include/esp_modem_dce_service.h -examples/protocols/pppos_client/components/modem/include/esp_modem_dte.h -examples/protocols/pppos_client/components/modem/include/esp_modem_netif.h -examples/protocols/pppos_client/components/modem/include/sim7600.h -examples/protocols/pppos_client/components/modem/include/sim800.h -examples/protocols/pppos_client/components/modem/src/bg96.c -examples/protocols/pppos_client/components/modem/src/esp_modem_compat.c -examples/protocols/pppos_client/components/modem/src/esp_modem_dce_service.c -examples/protocols/pppos_client/components/modem/src/esp_modem_netif.c -examples/protocols/pppos_client/components/modem/src/sim7600.c -examples/protocols/pppos_client/components/modem/src/sim800.c -examples/protocols/pppos_client/example_test.py -examples/protocols/pppos_client/main/pppos_client_main.c examples/protocols/slip/slip_udp/components/slip_modem/include/slip_modem.h examples/protocols/slip/slip_udp/components/slip_modem/library/slip_modem.c examples/protocols/slip/slip_udp/main/slip_client_main.c @@ -3556,10 +3539,6 @@ tools/test_apps/protocols/mqtt/publish_connect_test/main/publish_test.c tools/test_apps/protocols/openssl/app_test.py tools/test_apps/protocols/openssl/main/connect_test.c tools/test_apps/protocols/openssl/main/main.c -tools/test_apps/protocols/pppos/app_test.py -tools/test_apps/protocols/pppos/main/null_dce.c -tools/test_apps/protocols/pppos/main/null_dce.h -tools/test_apps/protocols/pppos/main/pppos_client_main.c tools/test_apps/security/secure_boot/example_test.py tools/test_apps/security/secure_boot/main/secure_boot_main.c tools/test_apps/security/secure_boot/main/secure_boot_main_esp32.c
Fix options window crash
#include <phsettings.h> #define WM_PH_CHILD_EXIT (WM_APP + 301) +#define WM_PH_SHOWDIALOG (WM_APP + 302) INT_PTR CALLBACK PhpOptionsGeneralDlgProc( _In_ HWND hwndDlg, @@ -134,6 +135,8 @@ VOID PhpSetDefaultTaskManager( ); static HWND PhOptionsWindowHandle = NULL; +static HANDLE PhOptionsWindowThreadHandle = NULL; +static PH_EVENT PhOptionsWindowInitializedEvent = PH_EVENT_INIT; static PPH_LIST PhOptionsDialogList = NULL; static PH_LAYOUT_MANAGER WindowLayoutManager; @@ -148,30 +151,28 @@ static BOOLEAN RestartRequired = FALSE; // General static PH_STRINGREF CurrentUserRunKeyName = PH_STRINGREF_INIT(L"Software\\Microsoft\\Windows\\CurrentVersion\\Run"); -static BOOLEAN CurrentUserRunPresent; -static BOOLEAN CurrentUserRunStartHidden; -static HFONT CurrentFontInstance; -static PPH_STRING NewFontSelection; +static BOOLEAN CurrentUserRunPresent = FALSE; +static BOOLEAN CurrentUserRunStartHidden = FALSE; +static HFONT CurrentFontInstance = NULL; +static PPH_STRING NewFontSelection = NULL; static HIMAGELIST GeneralListviewImageList = NULL; // Advanced static PH_STRINGREF TaskMgrImageOptionsKeyName = PH_STRINGREF_INIT(L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\taskmgr.exe"); -static PPH_STRING OldTaskMgrDebugger; -static HWND WindowHandleForElevate; +static PPH_STRING OldTaskMgrDebugger = NULL; +static HWND WindowHandleForElevate = NULL; // Highlighting -static HWND HighlightingListViewHandle; +static HWND HighlightingListViewHandle = NULL; -VOID PhShowOptionsDialog( - _In_ HWND ParentWindowHandle +NTSTATUS ShowUpdateDialogThread( + _In_ PVOID Parameter ) { - if (PhStartupParameters.ShowOptions) - { - PhpSetDefaultTaskManager(ParentWindowHandle); - } - else - { + PH_AUTO_POOL autoPool; + + PhInitializeAutoPool(&autoPool); + DialogBox( PhInstanceHandle, MAKEINTRESOURCE(IDD_OPTIONS), @@ -208,6 +209,32 @@ VOID PhShowOptionsDialog( ProcessHacker_Destroy(PhMainWndHandle); } } + + PhDeleteAutoPool(&autoPool); + + PhResetEvent(&PhOptionsWindowInitializedEvent); + + return STATUS_SUCCESS; +} + +VOID PhShowOptionsDialog( + _In_ HWND ParentWindowHandle + ) +{ + if (PhStartupParameters.ShowOptions) + { + PhpSetDefaultTaskManager(ParentWindowHandle); + } + else + { + if (!PhTestEvent(&PhOptionsWindowInitializedEvent)) + { + PhCreateThread2(ShowUpdateDialogThread, NULL); + + PhWaitForEvent(&PhOptionsWindowInitializedEvent, NULL); + } + + PostMessage(PhOptionsWindowHandle, WM_PH_SHOWDIALOG, 0, 0); } } @@ -354,6 +381,8 @@ INT_PTR CALLBACK PhOptionsDialogProc( PhOptionsEnterSectionView(section); PhOptionsOnSize(); } + + PhSetEvent(&PhOptionsWindowInitializedEvent); } break; case WM_NCDESTROY: @@ -375,6 +404,16 @@ INT_PTR CALLBACK PhOptionsDialogProc( PhDeleteLayoutManager(&WindowLayoutManager); } break; + case WM_PH_SHOWDIALOG: + { + if (IsMinimized(hwndDlg)) + ShowWindow(hwndDlg, SW_RESTORE); + else + ShowWindow(hwndDlg, SW_SHOW); + + SetForegroundWindow(hwndDlg); + } + break; case WM_SIZE: { PhOptionsOnSize();
[STM32][RTC] Add timeval ops for STM32 platform Sub-second timestamp.
@@ -38,7 +38,7 @@ RT_WEAK void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegiste return; } -static time_t get_rtc_timestamp(void) +static void get_rtc_timeval(struct timeval *tv) { RTC_TimeTypeDef RTC_TimeStruct = {0}; RTC_DateTypeDef RTC_DateStruct = {0}; @@ -54,8 +54,11 @@ static time_t get_rtc_timestamp(void) tm_new.tm_mon = RTC_DateStruct.Month - 1; tm_new.tm_year = RTC_DateStruct.Year + 100; - LOG_D("get rtc time."); - return timegm(&tm_new); + tv->tv_sec = timegm(&tm_new); + +#if defined(SOC_SERIES_STM32H7) + tv->tv_usec = (255.0 - RTC_TimeStruct.SubSeconds * 1.0) / 256.0 * 1000.0 * 1000.0; +#endif } static rt_err_t set_rtc_time_stamp(time_t time_stamp) @@ -243,7 +246,9 @@ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI1; static rt_err_t stm32_rtc_get_secs(void *args) { - *(rt_uint32_t *)args = get_rtc_timestamp(); + struct timeval tv; + get_rtc_timeval(&tv); + *(rt_uint32_t *) args = tv.tv_sec; LOG_D("RTC: get rtc_time %x\n", *(rt_uint32_t *)args); return RT_EOK; @@ -262,6 +267,13 @@ static rt_err_t stm32_rtc_set_secs(void *args) return result; } +static rt_err_t stm32_rtc_get_timeval(void *args) +{ + get_rtc_timeval((struct timeval *) args); + + return RT_EOK; +} + static const struct rt_rtc_ops stm32_rtc_ops = { stm32_rtc_init, @@ -269,7 +281,7 @@ static const struct rt_rtc_ops stm32_rtc_ops = stm32_rtc_set_secs, RT_NULL, RT_NULL, - RT_NULL, + stm32_rtc_get_timeval, RT_NULL, };
Implement reading from local variables
@@ -8,6 +8,7 @@ local coder = {} local generate_program local generate_stat +local generate_var local generate_exp function coder.generate(filename, input, modname) @@ -415,7 +416,39 @@ generate_stat = function(stat) end end --- Returns (statements, value) +-- @returns (statements, clvalue) +generate_var = function(var) + local tag = var._tag + if tag == ast.Var.Name then + local decl = var._decl + if decl._tag == ast.Decl.Decl then + -- Local variable + return "", local_name(decl.name) + + elseif decl._tag == ast.Toplevel.Var then + -- Toplevel variable + error("not implemented yet") + + elseif decl._tag == ast.Toplevel.Func then + -- Toplevel function + error("not implemented yet") + + else + error("impossible") + end + + elseif tag == ast.Var.Bracket then + error("not implemented yet") + + elseif tag == ast.Var.Dot then + error("not implemented yet") + + else + error("impossible") + end +end + +-- @returns (statements, cvalue) generate_exp = function(exp) -- TODO local tag = exp._tag if tag == ast.Exp.Nil then @@ -436,6 +469,12 @@ generate_exp = function(exp) -- TODO elseif tag == ast.Exp.Initlist then error("not implemented yet") + elseif tag == ast.Exp.Call then + error("not implemented yet") + + elseif tag == ast.Exp.Var then + return generate_var(exp.var) + elseif tag == ast.Exp.Unop then local cstats, cvalue = generate_exp(exp.exp)
removing extra quotes from shell command
@@ -8,4 +8,4 @@ dependencies: test: override: - - docker run -t --env CIRCLE_BRANCH='$CIRCLE_BRANCH' -v $PWD:$PWD kubostech/kubos-dev:latest python $PWD/test/integration/integration_test.py + - docker run -t --env CIRCLE_BRANCH=$CIRCLE_BRANCH -v $PWD:$PWD kubostech/kubos-dev:latest python $PWD/test/integration/integration_test.py
clay: scry kernel source out of arvo for reef short-circuit
++ deep |= [pax=path src=cord] ^- ? - :: XX scry into arvo - :: - :: //=//=/mod/fat - :: =+ (~(get ^de fat) pax) - :: &(?=(^ fil) ?=(%hoon p.fil) =(src q.fil)) - :: - =/ our-lobe=lobe - (page-to-lobe hoon/src) - =/ =dome dom:(~(got by dos.rom) %home) - =/ =yaki (~(got by hut.ran) (~(got by hit.dome) let.dome)) - =/ lobe=(unit lobe) - (~(get by q.yaki) (weld pax /hoon)) - &(?=(^ lobe) =(our-lobe u.lobe)) + :: XX use roof + :: + :: =/ dat (rof `[our ~ ~] $/[[our $/da/now] mod/fat/pax]) + :: ?: |(?=(~ dat) ?=(~ u.dat)) | + :: =/ nod !<((axal (cask)) q.u.u.dat) + :: + =/ dat + ;; (unit (unit (axal (cask)))) + ((sloy-light ski) [hoon-version %noun] %$ our %$ da/now mod/fat/pax) + ?: |(?=(~ dat) ?=(~ u.dat)) | + =* nod u.u.dat + &(?=(^ fil.nod) ?=(%hoon p.u.fil.nod) =(src q.u.fil.nod)) -- :: ++ page-to-cord
tests CHANGE test description/reference refine in uses/grouping
@@ -2335,7 +2335,7 @@ test_refine(void **state) "leaf-list ll {type mytype; default goodbye; max-elements 6;}" "choice ch {default a; leaf a {type int8;}leaf b{type uint8;}}" "leaf x {type mytype; mandatory true; must 1;}" - "anydata a {mandatory false; if-feature f;}" + "anydata a {mandatory false; if-feature f; description original; reference original;}" "container c {config false; leaf l {type string;}}}}}", LYS_IN_YANG)); assert_int_equal(LY_SUCCESS, lys_compile(mod, 0)); @@ -2343,8 +2343,8 @@ test_refine(void **state) "uses g:grp {refine c/l {default hello; config false;}" "refine c/ll {default hello;default world; min-elements 2; max-elements 5;}" "refine c/ch {default b;config true; if-feature fa;}" - "refine c/x {mandatory false; must ../ll;}" - "refine c/a {mandatory true; must 1; if-feature fa;}" + "refine c/x {mandatory false; must ../ll;description refined; reference refined;}" + "refine c/a {mandatory true; must 1; if-feature fa;description refined; reference refined;}" "refine c/c {config true;presence indispensable;}}}", LYS_IN_YANG)); assert_int_equal(LY_SUCCESS, lys_compile(mod, 0)); assert_non_null((parent = mod->compiled->data)); @@ -2378,6 +2378,8 @@ test_refine(void **state) assert_string_equal("cheers!", ((struct lysc_node_leaf*)child)->dflt); assert_non_null(((struct lysc_node_leaf*)child)->musts); assert_int_equal(2, LY_ARRAY_SIZE(((struct lysc_node_leaf*)child)->musts)); + assert_string_equal("refined", child->dsc); + assert_string_equal("refined", child->ref); assert_non_null(child = child->next); assert_int_equal(LYS_ANYDATA, child->nodetype); assert_string_equal("a", child->name); @@ -2386,6 +2388,8 @@ test_refine(void **state) assert_int_equal(1, LY_ARRAY_SIZE(((struct lysc_node_anydata*)child)->musts)); assert_non_null(child->iffeatures); assert_int_equal(2, LY_ARRAY_SIZE(child->iffeatures)); + assert_string_equal("refined", child->dsc); + assert_string_equal("refined", child->ref); assert_non_null(child = child->next); assert_int_equal(LYS_CONTAINER, child->nodetype); assert_string_equal("c", child->name);
baseboard/kukui: Increase UART TX buffer size to 8192 To keep buffer overflow logs. TEST=make buildall BRANCH=kukui Tested-by: Nicolas Boichat
/* Increase tx buffer size, as we'd like to stream EC log to AP. */ #undef CONFIG_UART_TX_BUF_SIZE -#define CONFIG_UART_TX_BUF_SIZE 4096 +#define CONFIG_UART_TX_BUF_SIZE 8192 /* To be able to indicate the device is in tablet mode. */ #define CONFIG_TABLET_MODE
Do not use ChaCha20 if not supported by OpenSSL version
@@ -1032,14 +1032,18 @@ void picoquic_crypto_context_free(picoquic_crypto_context_t * ctx) /* Definition of supported key exchange algorithms */ -ptls_key_exchange_algorithm_t *picoquic_key_exchanges[] = { &ptls_openssl_secp256r1, &ptls_openssl_x25519, NULL }; +ptls_key_exchange_algorithm_t *picoquic_key_exchanges[] = { &ptls_openssl_secp256r1, +#ifdef PTLS_OPENSSL_HAVE_CHACHA20_POLY1305 + &ptls_openssl_x25519, +#endif + NULL }; ptls_cipher_suite_t *picoquic_cipher_suites[] = { &ptls_openssl_aes128gcmsha256, &ptls_openssl_aes256gcmsha384, #ifdef PTLS_OPENSSL_HAVE_CHACHA20_POLY1305 &ptls_openssl_chacha20poly1305sha256, #else - &ptls_openssl_chacha20poly1305sha256, + /* No support for ChaCha 20 */ #endif NULL };
Respect predefined defaults for AR, AS, LD and RANLIB
@@ -263,10 +263,10 @@ endif ARFLAGS = CPP = $(COMPILER) -E -AR = $(CROSS_SUFFIX)ar -AS = $(CROSS_SUFFIX)as -LD = $(CROSS_SUFFIX)ld -RANLIB = $(CROSS_SUFFIX)ranlib +AR ?= $(CROSS_SUFFIX)ar +AS ?= $(CROSS_SUFFIX)as +LD ?= $(CROSS_SUFFIX)ld +RANLIB ?= $(CROSS_SUFFIX)ranlib NM = $(CROSS_SUFFIX)nm DLLWRAP = $(CROSS_SUFFIX)dllwrap OBJCOPY = $(CROSS_SUFFIX)objcopy
tests/unit/tests/utils/utils_refcnt.c/utils_refcnt_register_zero_cb.c: fix typos
@@ -87,7 +87,7 @@ static void ocf_refcnt_register_zero_cb_test02(void **state) expect_function_calls(zero_cb, 1); expect_value(zero_cb, ctx, ptr); - /* regiser callback */ + /* register callback */ ocf_refcnt_register_zero_cb(&rc, zero_cb, ptr); val = env_atomic_read(&rc.callback);
HotKeys: Add OC_INPUT_TYPING_CONFIRM
@@ -404,24 +404,12 @@ OcGetPickerKeyInfo ( } // - // Handle typing + // Handle typing chars. // - if (FilterForTyping) { - if (UnicodeChar >= 32 && UnicodeChar < 128) { + if (FilterForTyping && UnicodeChar >= 32 && UnicodeChar < 128) { PickerKeyInfo->TypingChar = (CHAR8)UnicodeChar; } - if (OcKeyMapHasKey (Keys, NumKeys, AppleHidUsbKbUsageKeyEscape)) { - PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_CLEAR_ALL; - return; - } - - if (OcKeyMapHasKey (Keys, NumKeys, AppleHidUsbKbUsageKeyBackSpace)) { - PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_BACKSPACE; - return; - } - } - // // Handle VoiceOver - non-repeating. // @@ -470,6 +458,23 @@ OcGetPickerKeyInfo ( PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_RIGHT; return; } + + if (Keys[0] == AppleHidUsbKbUsageKeyEscape) { + PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_CLEAR_ALL; + return; + } + + if (Keys[0] ==AppleHidUsbKbUsageKeyBackSpace) { + PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_BACKSPACE; + return; + } + + if (Keys[0] == AppleHidUsbKbUsageKeyEnter + || Keys[0] == AppleHidUsbKbUsageKeyReturn + || Keys[0] == AppleHidUsbKbUsageKeyPadEnter) { + PickerKeyInfo->OcKeyCode = OC_INPUT_TYPING_CONFIRM; + return; + } } else { // // Non-typing index key strokes.
Create config.powerup only for dresden elektronik FLS lights
@@ -2375,7 +2375,7 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node) QString uid = generateUniqueId(lightNode.address().ext(), lightNode.haEndpoint().endpoint(), 0); lightNode.setUniqueId(uid); - if (existDevicesWithVendorCodeForMacPrefix(node->address(), VENDOR_DDEL) && i->deviceId() != DEV_ID_CONFIGURATION_TOOL) + if (existDevicesWithVendorCodeForMacPrefix(node->address(), VENDOR_DDEL) && i->deviceId() != DEV_ID_CONFIGURATION_TOOL && node->nodeDescriptor().manufacturerCode() == VENDOR_DDEL) { ResourceItem *item = lightNode.addItem(DataTypeUInt32, RConfigPowerup); DBG_Assert(item != 0);
libhfnetdriver: use TCP_NODELAY only if it and SOL_TCP is defined
@@ -123,10 +123,12 @@ static int netDriver_sockConnAddr(const struct sockaddr *addr, socklen_t socklen if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &val, (socklen_t)sizeof(val)) == -1) { PLOG_W("setsockopt(sock=%d, SOL_SOCKET, SO_REUSEADDR, 1)", sock); } +#if defined(SOL_TCP) && defined(TCP_NODELAY) val = 1; if (setsockopt(sock, SOL_TCP, TCP_NODELAY, &val, (socklen_t)sizeof(val)) == -1) { PLOG_W("setsockopt(sock=%d, SOL_TCP, TCP_NODELAY, 1)", sock); } +#endif /* defined(SOL_TCP) && defined(TCP_NODELAY) */ netDriver_bindToRndLoopback(sock, addr->sa_family);
fix issue of get absolute path
@@ -27,7 +27,7 @@ void xdag_init_path(char *path) { if (*n != '/' && *n != '\\') { char buf[PATH_MAX]; getcwd(buf, PATH_MAX); - sprintf(g_xdag_current_path, "%s/%s", n, buf); + sprintf(g_xdag_current_path, "%s/%s", buf, n); } else { sprintf(g_xdag_current_path, "%s", n); }
Getting rid of c_str for TStringBuf, p1.
@@ -83,14 +83,14 @@ struct TFixedString { template <typename T> TFixedString(const TStringBase<T, TCharType, TTraits>& s) - : Start(s.c_str()) + : Start(s.data()) , Length(s.size()) { } template <typename T, typename A> TFixedString(const std::basic_string<TCharType, T, A>& s) - : Start(s.c_str()) + : Start(s.data()) , Length(s.size()) { } @@ -267,6 +267,10 @@ public: return Ptr()[0]; } + constexpr const TCharType* data() const noexcept { + return Ptr(); + } + constexpr inline size_t size() const noexcept { return Len(); }
Conditionals: Use fences for code blocks
@@ -32,7 +32,9 @@ Operations: `!=, ==, <, <=, =>, >, :=`, where: ### Assign Syntax +``` (IF-condition) ? ('ThenValue') : ('ElseValue') +``` Depending on if the condition is met, either 'ThenValue' or 'ElseValue' will be assigned as key value if the metakey `assign/condition` is used. @@ -56,7 +58,9 @@ For multiple assign statements use `assign/condition` as a meta array. The first ## Example +``` (this/key != 'value') ? (then/key == some/other/key) : (or/key <= '125') +``` Meaning: IF `this/key` NOT EQUAL TO `'value'` THEN `then/key` MUST EQUAL `some/other/key` ELSE `or/key` MUST BE LESS THAN `125`
doc: update security advisory for v1.6 release Update mitigations for security vulnerabilities for ACRN v.16 release.
Security Advisory ***************** -We recommend that all developers upgrade to this v1.4 release, which addresses the following security +We recommend that all developers upgrade to this v1.6 release, which addresses the following security issues that were discovered in previous releases: +Hypervisor Crashed When Fuzzing HC_DESTROY_VM + The input 'vdev->pdev' shall be validated properly when handling HC_SET_PTDEV_INTR_INFO, + to insure physical device is linked to 'vdev', otherwise hypervisor will crash when fuzzing + hypercall HC_DESTROY_VM with crafted input. + + | **Affected Release:** v1.5 and earlier. + | Upgrade to ACRN release v1.6. + +Hypervisor Crashed When Fuzzing HC_VM_WRITE_PROTECT_PAGE + The input GPA is not validated when handling this hypercall, Invalid GPA that is not + in the scope of the target VM's EPT address space results in hypervisor crash when + handing this hypercall. + + | **Affected Release:** v1.4 and earlier. + | Upgrade to ACRN release v1.6. + +Hypervisor Crashed When Fuzzing HC_NOTIFY_REQUEST_FINISH + The input is not validated properly when handing this hypercall, 'vcpu_id' shall be + less than 'vm->hw.created_vcpus' instead of 'MAX_VCPUS_PER_VM'. When the software + fails to validate input properly, hypervisor will crash when handling crafted inputs. + + | **Affected Release:** v1.4 and earlier. + | Upgrade to ACRN release v1.6. + Mitigation for Machine Check Error on Page Size Change Improper invalidation for page table updates by a virtual guest operating system for multiple Intel(R) Processors may allow an authenticated user to potentially enable denial of service of the host system via local access. Malicious guest kernel could trigger this issue, CVE-2018-12207.
Document AtkEventListener.ReceiveEvent
@@ -755,7 +755,9 @@ factory.register(0x14164F460, "Client::System::Framework::TaskManager", [], { factory.register(0x14164F478, "Client::System::Configuration::SystemConfig", ["Common::Configuration::SystemConfig"], {}) factory.register(0x14164F498, "Client::System::Configuration::DevConfig", ["Common::Configuration::DevConfig"], {}) factory.register(0x14164F4E0, "Component::Excel::ExcelModuleInterface", [], {}) -factory.register(0x141659488, "Component::GUI::AtkEventListener", [], {}) # TODO: Verify this +factory.register(0x141659488, "Component::GUI::AtkEventListener", [], { + 2: "ReceiveEvent", +}) # TODO: Verify this factory.register(0x1416594C0, "Component::GUI::AtkUnitList", [], {}) factory.register(0x1416594C8, "Component::GUI::AtkUnitManager", ["Component::GUI::AtkEventListener"], { 0x1404E5470: "ctor",
scope properties
@@ -380,7 +380,7 @@ sys_gui("set $var_scope_max_range $max_range\n"); sys_gui("set $var_scope_del $del\n"); sys_gui("set $var_scope_draw_style $draw_style\n"); // Receive -sys_gui("if {$rcv == \"empty\"} {set $var_scope_rcv [format \"\"]} else {set $var_scope_rcv $rcv}\n"); +sys_gui("if {$rcv == \"empty\"} {set $var_scope_rcv [format \"\"]} else {set $var_scope_rcv [string map {{\\ } \" \"} $rcv]}\n"); sys_gui("set $var_scope_tr_mode $tr_mode\n"); sys_gui("set $var_scope_tr_level $tr_level \n"); sys_gui("set $var_scope_bcol $bcol\n");
use error_return_t struct
@@ -135,11 +135,11 @@ uint8_t LuosBootloader_IsEnoughSpace(uint32_t binary_size) uint32_t free_space = FLASH_END - APP_ADDRESS; if (free_space > binary_size) { - return 0x01; + return SUCCEED; } else { - return 0x00; + return FAILED; } } #endif @@ -358,7 +358,7 @@ void LuosBootloader_Task(void) // save binary length memcpy(&nb_bytes, &bootloader_data, sizeof(uint32_t)); // check free space in flash - if (LuosBootloader_IsEnoughSpace(nb_bytes)) + if (LuosBootloader_IsEnoughSpace(nb_bytes) == SUCCEED) { // send READY response LuosBootloader_SendResponse(BOOTLOADER_READY_RESP);
[viostor] fail write request on readonly disk.
@@ -824,12 +824,11 @@ VirtIoStartIo( case SCSIOP_WRITE: case SCSIOP_WRITE16: { if (CHECKBIT(adaptExt->features, VIRTIO_BLK_F_RO)) { - PSENSE_DATA senseBuffer = (PSENSE_DATA) Srb->SenseInfoBuffer; - ScsiStatus = SCSISTAT_CHECK_CONDITION; - SRB_SET_SCSI_STATUS(((PSRB_TYPE)Srb), ScsiStatus); - senseBuffer->SenseKey = SCSI_SENSE_DATA_PROTECT; - senseBuffer->AdditionalSenseCode = SCSI_ADWRITE_PROTECT; - CompleteRequestWithStatus(DeviceExtension, (PSRB_TYPE)Srb, SRB_STATUS_ERROR); + UCHAR SrbStatus = SRB_STATUS_ERROR; + if (SetSenseInfo((PSRB_TYPE)Srb, SCSI_SENSE_DATA_PROTECT, SCSI_ADSENSE_WRITE_PROTECT, SCSI_ADSENSE_NO_SENSE)) { + SrbStatus |= SRB_STATUS_AUTOSENSE_VALID; + } + CompleteRequestWithStatus(DeviceExtension, (PSRB_TYPE)Srb, SrbStatus); return TRUE; } } @@ -859,6 +858,10 @@ VirtIoStartIo( } case SCSIOP_SYNCHRONIZE_CACHE: case SCSIOP_SYNCHRONIZE_CACHE16: { + if (CHECKBIT(adaptExt->features, VIRTIO_BLK_F_RO)) { + CompleteRequestWithStatus(DeviceExtension, (PSRB_TYPE)Srb, SRB_STATUS_SUCCESS); + return TRUE; + } SRB_SET_SRB_STATUS(Srb, SRB_STATUS_PENDING); if (!RhelDoFlush(DeviceExtension, (PSRB_TYPE)Srb, FALSE, FALSE)) { CompleteRequestWithStatus(DeviceExtension, (PSRB_TYPE)Srb, SRB_STATUS_ERROR);
SW: Add one more linefeed
@@ -151,6 +151,7 @@ static void dnut_print_search_results(struct dnut_job *cjob, unsigned int run) if (((i+1) % 3) == 0) printf("\n"); } + printf("\n"); } if (verbose_flag > 1) { printf(PR_RED "Found: %016llx/%lld" PR_STD
Fix for "MemorySanitizer: use-of-uninitialized-value in __kmp_query_cpuid"
#include "kmp_str.h" #include <float.h> #include "kmp_i18n.h" +#include <util/system/cpu_id.h> /* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */ @@ -284,20 +285,17 @@ __kmp_query_cpuid( kmp_cpuinfo_t *p ) { // Parse CPU brand string for frequency. union kmp_cpu_brand_string { - struct kmp_cpuid buf[ 3 ]; - char string[ sizeof( struct kmp_cpuid ) * 3 + 1 ]; + ui32 buf[ 12 ]; + char string[ sizeof( ui32 ) * 12 + 1 ]; }; // union kmp_cpu_brand_string union kmp_cpu_brand_string brand; - int i; memset(&brand, 0, sizeof(brand)); p->frequency = 0; // Get CPU brand string. - for ( i = 0; i < 3; ++ i ) { - __kmp_x86_cpuid( 0x80000002 + i, 0, &brand.buf[ i ] ); - }; // for + CpuBrand(brand.buf); brand.string[ sizeof( brand.string ) - 1 ] = 0; // Just in case. ;-) KA_TRACE( trace_level, ( "cpu brand string: \"%s\"\n", brand.string ) );
a concession for sipfyn-pidmex
=, format ;< breh=(list @tas) bind:m (buds (so:dejs u.know)) %- pure:m -!>(`json`(frond:enjs 'buds' a+(turn breh |=(@tas s++<)))) +!>(`json`(frond:enjs 'buds' a+(turn breh |=(@tas s+[+<]))))
gall: fix /clear-huck handling
?. (~(has by yokes.state) dap) ~> %slog.0^leaf/"gall: ignoring %nuke for {<dap>}, not running" mo-core + ~> %slog.0^leaf/"gall: nuking {<dap>}" =. mo-core ap-abet:ap-nuke:(ap-abed:ap dap `our) mo-core(yokes.state (~(del by yokes.state) dap)) :: +mo-peek: call to +ap-peek (which is not accessible outside of +mo). ~&(%gall-take-dud ((slog tang.u.dud) [~ gall-payload])) ?: =(/nowhere wire) [~ gall-payload] + ?: =(/clear-huck wire) + =/ =gift ?>(?=([%behn %heck %gall *] syn) +>+.syn) + [[duct %give gift]~ gall-payload] :: ~| [%gall-take-failed wire] ?> ?=([?(%sys %use) *] wire)
Update: Minor adjustment for better usage
@@ -1405,6 +1405,8 @@ int main(int argc, char *argv[]) puts("YAN pong (starts Pong example)"); puts("YAN pong2 (starts Pong2 example)"); puts("YAN testchamber (starts Test Chamber multistep procedure learning example)"); + puts("YAN alien (starts the alien example)"); + puts("YAN shell (starts the interactive NAL shell)"); return 0; }
Fix for string object not being identified correctly
@@ -21,9 +21,9 @@ static void mp_obj_to_string(const mp_obj_t &obj, std::string &string_out) { } else if(mp_obj_is_float(obj)) mp_raise_TypeError("can't convert 'float' object to str implicitly"); - if(mp_obj_is_int(obj)) + else if(mp_obj_is_int(obj)) mp_raise_TypeError("can't convert 'int' object to str implicitly"); - if(mp_obj_is_bool(obj)) + else if(mp_obj_is_bool(obj)) mp_raise_TypeError("can't convert 'bool' object to str implicitly"); else mp_raise_TypeError("can't convert object to str implicitly");
add mixin to sha3 config
@@ -149,6 +149,7 @@ class FireSimRocketChipOctaCoreConfig extends Config( // SHA-3 accelerator config class FireSimRocketChipSha3L2Config extends Config( new WithInclusiveCache ++ + new sha3.WithSha3Printf ++ new sha3.WithSha3Accel ++ new WithNBigCores(1) ++ new FireSimRocketChipConfig)
GBP: fix the runs before statement against the ACL node
@@ -726,7 +726,7 @@ VLIB_NODE_FUNCTION_MULTIARCH (gbp_4_node, gbp_4); VNET_FEATURE_INIT (gbp_4_node, static) = { .arc_name = "ip4-unicast", .node_name = "gbp4", - .runs_after = VNET_FEATURES ("acl-plugin-out-ip4-fa"), + .runs_after = VNET_FEATURES ("acl-plugin-in-ip4-fa"), }; VLIB_REGISTER_NODE (gbp_6_node) = { @@ -751,7 +751,7 @@ VLIB_NODE_FUNCTION_MULTIARCH (gbp_6_node, gbp_6); VNET_FEATURE_INIT (gbp_6_node, static) = { .arc_name = "ip6-unicast", .node_name = "gbp6", - .runs_after = VNET_FEATURES ("acl-plugin-out-ip6-fa"), + .runs_after = VNET_FEATURES ("acl-plugin-in-ip6-fa"), }; /* *INDENT-ON* */
tests: Replace `fgrep` by `grep -f`
@@ -203,7 +203,7 @@ check_set_mv_rm() { # is_not_rw_storage() { - echo $("$KDB" plugin-info "$PLUGIN" provides 2> /dev/null) | fgrep -qw "storage" + echo $("$KDB" plugin-info "$PLUGIN" provides 2> /dev/null) | grep -f -qw "storage" if [ $? != 0 ]; then return 0 fi
Add note that binaries come from last stable tag
@@ -57,6 +57,9 @@ and macOS (x64) are available here: * [Binary directory](/Binary/). + These binaries are built from the latest stable tag, and therefore do not + necessarily represent the current state of the `master` branch source code. + # Building from source Builds for Linux and macOS use GCC and Make, and are tested with GCC 4.6 and @@ -116,14 +119,14 @@ console. ## Experimenting -Efficient real-time graphics benefits from low bandwidth texture access, -as it reduces bandwidth, saves energy, and can improve texture cache -efficiency. However, like any lossy compression format there will come a point -where the output compression quality is unacceptable because there are simply -not enough bits to represent the output at the quality needed. We recommend -experimenting with the block footprint to find the optimum balance between size -and quality, as the finely adjustable compression ratio is one of major -strengths of the ASTC format. +Efficient real-time graphics benefits from minimizing the bitrate needed to +store a texture, as it reduces memory bandwidth, saves energy, and can improve +texture cache efficiency. However, like any lossy compression format there will +come a point where the compressed image quality is unacceptable because there +are simply not enough bits to represent the output with the precision needed. +We recommend experimenting with the block footprint to find the optimum balance +between size and quality, as the finely adjustable compression ratio is one of +major strengths of the ASTC format. The compression speed can be controlled from `-veryfast`, through `-fast`, `-medium` and `-thorough`, up to `-exhaustive`. In general, the more time the
Update PKGBUILD-odroid
-# Maintainer: Jai-JAP <parjailu@gmail.com>, SpacingBat3 <git@spacingbat3.anonaddy.com> +# Maintainer: Jai-JAP <jai.jap.318@gmail.com>, SpacingBat3 <git@spacingbat3.anonaddy.com> # Author: Sebastien Chevalier <ptitseb@box86.org> pkgname=box86-odroid-git -pkgver=3494.bedacef +pkgver=3858.5368285 pkgrel=1 pkgdesc="Linux Userspace x86 Emulator with a twist, targeted at ARM Linux devices." arch=('armv7h')
dojo: reset =dir during migration The base desk is the new default. If we leave the dir untouched, for most users this means they remain on home, which gets rendered explicitly in the prompt since it's no longer the default desk.
++ session-6-to-7 |= old=session-6 ~? ?=(^ poy.old) [dap.hid %cancelling-for-load] - old(poy ~) + old(poy ~, -.dir [our.hid %base ud+0]) :: +$ house-5 [%5 egg=@u hoc=(map id session)]
Update test suite to timeout after 300 seconds, show error_log on failure in Github action.
@@ -18,13 +18,11 @@ jobs: - name: configure env: CC: /usr/bin/gcc - run: ./configure --enable-debug --enable-maintainer --enable-sanitizer + run: ./configure --enable-debug --enable-maintainer - name: make run: make - name: test - env: - ASAN_OPTIONS: leak_check_at_exit=false - run: make test + run: make test || cat test/error_log* build-macos: @@ -37,4 +35,4 @@ jobs: - name: make run: make - name: test - run: make test + run: make test || cat test/error_log*
server: Limit dynbuflen
@@ -62,6 +62,10 @@ namespace { constexpr size_t TOKEN_RAND_DATALEN = 16; } // namespace +namespace { +constexpr size_t MAX_DYNBUFLEN = 1024 * 1024; +} // namespace + namespace { auto randgen = util::make_mt19937(); } // namespace @@ -502,6 +506,10 @@ int dyn_read_data(nghttp3_conn *conn, int64_t stream_id, const uint8_t **pdata, void *stream_user_data) { auto stream = static_cast<Stream *>(stream_user_data); + if (stream->dynbuflen > MAX_DYNBUFLEN) { + return NGHTTP3_ERR_WOULDBLOCK; + } + auto len = std::min(static_cast<size_t>(16384), static_cast<size_t>(stream->dyndataleft)); auto buf = std::make_unique<std::vector<uint8_t>>(len); @@ -570,6 +578,7 @@ void Stream::http_acked_stream_data(size_t datalen) { } datalen -= buf->size(); + dynbuflen -= buf->size(); dynbufs.pop_front(); } @@ -1440,6 +1449,15 @@ void Handler::http_acked_stream_data(int64_t stream_id, size_t datalen) { auto &stream = (*it).second; stream->http_acked_stream_data(datalen); + + if (stream->fd == -1 && stream->dynbuflen < MAX_DYNBUFLEN - 16384) { + auto rv = nghttp3_conn_resume_stream(httpconn_, stream_id); + if (rv != 0) { + // TODO Handle error + std::cerr << "nghttp3_conn_resume_stream: " << nghttp3_strerror(rv) + << std::endl; + } + } } int Handler::setup_httpconn() {
uip: Corrects restoration of IEEE 802.15.4 short addresses from IIDs
@@ -600,7 +600,7 @@ uip_ds6_set_lladdr_from_iid(uip_lladdr_t *lladdr, const uip_ipaddr_t *ipaddr) memcpy(lladdr, ipaddr->u8 + 8, UIP_LLADDR_LEN); lladdr->addr[0] ^= 0x02; #elif (UIP_LLADDR_LEN == 2) - memcpy(lladdr, ipaddr->u8 + 6, UIP_LLADDR_LEN); + memcpy(lladdr, ipaddr->u8 + 8 + 6, UIP_LLADDR_LEN); #else #error uip-ds6.c cannot build lladdr address when UIP_LLADDR_LEN is not 8 or 2 #endif
test-suite: tweak extrae test for pbs
@@ -49,6 +49,18 @@ unset OMP_NUM_THREADS run ls trace.prv assert_success + # allow for some job output lag from pbs + for i in `seq 1 10`; do + if [ -s job.out ];then + break + else + sleep 0.2 + fi + done + + run ls job.out + assert_success + run tail -1 job.out assert_output "mpi2prv: Congratulations! trace.prv has been generated."
Updates GOPATH in README.macOS.bash gpbackup and gpmigrate need the GOPATH to be set to the standard GOPATH gpupgrade uses direnv to successfully set a custom GOPATH
@@ -87,8 +87,8 @@ EOF # Step: GOPATH for Golang cat >> ~/.bash_profile << EOF -export GOPATH=\$HOME/workspace/gpdb/gpMgmt/go-utils -export PATH=\$HOME/workspace/gpdb/gpMgmt/go-utils/bin:\$PATH +export GOPATH=\$HOME/go +export PATH=\$HOME/go/bin:\$PATH EOF # Step: speed up compile time (optional)
Correct processing of AES-SHA stitched ciphers Fixes:
@@ -733,7 +733,7 @@ static int aesni_cbc_hmac_sha256_set_tls1_aad(void *vctx, if (len < AES_BLOCK_SIZE) return 0; len -= AES_BLOCK_SIZE; - p[aad_len] = len >> 8; + p[aad_len - 2] = len >> 8; p[aad_len - 1] = len; } sctx->md = sctx->head;
util/ectool_i2c.c: Format with clang-format BRANCH=none TEST=none
@@ -20,8 +20,7 @@ int cmd_i2c_protect(int argc, char *argv[]) int rv; if (argc != 2 && (argc != 3 || strcmp(argv[2], "status"))) { - fprintf(stderr, "Usage: %s <port> [status]\n", - argv[0]); + fprintf(stderr, "Usage: %s <port> [status]\n", argv[0]); return -1; } @@ -56,9 +55,8 @@ int cmd_i2c_protect(int argc, char *argv[]) return 0; } -static int do_i2c_xfer(unsigned int port, unsigned int addr, - uint8_t *write_buf, int write_len, - uint8_t **read_buf, int read_len) +static int do_i2c_xfer(unsigned int port, unsigned int addr, uint8_t *write_buf, + int write_len, uint8_t **read_buf, int read_len) { struct ec_params_i2c_passthru *p = (struct ec_params_i2c_passthru *)ec_outbuf; @@ -96,8 +94,8 @@ static int do_i2c_xfer(unsigned int port, unsigned int addr, msg->len = read_len; } - rv = ec_command(EC_CMD_I2C_PASSTHRU, 0, p, size + write_len, - r, sizeof(*r) + read_len); + rv = ec_command(EC_CMD_I2C_PASSTHRU, 0, p, size + write_len, r, + sizeof(*r) + read_len); if (rv < 0) return rv; @@ -132,9 +130,7 @@ static void cmd_i2c_help(void) " <offset> offset to read from or write to\n" " <data> data to write\n" " <read_count> number of bytes to read\n" - " [bytes ...] data to write\n" - ); - + " [bytes ...] data to write\n"); } int cmd_i2c_read(int argc, char *argv[]) @@ -184,8 +180,8 @@ int cmd_i2c_read(int argc, char *argv[]) if (rv < 0) return rv; - printf("Read from I2C port %d at 0x%x offset 0x%x = 0x%x\n", - port, addr8, write_buf[0], *(uint16_t *)read_buf); + printf("Read from I2C port %d at 0x%x offset 0x%x = 0x%x\n", port, + addr8, write_buf[0], *(uint16_t *)read_buf); return 0; } @@ -374,8 +370,7 @@ static int i2c_set(int port, int new_speed_khz) printf("Port %d speed set to %d kHz\n", port, new_speed_khz); } else { printf("Port %d speed changed from %u kHz to %d kHz\n", port, - old_speed_khz, - new_speed_khz); + old_speed_khz, new_speed_khz); } return 0;
grid: Fix notification order in inbox
@@ -40,7 +40,8 @@ export const BasicNotification = ({ notification, lid }: BasicNotificationProps) if (!first || !charge) { return null; } - const contents = map(notification.body, 'content').filter((c) => c.length > 0); + const orderedByTime = notification.body.sort((a, b) => b.time - a.time); + const contents = map(orderedByTime, 'content').filter((c) => c.length > 0); const large = contents.length === 0; const archive = () => { useHarkStore.getState().archiveNote(notification.bin, lid); @@ -66,19 +67,19 @@ export const BasicNotification = ({ notification, lid }: BasicNotificationProps) > <header id={id} className="contents"> <DocketImage {...charge} size={!large ? 'xs' : 'default'} className="note-grid-icon" /> - <div className="note-grid-title font-semibold">{charge?.title || desk}</div> - {!large ? <Elbow className="note-grid-arrow w-6 h-6 text-gray-300" /> : null} + <div className="font-semibold note-grid-title">{charge?.title || desk}</div> + {!large ? <Elbow className="w-6 h-6 text-gray-300 note-grid-arrow" /> : null} <h2 id={`${id}-title`} - className="note-grid-head leading-tight sm:leading-normal font-semibold text-gray-600" + className="font-semibold leading-tight text-gray-600 note-grid-head sm:leading-normal" > <NotificationText contents={first.title} /> </h2> {!('time' in lid) ? ( - <div className="note-grid-actions flex sm:hidden hover-none:flex pointer-coarse:flex justify-center self-center group-hover:flex"> + <div className="flex self-center justify-center note-grid-actions sm:hidden hover-none:flex pointer-coarse:flex group-hover:flex"> <Button onClick={archiveNoFollow} - className="px-2 py-1 sm:px-4 sm:py-2 text-xs sm:text-base leading-none sm:leading-normal" + className="px-2 py-1 text-xs leading-none sm:px-4 sm:py-2 sm:text-base sm:leading-normal" > Archive </Button> @@ -86,7 +87,7 @@ export const BasicNotification = ({ notification, lid }: BasicNotificationProps) ) : null} </header> {contents.length > 0 ? ( - <div className="note-grid-body leading-tight sm:leading-normal space-y-2"> + <div className="leading-tight note-grid-body sm:leading-normal space-y-2"> {take(contents, MAX_CONTENTS).map((content) => ( <p className=""> <NotificationText contents={content} />
Prototype do_active_block(entity *ent) function. Consolidate setting up flags, actions and animations when entity blocks actively (before an attack hits).
@@ -2806,9 +2806,10 @@ int is_frozen(entity *e); void unfrozen(entity *e); void adjust_bind(entity *e); float binding_position(float position_default, float position_target, int offset, e_binding_positioning positioning); +int check_bind_override(entity *ent, e_binding_overriding overriding); // Blocking logic. -int check_bind_override(entity *ent, e_binding_overriding overriding); +void do_active_block(entity *ent); int check_blocking_decision(entity *ent); int check_blocking_eligible(entity *ent, entity *other, s_collision_attack *attack); int check_blocking_master(entity *ent, entity *other, s_collision_attack *attack);
Fix trimlines wasn't allowing extra character count when using global vars
@@ -3,12 +3,12 @@ const LINE_MIN = 2; const CHARS_PER_LINE = 18; const CHARS_MAX_TOTAL = 18 + 18 + 16; -const varRegex = new RegExp("\\$[VLT][0-9]+\\$", "g"); -const varCharRegex = new RegExp("#[VLT][0-9]+#", "g"); +const varRegex = new RegExp("\\$[VLT]?[0-9]+\\$", "g"); +const varCharRegex = new RegExp("#[VLT]?[0-9]+#", "g"); const commandRegex = new RegExp("\\!S[0-5]\\!", "g"); -const startsWithVarRegex = new RegExp("^\\$[VLT][0-9]+\\$"); -const startsWithVarCharRegex = new RegExp("^#[VLT][0-9]+#"); +const startsWithVarRegex = new RegExp("^\\$[VLT]?[0-9]+\\$"); +const startsWithVarCharRegex = new RegExp("^#[VLT]?[0-9]+#"); const startsWithCommandRegex = new RegExp("^\\!S[0-5]\\!"); export const lineLength = (line) => {
Update the json config file for using git
{"bootstrap_visit": {"version": "3.0.0b", "build_types": ["release"], + "branch": "develop", "arch": "darwin-x86_64", "cert": "Developer ID Application: Kevin Griffin (K2QL7A77SW)", "make_nthreads": 8, + "skip_checkout": "yes", "boost_dir": "/Users/griffin28/Documents/WCI/ASQ/VisIt/third_party_pydv/boost/1_60_0/i386-apple-darwin15_clang", "svn": {"mode":"ssh","nersc_uname":"kgriffin"}, + "git": {"mode":"ssh","git_uname":"griffin28"}, "build_visit": { "cmake_ver": "3.9.3", - "args":"--no-thirdparty --openssl", + "args":"--no-thirdparty --openssl --vtkh --vtkm --ospray --embree --ispc --tbb", "libs":["cmake", "python", "vtk", "mili", "zlib", "xdmf", + "uintah", "moab"]} }}
chore(docs) add missed makeindex step
@@ -60,6 +60,7 @@ cmd("cd ../scripts && doxygen Doxyfile") cmd("sphinx-build -b latex . out_latex") # Generate PDF +cmd("cd out_latex && makeindex LVGL.idx") cmd("cd out_latex && makeindex -s python.ist -o LVGL.ind LVGL.idx") cmd("cd out_latex && xelatex -interaction=batchmode *.tex") # Copy the result PDF to the main directory to make it avaiable for the HTML build
*Removed* line 1521 to remove default header
@@ -1509,7 +1509,6 @@ _cttp_ccon_fire(u3_ccon* coc_u, u3_creq* ceq_u) _cttp_ccon_fire_str(coc_u, ceq_u->url_c); _cttp_ccon_fire_str(coc_u, " HTTP/1.1\r\n"); _cttp_ccon_fire_str(coc_u, "User-Agent: urbit/vere.0.2\r\n"); - // _cttp_ccon_fire_str(coc_u, "Accept: */*\r\n"); // XX it's more painful than it's worth to deal with SSL+Keepalive if ( c3n == coc_u->sec ) { _cttp_ccon_fire_str(coc_u, "Connection: Keep-Alive\r\n");
SOVERSION bump to version 2.3.11
@@ -63,7 +63,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 3) -set(LIBYANG_MICRO_SOVERSION 10) +set(LIBYANG_MICRO_SOVERSION 11) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
INTERNAL: Fix loop count bug in default_keyscan.
@@ -1238,52 +1238,56 @@ default_keyscan(const char cursor[], const uint32_t count, const char *pattern, ENGINE_ITEM_TYPE type, item **item_array, int item_arrsz, int *item_count) { assert(count+100 <= item_arrsz); /* may scan more than count. */ - hash_item **scan_array = (hash_item**)item_array; + int iter_total = 0; + int scan_total = 0; int iter_count; - int scan_count = 0; - int scan_cost = 0; - int get_count = 0; + int scan_count; + int pattern_leng = (pattern ? strlen(pattern) : 0); int max_elapsed = 5000; /* 5 msec */ struct timeval begin, end, diff; gettimeofday(&begin, NULL); - while (scan_cost < count) { - iter_count = (count-scan_cost) < SCAN_ITER_COUNT - ? (count-scan_cost) : SCAN_ITER_COUNT; - scan_count = item_scan_direct(cursor, type, iter_count, (void**)scan_array, item_arrsz); + while (iter_total < count) { + iter_count = (count-scan_total) < SCAN_ITER_COUNT + ? (count-scan_total) : SCAN_ITER_COUNT; + scan_count = item_scan_direct(cursor, type, iter_count, + (void**)&item_array[scan_total], + (item_arrsz - scan_total)); if (scan_count < 0) { /* reached to the end or invalid cursor */ break; } if (pattern) { + hash_item **scan_array = (hash_item **)&item_array[scan_total]; + int match_count = 0; for (int i = 0; i < scan_count; i++) { - hash_item *it = (hash_item*)scan_array[i]; - if (string_pattern_match(item_get_key(it), it->nkey, pattern, strlen(pattern))) { /* match */ - item_array[get_count++] = it; + hash_item *it = scan_array[i]; + if (string_pattern_match(item_get_key(it), it->nkey, pattern, pattern_leng)) { + if (match_count != i) { + scan_array[match_count] = it; + } + match_count += 1; } else { /* no match */ item_release(it); - scan_count -= 1; } } - } else { - get_count += scan_count; + scan_count = match_count; } + scan_total += scan_count; + iter_total += iter_count; + if (strncmp(cursor, "0", 1) == 0) break; /* reached to the end */ gettimeofday(&end, NULL); timersub(&end, &begin, &diff); if (diff.tv_usec >= max_elapsed) break; /* too long scan */ - - scan_cost += iter_count; - scan_array += scan_count; - item_arrsz -= scan_count; } if (scan_count == -2) { /* invalid cursor */ - for (int i = 0; i < get_count; i++) { + for (int i = 0; i < scan_total; i++) { item_release(item_array[i]); } return ENGINE_EINVAL; } - *item_count = get_count; + *item_count = scan_total; return ENGINE_SUCCESS; } #endif
jenkins: run checks also on master
@@ -776,7 +776,7 @@ def buildTodo() { }] } -/* Stage checking if release notes have been updated */ +/* Stage checking if release notes have been updated (only on PRs, as it doesn't make sense on master) */ def buildCheckReleaseNotes() { def stageName = "check-release-notes" return [(stageName): { @@ -789,11 +789,11 @@ def buildCheckReleaseNotes() { }] } -/* Stage checking if release notes have been updated */ +/* Stage checking for correct file names in the repository */ def buildCheckFileNames() { def stageName = "check-file-names" return [(stageName): { - maybeStage(stageName, !isMaster()) { + stage(stageName) { withDockerEnv(DOCKER_IMAGES.bullseye, [DockerOpts.MOUNT_MIRROR]) { sh "scripts/dev/filename-checker" deleteDir() @@ -806,7 +806,7 @@ def buildCheckFileNames() { def buildCheckReuseCompliant() { def stageName = "check-reuse-compliant" return [(stageName): { - maybeStage(stageName, !isMaster()) { + stage(stageName) { withDockerEnv(DOCKER_IMAGES.bullseye, [DockerOpts.MOUNT_MIRROR]) { sh "reuse lint" deleteDir()
Improve event autoLabel for direction fields
@@ -158,6 +158,18 @@ const ScriptEventTitle = ({ command, args = {} }: ScriptEventTitleProps) => { } return String(value); }; + const directionForValue = (value: unknown) => { + if (value === "left") { + return l10n("FIELD_DIRECTION_LEFT"); + } + if (value === "right") { + return l10n("FIELD_DIRECTION_RIGHT"); + } + if (value === "down") { + return l10n("FIELD_DIRECTION_DOWN"); + } + return l10n("FIELD_DIRECTION_UP"); + }; const mapArg = (key: string) => { const arg = args[key]; @@ -189,6 +201,8 @@ const ScriptEventTitle = ({ command, args = {} }: ScriptEventTitleProps) => { }); } else if (fieldType === "scene") { return sceneNameForId(value); + } else if (fieldType === "direction") { + return directionForValue(value); } return String(value); };
out_stackdriver: fix private_key buffer allocation
@@ -150,7 +150,7 @@ static int read_credentials_file(const char *creds, struct flb_stackdriver *ctx) tmp = flb_sds_create_len(val, val_len); if (tmp) { /* Unescape private key */ - ctx->private_key = flb_sds_create_size(flb_sds_alloc(tmp)); + ctx->private_key = flb_sds_create_size(val_len); flb_unescape_string(tmp, flb_sds_len(tmp), &ctx->private_key); flb_sds_destroy(tmp);
linux-firmware-rpidistro: Update to 1:20210315-3+rpt7 release This new revision comes with a lot of changes around the license. We have two issues raised against upstream to clarify them:
@@ -24,17 +24,17 @@ LICENSE = "\ Firmware-broadcom_bcm43xx-rpidistro \ " LIC_FILES_CHKSUM = "\ - file://debian/config/brcm80211/LICENSE;md5=8cba1397cda6386db37210439a0da3eb \ + file://debian/config/brcm80211/copyright;md5=b0630b02d90e3da72206c909b6aecc8c \ " # These are not common licenses, set NO_GENERIC_LICENSE for them # so that the license files will be copied from fetched source -NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "debian/config/brcm80211/LICENSE" +NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "debian/config/brcm80211/copyright" SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bullseye;protocol=https" -SRCREV = "99d5c588e95ec9c9b86d7e88d3cf85b4f729d2bc" -PV = "20210315-3+rpt4" +SRCREV = "541e5a05d152e7e6f0d9be45622e4a3741e51c02" +PV = "20210315-3+rpt7" S = "${WORKDIR}/git" @@ -49,7 +49,7 @@ do_compile() { do_install() { install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress - cp debian/config/brcm80211/LICENSE ${D}${nonarch_base_libdir}/firmware/LICENSE.broadcom_bcm43xx-rpidistro + cp debian/config/brcm80211/copyright ${D}${nonarch_base_libdir}/firmware/copyright.broadcom_bcm43xx-rpidistro # Replace outdated linux-firmware files with updated ones from # raspbian firmware-nonfree. Raspbian adds blobs and nvram @@ -81,7 +81,7 @@ LICENSE:${PN}-bcm43436s = "Firmware-broadcom_bcm43xx-rpidistro" LICENSE:${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" LICENSE:${PN}-bcm43456 = "Firmware-broadcom_bcm43xx-rpidistro" LICENSE:${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" -FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENSE.broadcom_bcm43xx-rpidistro" +FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/copyright.broadcom_bcm43xx-rpidistro" FILES:${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob" FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*" FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*"
NAT44: fix coverity
@@ -2541,7 +2541,7 @@ nat44_ed_not_translate_output_feature (snat_main_t * sm, ip4_header_t * ip, u32 thread_index, u32 sw_if_index) { clib_bihash_kv_16_8_t kv, value; - snat_main_per_thread_data_t *tsm = tsm = &sm->per_thread_data[thread_index]; + snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index]; snat_interface_t *i; /* src NAT check */
Do not use GOST sig algs in TLSv1.3 where possible Fixes
@@ -1519,9 +1519,50 @@ static int tls12_sigalg_allowed(SSL *s, int op, const SIGALG_LOOKUP *lu) || lu->hash_idx == SSL_MD_MD5_IDX || lu->hash_idx == SSL_MD_SHA224_IDX)) return 0; + /* See if public key algorithm allowed */ if (ssl_cert_is_disabled(lu->sig_idx)) return 0; + + if (lu->sig == NID_id_GostR3410_2012_256 + || lu->sig == NID_id_GostR3410_2012_512 + || lu->sig == NID_id_GostR3410_2001) { + /* We never allow GOST sig algs on the server with TLSv1.3 */ + if (s->server && SSL_IS_TLS13(s)) + return 0; + if (!s->server + && s->method->version == TLS_ANY_VERSION + && s->s3->tmp.max_ver >= TLS1_3_VERSION) { + int i, num; + STACK_OF(SSL_CIPHER) *sk; + + /* + * We're a client that could negotiate TLSv1.3. We only allow GOST + * sig algs if we could negotiate TLSv1.2 or below and we have GOST + * ciphersuites enabled. + */ + + if (s->s3->tmp.min_ver >= TLS1_3_VERSION) + return 0; + + sk = SSL_get_ciphers(s); + num = sk != NULL ? sk_SSL_CIPHER_num(sk) : 0; + for (i = 0; i < num; i++) { + const SSL_CIPHER *c; + + c = sk_SSL_CIPHER_value(sk, i); + /* Skip disabled ciphers */ + if (ssl_cipher_disabled(s, c, SSL_SECOP_CIPHER_SUPPORTED, 0)) + continue; + + if ((c->algorithm_mkey & SSL_kGOST) != 0) + break; + } + if (i == num) + return 0; + } + } + if (lu->hash == NID_undef) return 1; /* Security bits: half digest bits */
Add oc_auto_assert_roles to Java
@@ -1103,6 +1103,7 @@ bool jni_assert_role(const char *role, const char *authority, oc_endpoint_t *end #endif /* OC_SECURITY && OC_PKI */ } %} +%rename(autoAssertRoles) oc_auto_assert_roles; %rename(assertAllRoles) oc_assert_all_roles; %ignore oc_send_ping; %rename(sendPing) jni_send_ping;
Changes from PR.
@@ -140,9 +140,10 @@ the benchmark, without measuring anything. ```sh ./benchmarks/run benchmarks/sieve/pallene.pln --mode=none ``` -It may be the case that your terminal will come with a time program, but will lack the `/usr/bin/time`, which will raise an assertion error in lua when you try to run a benchmark. In that case install with `$ sudo apt install time` or equivalent. - +To run Pallene's benchmarks you need to have /usr/bin/time installed in your system. +Some Linux distributions may have only the Bash time builtin function but not the /usr/bin/time executable. +If that is the case you will need to install time with $ sudo apt install time or equivalent. To run benchmarks with LuaJIT, use the `--lua` option:
OCB: Add shutdown/restart voice over prompts to builtin picker
@@ -219,6 +219,7 @@ GetPickerEntryCursor ( VOID UpdateTabContext ( IN BOOLEAN IsEntering, + IN OC_BOOT_CONTEXT *BootContext, IN TAB_CONTEXT TabContext, IN INTN ChosenEntry, IN CHAR16 OldEntryCursor, @@ -253,8 +254,16 @@ UpdateTabContext ( gST->ConOut->OutputString (gST->ConOut, Code); if (TabContext == TAB_SHUTDOWN) { + if (IsEntering) { + OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileSelected, FALSE); + OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileShutDown, FALSE); + } gST->ConOut->OutputString (gST->ConOut, L"Shutdown"); } else { + if (IsEntering) { + OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileSelected, FALSE); + OcPlayAudioFile (BootContext->PickerContext, OcVoiceOverAudioFileRestart, FALSE); + } gST->ConOut->OutputString (gST->ConOut, L"Restart"); } @@ -536,6 +545,7 @@ OcShowSimpleBootMenu ( if (PickerKeyInfo.OcKeyCode == OC_INPUT_SWITCH_CONTEXT) { UpdateTabContext ( FALSE, + BootContext, TabContext, ChosenEntry, OldEntryCursor, @@ -571,6 +581,7 @@ OcShowSimpleBootMenu ( UpdateTabContext ( TRUE, + BootContext, TabContext, ChosenEntry, OldEntryCursor, @@ -591,6 +602,7 @@ OcShowSimpleBootMenu ( if (PickerKeyInfo.OcKeyCode == OC_INPUT_TYPING_CONFIRM) { gST->ConOut->OutputString (gST->ConOut, OC_MENU_RESTART); gST->ConOut->OutputString (gST->ConOut, L"\r\n"); + OcPlayAudioFile (BootContext->PickerContext, AppleVoiceOverAudioFileBeep, FALSE); ResetWarm(); return EFI_SUCCESS; } @@ -598,6 +610,7 @@ OcShowSimpleBootMenu ( if (PickerKeyInfo.OcKeyCode == OC_INPUT_TYPING_CONFIRM) { gST->ConOut->OutputString (gST->ConOut, OC_MENU_SHUTDOWN); gST->ConOut->OutputString (gST->ConOut, L"\r\n"); + OcPlayAudioFile (BootContext->PickerContext, AppleVoiceOverAudioFileBeep, FALSE); ResetShutdown(); return EFI_SUCCESS; }
test: fix failure with FIPS and no-des configured.
@@ -96,8 +96,8 @@ SKIP: { } SKIP: { - skip "Skipping legacy PKCS#12 test because RC2 is disabled in this build", 1 - if disabled("rc2") || disabled("legacy"); + skip "Skipping legacy PKCS#12 test because the required algorithms are disabled", 1 + if disabled("des") || disabled("rc2") || disabled("legacy"); # Test reading legacy PKCS#12 file ok(run(app(["openssl", "pkcs12", "-export", "-in", srctop_file(@path, "v3-certs-RC2.p12"),
super-rsu: call safe_rsu_boot for secure updates There might be a bug in the fpgasupdate/max10 RoT flow that prevents subsequent calls to fpgasupdate to succeed without rebooting the card. This adds a call to safe_rsu_boot after every call to fpgasupdate if it is determined that the board is secured.
@@ -742,6 +742,9 @@ class pac(object): LOG.warning('%s exited with code: %s', task.cmd, p.returncode) self._errors += 1 + if self.is_secure: + self.fpga.safe_rsu_boot(self.boot_page) + LOG.debug('task completed in %s', timedelta( seconds=time.time() - task.start_time))
Updated nrf51 to have the same reset cause as nrf52.
@@ -37,6 +37,8 @@ hal_reset_cause(void) reason = HAL_RESET_SOFT; } else if (reg & POWER_RESETREAS_RESETPIN_Msk) { reason = HAL_RESET_PIN; + } else if (reg & POWER_RESETREAS_OFF_Msk) { + reason = HAL_RESET_SYS_OFF_INT; } else { reason = HAL_RESET_POR; /* could also be brownout */ }
Fix keypoint op.
@@ -72,7 +72,7 @@ static void py_kp_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind mp_printf(print, "{\"size\":%d, \"threshold\":%d, \"normalized\":%d}", array_length(self->kpts), self->threshold, self->normalized); } -mp_obj_t py_kp_unary_op(mp_uint_t op, mp_obj_t self_in) { +mp_obj_t py_kp_unary_op(mp_unary_op_t op, mp_obj_t self_in) { py_kp_obj_t *self = MP_OBJ_TO_PTR(self_in); switch (op) { case MP_UNARY_OP_LEN:
Work CD-CI Add check for ***NO_CI*** in commit message for merges. Change variable name to SKIP_BUILD to make it clearer.
@@ -36,16 +36,23 @@ jobs: if( ($commit.commit.author.name -eq "nfbot") -and (($commit.commit.message -like "*[version update]*") -or ($commit.commit.message -like "***NO_CI***")) ) { - echo "##vso[task.setvariable variable=IS_VERSION_UPDATE;isOutput=true]true" + echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true" } else { - echo "##vso[task.setvariable variable=IS_VERSION_UPDATE;isOutput=true]false" + echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false" } } else { - echo "##vso[task.setvariable variable=IS_VERSION_UPDATE;isOutput=true]false" + if($commit.commit.message -like "***NO_CI***") + { + echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]true" + } + else + { + echo "##vso[task.setvariable variable=SKIP_BUILD;isOutput=true]false" + } } name: BuildOptions @@ -56,7 +63,7 @@ jobs: - job: Build_STM32_targets # skip build if this is a PR, submitted by nfbot and the commit message contains [version update] # not( and( eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.RequestedForId'], 'nfbot'), contains(variables['Build.SourceVersionMessage'], '[version update]') ) ) - condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.IS_VERSION_UPDATE'], true ) )) + condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )) dependsOn: - Check_Build_Options @@ -113,7 +120,7 @@ jobs: - job: Build_ESP32_targets # skip build if this is a PR, submitted by nfbot and the commit message contains [version update] # condition: not( and( eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.RequestedForId'], 'nfbot'), contains(variables['Build.SourceVersionMessage'], '[version update]') ) ) - condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.IS_VERSION_UPDATE'], true ) )) + condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )) dependsOn: - Check_Build_Options @@ -159,7 +166,7 @@ jobs: - job: Build_WIN32_nanoCLR # skip build if this is a PR, submitted by nfbot and the commit message contains [version update] # condition: not( and( eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.RequestedForId'], 'nfbot'), contains(variables['Build.SourceVersionMessage'], '[version update]') ) ) - condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.IS_VERSION_UPDATE'], true ) )) + condition: not( and( startsWith(variables['Build.SourceBranch'], 'refs/pull'), eq( dependencies.Check_Build_Options.outputs['BuildOptions.SKIP_BUILD'], true ) )) dependsOn: - Check_Build_Options
Test round-tripping of doubles through the stack
@@ -27,6 +27,7 @@ spec = do describe "Random StackValues" $ do it "can push/pop booleans" $ property prop_bool it "can push/pop ints" $ property prop_int + it "can push/pop doubles" $ property prop_double it "can push/pop bytestrings" $ property prop_bytestring it "can push/pop lists of booleans" $ property prop_lists_bool it "can push/pop lists of ints" $ property prop_lists_int @@ -99,6 +100,9 @@ prop_bool = testStackValueInstance -- Ints prop_int :: Int -> Property prop_int = testStackValueInstance +-- Doubles +prop_double :: Double -> Property +prop_double = testStackValueInstance -- Bytestrings prop_bytestring :: ByteString -> Property prop_bytestring = testStackValueInstance
Make kubelet directory configurable via an environment variable
@@ -44,6 +44,9 @@ const ( // UserRootless is the user which runs the operator. UserRootless = 65535 + // DefaultKubeletPath specifies the default kubelet path. + DefaultKubeletPath = "/var/lib/kubelet" + // KubeletSeccompRootPath specifies the path where all kubelet seccomp // profiles are stored. KubeletSeccompRootPath = "/var/lib/kubelet/seccomp" @@ -84,6 +87,9 @@ const ( // profiling port. ProfilingPortEnvKey = "SPO_PROFILING_PORT" + // KubeletDirEnvKey is the environment variable key for custom kubelet directory. + KubeletDirEnvKey = "KUBELET_DIR" + // DefaultProfilingPort is the start port where the profiling endpoint runs. DefaultProfilingPort = 6060 @@ -155,3 +161,13 @@ func TryToGetOperatorNamespace() (string, error) { } return operatorNS, nil } + +// KubeletDir returns the kubelet directory either form an environment variable +// when is set or the default Kubernetes path. +func KubeletDir() string { + kubeletDir := env.Default(KubeletDirEnvKey, "") + if kubeletDir == "" { + return DefaultKubeletPath + } + return kubeletDir +} \ No newline at end of file
examples/openssl: print out contents of EVP_PKEY
@@ -21,6 +21,10 @@ int LLVMFuzzerTestOneInput(const uint8_t* buf, size_t len) { EVP_PKEY* key = d2i_AutoPrivateKey(NULL, &buf, len); if (key == NULL) { fprintf(stderr, "%s", ERR_error_string(ERR_get_error(), NULL)); + } else { + BIO* out = BIO_new_fp(stdout, BIO_NOCLOSE); + EVP_PKEY_print_private(out, key, 4, NULL); + BIO_free(out); } EVP_PKEY_free(key); return 0;
input: update coverage bucketting map
@@ -473,15 +473,14 @@ static inline int input_skipFactor(run_t* run, dynfile_t* dynfile, int* speed_fa { /* Inputs with lower total coverage -> lower chance of being tested */ static const int scaleMap[200] = { - [100 ... 199] = -20, - [90 ... 99] = -15, - [80 ... 89] = -10, - [70 ... 79] = -5, - [60 ... 69] = -2, + [95 ... 199] = -15, + [90 ... 94] = -7, + [80 ... 89] = -3, + [60 ... 79] = -1, [50 ... 59] = 0, - [30 ... 49] = 1, - [11 ... 29] = 3, - [0 ... 10] = 5, + [30 ... 49] = 5, + [11 ... 29] = 10, + [0 ... 10] = 15, }; uint64_t maxCov0 = ATOMIC_GET(run->global->feedback.maxCov[0]);
replace 8.9 with 9.9 in helpers/build-debian.sh
@@ -4,16 +4,16 @@ source /opt/Xilinx/Vivado/2018.3/settings64.sh make NAME=led_blinker all -sudo sh scripts/image.sh scripts/debian.sh red-pitaya-debian-8.9-armhf-$DATE.img 1024 -zip red-pitaya-debian-8.9-armhf-$DATE.zip red-pitaya-debian-8.9-armhf-$DATE.img +sudo sh scripts/image.sh scripts/debian.sh red-pitaya-debian-9.9-armhf-$DATE.img 1024 +zip red-pitaya-debian-9.9-armhf-$DATE.zip red-pitaya-debian-9.9-armhf-$DATE.img -sudo sh scripts/image.sh scripts/debian-ecosystem.sh red-pitaya-ecosystem-0.95-debian-8.9-armhf-$DATE.img 1024 -zip red-pitaya-ecosystem-0.95-debian-8.9-armhf-$DATE.zip red-pitaya-ecosystem-0.95-debian-8.9-armhf-$DATE.img +sudo sh scripts/image.sh scripts/debian-ecosystem.sh red-pitaya-ecosystem-0.95-debian-9.9-armhf-$DATE.img 1024 +zip red-pitaya-ecosystem-0.95-debian-9.9-armhf-$DATE.zip red-pitaya-ecosystem-0.95-debian-9.9-armhf-$DATE.img make NAME=sdr_transceiver_emb all -sudo sh scripts/image.sh scripts/debian-gnuradio.sh red-pitaya-gnuradio-debian-8.9-armhf-$DATE.img 2048 -zip red-pitaya-gnuradio-debian-8.9-armhf-$DATE.zip red-pitaya-gnuradio-debian-8.9-armhf-$DATE.img +sudo sh scripts/image.sh scripts/debian-gnuradio.sh red-pitaya-gnuradio-debian-9.9-armhf-$DATE.img 2048 +zip red-pitaya-gnuradio-debian-9.9-armhf-$DATE.zip red-pitaya-gnuradio-debian-9.9-armhf-$DATE.img make NAME=sdr_transceiver_wspr all
ECDSA_SIG: restore doc comments which were deleted accidentally amends
@@ -1078,6 +1078,8 @@ const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig); /** Setter for r and s fields of ECDSA_SIG * \param sig pointer to ECDSA_SIG structure + * \param r pointer to BIGNUM for r (may be NULL) + * \param s pointer to BIGNUM for s (may be NULL) */ int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
Fix typo in define in comment This fixes error in check-names.sh test.
#if defined(MBEDTLS_PSA_CRYPTO_CONFIG) #include "psa/crypto_config.h" -#endif /* defined(MBEDTLS_PSAY_CRYPTO_CONFIG) */ +#endif /* defined(MBEDTLS_PSA_CRYPTO_CONFIG) */ #ifdef __cplusplus extern "C" {
fix floating root hover resize
@@ -2041,11 +2041,11 @@ motionnotify(XEvent *e) // leave small deactivator zone if (ev->y_root >= bh - 3) { // hover near floating sel, don't do it if desktop is covered - if (selmon->sel && selmon->sel->isfloating) { + if (selmon->sel && ( selmon->sel->isfloating || NULL == selmon->lt[selmon->sellt]->arrange )) { Client *c; int tilefound = 0; for(c = m->clients; c; c = c->next) { - if (ISVISIBLE(c) && !c->isfloating) { + if (ISVISIBLE(c) && !( c->isfloating || NULL == selmon->lt[selmon->sellt]->arrange )) { tilefound = 1; break; }
server: Send all post handshake data
@@ -948,8 +948,8 @@ int Handler::tls_handshake() { // TODO Create stream 0 to send post-handshake data. Probably, we // should feed data in recv_stream0_data as well. auto stream = std::make_unique<Stream>(0); - if (shandshake_idx_ != shandshake_.size()) { - auto &v = shandshake_[shandshake_idx_++]; + for (; shandshake_idx_ != shandshake_.size(); ++shandshake_idx_) { + auto &v = shandshake_[shandshake_idx_]; stream->streambuf.emplace_back(v.rpos(), v.size()); } streams_.emplace(0, std::move(stream));
Badger2040: Fix fast partial update endless busy wait for
@@ -175,7 +175,7 @@ MICROPY_EVENT_POLL_HOOK // Ensure blocking for the minimum amount of time // in cases where "is_busy" is unreliable. - while(self->badger2040->is_busy() || absolute_time_diff_us(t_end, get_absolute_time()) > 0) { + while(self->badger2040->is_busy() || absolute_time_diff_us(get_absolute_time(), t_end) > 0) { #ifdef MICROPY_EVENT_POLL_HOOK MICROPY_EVENT_POLL_HOOK #endif
Disabled 136 length AAD for aes-gmac
@@ -774,8 +774,10 @@ static int enable_aes(ACVP_CTX *ctx) { CHECK_ENABLE_CAP_RV(rv); rv = acvp_cap_sym_cipher_set_parm(ctx, ACVP_AES_GMAC, ACVP_SYM_CIPH_AADLEN, 128); CHECK_ENABLE_CAP_RV(rv); +#if 0 //OpenSSL FOM has compatibility issues with this rv = acvp_cap_sym_cipher_set_parm(ctx, ACVP_AES_GMAC, ACVP_SYM_CIPH_AADLEN, 136); CHECK_ENABLE_CAP_RV(rv); +#endif rv = acvp_cap_sym_cipher_set_parm(ctx, ACVP_AES_GMAC, ACVP_SYM_CIPH_AADLEN, 256); CHECK_ENABLE_CAP_RV(rv);
Fixed inability to parse truncated logs. This is a regression introduced on
@@ -782,7 +782,7 @@ perform_tail_follow (uint64_t * size1, const char *fn) { size2 = file_size (fn); /* file hasn't changed */ - if (size2 <= *size1) + if (size2 == *size1) return; if (!(fp = fopen (fn, "r")))
Address - don't process names passed to dlopen.
@@ -1183,9 +1183,7 @@ JANET_CORE_FN(janet_core_raw_native, "Returns a `core/native`.") { janet_arity(argc, 0, 1); const char *path = janet_optcstring(argv, argc, 0, NULL); - char *processed_name = (NULL == path) ? NULL : get_processed_name(path); - Clib lib = load_clib(processed_name); - if (NULL != path && path != processed_name) janet_free(processed_name); + Clib lib = load_clib(path); if (!lib) janet_panic(error_clib()); JanetAbstractNative *anative = janet_abstract(&janet_native_type, sizeof(JanetAbstractNative)); anative->clib = lib;
common/usb_host_command.c: Format with clang-format BRANCH=none TEST=none
@@ -38,26 +38,16 @@ struct producer const hostcmd_producer; struct usb_stream_config const usbhc_stream; /* RX (Host->EC) queue */ -static struct queue const usb_to_hostcmd = QUEUE_DIRECT(64, - uint8_t, - usbhc_stream.producer, - hostcmd_consumer); +static struct queue const usb_to_hostcmd = + QUEUE_DIRECT(64, uint8_t, usbhc_stream.producer, hostcmd_consumer); /* TX (EC->Host) queue */ -static struct queue const hostcmd_to_usb = QUEUE_DIRECT(64, - uint8_t, - hostcmd_producer, - usbhc_stream.consumer); - -USB_STREAM_CONFIG_FULL(usbhc_stream, - USB_IFACE_HOSTCMD, - USB_CLASS_VENDOR_SPEC, - USB_SUBCLASS_GOOGLE_HOSTCMD, - USB_PROTOCOL_GOOGLE_HOSTCMD, - USB_STR_HOSTCMD_NAME, - USB_EP_HOSTCMD, - USB_MAX_PACKET_SIZE, - USB_MAX_PACKET_SIZE, - usb_to_hostcmd, +static struct queue const hostcmd_to_usb = + QUEUE_DIRECT(64, uint8_t, hostcmd_producer, usbhc_stream.consumer); + +USB_STREAM_CONFIG_FULL(usbhc_stream, USB_IFACE_HOSTCMD, USB_CLASS_VENDOR_SPEC, + USB_SUBCLASS_GOOGLE_HOSTCMD, USB_PROTOCOL_GOOGLE_HOSTCMD, + USB_STR_HOSTCMD_NAME, USB_EP_HOSTCMD, + USB_MAX_PACKET_SIZE, USB_MAX_PACKET_SIZE, usb_to_hostcmd, hostcmd_to_usb) static uint8_t in_msg[USBHC_MAX_REQUEST_SIZE]; @@ -252,8 +242,8 @@ struct consumer const hostcmd_consumer = { }), }; -static enum ec_status host_command_protocol_info( - struct host_cmd_handler_args *args) +static enum ec_status +host_command_protocol_info(struct host_cmd_handler_args *args) { struct ec_response_get_protocol_info *r = args->response; @@ -267,6 +257,5 @@ static enum ec_status host_command_protocol_info( return EC_RES_SUCCESS; } -DECLARE_HOST_COMMAND(EC_CMD_GET_PROTOCOL_INFO, - host_command_protocol_info, +DECLARE_HOST_COMMAND(EC_CMD_GET_PROTOCOL_INFO, host_command_protocol_info, EC_VER_MASK(0));
README.md: Use version 2.04.78
@@ -17,26 +17,26 @@ Usage Currently the compilation of the plugin is only supported for Raspbian Jessie distribution. Packages for Qt4 and Raspbian Wheezy are available but not described here. -##### Install Qt5 development libraries and tools - - sudo apt install qt5-default libqt5sql5 libqt5websockets5-dev libqt5serialport5-dev wiringpi - ##### Install deCONZ and development package 1. Download deCONZ package - wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.70-qt5.deb + wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.78-qt5.deb 2. Install deCONZ package - sudo dpkg -i deconz-2.04.70-qt5.deb + sudo dpkg -i deconz-2.04.78-qt5.deb + +3. Install missing dependencies + + sudo apt install -f -3. Download deCONZ development package +4. Download deCONZ development package - wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.70.deb + wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.78.deb -4. Install deCONZ development package +5. Install deCONZ development package - sudo dpkg -i deconz-dev-2.04.70.deb + sudo dpkg -i deconz-dev-2.04.78.deb ##### Get and compile the plugin 1. Checkout the repository @@ -46,7 +46,7 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here. 2. Checkout related version tag cd deconz-rest-plugin - git checkout -b mybranch V2_04_70 + git checkout -b mybranch V2_04_78 3. Compile the plugin
Avoid #include with inline function on C++Builder Commit exposed a bug with C++Builder's Clang-based compilers, which cause inline function definitions in C translation units to not be found by the linker. Disable the inclusion of the triggering header.
*/ # include <winsock2.h> # include <ws2tcpip.h> + /* + * Clang-based C++Builder 10.3.3 toolchains cannot find C inline + * definitions at link-time. This header defines WspiapiLoad() as an + * __inline function. https://quality.embarcadero.com/browse/RSP-33806 + */ +# if !defined(__BORLANDC__) || !defined(__clang__) # include <wspiapi.h> +# endif /* yes, they have to be #included prior to <windows.h> */ # endif # include <windows.h>
Add missing case from previous commit
@@ -984,6 +984,16 @@ LRESULT CALLBACK MainWndSubclassProc( PhInsertEMenuItem(menu, PhCreateEMenuItem(0, PHAPP_ID_COMPUTER_SHUTDOWN, L"Shu&t down", NULL, NULL), -1); PhInsertEMenuItem(menu, PhCreateEMenuItem(0, PHAPP_ID_COMPUTER_SHUTDOWNHYBRID, L"H&ybrid shut down", NULL, NULL), -1); + if (WindowsVersion < WINDOWS_8) + { + PPH_EMENU_ITEM menuItemRemove; + + if (menuItemRemove = PhFindEMenuItem(menu, PH_EMENU_FIND_DESCEND, NULL, PHAPP_ID_COMPUTER_RESTARTBOOTOPTIONS)) + PhDestroyEMenuItem(menuItemRemove); + if (menuItemRemove = PhFindEMenuItem(menu, PH_EMENU_FIND_DESCEND, NULL, PHAPP_ID_COMPUTER_SHUTDOWNHYBRID)) + PhDestroyEMenuItem(menuItemRemove); + } + MapWindowPoints(ToolBarHandle, NULL, (LPPOINT)&toolbar->rcButton, 2); selectedItem = PhShowEMenu(
interface api: restore order of context value vl_api_sw_interface_tx_placement_get_t_handler is autoendian. So (contrary to most other uses) the context is in native order there. Thus, send_interface_tx_placement_details needs to convert back before using REPLY_MACRO_DETAILS5 macro. Type: fix Fixes:
@@ -1214,7 +1214,7 @@ out: static void send_interface_tx_placement_details (vnet_hw_if_tx_queue_t **all_queues, u32 index, vl_api_registration_t *rp, - u32 context) + u32 native_context) { vnet_main_t *vnm = vnet_get_main (); vl_api_sw_interface_tx_placement_details_t *rmp; @@ -1223,6 +1223,7 @@ send_interface_tx_placement_details (vnet_hw_if_tx_queue_t **all_queues, uword *bitmap = q[0]->threads; u32 hw_if_index = q[0]->hw_if_index; vnet_hw_interface_t *hw_if = vnet_get_hw_interface (vnm, hw_if_index); + u32 context = clib_host_to_net_u32 (native_context); n_bits = clib_bitmap_count_set_bits (bitmap); u32 n = n_bits * sizeof (u32);
Remove use of invalid print specifier Removed invalid print specifer which were causing the print specifer (commonly 'hu') to be printed rather than the expected number. Reported in the show -error command.
#define FORMAT_UINT32 L"%u" #define FORMAT_UINT32_HEX L"%08x" #define FORMAT_INT32 L"%d" -#define FORMAT_UINT16 L"%hu" +#define FORMAT_UINT16 L"%u" #define FORMAT_UINT16_HEX L"%04x" -#define FORMAT_INT16 L"%hi" -#define FORMAT_UINT8 L"%hhu" +#define FORMAT_INT16 L"%d" +#define FORMAT_UINT8 L"%u" #define FORMAT_UINT8_HEX L"%02x" -#define FORMAT_INT8 L"%hhi" +#define FORMAT_INT8 L"%d" #define FORMAT_CHAR L"%c" #define FORMAT_STR_WITH_COMMA L", %s" #define FORMAT_HEX_WITH_COMMA L", 0x%04x" #define FORMAT_STEPPING L"%s%d, 0x%04x" #define FORMAT_HEX_PREFIX L"0x" #define FORMAT_DYNAMIC_WIDTH_LEADING_ZEROS L"%0*d" -#define FORMAT_POINTER L"%p" +#define FORMAT_POINTER L"0x%x" #else // OS_BUILD #define FORMAT_NL L"\n" #define FORMAT_STR L"%ls"
Increase range of hinted search locations for libaec
# # AEC_DIR - prefix path of the AEC installation # AEC_PATH - prefix path of the AEC installation +# LIBAEC_DIR +# libaec_DIR +# LIBAEC_PATH +# libaec_PATH find_path( AEC_INCLUDE_DIR szlib.h - PATHS ${AEC_DIR} ${AEC_PATH} ENV AEC_DIR ENV AEC_PATH + PATHS ${AEC_DIR} ${AEC_PATH} ${LIBAEC_DIR} ${libaec_DIR} ${LIBAEC_PATH} ${libaec_PATH} ENV AEC_DIR ENV AEC_PATH ENV LIBAEC_DIR ENV libaec_DIR ENV LIBAEC_PATH ENV libaec_PATH PATH_SUFFIXES include include/aec NO_DEFAULT_PATH ) find_path( AEC_INCLUDE_DIR szlib.h PATH_SUFFIXES include include/aec ) find_library( AEC_LIBRARY NAMES aec - PATHS ${AEC_DIR} ${AEC_PATH} ENV AEC_DIR ENV AEC_PATH + PATHS ${AEC_DIR} ${AEC_PATH} ${LIBAEC_DIR} ${libaec_DIR} ${LIBAEC_PATH} ${libaec_PATH} ENV AEC_DIR ENV AEC_PATH ENV LIBAEC_DIR ENV libaec_DIR ENV LIBAEC_PATH ENV libaec_PATH PATH_SUFFIXES lib lib64 lib/aec lib64/aec NO_DEFAULT_PATH ) find_library( AEC_LIBRARY NAMES aec PATH_SUFFIXES lib lib64 lib/aec lib64/aec )