message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
out_lib: fix time formatting for JSON output | #include <fluent-bit/flb_output.h>
#include <fluent-bit/flb_utils.h>
#include <fluent-bit/flb_pack.h>
+#include <fluent-bit/flb_time.h>
#include <msgpack.h>
#include "out_lib.h"
@@ -71,7 +72,7 @@ static int out_lib_init(struct flb_output_instance *ins,
ctx = flb_calloc(1, sizeof(struct flb_out_lib_config));
if (ctx == NULL) {
- perror("calloc");
+ flb_errno();
return -1;
}
if (ins->data != NULL) {
@@ -96,11 +97,18 @@ static void out_lib_flush(void *data, size_t bytes,
void *out_context,
struct flb_config *config)
{
+ int len;
size_t off = 0;
size_t last_off = 0;
size_t data_size = 0;
+ size_t alloc_size = 0;
+ size_t out_size = 0;
+ char *buf = NULL;
+ char *out_buf = NULL;
char *data_for_user = NULL;
+ msgpack_object *obj;
msgpack_unpacked result;
+ struct flb_time tm;
struct flb_out_lib_config *ctx = out_context;
(void) i_ins;
(void) config;
@@ -122,15 +130,32 @@ static void out_lib_flush(void *data, size_t bytes,
data_size = bytes;
break;
case FLB_OUT_LIB_FMT_JSON:
- /* JSON is larger than msgpack, just a hint */
- data_size = (off - last_off) + 128;
+ /* JSON is larger than msgpack */
+ alloc_size = (off - last_off) + 128;
last_off = off;
- data_for_user = flb_msgpack_to_json_str(data_size, &result.data);
- if (!data_for_user) {
+
+ flb_time_pop_from_msgpack(&tm, &result, &obj);
+ buf = flb_msgpack_to_json_str(alloc_size, obj);
+ if (!buf) {
msgpack_unpacked_destroy(&result);
FLB_OUTPUT_RETURN(FLB_ERROR);
}
- data_size = strlen(data_for_user);
+
+ len = strlen(buf);
+ out_size = len + 20;
+ out_buf = flb_malloc(out_size);
+ if (!out_buf) {
+ flb_errno();
+ msgpack_unpacked_destroy(&result);
+ FLB_OUTPUT_RETURN(FLB_ERROR);
+ }
+
+ len = snprintf(out_buf, out_size, "[%f, %s]",
+ flb_time_to_double(&tm),
+ buf);
+ flb_free(buf);
+ data_for_user = out_buf;
+ data_size = len;
break;
}
|
Fix AndroidManifest.xml path;
The file has to literally be named AndroidManifest.xml so it has
to be copied to that name. | @@ -636,7 +636,7 @@ elseif(ANDROID)
if(LOVR_BUILD_EXE)
get_filename_component(ANDROID_SDK "${ANDROID_NDK}" DIRECTORY) # SDK root is parent of NDK dir
- set(ANDROID_JAR "${ANDROID_SDK}/platforms/android-${ANDROID_NATIVE_API_LEVEL}/android.jar")
+ set(ANDROID_JAR "${ANDROID_SDK}/platforms/${ANDROID_PLATFORM}/android.jar")
set(ANDROID_TOOLS "${ANDROID_SDK}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}")
# If assets are included in the apk then add '-A assets' to aapt, otherwise don't add any flags
@@ -657,30 +657,31 @@ elseif(ANDROID)
# - Some of the Pico SDK is in a jar that has to be added to the classpath and dx invocation
# TODO error (probably way earlier) if both USE_VRAPI and USE_PICO aren't defined
if(LOVR_USE_VRAPI)
+ set(ANDROID_FLAVOR "vrapi")
get_target_property(VRAPI_LIB ${LOVR_VRAPI} IMPORTED_LOCATION)
file(COPY ${VRAPI_LIB} DESTINATION lib/${ANDROID_ABI})
- set(ANDROID_MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/AndroidManifest_vrapi.xml" CACHE STRING "The AndroidManifest.xml path")
- set(ANDROID_ACTIVITY "vrapi")
elseif(LOVR_USE_PICO)
+ set(ANDROID_FLAVOR "pico")
get_target_property(PICO_LIB ${LOVR_PICO} IMPORTED_LOCATION)
file(COPY ${PICO_LIB} DESTINATION lib/${ANDROID_ABI})
- set(ANDROID_MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/AndroidManifest_pico.xml" CACHE STRING "The AndroidManifest.xml path")
- set(ANDROID_ACTIVITY "pico")
endif()
+ set(ANDROID_MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/AndroidManifest_${ANDROID_FLAVOR}.xml" CACHE STRING "The AndroidManifest.xml file to use")
+
# Make an apk
add_custom_command(
TARGET lovr
POST_BUILD
BYPRODUCTS lovr.apk
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Activity_${ANDROID_ACTIVITY}.java Activity.java
+ COMMAND ${CMAKE_COMMAND} -E copy "${ANDROID_MANIFEST}" AndroidManifest.xml
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/src/resources/Activity_${ANDROID_FLAVOR}.java Activity.java
COMMAND ${Java_JAVAC_EXECUTABLE} -classpath "${ANDROID_JAR}" -d . Activity.java
COMMAND ${ANDROID_TOOLS}/dx --dex --output classes.dex org/lovr/app/Activity.class
COMMAND
${ANDROID_TOOLS}/aapt
package -f
- -M ${ANDROID_MANIFEST}
+ -M AndroidManifest.xml
-I ${ANDROID_JAR}
-F lovr.unaligned.apk
${ANDROID_ASSETS}
@@ -695,7 +696,7 @@ elseif(ANDROID)
--ks-pass ${ANDROID_KEYSTORE_PASS}
--in lovr.unsigned.apk
--out lovr.apk
- COMMAND ${CMAKE_COMMAND} -E remove lovr.unaligned.apk lovr.unsigned.apk Activity.java classes.dex
+ COMMAND ${CMAKE_COMMAND} -E remove lovr.unaligned.apk lovr.unsigned.apk AndroidManifest.xml Activity.java classes.dex
COMMAND ${CMAKE_COMMAND} -E remove_directory org
)
endif()
|
Add translation for linker script generation | @@ -35,7 +35,7 @@ For this guide, suppose we have the following::
- a component named ``my_component`` that is archived as library ``libmy_component.a`` during build
- three source files archived under the library, ``my_src1.c``, ``my_src2.c`` and ``my_src3.c`` which are compiled as ``my_src1.o``, ``my_src2.o`` and ``my_src3.o``, respectively
- under ``my_src1.o``, the function ``my_function1`` is defined; under ``my_src2.o``, the function ``my_function2`` is defined
-- there exist bool-type config ``PERFORMANCE_MODE`` (y/n) and int type config ``PERFORMANCE_LEVEL`` (with range 0-3) in my_component's Kconfig
+- there exist bool-type config ``PERFORMANCE_MODE`` (y/n) and int type config ``PERFORMANCE_LEVEL`` (with range 0-3) in ``my_component``'s Kconfig
Creating and Specifying a Linker Fragment File
@@ -206,7 +206,7 @@ Nesting condition-checking is also possible. The following is equivalent to the
The 'default' placements
^^^^^^^^^^^^^^^^^^^^^^^^
-Up until this point, the term 'default placements' has been mentioned as fallback placements for when the
+Up until this point, the term 'default placements' has been mentioned as fallback placements when the
placement rules ``rtc`` and ``noflash`` are not specified. It is important to note that the tokens ``noflash`` or ``rtc`` are not merely keywords, but are actually
entities called fragments, specifically :ref:`schemes<ldgen-scheme-fragment>`.
@@ -338,8 +338,7 @@ Compatibility with ESP-IDF v3.x Linker Script Fragment Files
ESP-IDF v4.0 brings some changes to the linker script fragment file grammar:
-- indentation is enforced and improperly indented fragment files generate a parse exception; this was not enforced in the old version but previous documentation
- and examples demonstrates properly indented grammar
+- indentation is enforced and improperly indented fragment files generate a parse exception; this was not enforced in the old version but previous documentation and examples demonstrates properly indented grammar
- move to ``if...elif...else`` structure for conditionals, with the ability to nest checks and place entire fragments themselves inside conditionals
- mapping fragments now requires a name like other fragment types
|
Removed unused struct from gkhash.h. | @@ -94,11 +94,6 @@ typedef struct GKHashMetric_ {
const char *filename;
} GKHashMetric;
-/* Raw Data store per module */
-typedef struct RawDataHash_ {
- GKHashMetric metrics[GSMTRC_TOTAL];
-} RawDataHash;
-
/* Data store per module */
typedef struct GKHashModule_ {
GModule module;
|
feat(fabric test):
add fabric test case "TxQueryFail_Method_ERR" | @@ -640,6 +640,35 @@ START_TEST(test_002Transaction_0025TxQueryFail_Args_NULL)
}
END_TEST
+START_TEST(test_002Transaction_0026TxQueryFail_Method_ERR)
+{
+ BSINT32 rtnVal;
+ BoatHlfabricTx tx_ptr;
+ BoatHlfabricWallet *g_fabric_wallet_ptr = NULL;
+ BoatHlfabricWalletConfig wallet_config = get_fabric_wallet_settings();
+ BoatIotSdkInit();
+ /* 1. execute unit test */
+ rtnVal = BoatWalletCreate(BOAT_PROTOCOL_HLFABRIC, NULL, &wallet_config, sizeof(BoatHlfabricWalletConfig));
+ g_fabric_wallet_ptr = BoatGetWalletByIndex(rtnVal);
+
+ rtnVal = BoatHlfabricTxInit(&tx_ptr, g_fabric_wallet_ptr, NULL, "mycc", NULL, "mychannel", "Org1MSP");
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricWalletSetNetworkInfo(tx_ptr.wallet_ptr, wallet_config.nodesCfg);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ long int timesec = 0;
+ time(×ec);
+ rtnVal = BoatHlfabricTxSetTimestamp(&tx_ptr, timesec, 0);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSetArgs(&tx_ptr, "query_test", "a", NULL);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSubmit(&tx_ptr);
+ ck_assert_int_eq(rtnVal, BOAT_ERROR);
+ BoatHlfabricTxDeInit(&tx_ptr);
+ BoatIotSdkDeInit();
+ fabricWalletConfigFree(wallet_config);
+}
+END_TEST
+
Suite *make_transaction_suite(void)
{
@@ -677,6 +706,7 @@ Suite *make_transaction_suite(void)
tcase_add_test(tc_transaction_api, test_002Transaction_0023TxQuery_Success);
tcase_add_test(tc_transaction_api, test_002Transaction_0024TxQueryFail_Txptr_NULL);
tcase_add_test(tc_transaction_api, test_002Transaction_0025TxQueryFail_Args_NULL);
+ tcase_add_test(tc_transaction_api, test_002Transaction_0026TxQueryFail_Method_ERR);
return s_transaction;
}
|
genvif: made default missing PID/TID 0xFFFF
BRANCH=none
TEST=verify XML output
Tested-by: Denis Brockus | #define VIF_APP_VERSION_VALUE "3.0.0.5"
#define VENDOR_NAME_VALUE "Google"
+#define DEFAULT_MISSING_TID 0xFFFF
+#define DEFAULT_MISSING_PID 0xFFFF
const uint32_t *src_pdo;
uint32_t src_pdo_cnt;
@@ -1055,10 +1057,10 @@ static int gen_vif(const char *name,
NULL,
CONFIG_USB_PD_TID);
#else
- set_vif_field(&vif_fields[TID],
+ set_vif_field_stis(&vif_fields[TID],
"TID",
NULL,
- "12345");
+ DEFAULT_MISSING_TID);
#endif
set_vif_field(&vif_fields[VIF_Product_Type],
@@ -1315,16 +1317,23 @@ static int gen_vif(const char *name,
"Manufacturer_Info_Supported_Port",
IS_ENABLED(CONFIG_USB_PD_MANUFACTURER_INFO));
- #if defined(CONFIG_USB_PID)
{
char hex_str[10];
+ #if defined(CONFIG_USB_PID)
sprintf(hex_str, "%04X", CONFIG_USB_PID);
- set_vif_field_itss(&vif_fields[Manufacturer_Info_PID_Port],
+ set_vif_field_itss(&vif_fields[
+ Manufacturer_Info_PID_Port],
"Manufacturer_Info_PID_Port",
CONFIG_USB_PID, hex_str);
- }
+ #else
+ sprintf(hex_str, "%04X", DEFAULT_MISSING_PID);
+ set_vif_field_itss(&vif_fields[
+ Manufacturer_Info_PID_Port],
+ "Manufacturer_Info_PID_Port",
+ DEFAULT_MISSING_PID, hex_str);
#endif
+ }
set_vif_field_b(&vif_fields[Security_Msgs_Supported_SOP],
"Security_Msgs_Supported_SOP",
|
Correct comment indent and make null pointer check consistent | @@ -801,7 +801,7 @@ espi_parse_received(esp_recv_t* rcv) {
*/
if (is_ok || is_error || is_ready) {
espr_t res = espOK;
- if (esp.msg) { /* Do we have active message? */
+ if (esp.msg != NULL) { /* Do we have active message? */
res = espi_process_sub_cmd(esp.msg, is_ok, is_error, is_ready);
if (res != espCONT) { /* Shall we continue with next subcommand under this one? */
if (is_ok || is_ready) { /* Check ready or ok status */
|
define "unlikely" on non-cygwin too | #include <stdlib.h>
#include "common.h"
-#if defined(OS_CYGWIN_NT) && !defined(unlikely)
+#if !defined(unlikely)
#ifdef __GNUC__
#define unlikely(x) __builtin_expect(!!(x), 0)
#else
|
os/board/rtl8721csm: modify error flag for AP mac filter case
Modify error flag in wifi_disconn_hdl for AP mac filter case from RTW_UNKNOWN to RTW_CONNECT_FAIL | @@ -381,7 +381,7 @@ static void wifi_disconn_hdl( char* buf, int buf_len, int flags, void* userdata)
if(rtw_join_status & JOIN_NO_NETWORKS)
error_flag = RTW_NONE_NETWORK;
- else if(rtw_join_status == 0)
+ else if(rtw_join_status == JOIN_CONNECTING)
error_flag = RTW_CONNECT_FAIL;
}else if(join_user_data->network_info.security_type == RTW_SECURITY_WPA2_AES_PSK){
@@ -389,7 +389,7 @@ static void wifi_disconn_hdl( char* buf, int buf_len, int flags, void* userdata)
if(rtw_join_status & JOIN_NO_NETWORKS)
error_flag = RTW_NONE_NETWORK;
- else if(rtw_join_status == 0)
+ else if(rtw_join_status == JOIN_CONNECTING)
error_flag = RTW_CONNECT_FAIL;
else if(rtw_join_status == (JOIN_COMPLETE | JOIN_SECURITY_COMPLETE | JOIN_ASSOCIATED | JOIN_AUTHENTICATED | JOIN_LINK_READY | JOIN_CONNECTING))
|
Testing: Check descriptor code: FXY must be 6 digits | #include "grib_api_internal.h"
static const size_t MIN_NUM_COLUMNS = 8;
+static const size_t NUM_DESCRIPTOR_DIGITS = 6; /* FXY */
#define NUMBER(a) (sizeof(a) / sizeof(a[0]))
static const char* allowed_types[] = { "long", "double", "table", "flag", "string" };
@@ -73,6 +74,11 @@ int main(int argc, char** argv)
line_number, str_code);
return 1;
}
+ if (strlen(str_code) != NUM_DESCRIPTOR_DIGITS) {
+ fprintf(stderr, "Error on line %lu: descriptor code '%s' (column 1) is not %lu digits.\n",
+ line_number, str_code, NUM_DESCRIPTOR_DIGITS);
+ return 1;
+ }
str_key = list[1];
str_type = list[2];
if (check_descriptor_type(str_type) != GRIB_SUCCESS) {
|
Fix Shutdown->Restart to Firmware option failing in nightly builds for users without environment privileges
reported by mikewolf | @@ -773,6 +773,18 @@ BOOLEAN PhUiRestartComputer(
break;
}
+ if (!NT_SUCCESS(PhAdjustPrivilege(NULL, SE_SYSTEM_ENVIRONMENT_PRIVILEGE, TRUE)))
+ {
+ PhShowMessage2(
+ WindowHandle,
+ TDCBF_OK_BUTTON,
+ TD_ERROR_ICON,
+ L"Unable to restart to firmware options.",
+ L"Make sure Process Hacker is running with administrative privileges."
+ );
+ break;
+ }
+
if (!PhIsFirmwareSupported())
{
PhShowMessage2(
|
SOVERSION bump to version 6.4.8 | @@ -68,7 +68,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 6)
set(SYSREPO_MINOR_SOVERSION 4)
-set(SYSREPO_MICRO_SOVERSION 7)
+set(SYSREPO_MICRO_SOVERSION 8)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
Add Touchscreen mod | @@ -33,7 +33,7 @@ def difficulty_multiplier(diff):
def getmultiplier(mods):
multiplier = {Mod.Easy: 0.5, Mod.NoFail: 0.5, Mod.HalfTime: 0.3,
- Mod.HardRock: 1.06, Mod.SuddenDeath: 1, Mod.Perfect: 1, Mod.DoubleTime: 1.12, Mod.Nightcore: 1.12, Mod.Hidden: 1.06, Mod.Flashlight: 1.12,
+ Mod.HardRock: 1.06, Mod.NoVideo: 1, Mod.SuddenDeath: 1, Mod.Perfect: 1, Mod.DoubleTime: 1.12, Mod.Nightcore: 1.12, Mod.Hidden: 1.06, Mod.Flashlight: 1.12,
Mod.Relax: 0, Mod.Autopilot: 0, Mod.SpunOut: 0.9, Mod.Autoplay: 1, Mod.NoMod: 1}
result = 1
for m in mods:
|
Make sure address and size are each aligned with a page | @@ -2957,11 +2957,26 @@ int stlink_erase_flash_section(stlink_t *sl, stm32_addr_t base_addr, size_t size
return (-1);
}
- stm32_addr_t addr = (stm32_addr_t)base_addr;
+ stm32_addr_t addr = sl->flash_base;
+
+ // Make sure the requested address is aligned with the beginning of a page
+ while (addr < base_addr) {
+ addr += stlink_calculate_pagesize(sl, addr);
+ }
+ if (addr != base_addr) {
+ ELOG("The address to erase is not aligned with the beginning of a page\n");
+ return -1;
+ }
do {
size_t page_size = stlink_calculate_pagesize(sl, addr);
+ // Check if we are going further than the requested size
+ if ((addr + page_size) > (base_addr + size)) {
+ ELOG("Invalid size (not aligned with a page). Page size at address %#x is %#lx\n", addr, page_size);
+ return -1;
+ }
+
if (stlink_erase_flash_page(sl, addr)) {
WLOG("Failed to erase_flash_page(%#x) == -1\n", addr);
return (-1);
|
vlib: fix startup-config-process stack overflow
Type: fix
Startup config setting an i40e/ice interface
up in Debug VPP consumes more than the currently
available stack space. | @@ -372,6 +372,7 @@ VLIB_REGISTER_NODE (startup_config_node,static) = {
.function = startup_config_process,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "startup-config-process",
+ .process_log2_n_stack_bytes = 18,
};
/* *INDENT-ON* */
|
change to non-working but better version | @@ -7,7 +7,7 @@ RUN apt-get install -y libgsl-dev libfftw3-dev
RUN pip install numpy scipy matplotlib jupyter
# Installing CCL C library
-RUN git clone https://github.com/LSSTDESC/CCL && cd CCL && git checkout changelog && \
+RUN git clone https://github.com/LSSTDESC/CCL && cd CCL && git checkout releases/1.0 && \
mkdir -p build && (cd build; cmake .. ; make; make install)
# Installing CCL Python module
|
Fix bad error message for FOR UPDATE on non-existent table | @@ -1017,23 +1017,21 @@ addRangeTableEntry(ParseState *pstate,
locking = getLockedRefname(pstate, refname);
if (locking)
{
- lockmode = (locking->strength >= LCS_FORNOKEYUPDATE) ? RowExclusiveLock : RowShareLock;
if (locking->strength >= LCS_FORNOKEYUPDATE)
{
Oid relid;
- relid = RangeVarGetRelid(relation, lockmode, true);
- if (relid == InvalidOid)
- elog(ERROR, "Got Invalid RelationId of %s", relation->relname);
+ relid = RangeVarGetRelid(relation, lockmode, false);
rel = try_heap_open(relid, NoLock, true);
if (!rel)
elog(ERROR, "open relation(%u) fail", relid);
- if (locking->strength >= LCS_FORNOKEYUPDATE)
lockmode = IsSystemRelation(rel) ? RowExclusiveLock : ExclusiveLock;
+ heap_close(rel, NoLock);
+ }
else
+ {
lockmode = RowShareLock;
- heap_close(rel, NoLock);
}
nowait = locking->noWait;
}
|
openvr hand -> device; | @@ -357,7 +357,7 @@ static bool openvr_getPose(Device device, vec3 position, quat orientation) {
if (device == DEVICE_HAND_LEFT || device == DEVICE_HAND_RIGHT) {
InputPoseActionData_t actionData;
- state.input->GetPoseActionData(state.poseActions[hand], state.compositor->GetTrackingSpace(), 0.f, &actionData, sizeof(actionData), 0);
+ state.input->GetPoseActionData(state.poseActions[device], state.compositor->GetTrackingSpace(), 0.f, &actionData, sizeof(actionData), 0);
mat4_fromMat34(transform, actionData.pose.mDeviceToAbsoluteTracking.m);
transform[13] += state.offset;
mat4_getPosition(transform, position);
|
Implement API for setting seq cutoff threshold | @@ -287,6 +287,18 @@ class Cache:
if status:
raise OcfError("Error setting cache seq cut off policy", status)
+ def set_seq_cut_off_threshold(self, threshold: int):
+ self.write_lock()
+
+ status = self.owner.lib.ocf_mngt_core_set_seq_cutoff_threshold_all(
+ self.cache_handle, threshold
+ )
+
+ self.write_unlock()
+
+ if status:
+ raise OcfError("Error setting cache seq cut off policy", status)
+
def configure_device(
self, device, force=False, perform_test=True, cache_line_size=None
):
@@ -574,6 +586,8 @@ lib.ocf_mngt_cache_cleaning_set_policy.argtypes = [c_void_p, c_uint32]
lib.ocf_mngt_cache_cleaning_set_policy.restype = c_int
lib.ocf_mngt_core_set_seq_cutoff_policy_all.argtypes = [c_void_p, c_uint32]
lib.ocf_mngt_core_set_seq_cutoff_policy_all.restype = c_int
+lib.ocf_mngt_core_set_seq_cutoff_threshold_all.argtypes = [c_void_p, c_uint32]
+lib.ocf_mngt_core_set_seq_cutoff_threshold_all.restype = c_int
lib.ocf_stats_collect_cache.argtypes = [
c_void_p,
c_void_p,
|
Fix clear alpha; | @@ -2841,7 +2841,7 @@ Pass* lovrGraphicsGetPass(PassInfo* info) {
target.color[i].clear[0] = lovrMathGammaToLinear(canvas->clears[i][0]);
target.color[i].clear[1] = lovrMathGammaToLinear(canvas->clears[i][1]);
target.color[i].clear[2] = lovrMathGammaToLinear(canvas->clears[i][2]);
- target.color[i].clear[3] = canvas->clears[i][2];
+ target.color[i].clear[3] = canvas->clears[i][3];
if (info->canvas.mipmap && canvas->textures[i]->info.mipmaps > 1) {
trackTexture(pass, canvas->textures[i], GPU_PHASE_TRANSFER, GPU_CACHE_TRANSFER_WRITE);
|
ignore upcall program variants | @@ -56,15 +56,21 @@ Makefile.in
# binaries
programs/client
+programs/client_upcall
programs/daytime_server
+programs/daytime_server_upcall
programs/discard_server
+programs/discard_server_upcall
programs/echo_server
+programs/echo_server_upcall
programs/ekr_client
programs/ekr_loop
programs/ekr_loop_offload
+programs/ekr_loop_upcall
programs/ekr_peer
programs/ekr_server
programs/http_client
+programs/http_client_upcall
programs/rtcweb
programs/tsctp
programs/test_libmgmt
|
CommonAPI>>Barcode RhoElements mention has been removed | @@ -18,10 +18,6 @@ In order to use this API you must include the following extension in your `build
:::ruby
extensions: ["barcode"]
-The `barcode` extension is also included automatically if you specify the following in your `build.yml`
- :::ruby
- app_type: "rhoelements"
-
NOTE: If you are building a Windows Mobile or Windows CE app with this API, you must set your app_type as "rhoelements" in your build.yml as shown [here](../guide/build_config#other-build-time-settings).
## JavaScript Usage
|
Add logic for manual animation and frame binds.
Tested legacy (default) behavior, and it is working as always. Have not yet tested new settings. | @@ -21378,6 +21378,7 @@ void damage_recursive(entity *target)
void adjust_bind(entity *e)
{
#define ADJUST_BIND_SET_ANIM_RESETABLE 1
+ #define ADJUST_BIND_NO_FRAME_MATCH -1
// If there is no binding
// target, just get out.
@@ -21395,13 +21396,28 @@ void adjust_bind(entity *e)
// Animation match flag in use?
if(e->binding.matching)
{
+ e_animations animation;
+ int frame;
+
+ // If a defined value is requested,
+ // use the binding member value.
+ // Otherwise use target's current value.
+ if(e->binding.matching & BINDING_MATCHING_ANIMATION_DEFINED)
+ {
+ animation = e->binding.animation;
+ }
+ else
+ {
+ animation = e->binding.ent->animnum;
+ }
+
// Are we NOT currently playing the target animation?
- if(e->animnum != e->binding.ent->animnum)
+ if(e->animnum != animation)
{
// If we don't have the target animation
// and animation kill flag is set, then
// we kill ourselves and exit the function.
- if(!validanim(e, e->binding.ent->animnum))
+ if(!validanim(e, animation))
{
// Don't have the animation? Kill ourself.
if(e->binding.matching & BINDING_MATCHING_ANIMATION_REMOVE)
@@ -21416,18 +21432,38 @@ void adjust_bind(entity *e)
// Made it this far, we must have the target
// animation, so let's apply it.
- ent_set_anim(e, e->binding.ent->animnum, ADJUST_BIND_SET_ANIM_RESETABLE);
+ ent_set_anim(e, animation, ADJUST_BIND_SET_ANIM_RESETABLE);
+ }
+
+ // If a defined value is requested,
+ // use the binding member value.
+ // If target value is requested use
+ // target's current value (duh).
+ // if no frame match at all requested
+ // then set ADJUST_BIND_NO_FRAME_MATCH
+ // so frame matching logic is skipped.
+ if(e->binding.matching & BINDING_MATCHING_FRAME_DEFINED)
+ {
+ frame = e->binding.animation;
+ }
+ else if(e->binding.matching & BINDING_MATCHING_FRAME_TARGET)
+ {
+ frame = e->binding.ent->animpos;
+ }
+ else
+ {
+ frame = ADJUST_BIND_NO_FRAME_MATCH;
}
- // Frame match flag set?
- if(e->binding.matching & BINDING_MATCHING_FRAME_TARGET)
+ // Any frame match flag set?
+ if(frame != ADJUST_BIND_NO_FRAME_MATCH)
{
// Are we NOT currently playing the target frame?
- if(e->animpos != e->binding.ent->animpos)
+ if(e->animpos != frame)
{
// If we don't have the frame and frame kill flag is
// set, kill ourselves.
- if(e->animation[e->animnum].numframes < e->binding.ent->animpos)
+ if(e->animation[e->animnum].numframes < frame)
{
if(e->binding.matching & BINDING_MATCHING_FRAME_REMOVE)
{
@@ -21441,7 +21477,7 @@ void adjust_bind(entity *e)
// Made it this far, we must have the target
// frame, so let's apply it.
- update_frame(e, e->binding.ent->animpos);
+ update_frame(e, frame);
}
}
}
@@ -21528,6 +21564,7 @@ void adjust_bind(entity *e)
}
#undef ADJUST_BIND_SET_ANIM_RESETABLE
+ #undef ADJUST_BIND_NO_FRAME_MATCH
}
|
WIP Steal Ctrl or Ctrl shift Z in world from the accelerator, win undo issue
Chromium bug with DOM objects using undo buffer first, even if cleared from view.
Not hooked up to the react undo buffer yet! (not sure how) | @@ -136,6 +136,15 @@ class World extends Component {
if (e.target.nodeName !== "BODY") {
return;
}
+ if (e.code === "KeyZ" && e.ctrlKey) {
+ if (e.shiftKey) {
+ event.preventDefault();
+ console.log("caught Shift Z" + event);
+ } else {
+ event.preventDefault();
+ console.log("caught Z" + event);
+ }
+ }
if (e.ctrlKey || e.shiftKey || e.metaKey) {
return;
}
|
BugID:17816263:fix mal sdk compile error | @@ -101,8 +101,8 @@ static char mal_mc_is_topic_matched(char *topicFilter, const char *topicName)
return 0;
}
char *curf = topicFilter;
- char *curn = topicName;
- char *curn_end = curn + strlen(topicName);
+ const char *curn = topicName;
+ const char *curn_end = curn + strlen(topicName);
while (*curf && curn < curn_end) {
if (*curn == '/' && *curf != '/') {
@@ -115,7 +115,7 @@ static char mal_mc_is_topic_matched(char *topicFilter, const char *topicName)
if (*curf == '+') {
/* skip until we meet the next separator, or end of string */
- char *nextpos = curn + 1;
+ const char *nextpos = curn + 1;
while (nextpos < curn_end && *nextpos != '/') {
nextpos = ++curn + 1;
}
@@ -788,8 +788,9 @@ static int mal_mc_release(iotx_mc_client_t *pClient)
return SUCCESS_RETURN;
}
-#define GUIDER_DEFAULT_TS_STR "2524608000000"
+#ifndef MAL_ICA_ENABLED
+#define GUIDER_DEFAULT_TS_STR "2524608000000"
static void guider_get_timestamp_str(char *buf, int len)
{
HAL_Snprintf(buf, len, "%s", GUIDER_DEFAULT_TS_STR);
@@ -829,6 +830,7 @@ static int _calc_hmac_signature(
memcpy(hmac_sigbuf, signature, hmac_buflen);
return 0;
}
+#endif /* MAL_ICA_ENABLED */
int iotx_mdal_get_auth_username_passwd(char* username, char* password)
{
|
Fix wxgui CLKGEN values
issue | @@ -274,10 +274,10 @@ void lms7002_pnlCLKGEN_view::UpdateGUI()
LMS_ReadParam(lmsControl,LMS7param(FRAC_SDM_CGEN_MSB),&value);
int fracValue = value << 16;
LMS_ReadParam(lmsControl,LMS7param(FRAC_SDM_CGEN_LSB),&value);
- fracValue |= 0;
+ fracValue |= value;
lblFRAC_SDM_CGEN->SetLabel(wxString::Format("%i", fracValue));
LMS_ReadParam(lmsControl,LMS7param(DIV_OUTCH_CGEN),&value);
- lblDivider->SetLabel(wxString::Format("2^%i", value+1));
+ lblDivider->SetLabel(wxString::Format("2*%i", value+1));
}
void lms7002_pnlCLKGEN_view::UpdateInterfaceFrequencies()
|
Update the request status in create_reply_ | @@ -2100,6 +2100,7 @@ htp__create_reply_(evhtp_request_t * request, evhtp_res code) {
&& request->conn
&& request->rc_parser);
+ request->status = code;
content_type = evhtp_header_find(request->headers_out, "Content-Type");
out_len = evbuffer_get_length(request->buffer_out);
|
Added -q option to execsnoop to quote individual arguments. This helps when working with arguments that contain spaces. | @@ -42,6 +42,9 @@ parser.add_argument("-t", "--timestamp", action="store_true",
help="include timestamp on output")
parser.add_argument("-x", "--fails", action="store_true",
help="include failed exec()s")
+parser.add_argument("-q", "--quote", action="store_true",
+ help="Add quotemarks (\") around arguments."
+ )
parser.add_argument("-n", "--name",
type=ArgString,
help="only print commands matching this name (regex), any arg")
@@ -192,6 +195,11 @@ def print_event(cpu, data, size):
skip = True
if args.name and not re.search(bytes(args.name), event.comm):
skip = True
+ if args.quote:
+ argv[event.pid] = [
+ "\"" + arg.replace("\"", "\\\"") + "\""
+ for arg in argv[event.pid]
+ ]
if args.line and not re.search(bytes(args.line),
b' '.join(argv[event.pid])):
skip = True
|
chip/mt_scp/mt818x/ipi_table.c: Format with clang-format
BRANCH=none
TEST=none | @@ -17,20 +17,23 @@ typedef void (*ipi_handler_t)(int32_t id, void *data, uint32_t len);
#define ipi_arguments int32_t id, void *data, uint32_t len
#if PASS == 1
-void ipi_handler_undefined(ipi_arguments) { }
+void ipi_handler_undefined(ipi_arguments)
+{
+}
const int ipi_wakeup_undefined;
#define table(type, name, x) x
#define ipi_x_func(suffix, args, number) \
- extern void __attribute__( \
- (used, weak, alias(STRINGIFY(ipi_##suffix##_undefined)))) \
+ extern void \
+ __attribute__((used, weak, \
+ alias(STRINGIFY(ipi_##suffix##_undefined)))) \
ipi_##number##_##suffix(args);
#define ipi_x_var(suffix, number) \
- extern int __attribute__( \
- (weak, alias(STRINGIFY(ipi_##suffix##_undefined)))) \
+ extern int __attribute__((weak, \
+ alias(STRINGIFY(ipi_##suffix##_undefined)))) \
ipi_##number##_##suffix;
#endif /* PASS == 1 */
|
BugID:16846667:fix task_misc_test compile | @@ -335,13 +335,6 @@ void task_misc_entry(void *arg)
test_case_fail++;
}
- tmp.blk_state = BLK_ABORT;
- pend_state_end_proc(&tmp);
-
- tmp.blk_state = BLK_TIMEOUT;
-
- pend_state_end_proc(&tmp);
-
#if (RHINO_CONFIG_HW_COUNT > 0)
krhino_overhead_measure();
#endif
|
publish: spinner on post comment, proper disabling | @@ -5,7 +5,8 @@ export class Comments extends Component {
constructor(props){
super(props);
this.state = {
- commentBody: ''
+ commentBody: '',
+ disabled: false
}
this.commentSubmit = this.commentSubmit.bind(this);
this.commentChange = this.commentChange.bind(this);
@@ -21,8 +22,13 @@ export class Comments extends Component {
};
this.textArea.value = '';
- window.api.action("publish", "publish-action", comment);
-
+ window.api.setSpinner(true);
+ this.setState({disabled: true});
+ let submit = window.api.action("publish", "publish-action", comment);
+ submit.then(() => {
+ window.api.setSpinner(false);
+ this.setState({ disabled: false, commentBody: "" });
+ })
}
commentChange(evt){
@@ -45,7 +51,7 @@ export class Comments extends Component {
);
})
- let disableComment = this.state.commentBody === '';
+ let disableComment = ((this.state.commentBody === '') || (this.state.disabled === true));
let commentClass = (disableComment)
? "f9 pa2 bg-white br1 ba b--gray2 gray2"
: "f9 pa2 bg-white br1 ba b--gray2 black pointer";
|
test python crash fix | @@ -96,6 +96,10 @@ def add(img, background, x_offset, y_offset, alpha=1, channel=3, topleft=False):
elif channel == 4:
+ if Settings.usecv2:
+ print("HI")
+ return add(img, background, x_offset, y_offset, alpha=alpha, channel=3, topleft=True)
+
b = background.crop((x_offset, y_offset, x_offset + img.size[0], y_offset + img.size[1]))
c = Image.alpha_composite(b, img)
background.paste(c, (x_offset, y_offset))
|
docs: tweak page breaks | \input{common/time}
+\vspace*{.25cm}
\subsection{Add resource management services on {\em master} node} \label{sec:add_rm}
\input{common/install_pbspro}
%% \subsection{Optionally add \InfiniBand{} support services on {\em master} node} \label{sec:add_ofed}
%% \input{common/ibsupport_sms_sles}
-\vspace*{-0.3cm}
+\vspace*{.25cm}
\subsection{Complete basic Warewulf setup for {\em master} node} \label{sec:setup_ww}
\input{common/warewulf_setup}
\input{common/warewulf_setup_sles}
\input{common/warewulf_setup_aarch_db}
+\vspace*{.5cm}
\subsection{Define {\em compute} image for provisioning}
\input{common/warewulf_mkchroot_sles}
\input{common/add_ww_hosts_pbs}
\input{common/add_ww_hosts_finalize}
-\clearpage
\subsubsection{Optional kernel arguments} \label{sec:optional_kargs}
\input{common/conman_post}
\input{common/kargs_post}
|
update document abourt maximum ticket_age_tolerance | //#define MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
/**
- * \def MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH
- *
- * Time in seconds of max ticket lifetime. This is not used in TLS 1.2.
+ * \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE
+ *
+ * Maximum time difference in milliseconds tolerated between the age of a
+ * ticket from the server and client point of view.
+ * From the client point of view, the age of a ticket is the time difference
+ * between the time when the client proposes to the server to use the ticket
+ * (time of writing of the Pre-Shared Key Extension including the ticket) and
+ * the time the client received the ticket from the server.
+ * From the server point of view, the age of a ticket is the time difference
+ * between the time when the server receives a proposition from the client
+ * to use the ticket and the time when the ticket was created by the server.
+ * The server age is expected to be always greater than the client one and
+ * MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE defines the
+ * maximum difference tolerated for the server to accept the ticket.
+ * This is not used in TLS 1.2.
*
*/
#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000
|
SOVERSION bump to version 1.1.4 | @@ -48,7 +48,7 @@ set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION
# with backward compatible change and micro version is connected with any internal change of the library.
set(LIBNETCONF2_MAJOR_SOVERSION 1)
set(LIBNETCONF2_MINOR_SOVERSION 1)
-set(LIBNETCONF2_MICRO_SOVERSION 3)
+set(LIBNETCONF2_MICRO_SOVERSION 4)
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
|
Fix incorrect param log types. | @@ -122,7 +122,7 @@ archiveDbList(const String *stanza, const InfoPgData *pgData, VariantList *archi
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(STRING, stanza);
FUNCTION_TEST_PARAM_P(INFO_PG_DATA, pgData);
- FUNCTION_TEST_PARAM(VARIANT, archiveSection);
+ FUNCTION_TEST_PARAM(VARIANT_LIST, archiveSection);
FUNCTION_TEST_PARAM(BOOL, currentDb);
FUNCTION_TEST_END();
@@ -208,7 +208,7 @@ static void
backupList(VariantList *backupSection, InfoBackup *info, const String *backupLabel)
{
FUNCTION_TEST_BEGIN();
- FUNCTION_TEST_PARAM(VARIANT, backupSection);
+ FUNCTION_TEST_PARAM(VARIANT_LIST, backupSection);
FUNCTION_TEST_PARAM(INFO_BACKUP, info);
FUNCTION_TEST_PARAM(STRING, backupLabel);
FUNCTION_TEST_END();
|
ur: optimizes bitstream bytes-reader implementation | @@ -411,25 +411,21 @@ ur_bsr_bytes_any(ur_bsr_t *bsr, uint64_t len, uint8_t *out)
//
else {
uint8_t rest = 8 - off;
- uint8_t mask = (1 << off) - 1;
- uint8_t byt, l, m = *b >> off;
uint64_t last = left - 1;
+ uint64_t max = ur_min(last, len_byt);
+ uint8_t m, l;
// loop over all the bytes we need (or all that remain)
//
- // [l] holds [off] bits
- // [m] holds [rest] bits
- //
{
- uint64_t max = ur_min(last, len_byt);
uint64_t i;
for ( i = 0; i < max; i++ ) {
- byt = *++b;
- l = byt & mask;
- out[i] = m ^ (l << rest);
- m = byt >> off;
+ out[i] = (b[i] >> off) ^ (b[i + 1] << rest);
}
+
+ b += max;
+ m = *b >> off;
}
// we're reading into or beyond the last byte [bsr]
@@ -441,13 +437,13 @@ ur_bsr_bytes_any(ur_bsr_t *bsr, uint64_t len, uint8_t *out)
uint8_t bits = len - (last << 3);
if ( bits < rest ) {
- out[last] = m & ((1 << bits) - 1);
+ out[max] = m & ((1 << len_bit) - 1);
bsr->bytes = b;
left = 1;
off += len_bit;
}
else {
- out[last] = m;
+ out[max] = m;
bsr->bytes = 0;
left = 0;
off = 0;
@@ -465,11 +461,11 @@ ur_bsr_bytes_any(ur_bsr_t *bsr, uint64_t len, uint8_t *out)
if ( len_bit ) {
if ( len_bit <= rest ) {
- out[len_byt] = m & ((1 << len_bit) - 1);
+ out[max] = m & ((1 << len_bit) - 1);
}
else {
l = *++b & ((1 << off) - 1);
- out[len_byt] = m ^ (l << rest);
+ out[max] = (m ^ (l << rest)) & ((1 << len_bit) - 1);
}
}
}
|
Set default values on parser unions.
Suppresses compiler warnings. | @@ -171,6 +171,7 @@ TCOD_value_type_t TCOD_struct_get_type(TCOD_parser_struct_t def, const char* pro
TCOD_value_t TCOD_parse_bool_value(void) {
TCOD_value_t ret;
+ ret.b = false;
if (strcmp(lex->tok, "true") == 0)
ret.b = true;
else if (strcmp(lex->tok, "false") == 0)
@@ -240,6 +241,7 @@ TCOD_value_t TCOD_parse_string_value(void) {
TCOD_value_t TCOD_parse_color_value(void) {
TCOD_value_t ret;
+ ret.col = (TCOD_ColorRGB){0, 0, 0};
if (lex->token_type == TCOD_LEX_SYMBOL && lex->tok[0] == '#') {
char tmp[128] = "";
int tok = TCOD_lex_parse(lex);
|
Fix build error on non SSE 4.2 environment
This will fix following error.
```
compiling ../../../../ext/oj/parse.c
../../../../ext/oj/parse.c:366:28: error: too many arguments to function call, expected single argument 'pi', have 2 arguments
scan_string_noSIMD(pi, str);
~~~~~~~~~~~~~~~~~~ ^~~
../../../../ext/oj/parse.c:330:20: note: 'scan_string_noSIMD' declared here
static inline void scan_string_noSIMD(ParseInfo pi) {
``` | @@ -363,7 +363,7 @@ static void read_str(ParseInfo pi) {
#if defined(OJ_USE_SSE4_2)
scan_string_SIMD(pi);
#else
- scan_string_noSIMD(pi, str);
+ scan_string_noSIMD(pi);
#endif
if (RB_UNLIKELY(pi->end <= pi->cur)) {
oj_set_error_at(pi,
|
Set index buffer at the right time;
Just a small ordering issue with previous commit. | @@ -702,15 +702,15 @@ void lovrGraphicsFlush() {
if (batch->type == BATCH_MESH) {
lovrMeshSetAttributeEnabled(batch->draw.mesh, "lovrDrawID", batch->params.mesh.instances <= 1);
} else {
+ if (batch->draw.mesh == state.instancedMesh && batch->draw.instances <= 1) {
+ batch->draw.mesh = state.mesh;
+ }
+
if (batch->indexed) {
lovrMeshSetIndexBuffer(batch->draw.mesh, state.buffers[STREAM_INDEX], bufferCount[STREAM_INDEX], sizeof(uint16_t), 0);
} else {
lovrMeshSetIndexBuffer(batch->draw.mesh, NULL, 0, 0, 0);
}
-
- if (batch->draw.mesh == state.instancedMesh && batch->draw.instances <= 1) {
- batch->draw.mesh = state.mesh;
- }
}
lovrGpuDraw(&batch->draw);
|
evp/e_aes_cbc_hmac_sha256.c: give SHAEXT right priority. | @@ -453,10 +453,12 @@ static int aesni_cbc_hmac_sha256_cipher(EVP_CIPHER_CTX *ctx,
* to identify it and avoid stitch invocation. So that after we
* establish that current CPU supports AVX, we even see if it's
* either even XOP-capable Bulldozer-based or GenuineIntel one.
+ * But SHAEXT-capable go ahead...
*/
- if (OPENSSL_ia32cap_P[1] & (1 << (60 - 32)) && /* AVX? */
+ if (((OPENSSL_ia32cap_P[2] & (1 << 29)) || /* SHAEXT? */
+ ((OPENSSL_ia32cap_P[1] & (1 << (60 - 32))) && /* AVX? */
((OPENSSL_ia32cap_P[1] & (1 << (43 - 32))) /* XOP? */
- | (OPENSSL_ia32cap_P[0] & (1<<30))) && /* "Intel CPU"? */
+ | (OPENSSL_ia32cap_P[0] & (1 << 30))))) && /* "Intel CPU"? */
plen > (sha_off + iv) &&
(blocks = (plen - (sha_off + iv)) / SHA256_CBLOCK)) {
SHA256_Update(&key->md, in + iv, sha_off);
|
Fix bug written at the end of buffer | @@ -405,7 +405,7 @@ flash_write(uint8_t flash_id, uint32_t addr, const void *buf, size_t len)
/**
* Write back extra stuff at the ending of page.
*/
- if (len < PAGE_SIZE) {
+ if (bfa + len < PAGE_SIZE) {
for (n = len; n < PAGE_SIZE; n++) {
hal_spi_tx_val(dev->spi_num, g_page_buffer[n]);
}
|
Add new names to check-namespace. | @@ -88,6 +88,8 @@ filter_misc () {
}
check_local_unw_abi () {
+ match _UL${plat}_apply_reg_state
+ match _UL${plat}_reg_states_iterate
match _UL${plat}_create_addr_space
match _UL${plat}_destroy_addr_space
match _UL${plat}_get_fpreg
@@ -190,6 +192,8 @@ check_local_unw_abi () {
}
check_generic_unw_abi () {
+ match _U${plat}_apply_reg_state
+ match _U${plat}_reg_states_iterate
match _U${plat}_create_addr_space
match _U${plat}_destroy_addr_space
match _U${plat}_flush_cache
|
Update ya tool arc
Note: mandatory check (NEED_CHECK) was skipped | },
"arc": {
"formula": {
- "sandbox_id": [490815481],
+ "sandbox_id": [499468551],
"match": "arc"
},
"executable": {
|
ts: Fix awkward sentences in the documentation and the default digest | @@ -170,7 +170,7 @@ in use. (Optional)
The message digest to apply to the data file.
Any digest supported by the OpenSSL B<dgst> command can be used.
-The default is SHA-1. (Optional)
+The default is SHA-256. (Optional)
=item B<-tspolicy> object_id
@@ -530,8 +530,9 @@ openssl/apps/openssl.cnf will do.
=head2 Time Stamp Request
-To create a time stamp request for design1.txt with SHA-256
-without nonce and policy and no certificate is required in the response:
+To create a time stamp request for design1.txt with SHA-256 digest,
+without nonce and policy, and without requirement for a certificate
+in the response:
openssl ts -query -data design1.txt -no_nonce \
-out design1.tsq
@@ -547,7 +548,7 @@ To print the content of the previous request in human readable format:
openssl ts -query -in design1.tsq -text
To create a time stamp request which includes the SHA-512 digest
-of design2.txt, requests the signer certificate and nonce,
+of design2.txt, requests the signer certificate and nonce, and
specifies a policy id (assuming the tsa_policy1 name is defined in the
OID section of the config file):
|
Runtime detect FIPS RNG usage in test | @@ -132,15 +132,23 @@ static time_t reseed_time(EVP_RAND_CTX *drbg)
/*
* When building the FIPS module, it isn't possible to disable the continuous
- * RNG tests. Tests that require this are skipped.
+ * RNG tests. Tests that require this are skipped and this means a detection
+ * mechanism for the FIPS provider being in use.
*/
-static int crngt_skip(void)
+static int using_fips_rng(void)
{
-#ifdef FIPS_MODULE
- return 1;
-#else
+ EVP_RAND_CTX *primary = RAND_get0_primary(NULL);
+ const OSSL_PROVIDER *prov;
+ const char *name;
+
+ if (!TEST_ptr(primary))
return 0;
-#endif
+
+ prov = EVP_RAND_get0_provider(EVP_RAND_CTX_get0_rand(primary));
+ if (!TEST_ptr(prov))
+ return 0;
+ name = OSSL_PROVIDER_get0_name(prov);
+ return strcmp(name, "OpenSSL FIPS Provider") == 0;
}
/*
@@ -550,7 +558,7 @@ static int test_rand_reseed(void)
int rv = 0;
time_t before_reseed;
- if (crngt_skip())
+ if (using_fips_rng())
return TEST_skip("CRNGT cannot be disabled");
#ifndef OPENSSL_NO_DEPRECATED_3_0
@@ -582,7 +590,6 @@ static int test_rand_reseed(void)
EVP_RAND_uninstantiate(private);
EVP_RAND_uninstantiate(public);
-
/*
* Test initial seeding of shared DRBGs
*/
@@ -592,7 +599,6 @@ static int test_rand_reseed(void)
1, 1, 1, 0)))
goto error;
-
/*
* Test initial state of shared DRBGs
*/
@@ -640,7 +646,6 @@ static int test_rand_reseed(void)
/* fill 'randomness' buffer with some arbitrary data */
memset(rand_add_buf, 'r', sizeof(rand_add_buf));
-#ifndef FIPS_MODULE
/*
* Test whether all three DRBGs are reseeded by RAND_add().
* The before_reseed time has to be measured here and passed into the
@@ -657,22 +662,6 @@ static int test_rand_reseed(void)
1, 1, 1,
before_reseed)))
goto error;
-#else /* FIPS_MODULE */
- /*
- * In FIPS mode, random data provided by the application via RAND_add()
- * is not considered a trusted entropy source. It is only treated as
- * additional_data and no reseeding is forced. This test assures that
- * no reseeding occurs.
- */
- before_reseed = time(NULL);
- RAND_add(rand_add_buf, sizeof(rand_add_buf), sizeof(rand_add_buf));
- if (!TEST_true(test_drbg_reseed(1,
- primary, public, private,
- NULL, NULL,
- 0, 0, 0,
- before_reseed)))
- goto error;
-#endif
rv = 1;
@@ -822,7 +811,7 @@ static int test_rand_prediction_resistance(void)
unsigned char buf1[51], buf2[sizeof(buf1)];
int ret = 0, xreseed, yreseed, zreseed;
- if (crngt_skip())
+ if (using_fips_rng())
return TEST_skip("CRNGT cannot be disabled");
/* Initialise a three long DRBG chain */
|
armv7: Enabled watchdog | @@ -17,9 +17,9 @@ MKDEPFLAGS = $(CFLAGS)
CC = $(CROSS)gcc
CFLAGS += -Wall -Wstrict-prototypes -I$(SRCDIR) -nostartfiles -nostdlib\
- -mcpu=cortex-m3 -mthumb -ffixed-r9 \
- -fomit-frame-pointer -ffreestanding -Wno-bool-operation \
- -DVERSION=\"$(VERSION)\" -DCORE_VERSION=\"$(CORE_VERSION)\" -DAPP_VERSION=\"$(APP_VERSION)\" -DHAL=\"hal//armv7//hal.h\" -DNOMMU
+ -mcpu=cortex-m3 -mthumb -ffixed-r9 -fomit-frame-pointer -ffreestanding -Wno-bool-operation \
+ -DVERSION=\"$(VERSION)\" -DCORE_VERSION=\"$(CORE_VERSION)\" -DAPP_VERSION=\"$(APP_VERSION)\" \
+ -DHAL=\"hal//armv7//hal.h\" -DNOMMU
CFLAGS += -fdata-sections -ffunction-sections
@@ -29,6 +29,10 @@ else ifneq (, $(findstring imxrt, $(TARGET)))
CFLAGS += -DCPU_IMXRT -DRAM_SIZE=128
endif
+ifneq ($(DEBUG), 1)
+ CFLAGS += -DWATCHDOG
+endif
+
AR = $(CROSS)ar
ARFLAGS = -r
|
example/mediaplayer: Add resume input
Start call prepare and start.
Resume call start | @@ -65,6 +65,7 @@ class MediaPlayerTest : public MediaPlayerObserverInterface, public enable_share
APP_OFF,
PLAYER_START,
PLAYER_PAUSE,
+ PLAYER_RESUME,
PLAYER_STOP,
VOLUME_UP,
VOLUME_DOWN
@@ -143,6 +144,12 @@ void MediaPlayerTest::start(void)
cout << "Mediaplayer::pause failed" << endl;
}
break;
+ case PLAYER_RESUME:
+ cout << "PLAYER_RESUME is selected" << endl;
+ if (mp.start() == PLAYER_ERROR) {
+ cout << "Mediaplayer::start failed" << endl;
+ }
+ break;
case PLAYER_STOP:
cout << "PLAYER_STOP is selected" << endl;
if (mp.stop() == PLAYER_ERROR) {
@@ -185,9 +192,10 @@ void MediaPlayerTest::printMenu()
cout << " 0. APP_OFF " << endl;
cout << " 1. PLAYER_START " << endl;
cout << " 2. PLAYER_PAUSE " << endl;
- cout << " 3. PLAYER_STOP " << endl;
- cout << " 4. VOLUME_UP " << endl;
- cout << " 5. VOLUME_DOWN " << endl;
+ cout << " 3. PLAYER_RESUME " << endl;
+ cout << " 4. PLAYER_STOP " << endl;
+ cout << " 5. VOLUME_UP " << endl;
+ cout << " 6. VOLUME_DOWN " << endl;
cout << "====================" << endl;
}
|
check getpwnam_r()/getspnam_r()'s return code
Unlike getpwnam(), the reentrant variant is not documented to manipulate
errno, but instead it is supposed to return the error code directly.
Same for getspnam_r(). Make sure the code handles ERANGE correctly. | @@ -715,16 +715,16 @@ auth_password_getpwnam(const char *username, struct passwd *pwd_buf, char **buf,
{
struct passwd *pwd = NULL;
char *mem;
+ int r = 0;
do {
- errno = 0;
- getpwnam_r(username, pwd_buf, *buf, *buf_size, &pwd);
+ r = getpwnam_r(username, pwd_buf, *buf, *buf_size, &pwd);
if (pwd) {
/* entry found */
break;
}
- if (errno == ERANGE) {
+ if (r == ERANGE) {
/* small buffer, enlarge */
*buf_size <<= 2;
mem = realloc(*buf, *buf_size);
@@ -734,7 +734,7 @@ auth_password_getpwnam(const char *username, struct passwd *pwd_buf, char **buf,
}
*buf = mem;
}
- } while (errno == ERANGE);
+ } while (r == ERANGE);
return pwd;
}
@@ -744,11 +744,11 @@ auth_password_getspnam(const char *username, struct spwd *spwd_buf, char **buf,
{
struct spwd *spwd = NULL;
char *mem;
+ int r = 0;
do {
- errno = 0;
# ifndef __QNXNTO__
- getspnam_r(username, spwd_buf, *buf, *buf_size, &spwd);
+ r = getspnam_r(username, spwd_buf, *buf, *buf_size, &spwd);
# else
spwd = getspnam_r(username, spwd_buf, *buf, *buf_size);
# endif
@@ -757,7 +757,7 @@ auth_password_getspnam(const char *username, struct spwd *spwd_buf, char **buf,
break;
}
- if (errno == ERANGE) {
+ if (r == ERANGE) {
/* small buffer, enlarge */
*buf_size <<= 2;
mem = realloc(*buf, *buf_size);
@@ -767,7 +767,7 @@ auth_password_getspnam(const char *username, struct spwd *spwd_buf, char **buf,
}
*buf = mem;
}
- } while (errno == ERANGE);
+ } while (r == ERANGE);
return spwd;
}
|
tls: fifo size is u32
unformat_memory_size() writes to a uword *
Limit cli input to u32
Type: fix | @@ -892,6 +892,7 @@ static clib_error_t *
tls_config_fn (vlib_main_t * vm, unformat_input_t * input)
{
tls_main_t *tm = &tls_main;
+ uword tmp;
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{
if (unformat (input, "use-test-cert-in-ca"))
@@ -901,9 +902,15 @@ tls_config_fn (vlib_main_t * vm, unformat_input_t * input)
else if (unformat (input, "first-segment-size %U", unformat_memory_size,
&tm->first_seg_size))
;
- else if (unformat (input, "fifo-size %U", unformat_memory_size,
- &tm->fifo_size))
- ;
+ else if (unformat (input, "fifo-size %U", unformat_memory_size, &tmp))
+ {
+ if (tmp >= 0x100000000ULL)
+ {
+ return clib_error_return
+ (0, "fifo-size %llu (0x%llx) too large", tmp, tmp);
+ }
+ tm->fifo_size = tmp;
+ }
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, input);
|
Use job-fetchable state-reason for 'fetchable' value of which-jobs. | @@ -3928,6 +3928,7 @@ ipp_get_jobs(server_client_t *client) /* I - Client */
/* which-jobs values */
int job_comparison; /* Job comparison */
ipp_jstate_t job_state; /* job-state value */
+ server_jreason_t job_reasons; /* job-state-reasons values */
int first_job_id, /* First job ID */
limit, /* Maximum number of jobs to return */
count; /* Number of jobs that match */
@@ -3957,13 +3958,14 @@ ipp_get_jobs(server_client_t *client) /* I - Client */
* See if the "which-jobs" attribute have been specified...
*/
- if ((attr = ippFindAttribute(client->request, "which-jobs",
- IPP_TAG_KEYWORD)) != NULL)
+ if ((attr = ippFindAttribute(client->request, "which-jobs", IPP_TAG_KEYWORD)) != NULL)
{
which_jobs = ippGetString(attr, 0, NULL);
serverLogClient(SERVER_LOGLEVEL_DEBUG, client, "Get-Jobs which-jobs='%s'", which_jobs);
}
+ job_reasons = SERVER_JREASON_NONE;
+
if (!which_jobs || !strcmp(which_jobs, "not-completed"))
{
job_comparison = -1;
@@ -4013,13 +4015,11 @@ ipp_get_jobs(server_client_t *client) /* I - Client */
{
job_comparison = 0;
job_state = IPP_JSTATE_STOPPED;
+ job_reasons = SERVER_JREASON_JOB_FETCHABLE;
}
else
{
- serverRespondIPP(client, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES,
- "The which-jobs value \"%s\" is not supported.", which_jobs);
- ippAddString(client->response, IPP_TAG_UNSUPPORTED_GROUP, IPP_TAG_KEYWORD,
- "which-jobs", NULL, which_jobs);
+ serverRespondUnsupported(client, attr);
return;
}
@@ -4094,20 +4094,27 @@ ipp_get_jobs(server_client_t *client) /* I - Client */
* Filter out jobs that don't match...
*/
- if ((job_comparison < 0 && job->state > job_state) ||
+ if (job->id < first_job_id || (username && job->username && strcasecmp(username, job->username)))
+ continue;
+
+ if (job_reasons != SERVER_JREASON_NONE)
+ {
+ if (!(job->state_reasons & job_reasons))
+ continue;
+ }
+ else if ((job_comparison < 0 && job->state > job_state) ||
(job_comparison == 0 && job->state != job_state) ||
- (job_comparison > 0 && job->state < job_state) ||
- job->id < first_job_id ||
- (username && job->username &&
- strcasecmp(username, job->username)))
+ (job_comparison > 0 && job->state < job_state))
+ {
continue;
+ }
if (count > 0)
ippAddSeparator(client->response);
count ++;
- if (serverAuthorizeUser(client, job->username, SERVER_GROUP_NONE, JobPrivacyScope))
+ if (serverAuthorizeUser(client, job->username, job->printer->pinfo.proxy_group, JobPrivacyScope))
{
pa = NULL;
serverLogClient(SERVER_LOGLEVEL_INFO, client, "%s Job #%d attributes accessed by \"%s\".", job->printer->name, job->id, client->username);
|
Mitigated deadlock of node in combination with python. | @@ -136,17 +136,11 @@ int type_py_interface_create(type t, type_impl impl)
void type_py_interface_destroy(type t, type_impl impl)
{
- PyGILState_STATE gstate;
-
PyObject * builtin = (PyObject *)impl;
(void)t;
- gstate = PyGILState_Ensure();
-
Py_DECREF(builtin);
-
- PyGILState_Release(gstate);
}
type_interface type_py_singleton(void)
@@ -1251,11 +1245,11 @@ void py_loader_impl_handle_destroy(loader_impl_py_handle py_handle)
{
size_t iterator;
- PyGILState_STATE gstate;
+ /* PyGILState_STATE gstate; */
PyObject * system_modules;
- gstate = PyGILState_Ensure();
+ /* gstate = PyGILState_Ensure(); */
system_modules = PySys_GetObject("modules");
@@ -1272,7 +1266,7 @@ void py_loader_impl_handle_destroy(loader_impl_py_handle py_handle)
Py_XDECREF(py_handle->modules[iterator].name);
}
- PyGILState_Release(gstate);
+ /* PyGILState_Release(gstate); */
free(py_handle->modules);
@@ -1808,9 +1802,9 @@ int py_loader_impl_destroy(loader_impl impl)
if (py_impl != NULL)
{
- PyGILState_STATE gstate;
+ /* PyGILState_STATE gstate; */
- gstate = PyGILState_Ensure();
+ /* gstate = PyGILState_Ensure(); */
Py_DECREF(py_impl->inspect_signature);
@@ -1846,7 +1840,7 @@ int py_loader_impl_destroy(loader_impl impl)
py_loader_impl_error_print(py_impl);
}
- PyGILState_Release(gstate);
+ /* PyGILState_Release(gstate); */
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 6
{
@@ -1863,7 +1857,7 @@ int py_loader_impl_destroy(loader_impl impl)
}
else
{
- PyGILState_Release(gstate);
+ /* PyGILState_Release(gstate); */
}
free(py_impl);
|
driver/temp_sensor/tmp468.c: Format with clang-format
BRANCH=none
TEST=none | #include "tmp468.h"
-
-static int fake_temp[TMP468_CHANNEL_COUNT] = {-1, -1, -1, -1, -1, -1, -1 , -1, -1};
+static int fake_temp[TMP468_CHANNEL_COUNT] = { -1, -1, -1, -1, -1,
+ -1, -1, -1, -1 };
static int temp_val[TMP468_CHANNEL_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
static uint8_t is_sensor_shutdown;
@@ -27,14 +27,14 @@ static int has_power(void)
static int raw_read16(const int offset, int *data_ptr)
{
- return i2c_read16(I2C_PORT_THERMAL, TMP468_I2C_ADDR_FLAGS,
- offset, data_ptr);
+ return i2c_read16(I2C_PORT_THERMAL, TMP468_I2C_ADDR_FLAGS, offset,
+ data_ptr);
}
static int raw_write16(const int offset, int data_ptr)
{
- return i2c_write16(I2C_PORT_THERMAL, TMP468_I2C_ADDR_FLAGS,
- offset, data_ptr);
+ return i2c_write16(I2C_PORT_THERMAL, TMP468_I2C_ADDR_FLAGS, offset,
+ data_ptr);
}
static int tmp468_shutdown(uint8_t want_shutdown)
|
misc: acrnd: fix a minor build Werror
The comparison ((argv + 1)) will always evaluate as 'true' for the pointer
operand in 'argv + 8' must not be NULL. | @@ -657,7 +657,7 @@ static int valid_start_args(struct acrnctl_cmd *cmd, int argc, char *argv[])
{
char df_opt[16] = "VM_NAME";
- if (argc != 2 || ((argv + 1) && !strcmp(argv[1], "help"))) {
+ if (argc != 2 || !strcmp(argv[1], "help")) {
printf("acrnctl %s %s\n", cmd->cmd, df_opt);
return -1;
}
|
close socket for unsused candidates | @@ -415,8 +415,8 @@ uint8_t neat_remove_event_cb(struct neat_ctx *nc, uint8_t event_type,
return RETVAL_SUCCESS;
}
-void neat_run_event_cb(struct neat_ctx *nc, uint8_t event_type,
- void *data)
+void
+neat_run_event_cb(struct neat_ctx *nc, uint8_t event_type, void *data)
{
struct neat_event_cbs *cb_list_head = NULL;
struct neat_event_cb *cb_itr = NULL;
@@ -2221,6 +2221,7 @@ he_connected_cb(uv_poll_t *handle, int status, int events)
send_result_connection_attempt_to_pm(flow->ctx, flow, he_res, false);
}
+ close(candidate->pollable_socket->fd);
uv_poll_stop(handle);
uv_close((uv_handle_t*)handle, free_he_handle_cb);
|
stm32l4/irq: Fixed typo | @@ -63,7 +63,7 @@ enum { wwdq_irq = 16, pvd_pvm_irq, rtc_tamper_stamp_irq, rtc_wkup_irq, flash_irq
can1_tx_irq, can1_rx0_irq, can1_rx1_irq, can1_sce_irq, exti9_5_irq, tim1_brk_irq,
tim1_up_irq, tim1_trg_com_irq, tim1_cc_irq, tim2_irq, tim3_irq, tim4_irq, i2c1_ev_irq,
i2c1_er_irq, i2c2_ev_irq, i2c2_er_irq, spi1_irq, spi2_irq, usart1_irq, usart2_irq,
- usart3_irq, exit15_10_irq, rtc_alarm_irq, dfsdm1_flt3_irq, tim8_brk_irq, tim8_up_irq,
+ usart3_irq, exti15_10_irq, rtc_alarm_irq, dfsdm1_flt3_irq, tim8_brk_irq, tim8_up_irq,
tim8_trg_com_irq, tim8_cc_irq, adc3_irq, fmc_irq, sdmmc1_irq, tim5_irq, spi3_irq,
uart4_irq, uart5_irq, tim6_dacunder_irq, tim7_irq, dma2_ch1_irq, dma2_ch2_irq,
dma2_ch3_irq, dma2_ch4_irq, dma2_ch5_irq, dfsdm1_flt0_irq, dfsdm1_flt1_irq, dfsdm1_flt2_irq,
|
Tests: Fix warning about catching polymorphic type | @@ -362,7 +362,7 @@ TEST (key, exceptions)
{
test.setName ("no");
}
- catch (kdb::KeyInvalidName)
+ catch (kdb::KeyInvalidName &)
{
succeed_if (test.getName () == "", "not set to noname");
}
@@ -374,7 +374,7 @@ TEST (key, exceptions)
{
test.setName ("no");
}
- catch (kdb::KeyInvalidName)
+ catch (kdb::KeyInvalidName &)
{
succeed_if (test.getName () == "", "not set to noname");
}
|
[chainmaker]add get time function in boatplatform.c | //! self header include
#include <stdlib.h>
+#include <time.h>
#include "boatplatform.h"
#include "boattypes.h"
#include "boatutility.h"
@@ -113,3 +114,10 @@ void BoatSleep(BUINT32 second)
{
sleep(second);
}
+
+BUINT64 BoatGetTimes()
+{
+ BUINT64 timesec = 0;
+ time(×ec);
+ return timesec;
+}
\ No newline at end of file
|
docs: tinyusb: fix typo | @@ -44,7 +44,7 @@ On top of it the driver implements:
- Customization of USB descriptors
- Serial device support
- Redirecting of standard streams through the Serial device
-- Encapsulated driver's task servicing the TinyuSB
+- Encapsulated driver's task servicing the TinyUSB
|
DDF add variant to Tuya TS0202 presence sensor (_TZ3040_6ygjfyll)
* Update ts0202_presence_sensor.json
Added manufacturer name of another clone ("_TZ3040_6ygjfyll")
* Update ts0202_presence_sensor.json | {
"schema":"devcap1.schema.json",
- "manufacturername": ["_TZ3000_msl6wxk9", "_TZ3000_otvn3lne"],
- "modelid":["TS0202", "TS0202"],
+ "manufacturername": ["_TZ3000_msl6wxk9", "_TZ3000_otvn3lne", "_TZ3040_6ygjfyll"],
+ "modelid":["TS0202", "TS0202", "TS0202"],
"product":"TS0202 Presence sensor",
"sleeper":true,
"status":"Gold",
|
anahera: add menu button to keyboard
Adding the "hamburger" button to support non-EPS non KB_BL SKU
BRANCH=none
TEST=none
Tested-by: Devin Lu | @@ -55,12 +55,12 @@ static const struct ec_response_keybd_config keybd_wo_privacy_wo_kblight = {
TK_SNAPSHOT, /* T5 */
TK_BRIGHTNESS_DOWN, /* T6 */
TK_BRIGHTNESS_UP, /* T7 */
- TK_PREV_TRACK, /* T8 */
- TK_PLAY_PAUSE, /* T9 */
- TK_MICMUTE, /* T10 */
- TK_VOL_MUTE, /* T11 */
- TK_VOL_DOWN, /* T12 */
- TK_VOL_UP, /* T13 */
+ TK_PLAY_PAUSE, /* T8 */
+ TK_MICMUTE, /* T9 */
+ TK_VOL_MUTE, /* T10 */
+ TK_VOL_DOWN, /* T11 */
+ TK_VOL_UP, /* T12 */
+ TK_MENU, /* T13 */
},
.capabilities = KEYBD_CAP_SCRNLOCK_KEY,
};
|
Add processor group combobox to affinity dialog | @@ -502,7 +502,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,169,206,50,14
PUSHBUTTON "Cancel",IDCANCEL,222,206,50,14
- LTEXT "Affinity controls which CPUs threads are allowed to execute on.",IDC_STATIC,7,7,265,11
+ LTEXT "Affinity controls which CPUs threads are allowed to execute on.",IDC_STATIC,7,7,212,11
CONTROL "CPU 0",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,21,35,10
CONTROL "CPU 1",IDC_CPU1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,33,35,10
CONTROL "CPU 2",IDC_CPU2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,44,35,10
@@ -569,6 +569,7 @@ BEGIN
CONTROL "CPU 63",IDC_CPU63,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,224,190,39,10
PUSHBUTTON "Select all",IDC_SELECTALL,7,206,50,14
PUSHBUTTON "Deselect all",IDC_DESELECTALL,60,206,50,14
+ COMBOBOX IDC_GROUPCPU,220,4,52,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP | NOT WS_VISIBLE
END
IDD_SYSINFO DIALOGEX 0, 0, 423, 247
|
schema mount UPDATE validate only present data
Do not add default nodes from all the modules
in the context. | @@ -954,8 +954,8 @@ schema_mount_validate(struct lysc_ext_instance *ext, struct lyd_node *sibling, c
old_log_opts = ly_log_options(LY_LOSTORE_LAST);
if (data_type == LYD_TYPE_DATA_YANG) {
- /* validate all the data */
- ret = lyd_validate_all(&sibling, NULL, val_opts, diff ? &ext_diff : NULL);
+ /* validate all the modules with data */
+ ret = lyd_validate_all(&sibling, NULL, val_opts | LYD_VALIDATE_PRESENT, diff ? &ext_diff : NULL);
} else {
/* validate the operation */
ret = lyd_validate_op(op_tree, dep_tree, data_type, diff ? &ext_diff : NULL);
|
Fix NULL ptr issue. | @@ -496,7 +496,7 @@ static int macroexpand1(
return 0;
/* Evaluate macro */
- JanetFiber *fiberp;
+ JanetFiber *fiberp = NULL;
JanetFunction *macro = janet_unwrap_function(macroval);
int lock = janet_gclock();
JanetSignal status = janet_pcall(
|
Fix issue introduced in
Variadic functions can't return from within a `va_start` ... `va_end block. | @@ -989,20 +989,20 @@ int yr_object_set_integer(
va_start(args, field);
if (field != NULL)
- {
integer_obj = _yr_object_lookup(object, OBJECT_CREATE, field, args);
+ else
+ integer_obj = object;
+
+ va_end(args);
if (integer_obj == NULL)
+ {
+ if (field != NULL)
return ERROR_INSUFFICIENT_MEMORY;
- }
else
- {
- integer_obj = object;
+ return ERROR_INVALID_ARGUMENT;
}
- va_end(args);
-
- assert(integer_obj != NULL);
assert(integer_obj->type == OBJECT_TYPE_INTEGER);
integer_obj->value.i = value;
@@ -1023,20 +1023,20 @@ int yr_object_set_float(
va_start(args, field);
if (field != NULL)
- {
double_obj = _yr_object_lookup(object, OBJECT_CREATE, field, args);
+ else
+ double_obj = object;
+
+ va_end(args);
if (double_obj == NULL)
+ {
+ if (field != NULL)
return ERROR_INSUFFICIENT_MEMORY;
- }
else
- {
- double_obj = object;
+ return ERROR_INVALID_ARGUMENT;
}
- va_end(args);
-
- assert(double_obj != NULL);
assert(double_obj->type == OBJECT_TYPE_FLOAT);
double_obj->value.d = value;
@@ -1058,20 +1058,20 @@ int yr_object_set_string(
va_start(args, field);
if (field != NULL)
- {
string_obj = _yr_object_lookup(object, OBJECT_CREATE, field, args);
+ else
+ string_obj = object;
+
+ va_end(args);
if (string_obj == NULL)
+ {
+ if (field != NULL)
return ERROR_INSUFFICIENT_MEMORY;
- }
else
- {
- string_obj = object;
+ return ERROR_INVALID_ARGUMENT;
}
- va_end(args);
-
- assert(string_obj != NULL);
assert(string_obj->type == OBJECT_TYPE_STRING);
if (string_obj->value.ss != NULL)
|
pybricks.common.ColorLight.blink: Duration > 0
Zero duration breaks the way the event loop works.
Since 0 is no use for blinking, just disallow it.
This also makes the error explicit for negative numbers. | @@ -76,6 +76,10 @@ STATIC mp_obj_t common_ColorLight_internal_blink(size_t n_args, const mp_obj_t *
mp_obj_t durations_iter = mp_getiter(durations_in, &iter_buf);
for (int i = 0; i < durations_len; i++) {
cells[i] = pb_obj_get_positive_int(mp_iternext(durations_iter));
+ // Duration less than event loop is not allowed
+ if (cells[i] == 0) {
+ pb_assert(PBIO_ERROR_INVALID_ARG);
+ }
}
// sentinel value
|
Pass through bin_gpdb_centos7 for mpp_resource_group_centos7
Previously, mpp_resource_group_centos7 use bin_gpdb_centos7 directly
which may cause the inconsistence of bin_gpdb_centos7 and gpdb_src.
This commit pass through bin_gpdb_centos7 from gate_mm_misc_start to
avoid this even though it's not used by mm_misc jobs. | @@ -2546,6 +2546,9 @@ jobs:
- MM_gppkg
- MM_gprecoverseg
# Not used by icw group, but is passed through
+ - get: bin_gpdb_centos7
+ passed:
+ - gate_mm_misc_start
- get: gpdb_src_tinc_tarball
passed:
- gate_mm_misc_start
@@ -2940,6 +2943,9 @@ jobs:
- get: bin_gpdb_centos6
passed:
- gate_mm_misc_end
+ - get: bin_gpdb_centos7
+ passed:
+ - gate_mm_misc_end
- name: MM_gpcheckcat
plan:
- aggregate:
@@ -3156,6 +3162,7 @@ jobs:
- get: bin_gpdb
tags: ["gpdb5_ccp_external_worker"]
resource: bin_gpdb_centos7
+ passed: [gate_general_misc_start]
trigger: true
- get: ccp_src
tags: ["gpdb5_ccp_external_worker"]
|
rpi-config: remove explicit device tree selection for raspberrypi3-64
The current firmware doesn't need this. | @@ -188,10 +188,6 @@ do_deploy_append_raspberrypi3-64() {
echo "# Enable audio (loads snd_bcm2835)" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
echo "dtparam=audio=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
-
- # Device Tree support
- echo "# Load correct Device Tree for Aarch64" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
- echo "device_tree=bcm2710-rpi-3-b.dtb" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
}
addtask deploy before do_build after do_install
|
remove make as install dependency | @@ -10,7 +10,7 @@ Standards-Version: 4.0.0
Package: oidc-agent
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, make (>= 4),
+Depends: ${shlibs:Depends}, ${misc:Depends},
libsodium18 (>= 1.0.11),
libcurl13 (>= 7.52)
Description: Commandline tool for obtaining OpenID Connect Access tokens on the commandline
|
Added <interrupt> element to <zone> element in the *.fzone file | @@ -87,7 +87,7 @@ This information can be used for example, to create a linker script that defines
<td>\subpage fm_interrupt ".interrupt"</td>
<td>A sequence of all interrupt sources available.</td>
<td>sequence</td>
- </tr>`
+ </tr>
<tr>
<td>\subpage fm_mpc_setup ".mpc_setup"</td>
<td>Contains the device specific configuration registers for the setup of the Memory Protection Controller (MPC).</td>
@@ -167,6 +167,11 @@ the related linker setup.
<td>A sequence of all peripherals that are accessible in the zone (or system partition).</td>
<td>sequence</td>
</tr>
+ <tr>
+ <td>\subpage fm_interrupt ".interrupt"</td>
+ <td>A sequence of all interrupt sources that belong to peripherals that are accessible in the zone (or system partition).</td>
+ <td>sequence</td>
+ </tr>
<tr>
<td>\subpage fm_mpu_setup ".mpu_setup"</td>
<td>A sequence of configuration information for the Memory Protection Unit (MPU).</td>
|
Copy ns time stat | #include "../common/constants.h"
#include "../common/version.h"
-#if !defined(_WIN32)
-#include <unistd.h>
-#include <utime.h>
-#define MAKE_BINARY(FILENO) (FILENO)
-#else
+#if defined(_WIN32)
#include <io.h>
#include <share.h>
#include <sys/utime.h>
@@ -72,7 +68,23 @@ static int ms_open(const char* filename, int oflag, int pmode) {
_sopen_s(&result, filename, oflag | O_BINARY, _SH_DENYNO, pmode);
return result;
}
-#endif /* WIN32 */
+#else /* !defined(_WIN32) */
+#include <unistd.h>
+#include <utime.h>
+#define MAKE_BINARY(FILENO) (FILENO)
+#endif /* defined(_WIN32) */
+
+#if defined(__APPLE__) && !defined(_POSIX_C_SOURCE)
+#define HAVE_UTIMENSAT 1
+#define ATIME_NSEC(S) ((S)->st_atimespec.tv_nsec)
+#define MTIME_NSEC(S) ((S)->st_mtimespec.tv_nsec)
+#elif defined(_WIN32) || !defined(AT_SYMLINK_NOFOLLOW)
+#define HAVE_UTIMENSAT 0
+#else
+#define HAVE_UTIMENSAT 1
+#define ATIME_NSEC(S) ((S)->st_atim.tv_nsec)
+#define MTIME_NSEC(S) ((S)->st_mtim.tv_nsec)
+#endif
typedef enum {
COMMAND_COMPRESS,
@@ -664,12 +676,27 @@ static int64_t FileSize(const char* path) {
return retval;
}
+static int CopyTimeStat(const struct stat* statbuf, const char* output_path) {
+#if HAVE_UTIMENSAT
+ struct timespec times[2];
+ times[0].tv_sec = statbuf->st_atime;
+ times[0].tv_nsec = ATIME_NSEC(statbuf);
+ times[1].tv_sec = statbuf->st_mtime;
+ times[1].tv_nsec = MTIME_NSEC(statbuf);
+ return utimensat(AT_FDCWD, output_path, times, AT_SYMLINK_NOFOLLOW);
+#else
+ struct utimbuf times;
+ times.actime = statbuf->st_atime;
+ times.modtime = statbuf->st_mtime;
+ return utime(output_path, ×);
+#endif
+}
+
/* Copy file times and permissions.
TODO(eustas): this is a "best effort" implementation; honest cross-platform
fully featured implementation is way too hacky; add more hacks by request. */
static void CopyStat(const char* input_path, const char* output_path) {
struct stat statbuf;
- struct utimbuf times;
int res;
if (input_path == 0 || output_path == 0) {
return;
@@ -677,9 +704,7 @@ static void CopyStat(const char* input_path, const char* output_path) {
if (stat(input_path, &statbuf) != 0) {
return;
}
- times.actime = statbuf.st_atime;
- times.modtime = statbuf.st_mtime;
- utime(output_path, ×);
+ res = CopyTimeStat(&statbuf, output_path);
res = chmod(output_path, statbuf.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO));
if (res != 0) {
fprintf(stderr, "setting access bits failed for [%s]: %s\n",
|
nothing now compiles on freebsd | #include <stdlib.h>
#include <errno.h>
#include "system/nth_alloc.h"
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
#include <sys/stat.h>
#include <sys/types.h>
#elif defined(_WIN32)
@@ -20,7 +20,7 @@ int last_modified(const char *filepath, time_t *time)
trace_assert(filepath);
trace_assert(time);
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
struct stat attr;
if (stat(filepath, &attr) < 0) {
|
Update data_dir default to in-src-build location, as used in nightly regresssion testing. | @@ -450,9 +450,13 @@ def log_test_result(result_dir,result):
# Changed the definition of tests_dir_def to the new location of the
# test directory.
#
+# Kathleen Biagas, Thu Dec 13 10:51:54 PST 2018
+# Changed definition of data_dir to new location. Assumes in-src build,
+# which is used for nightly regression tests.
+#
# ----------------------------------------------------------------------------
def default_suite_options():
- data_dir_def = abs_path(visit_root(),"data")
+ data_dir_def = abs_path(visit_root(),"src","testdata")
base_dir_def = abs_path(visit_root(),"test","baseline")
tests_dir_def = abs_path(visit_root(),"src","test","tests")
visit_exe_def = abs_path(visit_root(),"src","bin","visit")
|
Fix error introduced during cleanup | @@ -347,7 +347,7 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG incx, FLOAT *bu
range_m[MAX_CPU_NUMBER - num_cpu - 1] = range_m[MAX_CPU_NUMBER - num_cpu] - width;
range_n[num_cpu] = num_cpu * (((m + 15) & ~15) + 16);
if (range_n[num_cpu] > m * num_cpu) range_n[num_cpu] = m * num_cpu;
- }
+
queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
queue[num_cpu].args = &args;
@@ -387,6 +387,7 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG incx, FLOAT *bu
range_m[num_cpu + 1] = range_m[num_cpu] + width;
range_n[num_cpu] = num_cpu * (((m + 15) & ~15) + 16);
if (range_n[num_cpu] > m * num_cpu) range_n[num_cpu] = m * num_cpu;
+
queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
queue[num_cpu].args = &args;
|
chat fe: don't embed webms as images | @@ -72,7 +72,7 @@ export class Message extends Component {
);
} else if ('url' in letter) {
let imgMatch =
- /(jpg|img|png|gif|tiff|jpeg|JPG|IMG|PNG|TIFF|GIF|webp|WEBP|webm|WEBM|svg|SVG)$/
+ /(jpg|img|png|gif|tiff|jpeg|JPG|IMG|PNG|TIFF|GIF|webp|WEBP|svg|SVG)$/
.exec(letter.url);
const youTubeRegex = new RegExp(String(/(?:https?:\/\/(?:[a-z]+.)?)/.source) // protocol
+ /(?:youtu\.?be(?:\.com)?\/)(?:embed\/)?/.source // short and long-links
|
honggfuzz.h: increase the number of maximum positional args to execve that honggfuzz supports | #define _HF_INPUT_FILE_PATH "/dev/fd/" HF_XSTR(_HF_INPUT_FD)
/* Maximum number of supported execve() args */
-#define _HF_ARGS_MAX 512
+#define _HF_ARGS_MAX 2048
/* Message indicating that the fuzzed process is ready for new data */
static const uint8_t HFReadyTag = 'R';
|
Fixed compiler warnings in dd. | @@ -188,9 +188,12 @@ static int dd_verify(FAR const char *infile, FAR const char *outfile,
FAR struct dd_s *dd)
{
FAR uint8_t *buffer;
- int sector = 0;
+ unsigned sector = 0;
int ret = OK;
+ UNUSED(infile);
+ UNUSED(outfile);
+
ret = lseek(dd->infd, dd->skip ? dd->skip * dd->sectsize : 0, SEEK_SET);
if (ret < 0)
{
|
When compiling zlib after not found, always favor static under os/x / win32 | @@ -206,7 +206,7 @@ if(OPENEXR_FORCE_INTERNAL_ZLIB OR NOT ZLIB_FOUND)
file(MAKE_DIRECTORY "${zlib_INTERNAL_DIR}/include")
file(MAKE_DIRECTORY "${zlib_INTERNAL_DIR}/lib")
- if(BUILD_SHARED_LIBS AND NOT OPENEXR_FORCE_INTERNAL_ZLIB)
+ if(NOT (APPLE OR WIN32) AND BUILD_SHARED_LIBS AND NOT OPENEXR_FORCE_INTERNAL_ZLIB)
add_library(zlib_shared SHARED IMPORTED)
add_dependencies(zlib_shared zlib_external)
set_property(TARGET zlib_shared PROPERTY
@@ -222,7 +222,7 @@ if(OPENEXR_FORCE_INTERNAL_ZLIB OR NOT ZLIB_FOUND)
)
target_include_directories(zlib_static INTERFACE "${zlib_INTERNAL_DIR}/include")
- if (BUILD_SHARED_LIBS AND NOT OPENEXR_FORCE_INTERNAL_ZLIB)
+ if(NOT (APPLE OR WIN32) AND BUILD_SHARED_LIBS AND NOT OPENEXR_FORCE_INTERNAL_ZLIB)
add_library(ZLIB::ZLIB ALIAS zlib_shared)
else()
add_library(ZLIB::ZLIB ALIAS zlib_static)
|
Fix incorrect assumptions about the size of size_t | @@ -82,7 +82,7 @@ static void mbedtls_base64_cond_assign(unsigned char * dest, const unsigned char
*/
static unsigned char mbedtls_base64_eq(size_t in_a, size_t in_b)
{
- uint32_t difference = in_a ^ in_b;
+ size_t difference = in_a ^ in_b;
/* MSVC has a warning about unary minus on unsigned integer types,
* but this is well-defined and precisely what we want to do here. */
@@ -97,7 +97,9 @@ static unsigned char mbedtls_base64_eq(size_t in_a, size_t in_b)
#pragma warning( pop )
#endif
- difference >>= 31;
+ /* cope with the varying size of size_t per platform */
+ difference >>= ( sizeof( difference ) * 8 - 1 );
+
return (unsigned char) ( 1 ^ difference );
}
|
doc: fixes as suggested by | @@ -44,15 +44,13 @@ comment `# STDERR:`.
## Add a test
-To add a Markdown Shell Recorder test for a certain Markdown file, you use:
+To add a Markdown Shell Recorder test for a certain Markdown file, use the CMake function `add_msr_test`:
```
add_msr_test (name file)
```
-in a CMakeLists.txt.
-
-> Note that test cases executed with `add_msr_test` have the root of the source code repository as current working directory.
+> Note that test cases executed with `add_msr_test` use the root of the source code repository as current working directory.
`add_msr_test` also supports `REQUIRED_PLUGINS` which allows you to specify which plugins need to be present in order to
run the Markdown Shell Recorder test.
@@ -64,7 +62,7 @@ For example:
add_msr_test (tutorial_validation "${CMAKE_SOURCE_DIR}/doc/tutorials/validation.md" REQUIRED_PLUGINS validation)
```
-Adds the [validation tutorial](/doc/tutorials/validation.md) as Markdown Shell Recorder test and requires the plugin `validation` to be present.
+adds the [validation tutorial](/doc/tutorials/validation.md) as Markdown Shell Recorder test and requires the plugin `validation` to be present.
If the plugin is missing, the test will not be added.
@@ -108,7 +106,7 @@ All check start with a comment sign (`#`).
- `# RET: regex` This directive compares the return code (exit status) of the command to the value after `# RET:` . If not specified, the exit value is compared to `0`. The Shell Recorder uses **regular expressions** to compare the exit code, so an expression like `1|5` is also valid.
- `# ERROR: regex` Checks if the `kdb` command produced error `regex`. The text `regex` is a **regular expression** (e.g. `1|7` will check if the error `1` or the error `7` occurred).
- If you do not specify a regex, then the Markdown Shell Recorder will then check if the command printed nothing to the standard error output.
+ If you do not specify a regex, then the Markdown Shell Recorder will check if the command printed nothing to the standard error output.
- `# WARNINGS: csl` The Shell Recorder compares this **comma separated list** of numbers to the warnings thrown by a `kdb` command.
@@ -132,10 +130,10 @@ To get the output, use `-V` or `--output-on-failure`.
### Interactive Debugging
Sometimes you want to inspect what happens at a specific line within the Shell Recorder.
-These features require to use either
+This feature requires you to use either use
-- `ctest --interactive-debug-mode 1`
-- run the shell recorder directly, which can be done using
+- `ctest --interactive-debug-mode 1`, or
+- run the shell recorder directly, which can be done using (~e is the path to an Elektra checkout)
```
cd build
. ~e/scripts/run_dev_env
|
docs: add defaults for local rpm repos (xcat only) | @@ -37,6 +37,10 @@ domain_name="${domain_name:-local}"
# Path to copy of OS ISO image (xCAT recipe only)
iso_path="${iso_path:-}"
+# Path to local repository web roots (xCAT recipe only)
+ohpc_repo_dir="${ohpc_repo_dir:-/install/ohpc}"
+epel_repo_dir="${epel_repo_dir:-/install/epel}"
+
# Provisioning interface used by compute hosts (Warewulf recipe only)
eth_provision="${eth_provision:-eth0}"
|
remove this line. it will block pipelines without unit test | @@ -171,7 +171,6 @@ class UnitTestAssignTest(CIAssignTest.AssignTest):
test_cases.extend(get_test_cases_from_yml(self.test_case_path))
else:
print("Test case path is invalid. Should only happen when use @bot to skip unit test.")
- raise SystemExit(1)
# filter keys are lower case. Do map lower case keys with original keys.
try:
|
use "iat" for "timestamp" in session info hook | @@ -2808,7 +2808,7 @@ static int oidc_handle_remove_at_cache(request_rec *r, oidc_cfg *c) {
#define OIDC_HOOK_INFO_REQUEST "info"
#define OIDC_HOOK_INFO_FORMAT_JSON "json"
-#define OIDC_HOOK_INFO_TIMESTAMP "timestamp"
+#define OIDC_HOOK_INFO_TIMESTAMP "iat"
#define OIDC_HOOK_INFO_ACCES_TOKEN "access_token"
#define OIDC_HOOK_INFO_ACCES_TOKEN_EXP "access_token_expires"
#define OIDC_HOOK_INFO_USER_INFO "userinfo"
|
Have test/c/std/gif use frame background colors | @@ -875,15 +875,15 @@ const char* test_wuffs_gif_decode_background_color() {
wuffs_gif__decoder__set_quirk_enabled(
&dec, wuffs_gif__quirk_honor_background_color, q);
- wuffs_base__image_config ic = ((wuffs_base__image_config){});
+ wuffs_base__frame_config fc = ((wuffs_base__frame_config){});
wuffs_base__io_reader src_reader = wuffs_base__io_buffer__reader(&src);
- status = wuffs_gif__decoder__decode_image_config(&dec, &ic, src_reader);
+ status = wuffs_gif__decoder__decode_frame_config(&dec, &fc, src_reader);
if (status) {
- RETURN_FAIL("q=%d: decode_image_config: \"%s\"", q, status);
+ RETURN_FAIL("q=%d: decode_frame_config: \"%s\"", q, status);
}
wuffs_base__color_u32_argb_premul got =
- wuffs_base__image_config__background_color(&ic);
+ wuffs_base__frame_config__background_color(&fc);
wuffs_base__color_u32_argb_premul want = q ? 0xFF80C3C3 : 0x00000000;
if (got != want) {
|
declare rx_rate and tx_rate as uint16_t in sdr-transceiver.c | #include <arpa/inet.h>
volatile uint64_t *rx_data, *tx_data;
-volatile uint32_t *rx_freq, *rx_rate, *tx_freq, *tx_rate;
-volatile uint16_t *gpio, *rx_cntr, *tx_cntr;
+volatile uint32_t *rx_freq, *tx_freq;
+volatile uint16_t *gpio, *rx_rate, *rx_cntr, *tx_rate, *tx_cntr;
volatile uint8_t *rx_rst, *tx_rst;
int sock_thread[4] = {-1, -1, -1, -1};
@@ -85,12 +85,12 @@ int main(int argc, char *argv[])
rx_rst = ((uint8_t *)(cfg + 0));
rx_freq = ((uint32_t *)(cfg + 4));
- rx_rate = ((uint32_t *)(cfg + 8));
+ rx_rate = ((uint16_t *)(cfg + 8));
rx_cntr = ((uint16_t *)(sts + 0));
tx_rst = ((uint8_t *)(cfg + 1));
tx_freq = ((uint32_t *)(cfg + 12));
- tx_rate = ((uint32_t *)(cfg + 16));
+ tx_rate = ((uint16_t *)(cfg + 16));
tx_cntr = ((uint16_t *)(sts + 2));
/* set PTT pin to low */
|
baseboard/goroh/usbc_config.c: Format with clang-format
BRANCH=none
TEST=none | @@ -62,7 +62,6 @@ static int goroh_usb_c0_set_mux(const struct usb_mux *me, mux_state_t mux_state,
mux_state = mux_state ^ USB_PD_MUX_POLARITY_INVERTED;
return virtual_usb_mux_driver.set(me, mux_state, ack_required);
-
}
static int goroh_usb_c0_get_mux(const struct usb_mux *me,
@@ -128,7 +127,6 @@ void ppc_interrupt(enum gpio_signal signal)
syv682x_interrupt(1);
}
-
static void board_tcpc_init(void)
{
gpio_enable_interrupt(GPIO_USB_C0_FAULT_ODL);
|
Fix read-out-of-bounds bug. | @@ -92,7 +92,7 @@ arm_status arm_svdf_s8(const cmsis_nn_context *input_ctx,
memmove((q15_t *)state_data,
(q15_t *)state_data + 1,
- (size_t)(input_batches * feature_batches * time_batches * (int32_t)sizeof(int16_t)));
+ (size_t)((input_batches * feature_batches * time_batches - 1) * (int32_t)sizeof(int16_t)));
for (int i_batch = 0; i_batch < input_batches; i_batch++)
{
|
azure pipeline: try to add centos. | @@ -3,8 +3,10 @@ jobs:
timeoutInMinutes: 120
strategy:
matrix:
- linux:
- imageName: 'ubuntu-16.04'
+ ubuntu:
+ imageName: 'ubuntu-18.04'
+ centos:
+ imageName: 'OpenLogic:CentOS:7.5:latest'
mac:
imageName: 'macos-10.14'
# windows_2017:
|
add keyword EXTERNAL in JAVA_SRCS | @@ -103,6 +103,7 @@ def onjava_module(unit, *args):
'IDEA_EXCLUDE': extract_macro_calls(unit, 'IDEA_EXCLUDE_DIRS_VALUE', args_delim),
'GENERATE_SCRIPT': extract_macro_calls2(unit, 'GENERATE_SCRIPT_VALUE'),
}
+
if unit.get('JAVA_ADD_DLLS_VALUE') == 'yes':
data['ADD_DLLS_FROM_DEPENDS'] = extract_macro_calls(unit, 'JAVA_ADD_DLLS_VALUE', args_delim)
@@ -121,6 +122,29 @@ def onjava_module(unit, *args):
for p in dm_paths:
unit.oninternal_recurse(p)
+ for java_srcs_args in data['JAVA_SRCS']:
+ external = None
+
+ for i in xrange(len(java_srcs_args)):
+ arg = java_srcs_args[i]
+
+ if arg == 'EXTERNAL':
+ if not i + 1 < len(java_srcs_args):
+ continue # TODO configure error
+
+ ex = java_srcs_args[i + 1]
+
+ if ex in ('EXTERNAL', 'SRCDIR', 'PACKAGE_PREFIX', 'EXCLUDE'):
+ continue # TODO configure error
+
+ if external is not None:
+ continue # TODO configure error
+
+ external = ex
+
+ if external:
+ unit.oninternal_recurse(external)
+
for k, v in data.items():
if not v:
data.pop(k)
|
FIB: do debug before remvoing last source | @@ -1111,10 +1111,10 @@ fib_entry_special_remove (fib_node_index_t fib_entry_index,
best_source = fib_entry_src_get_source(bsrc);
bflags = fib_entry_src_get_flags(bsrc);
- sflag = fib_entry_src_action_remove_or_update_inherit(fib_entry, source);
-
FIB_ENTRY_DBG(fib_entry, "special remove:%U", format_fib_source, source);
+ sflag = fib_entry_src_action_remove_or_update_inherit(fib_entry, source);
+
/*
* if the path list for the source passed is invalid,
* then we need to create a new one. else we are updating
|
Disable EXPRECISION and add -lm on OSX (same as the BSDs and Linux) | @@ -8,7 +8,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(NO_EXPRECISION 1)
endif ()
-if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|OpenBSD|NetBSD|DragonFly")
+if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|OpenBSD|NetBSD|DragonFly|Darwin")
set(EXTRALIB "${EXTRALIB} -lm")
set(NO_EXPRECISION 1)
endif ()
|
Remove build warning about ftime being deprecated. | #include <stddef.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/timeb.h>
#include <time.h>
#include "dbg.h"
@@ -319,9 +318,9 @@ rateLimitMessage(proc_id_t *proc, watch_t src)
{
event_format_t event;
- struct timeb tb;
- ftime(&tb);
- event.timestamp = tb.time + tb.millitm/1000;
+ struct timespec ts;
+ clock_gettime(CLOCK_REALTIME, &ts);
+ event.timestamp = ts.tv_sec + ts.tv_nsec/1000000000;
event.src = "notice";
event.proc = proc;
event.uid = 0ULL;
@@ -421,7 +420,6 @@ static cJSON *
evtFormatHelper(evt_fmt_t *evt, event_t *metric, uint64_t uid, proc_id_t *proc, watch_t src)
{
event_format_t event;
- struct timeb tb;
time_t now;
regex_t *filter;
@@ -456,8 +454,9 @@ evtFormatHelper(evt_fmt_t *evt, event_t *metric, uint64_t uid, proc_id_t *proc,
return NULL;
}
- ftime(&tb);
- event.timestamp = tb.time + tb.millitm/1000;
+ struct timespec ts;
+ clock_gettime(CLOCK_REALTIME, &ts);
+ event.timestamp = ts.tv_sec + ts.tv_nsec/1000000000;
event.src = metric->name;
event.proc = proc;
event.uid = uid;
@@ -487,7 +486,6 @@ evtFormatLog(evt_fmt_t *evt, const char *path, const void *buf, size_t count,
uint64_t uid, proc_id_t* proc)
{
event_format_t event;
- struct timeb tb;
watch_t logType;
if (!evt || !path || !buf || !proc) return NULL;
@@ -505,8 +503,9 @@ evtFormatLog(evt_fmt_t *evt, const char *path, const void *buf, size_t count,
return NULL;
}
- ftime(&tb);
- event.timestamp = tb.time + tb.millitm/1000;
+ struct timespec ts;
+ clock_gettime(CLOCK_REALTIME, &ts);
+ event.timestamp = ts.tv_sec + ts.tv_nsec/1000000000;
event.src = path;
event.proc = proc;
event.uid = uid;
|
Refactoring common.c
Added forgotten defines | #define STM32_F3_OPTION_BYTES_BASE ((uint32_t)0x1FFFF800)
#define STM32_G4_OPTION_BYTES_BASE ((uint32_t)0x1FFFF800)
+#define STM32F0_DBGMCU_CR 0xE0042004
+#define STM32F0_DBGMCU_CR_IWDG_STOP 8
+#define STM32F0_DBGMCU_CR_WWDG_STOP 9
+
+#define STM32F4_DBGMCU_APB1FZR1 0xE0042008
+#define STM32F4_DBGMCU_APB1FZR1_WWDG_STOP 11
+#define STM32F4_DBGMCU_APB1FZR1_IWDG_STOP 12
+
+#define STM32L0_DBGMCU_APB1_FZ 0x40015808
+#define STM32L0_DBGMCU_APB1_FZ_WWDG_STOP 11
+#define STM32L0_DBGMCU_APB1_FZ_IWDG_STOP 12
+
+#define STM32H7_DBGMCU_APB1HFZ 0x5C001054
+#define STM32H7_DBGMCU_APB1HFZ_IWDG_STOP 18
+
+#define STM32WB_DBGMCU_APB1FZR1 0xE004203C
+#define STM32WB_DBGMCU_APB1FZR1_WWDG_STOP 11
+#define STM32WB_DBGMCU_APB1FZR1_IWDG_STOP 12
+
+#define STM32F1_RCC_AHBENR 0x40021014
+#define STM32F1_RCC_DMAEN 0x00000003 // DMA2EN | DMA1EN
+
+#define STM32F4_RCC_AHB1ENR 0x40023830
+#define STM32F4_RCC_DMAEN 0x00600000 // DMA2EN | DMA1EN
+
+#define STM32G0_RCC_AHBENR 0x40021038
+#define STM32G0_RCC_DMAEN 0x00000003 // DMA2EN | DMA1EN
+
+#define STM32G4_RCC_AHB1ENR 0x40021048
+#define STM32G4_RCC_DMAEN 0x00000003 // DMA2EN | DMA1EN
+
+#define STM32L0_RCC_AHBENR 0x40021030
+#define STM32L0_RCC_DMAEN 0x00000001 // DMAEN
+
+#define STM32H7_RCC_AHB1ENR 0x58024538
+#define STM32H7_RCC_DMAEN 0x00000003 // DMA2EN | DMA1EN
+
+#define STM32WB_RCC_AHB1ENR 0x58000048
+#define STM32WB_RCC_DMAEN 0x00000003 // DMA2EN | DMA1EN
+
#endif // STM32_H
|
interface: fix group feed unread count
Fixes urbit/landscape#1258 | @@ -54,7 +54,7 @@ export function SidebarListHeader(props: {
const feedPath = groupPath ? getFeedPath(associations.groups[groupPath]) : undefined;
const unreadCount = useHarkState(
- s => s.unreads?.graph?.[feedPath ?? '']?.['/']?.unreads as number ?? 0
+ s => s.unreads?.[`/graph/${feedPath.slice(6)}` ?? '']?.count as number ?? 0
);
return (
|
cirrus: undo gradle upgrade due to | @@ -59,7 +59,7 @@ RUN mkdir -p ${GTEST_ROOT} \
&& rm gtest.tar.gz
# download and install gradle
-RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-7.2-bin.zip && unzip gradle-7.2-bin.zip && rm gradle-7.2-bin.zip && mv gradle-7.2 /opt/gradle
+RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-7.1.1-bin.zip && unzip gradle-7.1.1-bin.zip && rm gradle-7.1.1-bin.zip && mv gradle-7.1.1 /opt/gradle
ENV PATH "${PATH}:/opt/gradle/bin"
ENV JAVA_HOME=/etc/alternatives/jre
RUN alternatives --auto java && alternatives --auto javac
|
CODINGSTYLE: Add link to libutil
Format reference to libutil in code style and add link to its subdirectory.
Acked-by: Michael Holzheu | Coding guidelines for s390-tools
================================
-For s390-tools the preferred language is C. We provide libraries, e.g. libutil
-that should be used by all tools if possible.
+For s390-tools the preferred language is C. We provide libraries, e.g.
+[`libutil`](libutil) that should be used by all tools if possible.
The coding style is based on the Linux kernel guidelines. Therefore, use
the checkpatch tool for verification before you submit a patch:
|
Fix Work CD-CI
Fix build vars overide for PRs. | @@ -19,6 +19,7 @@ steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
- script: Write-Host "$("##vso[task.setvariable variable=NBGV_AssemblyFileVersion]")0.0.0.$env:System_PullRequest_PullRequestNumber"
+ script: Write-Host "$("##vso[task.setvariable variable=NBGV_Version]")0.0.0"
+ script: Write-Host "$("##vso[task.setvariable variable=NBGV_VersionHeight]")$env:System_PullRequest_PullRequestNumber"
condition: eq(variables['system.pullrequest.isfork'], true)
displayName: Set temporary build number
|
app/examples: Add a dup function to a procfs test case.
To increase procfs code coverages, dup() is added to a procfs TC. | @@ -211,6 +211,7 @@ static int procfs_rewind_tc(const char *dirpath)
return OK;
}
+
#if defined(CONFIG_FS_SMARTFS) && !defined(CONFIG_SMARTFS_MULTI_ROOT_DIRS) && !defined(CONFIG_BUILD_PROTECTED)
void tc_fs_smartfs_mksmartfs(void)
{
@@ -236,6 +237,9 @@ void tc_fs_smartfs_procfs_main(void)
fd = open(PROC_SMARTFS_PATH, O_RDONLY);
TC_ASSERT_GEQ("open", fd, 0);
+ ret = dup(fd);
+ TC_ASSERT_GEQ("dup", ret, 0);
+
ret = close(fd);
TC_ASSERT_EQ("close", ret, OK);
|
[core] remove cygwin O_NOFOLLOW workaround
cygwin O_NOFOLLOW fixed in cygwin 3.4.5-1
x-ref:
[ANNOUNCEMENT] cygwin 3.4.5-1
Fix an uninitialized variable having weird side-effects in path handling. | @@ -171,10 +171,6 @@ int fdevent_dup_cloexec (int fd) {
#endif
int fdevent_open_cloexec(const char *pathname, int symlinks, int flags, mode_t mode) {
-#ifdef __CYGWIN__ /* broken in current cygwin; fixed in cygwin test */
-#undef O_NOFOLLOW
-#define O_NOFOLLOW 0
-#endif
if (!symlinks) flags |= O_NOFOLLOW;
#ifdef O_CLOEXEC
return open(pathname, flags | O_CLOEXEC | FDEVENT_O_FLAGS, mode);
|
messages: PR fixes
fixes urbit/landscape#497 | -import React, { ReactElement, ReactNode, useRef, useEffect, useState } from 'react';
+import React, { ReactElement, ReactNode, useState, useCallback } from 'react';
import { Icon, Box, Col, Text } from '@tlon/indigo-react';
import styled from 'styled-components';
import { Link, useHistory } from 'react-router-dom';
@@ -37,7 +37,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement {
const groups = useGroupState(state => state.groups);
const group = groups[association.group];
let workspace = association.group;
- const actionsRef = useRef(null);
+ const history = useHistory();
const [actionsWidth, setActionsWidth] = useState(0);
if (group?.hidden && app === 'chat') {
@@ -182,11 +182,9 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement {
</Link>
);
- useEffect(() => {
- if (actionsRef.current) {
- setActionsWidth(actionsRef.current.clientWidth);
- }
- }, [actionsRef]);
+ const actionsRef = useCallback((actionsRef) => {
+ setActionsWidth(actionsRef?.getBoundingClientRect().width);
+ }, []);
return (
<Col width='100%' height='100%' overflow='hidden'>
@@ -218,7 +216,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement {
flexShrink='0'
ref={actionsRef}
>
- <ExtraControls />
+ {ExtraControls()}
<MenuControl />
</Box>
</Box>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.