message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
|---|---|
json BUGFIX provided value in case of JSON [null]
instead of the pointer into the parsed data ("null]"), return just an
empty string "".
|
@@ -578,7 +578,7 @@ lyjson_value(struct lyjson_ctx *jsonctx)
} else if ((*jsonctx->in->current == 'n') && !strncmp(jsonctx->in->current, "null", ly_strlen_const("null"))) {
/* none */
- lyjson_ctx_set_value(jsonctx, jsonctx->in->current, 0, 0);
+ lyjson_ctx_set_value(jsonctx, "", 0, 0);
ly_in_skip(jsonctx->in, ly_strlen_const("null"));
JSON_PUSH_STATUS_RET(jsonctx, LYJSON_NULL);
LY_CHECK_RET(lyjson_check_next(jsonctx));
|
tests: runtime: filter_modify: add a conditional chaining test
|
@@ -26,13 +26,13 @@ static int cb_check_result(void *record, size_t size, void *data)
flb_error("Expected to find: '%s' in result '%s'",
expected, result);
}
- flb_free(record);
-
/*
* If you want to debug your test
*
* printf("Expect: '%s' in result '%s'", expected, result);
*/
+
+ flb_free(record);
return 0;
}
@@ -1004,6 +1004,65 @@ static void flb_test_cond_matching_keys_do_not_have_matching_values()
filter_test_destroy(ctx);
}
+/* Test all operations */
+static void flb_test_cond_chain()
+{
+ int len;
+ int ret;
+ int bytes;
+ char *p;
+ struct flb_lib_out_cb cb_data;
+ struct filter_test *ctx;
+
+ /* Create test context */
+ ctx = filter_test_create((void *) &cb_data);
+ if (!ctx) {
+ exit(EXIT_FAILURE);
+ }
+
+ /* Configure filter */
+ ret = flb_filter_set(ctx->flb, ctx->f_ffd,
+ "condition", "key_exists k1",
+ "condition", "key_does_not_exist k2",
+ "add", "k2 sample_2",
+ "condition", "a_key_matches ^[a-z]1$",
+ "add", "k3 3",
+ "condition", "no_key_matches ^[0-9]$",
+ "condition", "key_value_equals k1 sample",
+ "add", "k4 4",
+ "condition", "key_value_does_not_equal k1 sampl",
+ "condition", "key_value_matches k1 ^[a-z]+$",
+ "condition", "key_value_does_not_match k1 aa",
+
+ "condition",
+ "matching_keys_have_matching_values " \
+ "^[a-z][0-9]$ ^[a-z]+$",
+
+ "condition",
+ "matching_keys_do_not_have_matching_values " \
+ "^[a-z][0-9]$ ^[a-z][0-9]$",
+
+ "add", "k5 5",
+ NULL);
+ TEST_CHECK(ret == 0);
+
+ /* Prepare output callback with expected result */
+ cb_data.cb = cb_check_result;
+ cb_data.data = "\"k5\":\"5\"";
+
+ /* Start the engine */
+ ret = flb_start(ctx->flb);
+ TEST_CHECK(ret == 0);
+
+ /* Ingest data samples */
+ p = "[0, {\"k1\":\"sample\"}]";
+ len = strlen(p);
+ bytes = flb_lib_push(ctx->flb, ctx->i_ffd, p, len);
+ TEST_CHECK(bytes == len);
+
+ filter_test_destroy(ctx);
+}
+
TEST_LIST = {
/* Operations / Commands */
{"op_set_append" , flb_test_op_set_append },
@@ -1034,5 +1093,6 @@ TEST_LIST = {
{"cond_matching_keys_do_not_have_matching_values",
flb_test_cond_matching_keys_do_not_have_matching_values },
+ {"cond_chain", flb_test_cond_chain },
{NULL, NULL}
};
|
ExtendedServices: Remove unused handle
|
@@ -35,32 +35,35 @@ VOID NTAPI MenuItemCallback(
{
PPH_PLUGIN_MENU_ITEM menuItem = Parameter;
+ if (!menuItem)
+ return;
+
switch (menuItem->Id)
{
case ID_SERVICE_GOTOSERVICE:
{
- ProcessHacker_SelectTabPage(PhMainWndHandle, 1);
- ProcessHacker_SelectServiceItem(PhMainWndHandle, (PPH_SERVICE_ITEM)menuItem->Context);
+ ProcessHacker_SelectTabPage(menuItem->OwnerWindow, 1);
+ ProcessHacker_SelectServiceItem(menuItem->OwnerWindow, (PPH_SERVICE_ITEM)menuItem->Context);
}
break;
case ID_SERVICE_START:
{
- PhUiStartService(PhMainWndHandle, (PPH_SERVICE_ITEM)menuItem->Context);
+ PhUiStartService(menuItem->OwnerWindow, (PPH_SERVICE_ITEM)menuItem->Context);
}
break;
case ID_SERVICE_CONTINUE:
{
- PhUiContinueService(PhMainWndHandle, (PPH_SERVICE_ITEM)menuItem->Context);
+ PhUiContinueService(menuItem->OwnerWindow, (PPH_SERVICE_ITEM)menuItem->Context);
}
break;
case ID_SERVICE_PAUSE:
{
- PhUiPauseService(PhMainWndHandle, (PPH_SERVICE_ITEM)menuItem->Context);
+ PhUiPauseService(menuItem->OwnerWindow, (PPH_SERVICE_ITEM)menuItem->Context);
}
break;
case ID_SERVICE_STOP:
{
- PhUiStopService(PhMainWndHandle, (PPH_SERVICE_ITEM)menuItem->Context);
+ PhUiStopService(menuItem->OwnerWindow, (PPH_SERVICE_ITEM)menuItem->Context);
}
break;
case ID_SERVICE_RESTART:
@@ -71,7 +74,7 @@ VOID NTAPI MenuItemCallback(
if (serviceHandle = PhOpenService(serviceItem->Name->Buffer, SERVICE_QUERY_STATUS))
{
- EsRestartServiceWithProgress(PhMainWndHandle, serviceItem, serviceHandle);
+ EsRestartServiceWithProgress(menuItem->OwnerWindow, serviceItem, serviceHandle);
CloseServiceHandle(serviceHandle);
}
else
@@ -82,7 +85,7 @@ VOID NTAPI MenuItemCallback(
if (win32Result != ERROR_SUCCESS)
{
PhShowStatus(
- PhMainWndHandle,
+ menuItem->OwnerWindow,
PhaFormatString(L"Unable to restart %s", serviceItem->Name->Buffer)->Buffer,
0,
win32Result
|
Don't monitor kernel rules.
This is a remainder from the disambiguation code, which was removed
back in 2020.
|
@@ -39,7 +39,6 @@ THE SOFTWARE.
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-#include <linux/fib_rules.h>
#include <net/if_arp.h>
/* From <linux/if_bridge.h> */
@@ -668,13 +667,9 @@ kernel_setup_socket(int setup)
| rtnlgrp_to_mask(RTNLGRP_IPV4_ROUTE)
| rtnlgrp_to_mask(RTNLGRP_LINK)
| rtnlgrp_to_mask(RTNLGRP_IPV4_IFADDR)
- | rtnlgrp_to_mask(RTNLGRP_IPV6_IFADDR)
- /* We monitor rules, because it can be change by third parties. For example
- a /etc/init.d/network restart on OpenWRT flush the rules. */
- | rtnlgrp_to_mask(RTNLGRP_IPV4_RULE)
- | rtnlgrp_to_mask(RTNLGRP_IPV6_RULE));
+ | rtnlgrp_to_mask(RTNLGRP_IPV6_IFADDR));
if(rc < 0) {
- perror("netlink_socket(_ROUTE | _LINK | _IFADDR | _RULE)");
+ perror("netlink_socket(_ROUTE | _LINK | _IFADDR)");
kernel_socket = -1;
return -1;
}
@@ -1340,17 +1335,6 @@ kernel_dump(int operation, struct kernel_filter *filter)
return -1;
}
- memset(&g, 0, sizeof(g));
- g.rtgen_family = families[i];
- if(operation & CHANGE_RULE) {
- rc = netlink_send_dump(RTM_GETRULE, &g, sizeof(g));
- if(rc < 0)
- return -1;
-
- rc = netlink_read(&nl_command, NULL, 1, filter);
- if(rc < 0)
- return -1;
- }
}
if(operation & CHANGE_ADDR) {
|
socket-connect.c: print "Trying hostname:port (ip)" or "ip:port"
|
@@ -90,6 +90,8 @@ gftp_connect_server_with_getaddrinfo (gftp_request * request, char *service,
unsigned int proxy_port)
{
struct addrinfo *res, *hostp, *current_hostp;
+ struct sockaddr_in * addrin;
+ char ipstr[128], * hostname;
unsigned int port;
int sock = -1;
struct timeval timeout;
@@ -116,16 +118,31 @@ gftp_connect_server_with_getaddrinfo (gftp_request * request, char *service,
continue;
}
+ *ipstr = 0;
+ hostname = res[0].ai_canonname;
+
+ if (res->ai_addr->sa_family == AF_INET) {
+ addrin = (struct sockaddr_in *) res->ai_addr;
+ snprintf (ipstr, sizeof(ipstr)-1, "%s", inet_ntoa(addrin->sin_addr));
+ if (hostname && (strcmp(hostname, ipstr) == 0)) {
+ hostname = ipstr;
+ }
+ }
+ if (!hostname || (hostname == ipstr)) {
+ hostname = hostname ? hostname : ipstr;
request->logging_function (gftp_logging_misc, request,
- _("Trying %s:%d\n"), res[0].ai_canonname,
- port);
+ _("Trying %s:%d\n"), hostname, port);
+ } else {
+ request->logging_function (gftp_logging_misc, request,
+ _("Trying %s:%d (%s)\n"), hostname, port, ipstr);
+ }
setsockopt (sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout));
if (connect (sock, res->ai_addr, res->ai_addrlen) == -1)
{
request->logging_function (gftp_logging_error, request,
_("Cannot connect to %s: %s\n"),
- res[0].ai_canonname, g_strerror (errno));
+ hostname, g_strerror (errno));
close (sock);
switch (errno)
{
|
Add comment to rationale this if statement
|
@@ -937,7 +937,7 @@ lwespi_parse_received(lwesp_recv_t* rcv) {
}
}
} else if (CMD_IS_CUR(LWESP_CMD_TCPIP_CIPSTART)) {
-
+ /* Do nothing, it is either OK or not OK */
} else if (CMD_IS_CUR(LWESP_CMD_TCPIP_CIPSEND)) {
if (is_ok) { /* Check for OK and clear as we have to check for "> " statement after OK */
is_ok = 0; /* Do not reach on OK */
|
Params from text to allow zero length value fields
|
@@ -107,6 +107,7 @@ static int construct_from_text(OSSL_PARAM *to, const OSSL_PARAM *paramdef,
if (buf == NULL)
return 0;
+ if (buf_n > 0) {
switch (paramdef->data_type) {
case OSSL_PARAM_INTEGER:
case OSSL_PARAM_UNSIGNED_INTEGER:
@@ -146,10 +147,10 @@ static int construct_from_text(OSSL_PARAM *to, const OSSL_PARAM *paramdef,
return 0;
} else {
memcpy(buf, value, buf_n);
-
}
break;
}
+ }
*to = *paramdef;
to->data = buf;
@@ -209,7 +210,7 @@ int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to,
¶mdef, &ishex, &buf_n, &tmpbn))
return 0;
- if ((buf = OPENSSL_malloc(buf_n)) == NULL) {
+ if ((buf = OPENSSL_zalloc(buf_n > 0 ? buf_n : 1)) == NULL) {
CRYPTOerr(0, ERR_R_MALLOC_FAILURE);
return 0;
}
@@ -217,5 +218,7 @@ int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to,
ok = construct_from_text(to, paramdef, value, value_n, ishex,
buf, buf_n, tmpbn);
BN_free(tmpbn);
+ if (!ok)
+ OPENSSL_free(buf);
return ok;
}
|
Remove obsolete thread count check.
|
@@ -435,7 +435,6 @@ static void CalcBestScore(const TTrainingForCPUDataProviders& data,
TCandidateList* candidateList,
TFold* fold,
TLearnContext* ctx) {
- CB_ENSURE(static_cast<ui32>(ctx->LocalExecutor->GetThreadCount()) == ctx->Params.SystemOptions->NumThreads - 1);
const TFlatPairsInfo pairs = UnpackPairsFromQueries(fold->LearnQueriesInfo);
TCandidateList& candList = *candidateList;
ctx->LocalExecutor->ExecRange([&](int id) {
|
doc: improve sentence
see
|
@@ -84,7 +84,7 @@ You have some options to avoid running them as root:
3. Compile Elektra so that system paths are not actual system paths, e.g. to write everything into
the home directory (`~`) use cmake options:
`-DKDB_DB_SYSTEM="~/.config/kdb/system" -DKDB_DB_SPEC="~/.config/kdb/spec"`
- (for another example with ini see `scripts/configure-home`)
+ (for an example of a full CMake invocation see `scripts/configure-home`)
4. Use the XDG resolver (see `scripts/configure-xdg`) and set
the environment variable `XDG_CONFIG_DIRS`, currently lacks `spec` namespaces, see #734.
|
Removed TODO (completed by 7f6e928)
|
@@ -257,7 +257,6 @@ void generateInstruction(sCurStatus *curStatusPtr, int vertex, glsl_t *glsl, sIn
}
// Instruction variable pushing
- // TODO: MOV, LG2 and similar use only (a) specific component(s) (mask), optimize generated code
#define PUSH_MASKDST(i) \
PUSH_VARNAME(i) \
PUSH_DSTMASK(i, i)
|
Add static build assert to celix properties iterator
|
@@ -470,6 +470,8 @@ int celix_properties_size(const celix_properties_t *properties) {
celix_properties_iterator_t celix_propertiesIterator_construct(const celix_properties_t *properties) {
celix_properties_iterator_t iter;
+ CELIX_BUILD_ASSERT(sizeof(celix_properties_iterator_t) == sizeof(hash_map_iterator_t));
+ CELIX_BUILD_ASSERT(__alignof__(celix_properties_iterator_t) == __alignof__(hash_map_iterator_t));
hash_map_iterator_t mapIter = hashMapIterator_construct((hash_map_t*)properties);
iter._data1 = mapIter.map;
iter._data2 = mapIter.next;
|
fix-website-build... Got it working! Cleanup the debug a bit.
|
@@ -4,29 +4,23 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}
-# for debugging
-ls -al $HOME
-env
-
# nvm is provided by the runner, but needs to be setup for this shell env
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
+nvm --version
-# for debugging
-env
-
-# use nvm to control the version of node used
-echo "versions originally provided by the environment..."
+echo "npm and node versions originally provided..."
npm --version
node --version
-nvm --version | true
+
+# use nvm to control the version of node used
nvm install 14.18.1
nvm use 14.18.1
-echo "versions we're going to use..."
+
+echo "npm and node versions we're going to use..."
npm --version
node --version
-nvm --version
npm ci
npx gatsby build
|
filter_parser: validate return value when expanding map
|
@@ -222,6 +222,12 @@ static int cb_parser_filter(void *data, size_t bytes,
ret = flb_msgpack_expand_map(out_buf, out_size,
append_arr, append_arr_len,
&new_buf, &new_size);
+ if (ret == -1) {
+ flb_error("[filter_parser] cannot expand map");
+ msgpack_unpacked_destroy(&result);
+ return FLB_FILTER_NOTOUCH;
+ }
+
flb_free(out_buf);
out_buf = new_buf;
out_size = new_size;
|
raspberrypi4.conf: The firmware uses kernel7l.img when LPAE is supported
|
@@ -11,7 +11,8 @@ MACHINE_EXTRA_RRECOMMENDS += "\
bluez-firmware-rpidistro-bcm4345c0-hcd \
"
-SDIMG_KERNELIMAGE ?= "kernel7.img"
+# 'l' stands for LPAE
+SDIMG_KERNELIMAGE ?= "kernel7l.img"
UBOOT_MACHINE = "rpi_4_32b_config"
SERIAL_CONSOLES ?= "115200;ttyS0"
|
SOVERSION bump to version 2.24.21
|
@@ -66,7 +66,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 24)
-set(LIBYANG_MICRO_SOVERSION 20)
+set(LIBYANG_MICRO_SOVERSION 21)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
Fix crash when global functions didn't have a return and arguments being shifted by 1
|
@@ -166,8 +166,8 @@ sol::object Scripting::Execute(const std::string& aFuncName, sol::variadic_args
{
auto arg = aArgs[i];
- auto* pType = *reinterpret_cast<RED4ext::REDreverse::CRTTIBaseType**>(pFunc->params.unk0[i]);
- args[i].type = pType;
+ auto* pType = *reinterpret_cast<RED4ext::REDreverse::CRTTIBaseType**>(pFunc->params.unk0[i + 1]);
+ args[i + 1].type = pType;
if (pType == pStringType)
{
@@ -175,13 +175,13 @@ sol::object Scripting::Execute(const std::string& aFuncName, sol::variadic_args
auto* pMemory = _malloca(sizeof(RED4ext::REDreverse::CString));
auto* pString = new (pMemory) RED4ext::REDreverse::CString{ sstr.c_str() };
- args[i].value = pString;
+ args[i + 1].value = pString;
}
else if (pType == pInt32Type)
{
auto* pMemory = static_cast<int32_t*>(_malloca(sizeof(int32_t)));
*pMemory = arg.get<int32_t>();
- args[i].value = pMemory;
+ args[i + 1].value = pMemory;
}
else
{
@@ -207,8 +207,11 @@ sol::object Scripting::Execute(const std::string& aFuncName, sol::variadic_args
Ref returnBuffer;
CStackType result;
+ if (hasReturnType)
+ {
result.value = &returnBuffer;
result.type = *pFunc->returnType;
+ }
std::aligned_storage_t<sizeof(RED4ext::REDreverse::CScriptableStackFrame), alignof(RED4ext::REDreverse::CScriptableStackFrame)> stackStore;
auto* stack = reinterpret_cast<RED4ext::REDreverse::CScriptableStackFrame*>(&stackStore);
@@ -225,5 +228,8 @@ sol::object Scripting::Execute(const std::string& aFuncName, sol::variadic_args
if (!success)
return make_object(m_lua, nullptr);
+ if (!hasReturnType)
+ return make_object(m_lua, true);
+
return make_object(m_lua, returnBuffer.ref);
}
|
Add detailed pin mapping explanation to underglow docs
* Update underglow.md
Updated the documentation according to my current understandring of how to pin-mapping works, also split the chapter into a nrf-section and a non-nrf-section since that information isn't applicable to both
* Ran prettier and updated pin reference according to suggestion
|
@@ -55,10 +55,16 @@ If you have a shield with RGB underglow, you must add a `boards/` directory with
Inside the `boards/` folder, you define a `<board>.overlay` for each different board.
For example, the Kyria shield has a `boards/nice_nano.overlay` file that defines the RGB underglow for the `nice_nano` board specifically.
-The first step to adding support for underglow is to select you SPI output. With nRF52 boards, you can just use `&spi1` and define the pins you want to use.
-For other boards, you must select an SPI definition that has the `MOSI` pin as your data pin going to your LED strip.
+### nRF52-based boards
+
+With nRF52 boards, you can just use `&spi1` and define the pins you want to use.
+
+To identify which pin number you need to put in the config you need do to a bit of math. You need the hardware port and run it through a function.
+**32 \* X + Y** = `<Pin number>` where X is first part of the hardware port "PX.01" and Y is the second part of the hardware port "P1.Y".
+
+(_P1.13_ would give you _32 \* 1 + 13_ = `<45>` and P0.15 would give you _32 \* 0 + 15_ = `<15>`)
-Here's an example of an nRF52 SPI definition:
+Here's an example on a definition that uses P0.06:
```
&spi1 {
@@ -87,11 +93,15 @@ Here's an example of an nRF52 SPI definition:
:::info
-If you are configuring SPI for an nRF52840 (or other nRF52) based board, double check that you are using pins that aren't restricted to low frequency I/O.
-Ignoring these restrictions may result in poor wireless performance. You can find the list of low frequency I/O pins [here](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fpin.html&cp=4_0_0_6_0).
+If you are configuring SPI for an nRF52 based board, double check that you are using pins that aren't restricted to low frequency I/O.
+Ignoring these restrictions may result in poor wireless performance. You can find the list of low frequency I/O pins for the nRF52840 [here](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fpin.html&cp=4_0_0_6_0).
:::
+### Other boards
+
+For other boards, you must select an SPI definition that has the `MOSI` pin as your data pin going to your LED strip.
+
Here's another example for a non-nRF52 board on `spi1`:
```
|
Babelstream: add CCC_OVERRIDE_OPTIONS check before setting -DOMP_TARGET_FAST_DOT
Check if new runtime is disabled via:
CCC_OVERRIDE_OPTIONS='+-fno-openmp-target-new-runtime'
Don't set -DOMP_TARGET_FAST_DOT if new runtime is disabled.
|
@@ -95,7 +95,14 @@ for option in $RUN_OPTIONS; do
elif [ "$option" == "no_loop" ]; then
# FAST_DOT requires merge of http://gerrit-git.amd.com/c/lightning/ec/llvm-project/+/705744
$AOMP/bin/llvm-nm $AOMP/lib/libomptarget-new-amdgpu-gfx906.bc | grep kmpc_xteam_sum_d >/dev/null
- [ $? == 0 ] && omp_flags+=" -DOMP_TARGET_FAST_DOT"
+ FAST_DOT_STATUS=$?
+ # Check if new runtime is disabled via CCC_OVERRIDE_OPTIONS
+ # Set new runtime status = 0 if new runtime has not been disabled
+ echo "Checking CCC_OVERRIDE_OPTIONS"
+ echo $CCC_OVERRIDE_OPTIONS | grep -ve '+-fno-openmp-target-new-runtime'
+ NEW_RT_STATUS=$?
+ FAST_DOT_STATUS=$((FAST_DOT_STATUS+NEW_RT_STATUS))
+ [ $FAST_DOT_STATUS == 0 ] && omp_flags+=" -DOMP_TARGET_FAST_DOT"
omp_flags+=" -fopenmp-target-ignore-env-vars"
omp_flags+=" -fopenmp-assume-no-thread-state"
omp_flags+=" -fopenmp-target-new-runtime"
|
Fix RX GFIR setup for R3 chip
|
@@ -168,7 +168,13 @@ int LMS7_Device::ConfigureGFIR(bool enabled,bool tx, double bandwidth, size_t ch
lms->Modify_SPI_Reg_bits(LMS7param(GFIR1_BYP_RXTSP), enabled == false, true);
lms->Modify_SPI_Reg_bits(LMS7param(GFIR2_BYP_RXTSP), enabled == false, true);
lms->Modify_SPI_Reg_bits(LMS7param(GFIR3_BYP_RXTSP), enabled == false, true);
-
+ if (lms->Get_SPI_Reg_bits(LMS7_MASK, true) != 0)
+ {
+ if (ch%2)
+ lms->Modify_SPI_Reg_bits(LMS7param(CDSN_RXBTSP), enabled == false, true);
+ else
+ lms->Modify_SPI_Reg_bits(LMS7param(CDSN_RXATSP), enabled == false, true);
+ }
}
if (bandwidth < 0)
|
test: fix ethereum test case
test_005ParametersSet_0002SetNonceSuccess
|
@@ -285,9 +285,14 @@ START_TEST(test_005ParametersSet_0002SetNonceSuccess)
TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS);
ck_assert(rtnVal == BOAT_SUCCESS);
- rtnVal = BoatEthTxSetNonce(&tx_ptr, 0x01);
+ rtnVal = BoatEthTxSetNonce(&tx_ptr, 0xA1);
+ BoatFieldMax32B NONCE;
+ NONCE.field_len = UtilityHexToBin(NONCE.field, 32, "0xA1",
+ TRIMBIN_LEFTTRIM, BOAT_TRUE);
+ ck_assert(rtnVal == BOAT_SUCCESS);
+ rtnVal = string_eq_check(tx_ptr.rawtx_fields.nonce.field, NONCE.field,
+ tx_ptr.rawtx_fields.nonce.field_len, NONCE.field_len);
ck_assert(rtnVal == BOAT_SUCCESS);
-// ck_assert_int_eq(tx_ptr.rawtx_fields.nonce);
BoatIotSdkDeInit();
}
END_TEST
|
possibly fixed all the bugs notsure sob
|
@@ -89,34 +89,27 @@ for bp in range(len(beatmap_info)):
repeatedTime.append(beatmap_info[bp]["repeated"])
durationTime.append(beatmap_info[bp]["duration"])
endTime.append(beatmap_info[bp]["end time"])
- #print(beatmap_info[bp]["duration"] + beatmap_info[bp]["time"] * beatmap_info[bp]["repeated"])
for x in range(len(my_info)):
start_index = int(my_info[x].time/1000 * rate)
- '''if x < len(beatmap_info) and "slider" in beatmap_info[x]["type"]:
- spinSpeedup = 6
- arrow_time_list = []
- for a in range(0,beatmap_info[x]["repeated"]):
- arrow_time_list.append(beatmap_info[x]["time"] + beatmap_info[x]["duration"] * a+1)
-
- if my_info[x].time < beatmap_info[x]["time"] + beatmap_info[x]["duration"] * beatmap_info[x]["repeated"]:
- for abc in arrow_time_list:
- start_index2 = int(abc/1000 * rate)
- z[start_index2:start_index2 + len(s)] += s * 0.5'''
-
if type(my_info[x].more).__name__ == "Circle":
spinSpeedup = 6
if my_info[x].more.sliderhead == True:
arrow_time_list = []
for a in range(repeatedTime[0]):
- arrow_time_list.append(sliderTime[a] + durationTime[a] * (a+1))
+ arrow_time_list.append(sliderTime[0] + durationTime[0] * (a+1))
+
+ start_index2 = int(sliderTime[0]/1000 * rate)
+ z[start_index2:start_index2 + len(s)] += s * 0.5
+
for abc in arrow_time_list:
- print(abc)
+ print("Added Repeat Circles to:"+ str(abc))
start_index2 = int(abc/1000 * rate)
z[start_index2:start_index2 + len(s)] += s * 0.5
- z[int(sliderTime[a]/1000 * rate): int(sliderTime[a]/1000 * rate+ len(s))] += s * 0.5
+ start_index2 = int(endTime[0]/1000 * rate)
+ z[start_index2:start_index2 + len(s)] += s * 0.5
durationTime.pop(0)
sliderTime.pop(0)
endTime.pop(0)
|
scripts: add quotes
|
@@ -22,9 +22,9 @@ KDBSYSTEM="$($KDB file system)"
KDBUSER="$($KDB file user)"
KDBSPEC="$($KDB file spec)"
-$KDB reset-elektra
+"$KDB" reset-elektra -f
-$KDB rm -r --without-elektra system || rm -f $KDBSYSTEM
+"$KDB" rm -r --without-elektra system || rm -f "$KDBSYSTEM"
-$KDB rm -r user || rm -f $KDBUSER
-$KDB rm -r spec || rm -f $KDBSPEC
+"$KDB" rm -r user || rm -f "$KDBUSER"
+"$KDB" rm -r spec || rm -f "$KDBSPEC"
|
common/online_calibration.c: Format with clang-format
BRANCH=none
TEST=none
|
@@ -202,8 +202,7 @@ void online_calibration_init(void)
void *type_specific_data = NULL;
s->online_calib_data->last_temperature = -1;
- type_specific_data =
- s->online_calib_data->type_specific_data;
+ type_specific_data = s->online_calib_data->type_specific_data;
if (!type_specific_data)
continue;
|
py/asmxtensa: Fix bug with order of regs in addi encoding.
|
@@ -118,7 +118,7 @@ static inline void asm_xtensa_op_add(asm_xtensa_t *as, uint reg_dest, uint reg_s
}
static inline void asm_xtensa_op_addi(asm_xtensa_t *as, uint reg_dest, uint reg_src, int imm8) {
- asm_xtensa_op24(as, ASM_XTENSA_ENCODE_RRI8(2, 12, reg_dest, reg_src, imm8 & 0xff));
+ asm_xtensa_op24(as, ASM_XTENSA_ENCODE_RRI8(2, 12, reg_src, reg_dest, imm8 & 0xff));
}
static inline void asm_xtensa_op_and(asm_xtensa_t *as, uint reg_dest, uint reg_src_a, uint reg_src_b) {
|
Fix crash when recovering from exceeding the recursion limit.
|
@@ -23,6 +23,13 @@ void lily_mb_escape_add_str(lily_msgbuf *, const char *);
are to be returned from. */
static uint16_t foreign_code[1] = {o_vm_exit};
+/* Operations called from the vm that may raise an error must set the current
+ frame's code first. This allows parser and vm to assume that any native
+ function's line number exists at code[-1].
+ to_add should be the same value added to code at the end of the branch. */
+#define SAVE_LINE(to_add) \
+current_frame->code = code + to_add
+
/***
* ____ _
* / ___| ___| |_ _ _ _ __
@@ -492,9 +499,12 @@ static void vm_setup_before_call(lily_vm_state *vm, uint16_t *code)
{
lily_call_frame *current_frame = vm->call_chain;
if (current_frame->next == NULL) {
- if (vm->call_depth > 100)
+ if (vm->call_depth > 100) {
+ SAVE_LINE(code[2] + 5);
vm_error(vm, LILY_ID_RUNTIMEERROR,
"Function call recursion limit reached.");
+ }
+
add_call_frame(vm);
}
@@ -1890,13 +1900,6 @@ void lily_vm_add_class_unchecked(lily_vm_state *vm, lily_class *cls)
*
*/
-/* Operations called from the vm that may raise an error must set the current
- frame's code first. This allows parser and vm to assume that any native
- function's line number exists at code[-1].
- to_add should be the same value added to code at the end of the branch. */
-#define SAVE_LINE(to_add) \
-current_frame->code = code + to_add
-
#define INTEGER_OP(OP) \
lhs_reg = vm_regs[code[1]]; \
rhs_reg = vm_regs[code[2]]; \
|
Remove non-functional CRYPTO_AES_CTR ifdef disabling AES-CTR in cryptodev
|
@@ -184,7 +184,6 @@ static struct {
{
CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32,
},
-# ifdef CRYPTO_AES_CTR
{
CRYPTO_AES_CTR, NID_aes_128_ctr, 14, 16,
},
@@ -194,7 +193,6 @@ static struct {
{
CRYPTO_AES_CTR, NID_aes_256_ctr, 14, 32,
},
-# endif
{
CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16,
},
@@ -812,7 +810,6 @@ static const EVP_CIPHER *cryptodev_aes_256_cbc(void)
return aes_256_cbc_cipher;
}
-# ifdef CRYPTO_AES_CTR
static EVP_CIPHER *aes_ctr_cipher = NULL;
static const EVP_CIPHER *cryptodev_aes_ctr(void)
{
@@ -912,7 +909,6 @@ static const EVP_CIPHER *cryptodev_aes_ecb(void)
}
aes_ecb_cipher = cipher;
}
-# endif
return aes_ecb_cipher;
}
@@ -1010,7 +1006,6 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
case NID_aes_256_cbc:
*cipher = cryptodev_aes_256_cbc();
break;
-# ifdef CRYPTO_AES_CTR
case NID_aes_128_ctr:
*cipher = cryptodev_aes_ctr();
break;
@@ -1029,7 +1024,6 @@ cryptodev_engine_ciphers(ENGINE *e, const EVP_CIPHER **cipher,
case NID_aes_256_ecb:
*cipher = cryptodev_aes_256_ecb();
break;
-# endif
default:
*cipher = NULL;
break;
@@ -1447,7 +1441,6 @@ static int cryptodev_engine_destroy(ENGINE *e)
aes_192_cbc_cipher = NULL;
EVP_CIPHER_meth_free(aes_256_cbc_cipher);
aes_256_cbc_cipher = NULL;
-# ifdef CRYPTO_AES_CTR
EVP_CIPHER_meth_free(aes_ctr_cipher);
aes_ctr_cipher = NULL;
EVP_CIPHER_meth_free(aes_192_ctr_cipher);
@@ -1460,7 +1453,6 @@ static int cryptodev_engine_destroy(ENGINE *e)
aes_192_ecb_cipher = NULL;
EVP_CIPHER_meth_free(aes_256_ecb_cipher);
aes_256_ecb_cipher = NULL;
-# endif
# ifdef USE_CRYPTODEV_DIGESTS
EVP_MD_meth_free(sha1_md);
sha1_md = NULL;
|
Fix unused var warning in release mode
|
@@ -159,7 +159,8 @@ size_t cbor_serialize_alloc(const cbor_item_t *item, unsigned char **buffer,
return 0;
}
- size_t written = cbor_serialize(item, *buffer, serialized_size);
+ size_t written __attribute__((unused)) =
+ cbor_serialize(item, *buffer, serialized_size);
CBOR_ASSERT(written == serialized_size);
if (buffer_size != NULL) *buffer_size = serialized_size;
return serialized_size;
|
input_thread: pause coll_fd when read pipe is closed
|
@@ -744,6 +744,7 @@ int flb_input_thread_collect(struct flb_input_instance *ins,
if (bytes_read == 0) {
flb_plg_warn(ins, "end of file (read pipe closed by input thread)");
+ flb_input_collector_pause(it->coll_fd, ins);
return 0;
}
|
Bump firmware version to 0x262f0500
Clear existing route when device rejoins (APS update command)
Force stable link status commands/neighbor table
|
@@ -71,7 +71,7 @@ DEFINES += GIT_COMMMIT=\\\"$$GIT_COMMIT\\\" \
# Minimum version of the RaspBee firmware
# which shall be used in order to support all features for this software release (case sensitive)
DEFINES += GW_AUTO_UPDATE_FW_VERSION=0x260b0500
-DEFINES += GW_MIN_RPI_FW_VERSION=0x262e0500
+DEFINES += GW_MIN_RPI_FW_VERSION=0x262f0500
# Minimum version of the deRFusb23E0X firmware
# which shall be used in order to support all features for this software release
|
Increased maximal connection time for AT+CIPSTART
|
@@ -161,7 +161,7 @@ esp_conn_start(esp_conn_p* conn, esp_conn_type_t type, const char* host, uint16_
ESP_MSG_VAR_REF(msg).msg.conn_start.cb_func = cb_func;
ESP_MSG_VAR_REF(msg).msg.conn_start.arg = arg;
- return espi_send_msg_to_producer_mbox(&ESP_MSG_VAR_REF(msg), espi_initiate_cmd, blocking, 30000); /* Send message to producer queue */
+ return espi_send_msg_to_producer_mbox(&ESP_MSG_VAR_REF(msg), espi_initiate_cmd, blocking, 60000); /* Send message to producer queue */
}
/**
|
esp_http_client.h: Fix return type in declaration of esp_http_client_flush_response.
Closes:
|
@@ -537,7 +537,7 @@ int esp_http_client_read_response(esp_http_client_handle_t client, char *buffer,
* - ESP_FAIL If failed to read response
* - ESP_ERR_INVALID_ARG If the client is NULL
*/
-int esp_http_client_flush_response(esp_http_client_handle_t client, int *len);
+esp_err_t esp_http_client_flush_response(esp_http_client_handle_t client, int *len);
/**
* @brief Get URL from client
|
Fixed enum name for iblanking
|
@@ -59,7 +59,7 @@ GetPLOT3DReadOptions(void)
rv->SetBool("Big Endian", true);
rv->SetBool("Double Precision", false);
- rv->SetEnum("IBlanking In File", 0);
+ rv->SetEnum("IBlanking", 0);
vector<string> iBlankingOptions = {"Auto", "Always", "Never"};
rv->SetEnumStrings("IBlanking", iBlankingOptions);
rv->SetBool("Use IBlanking If Present", true);
|
Move PhNfPluginRegisterIcon typedef
|
@@ -155,16 +155,6 @@ HICON PhNfBitmapToIcon(
_In_ HBITMAP Bitmap
);
-struct _PH_NF_ICON *PhNfPluginRegisterIcon(
- _In_ struct _PH_PLUGIN * Plugin,
- _In_ ULONG SubId,
- _In_ GUID Guid,
- _In_opt_ PVOID Context,
- _In_ PWSTR Text,
- _In_ ULONG Flags,
- _In_ struct _PH_NF_ICON_REGISTRATION_DATA *RegistrationData
- );
-
PPH_NF_ICON PhNfRegisterIcon(
_In_opt_ struct _PH_PLUGIN *Plugin,
_In_ ULONG Id,
@@ -203,5 +193,14 @@ typedef struct _PH_NF_ICON_REGISTRATION_DATA
} PH_NF_ICON_REGISTRATION_DATA, *PPH_NF_ICON_REGISTRATION_DATA;
// end_phapppub
+struct _PH_NF_ICON *PhNfPluginRegisterIcon(
+ _In_ struct _PH_PLUGIN * Plugin,
+ _In_ ULONG SubId,
+ _In_ GUID Guid,
+ _In_opt_ PVOID Context,
+ _In_ PWSTR Text,
+ _In_ ULONG Flags,
+ _In_ struct _PH_NF_ICON_REGISTRATION_DATA *RegistrationData
+ );
#endif
|
Update: This example does not need so many inference step, also added some interesting questions showing inductive capabilities as well
|
<orangejuice --> [yellow]>. :@:
//milk is white
<milk --> [white]>. :@:
-100
+15
//arriving at school, you see a wooden object (a door knob!)
<{obj1} --> [wooden]>. :|:
//on the door
//the goal is to educate children
<child --> [educated]>! :|:
//expected: ^pick executed with args ({SELF} * {obj1})
-100
+15
//you are in a place with a large clock now (the corridor!)
<clock --> [large]>. :|:
//with a red floor
//the goal is to educate children
<child --> [educated]>! :|:
//expected: ^go executed with args ({SELF} * classroom)
-100
+15
//you are somewhere with a clean blackboard (you are in the classroom!)
<blackboard --> [clean]>. :|:
//and a blue floor as well
//the goal is to educate children
<child --> [educated]>! :|:
//expected: ^pick executed with args ({SELF} * write)
-100
+15
//your are at a place with a blackboard which now is dirty (blackboard was used!)
<blackboard --> [dirty]>. :|:
//the floor is still blue
//the goal is to educate children
<child --> [educated]>! :|:
//expected: ^pick executed with args ({SELF} * sponge)
-100
+15
//you are at a place with a clean blackboard now (still in the classroom!)
<blackboard --> [clean]>. :|:
//with a blue floor still
//you are really tired now, you want to be refreshed (go for coffee!!)
<{SELF} --> [refreshed]>! :|:
//expected: ^go executed with args ({SELF} * corridor)
-100
+15
//now you are in the place with a large clock (the corridor!)
<clock --> [large]>. :|:
//with a red floor
//you are really tired, you want to be refreshed (go for coffee!!)
<{SELF} --> [refreshed]>! :|:
//expected: ^go executed with args ({SELF} * kitchen)
-100
+15
//now you are at a place with a microwave which is on
<microwave --> [on]>. :|:
//with a cyan floor
//you are really tired, you want to be refreshed (go for coffee!!)
<{SELF} --> [refreshed]>! :|:
//expected: ^pick executed with args ({SELF} * {drink1})
+
+//Q&A time
+//What color does the floor have where the large clock is?
+<<clock --> [large]> =/> <floor --> [?what]>>?
+//expected: Answer: <<clock --> [large]> =/> <floor --> [red]>>. Truth: frequency=0.964794, confidence=0.449068
+//If you are where the floor is red, where do you need to go to see a cyan floor?
+<(<floor --> [red]> &/ <({SELF} * ?2) --> ^go>) =/> <floor --> [cyan]>>?
+//expected: Answer: <(<floor --> [red]> &/ <({SELF} * kitchen) --> ^go>) =/> <floor --> [cyan]>>. Truth: frequency=1.000000, confidence=0.01029
|
Eliminate duplicated statements in re-parser.c
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka
|
@@ -215,14 +215,14 @@ re_parse_iterator (re_parser_ctx_t *parser_ctx_p, /**< RegExp parser context */
if (qmax != RE_ITERATOR_INFINITE)
{
re_token_p->qmin = qmax;
- re_token_p->qmax = qmin;
}
else
{
re_token_p->qmin = qmin;
- re_token_p->qmax = qmin;
}
+ re_token_p->qmax = qmin;
+
break;
}
else
|
output: initialize match_regex conditionally
The attribute `match_regex` does not exist if FLB_REGEX is turned
off at compile time, so we need special care not to touch it in
such case.
|
@@ -271,7 +271,9 @@ struct flb_output_instance *flb_output_new(struct flb_config *config,
instance->data = data;
instance->upstream = NULL;
instance->match = NULL;
+#ifdef FLB_HAVE_REGEX
instance->match_regex = NULL;
+#endif
instance->retry_limit = 1;
instance->host.name = NULL;
|
Fix again for
|
@@ -235,7 +235,9 @@ load_pnm(unsigned char /* in */ *p,
}
n = 0;
if (maps == 0) {
- n = *s++ == '0';
+ n = *s == '0';
+ if (*s != '\0')
+ s++;
} else {
while (isdigit(*s) && n >= 0) {
n = n * 10 + (*s++ - '0');
|
envydis/falcon: add new v6 opcodes and sprs
|
@@ -73,6 +73,9 @@ static struct sreg sreg_sr[] = {
{ 0xa, "cauth", .fmask = F_CRYPT },
{ 0xb, "xtargets" },
{ 0xc, "tstatus", .fmask = F_FUC3P },
+ { 0xd, "cauth1", .fmask = F_FUC6P | F_CRYPT },
+ { 0xe, "xcbase1", .fmask = F_FUC6P },
+ { 0xf, "xdbase1", .fmask = F_FUC6P },
{ -1 },
};
static struct bitfield reg0_bf = { 0, 4 };
@@ -617,6 +620,7 @@ static struct insn tabm[] = {
{ 0x000400fa, 0x000f00ff, OP3B, N("xcld"), REG1, REG2 },
{ 0x000500fa, 0x000f00ff, OP3B, N("xdld"), REG1, REG2 },
{ 0x000600fa, 0x000f00ff, OP3B, N("xdst"), REG1, REG2 },
+ { 0x000700fa, 0x000f00ff, OP3B, U("fa/7"), REG2, REG1, .fmask = F_FUC6P },
{ 0x000800fa, 0x000f00ff, OP3B, N("setp"), REG2, REG1 },
{ 0x000000fa, 0x000000ff, OP3B, OOPS, REG1, REG2 },
@@ -646,6 +650,7 @@ static struct insn tabm[] = {
{ 0x000100fe, 0x000f00ff, OP3B, N("mov"), REG2, SREG1 },
{ 0x000200fe, 0x000f00ff, OP3B, N("ptlb"), REG2, REG1, .fmask = F_FUC3P },
{ 0x000300fe, 0x000f00ff, OP3B, N("vtlb"), REG2, REG1, .fmask = F_FUC3P },
+ { 0x000500fe, 0x000f00ff, OP3B, U("fe/5"), REG2, REG1, .fmask = F_FUC6P },
{ 0x000c00fe, 0x000f00ff, OP3B, N("xbit"), REG2, FLAGS, REG1 },
{ 0x000000fe, 0x000000ff, OP3B, OOPS, REG2, REG1 },
|
io-libs/hdf5: update version to v1.10.4
|
Summary: A general purpose library and file format for storing scientific data
Name: %{pname}-%{compiler_family}%{PROJ_DELIM}
-Version: 1.10.3
+Version: 1.10.4
Release: 1%{?dist}
License: Hierarchical Data Format (HDF) Software Library and Utilities License
Group: %{PROJ_NAME}/io-libs
|
power/rk3399: Fix the power sequence length passed to power_seq_run()
BRANCH=none
TEST=build scarlet
|
@@ -475,7 +475,7 @@ enum power_state power_handle_state(enum power_state state)
HOST_SLEEP_EVENT_S3_WAKEABLE_SUSPEND);
if (!usb_wake_enabled &&
power_seq_run(s0s3_usb_wake_power_seq,
- ARRAY_SIZE(s0s3_power_seq)))
+ ARRAY_SIZE(s0s3_usb_wake_power_seq)))
return POWER_S3S0;
#endif
@@ -501,7 +501,7 @@ enum power_state power_handle_state(enum power_state state)
/* Make sure all S3 rails are off */
if (usb_wake_enabled) {
power_seq_run(s0s3_usb_wake_power_seq,
- ARRAY_SIZE(s0s3_power_seq));
+ ARRAY_SIZE(s0s3_usb_wake_power_seq));
usb_wake_enabled = 0;
}
#endif
|
boot/mcuboot: Fix inclusion of more than one example app
Even though the options existed, the second application would override
the values, resulting in the missing first application on the final
binary.
|
@@ -31,23 +31,27 @@ VPATH += :$(MCUBOOT_UNPACK)$(DELIM)src
VPATH += :$(MCUBOOT_SRCDIR)
ifneq ($(CONFIG_MCUBOOT_UPDATE_AGENT_EXAMPLE),)
-MAINSRC = mcuboot_agent_main.c
-
-PROGNAME = mcuboot_agent
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
-else ifneq ($(CONFIG_MCUBOOT_SLOT_CONFIRM_EXAMPLE),)
-MAINSRC = mcuboot_confirm_main.c
-
-PROGNAME = mcuboot_confirm
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
-else ifneq ($(CONFIG_MCUBOOT_BOOTLOADER),)
-MAINSRC = mcuboot/boot/nuttx/main.c
-
-PROGNAME = mcuboot_loader
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = $(CONFIG_DEFAULT_TASK_STACKSIZE)
+MAINSRC += mcuboot_agent_main.c
+
+PROGNAME += mcuboot_agent
+PRIORITY += SCHED_PRIORITY_DEFAULT
+STACKSIZE += $(CONFIG_DEFAULT_TASK_STACKSIZE)
+endif
+
+ifneq ($(CONFIG_MCUBOOT_SLOT_CONFIRM_EXAMPLE),)
+MAINSRC += mcuboot_confirm_main.c
+
+PROGNAME += mcuboot_confirm
+PRIORITY += SCHED_PRIORITY_DEFAULT
+STACKSIZE += $(CONFIG_DEFAULT_TASK_STACKSIZE)
+endif
+
+ifneq ($(CONFIG_MCUBOOT_BOOTLOADER),)
+MAINSRC += mcuboot/boot/nuttx/main.c
+
+PROGNAME += mcuboot_loader
+PRIORITY += SCHED_PRIORITY_DEFAULT
+STACKSIZE += $(CONFIG_DEFAULT_TASK_STACKSIZE)
endif
CFLAGS += -Wno-undef
|
Use unsigned conversion specifier for nlmsg_pid
nlmsg_pid is __u32, so let's use %u instead of %d.
|
@@ -803,7 +803,7 @@ int bpf_attach_xdp(const char *dev_name, int progfd, uint32_t flags) {
for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len);
nh = NLMSG_NEXT(nh, len)) {
if (nh->nlmsg_pid != sa.nl_pid) {
- fprintf(stderr, "bpf: Wrong pid %d, expected %d\n",
+ fprintf(stderr, "bpf: Wrong pid %u, expected %u\n",
nh->nlmsg_pid, sa.nl_pid);
errno = EBADMSG;
goto cleanup;
|
Use builder method pattern to generate a key
|
@@ -236,6 +236,12 @@ class StorageKey(psa_storage.Key):
def __init__(self, *, description: str, **kwargs) -> None:
super().__init__(**kwargs)
self.description = description #type: str
+class StorageKeyBuilder:
+ def __init__(self) -> None:
+ pass
+
+ def build(self, **kwargs) -> StorageKey:
+ return StorageKey(**kwargs)
class StorageFormat:
"""Storage format stability test cases."""
@@ -253,6 +259,7 @@ class StorageFormat:
self.constructors = info.constructors #type: macro_collector.PSAMacroEnumerator
self.version = version #type: int
self.forward = forward #type: bool
+ self.key_builder = StorageKeyBuilder() #type: StorageKeyBuilder
def make_test_case(self, key: StorageKey) -> test_case.TestCase:
"""Construct a storage format test case for the given key.
@@ -305,7 +312,8 @@ class StorageFormat:
r'', short)
short = re.sub(r'PSA_KEY_[A-Z]+_', r'', short)
description = 'lifetime: ' + short
- key = StorageKey(version=self.version,
+ key = self.key_builder.build(
+ version=self.version,
id=1, lifetime=lifetime,
type='PSA_KEY_TYPE_RAW_DATA', bits=8,
usage='PSA_KEY_USAGE_EXPORT', alg=0, alg2=0,
@@ -339,7 +347,7 @@ class StorageFormat:
if short is None:
short = re.sub(r'\bPSA_KEY_USAGE_', r'', usage)
description = 'usage: ' + short
- return StorageKey(version=self.version,
+ return self.key_builder.build(version=self.version,
id=1, lifetime=0x00000001,
type='PSA_KEY_TYPE_RAW_DATA', bits=8,
usage=usage, alg=0, alg2=0,
@@ -381,7 +389,8 @@ class StorageFormat:
r'',
kt.expression)
description = 'type: {} {}-bit'.format(short_expression, bits)
- keys.append(StorageKey(version=self.version,
+ keys.append(self.key_builder.build(
+ version=self.version,
id=1, lifetime=0x00000001,
type=kt.expression, bits=bits,
usage=usage_flags, alg=alg, alg2=alg2,
@@ -403,13 +412,13 @@ class StorageFormat:
descr = re.sub(r'PSA_ALG_', r'', alg)
descr = re.sub(r',', r', ', re.sub(r' +', r'', descr))
usage = 'PSA_KEY_USAGE_EXPORT'
- key1 = StorageKey(version=self.version,
+ key1 = self.key_builder.build(version=self.version,
id=1, lifetime=0x00000001,
type='PSA_KEY_TYPE_RAW_DATA', bits=8,
usage=usage, alg=alg, alg2=0,
material=b'K',
description='alg: ' + descr)
- key2 = StorageKey(version=self.version,
+ key2 = self.key_builder.build(version=self.version,
id=1, lifetime=0x00000001,
type='PSA_KEY_TYPE_RAW_DATA', bits=8,
usage=usage, alg=0, alg2=alg,
|
mpi-families/openmpi: enable build against ucx/libfabric
|
# Base package name/config
%define pname openmpi4
-%define with_openib 1
+%define with_openib 0
%ifarch aarch64 || ppc64le
%define with_psm 0
%if 0%{?rhel}
%define with_psm 0
%else
-%define with_psm 1
+%define with_psm 0
%endif
-%define with_psm2 1
+%define with_psm2 0
%endif
%{!?with_lustre: %define with_lustre 0}
%{!?with_slurm: %define with_slurm 0}
%{!?with_tm: %global with_tm 1}
%{!?with_pmix: %define with_pmix 0}
+%{!?with_ofi: %define with_ofi 1}
+%{!?with_ucx: %define with_ucx 1}
Summary: A powerful implementation of MPI/SHMEM
@@ -63,6 +65,12 @@ BuildRequires: numactl
BuildRequires: pmix%{PROJ_DELIM}
BuildRequires: libevent-devel
%endif
+%if 0%{with_ofi}
+BuildRequires: libfabric%{PROJ_DELIM}
+%endif
+%if 0%{with_ucx}
+BuildRequires: ucx%{PROJ_DELIM}
+%endif
BuildRequires: hwloc-devel
%if 0%{?rhel}
BuildRequires: libtool-ltdl
@@ -144,6 +152,16 @@ BASEFLAGS="$BASEFLAGS --with-pmix=${PMIX_DIR}"
BASEFLAGS="$BASEFLAGS --with-libevent=external --with-hwloc=external"
%endif
+%if 0%{with_ofi}
+module load libfabric
+BASEFLAGS="$BASEFLAGS --with-libfabric=${LIBFABRIC_DIR}"
+%endif
+
+%if 0%{with_ucx}
+module load ucx
+BASEFLAGS="$BASEFLAGS --with-ucx=${UCX_DIR} --without-verbs"
+%endif
+
%if %{with_psm}
BASEFLAGS="$BASEFLAGS --with-psm"
%endif
@@ -215,6 +233,12 @@ prepend-path LD_LIBRARY_PATH %{install_path}/lib
prepend-path MODULEPATH %{OHPC_MODULEDEPS}/%{compiler_family}-%{pname}
prepend-path PKG_CONFIG_PATH %{install_path}/lib/pkgconfig
+%if 0%{with_ucx}
+depends-on ucx
+%endif
+%if 0%{with_ofi}
+depends-on libfabric
+%endif
family "MPI"
EOF
|
Replace misleading error message when loading PEM
The error message "short header" when the end line
of PEM data cannot be identified is misleading.
Replace it with already existing "bad end line" error.
Fixes
|
@@ -824,7 +824,7 @@ static int get_header_and_data(BIO *bp, BIO **header, BIO **data, char *name,
flags_mask = ~0u;
len = BIO_gets(bp, linebuf, LINESIZE);
if (len <= 0) {
- PEMerr(PEM_F_GET_HEADER_AND_DATA, PEM_R_SHORT_HEADER);
+ PEMerr(PEM_F_GET_HEADER_AND_DATA, PEM_R_BAD_END_LINE);
goto err;
}
|
tree@f7e376e finally fix that return and new twitter
|
@@ -470,8 +470,8 @@ extras = {
"This page was made by Urbit. Feedback: ", a({
href: "mailto:urbit@urbit.org"
}, "urbit@urbit.org"), " ", a({
- href: "https://twitter.com/urbit_"
- }, "@urbit_")
+ href: "https://twitter.com/urbit"
+ }, "@urbit")
])
]);
})
@@ -2053,7 +2053,7 @@ Virtual = name("Virtual", function(arg) {
}, function(str) {
return str;
}, function(arg1, key) {
- var c, e, error, ga, gn, props, ref1;
+ var c, e, ga, gn, props, ref1;
gn = arg1.gn, ga = arg1.ga, c = arg1.c;
props = {
key: key
@@ -2478,7 +2478,7 @@ module.exports = query({
if (this.props.match) {
comp = gn === this.props.match;
} else {
- comp = gn && gn[0] === 'h' && parseInt(gn[1]) !== NaN;
+ comp = gn && gn[0] === 'h' && parseInt(gn[1]) !== (0/0);
}
if (comp) {
ga = _.clone(ga);
@@ -3166,8 +3166,9 @@ module.exports = {
if (hor != null) {
d.setHours(hor);
d.setMinutes(min);
- return d.setSeconds(sec);
+ d.setSeconds(sec);
}
+ return d;
},
getKeys: function(kids, sortBy) {
return _.map(this.sortKids(kids, sortBy), 'name');
|
Simplify wording for degenerates
|
@@ -276,8 +276,8 @@ in a third, and no bias in the rest. As they are procedurally generated not all
of the partitions are useful, in particular with the smaller block sizes.
* Many partitions are duplicates.
-* Many partitions are degenerate (an N partition hash results in a partition
- assignment with some of the N containing no texels).
+* Many partitions are degenerate (an N partition hash results in at least one
+ partition assignment that contains no texels).
Texel weights
|
List and tuple convertor, use comma to separate when the length is greater than 3
|
@@ -2147,26 +2147,11 @@ PythonToBlocks.prototype.convertElements = function(key, values) {
* ctx: expr_context_ty
*
*/
-
-// return with many blocks, not use for the time being
-
-/*PythonToBlocks.prototype.List = function(node) {
- var elts = node.elts;
- var ctx = node.ctx;
-
- return block("lists_create_with_noreturn", node.lineno, {},
- this.convertElements("ADD", elts)
- , {
- "inline": "true",
- }, {
- "@items": elts.length
- });
-}
-*/
-
PythonToBlocks.prototype.List = function(node) {
var elts = node.elts;
+ if (elts.length > 3){
+ // return with one block & comma seperated
var valueList = [];
var s = this.getSourceCode(elts).split('\n')[node.lineno-1];
if (s.length > 0){
@@ -2182,22 +2167,9 @@ PythonToBlocks.prototype.List = function(node) {
}, {
});
-}
-
-/*
- * elts: asdl_seq
- * ctx: expr_context_ty
- */
-
-// return with many blocks, not use for the time being
-
-/*
-PythonToBlocks.prototype.Tuple = function(node)
-{
- var elts = node.elts;
- var ctx = node.ctx;
-
- return block("tuple_create_with_noreturn", node.lineno, {},
+ }else{
+ // return with many blocks
+ return block("lists_create_with_noreturn", node.lineno, {},
this.convertElements("ADD", elts)
, {
"inline": "true",
@@ -2205,12 +2177,18 @@ PythonToBlocks.prototype.Tuple = function(node)
"@items": elts.length
});
}
-*/
+}
+/*
+ * elts: asdl_seq
+ * ctx: expr_context_ty
+ */
PythonToBlocks.prototype.Tuple = function(node)
{
var elts = node.elts;
+ if (elts.length > 3){
+ // return with one block & comma seperated
var valueList = [];
var s = this.getSourceCode(elts).split('\n')[node.lineno-1];
if (s.length > 0){
@@ -2227,6 +2205,17 @@ PythonToBlocks.prototype.Tuple = function(node)
});
}
+ else{
+ // return with many blocks
+ return block("tuple_create_with_noreturn", node.lineno, {},
+ this.convertElements("ADD", elts)
+ , {
+ "inline": "true",
+ }, {
+ "@items": elts.length
+ });
+ }
+}
/*
* elts: asdl_seq
|
yanglint CHANGE check for creating output handler
The list command in interactive mode.
|
@@ -77,9 +77,12 @@ cmd_list(struct ly_ctx **ctx, const char *cmdline)
}
}
- ly_out_new_file(stdout, &out);
+ if (!ly_out_new_file(stdout, &out)) {
print_list(out, *ctx, format);
ly_out_free(out, NULL, 0);
+ } else {
+ YLMSG_E("Unable to print to the standard output.\n");
+ }
cleanup:
free_cmdline(argv);
|
Fix emscripten compilation;
|
@@ -2,9 +2,7 @@ cmake_minimum_required(VERSION 3.0.0)
project(lovr)
# Setup
-if(UNIX)
- find_package(PkgConfig REQUIRED)
-elseif(EMSCRIPTEN)
+if(EMSCRIPTEN)
set(CMAKE_EXECUTABLE_SUFFIX ".html")
add_definitions(-O3)
add_definitions(-s USE_ZLIB=1)
@@ -14,6 +12,8 @@ elseif(EMSCRIPTEN)
add_definitions(-s NO_EXIT_RUNTIME=1)
add_definitions(-s TOTAL_MEMORY=134217728)
include_directories("${EMSCRIPTEN_ROOT_PATH}/tests/zlib")
+elseif(UNIX)
+ find_package(PkgConfig REQUIRED)
endif()
# Assimp
@@ -43,7 +43,7 @@ endif()
# FreeType
if (EMSCRIPTEN)
- add_definitions(-s USE_FREETYPE=1)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_FREETYPE=1")
elseif (WIN32)
set(FREETYPE_NO_DIST TRUE CACHE BOOL "")
set(BUILD_SHARED_LIBS OFF)
@@ -62,7 +62,7 @@ set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "")
set(GLFW_BUILD_TESTS OFF CACHE BOOL "")
set(GLFW_BUILD_DOCS OFF CACHE BOOL "")
if(EMSCRIPTEN)
- add_definitions(-s USE_GLFW=3)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_GLFW=3")
elseif(WIN32)
add_subdirectory(deps/glfw glfw)
include_directories(deps/glfw/include)
@@ -161,7 +161,12 @@ set(PHYSFS_ARCHIVE_MVL OFF CACHE BOOL "")
set(PHYSFS_ARCHIVE_QPAK OFF CACHE BOOL "")
set(PHYSFS_BUILD_TEST OFF CACHE BOOL "")
set(PHYSFS_BUILD_WX_TEST FALSE CACHE BOOL "")
-if(EMSCRIPTEN OR WIN32)
+if(EMSCRIPTEN)
+ option(PHYSFS_ARCHIVE_ZIP OFF)
+ add_subdirectory(deps/physfs physfs)
+ include_directories(deps/physfs)
+ set(LOVR_PHYSFS physfs)
+elseif(WIN32)
add_subdirectory(deps/physfs physfs)
include_directories(deps/physfs)
set(LOVR_PHYSFS physfs)
|
Group name from Apache 2.2+ must be wsgi-group.
|
@@ -217,7 +217,7 @@ configuration would be used::
AuthBasicProvider dbm
AuthDBMUserFile /usr/local/wsgi/accounts.dbm
WSGIAuthGroupScript /usr/local/wsgi/scripts/auth.wsgi
- Require group secret-agents
+ Require wsgi-group secret-agents
Require valid-user
The 'auth.wsgi' script would then need to contain a 'groups_for_user()'
|
SOVERSION bump to version 2.0.10
|
@@ -34,7 +34,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 2)
set(SYSREPO_MINOR_SOVERSION 0)
-set(SYSREPO_MICRO_SOVERSION 9)
+set(SYSREPO_MICRO_SOVERSION 10)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
nimble/util: Use VS HCI command for reading static random address
Use dedicated VS command for reading static address instead of
calling controller code from host. This is required to properly
support multi-core MCUs where host and controller runs on separate
cores.
|
#include "host/ble_hs.h"
#include "host/util/util.h"
-
-#if MYNEWT_VAL(BLE_CONTROLLER)
-#include "controller/ble_hw.h"
-#endif
+#include "../src/ble_hs_hci_priv.h"
static int
ble_hs_util_load_rand_addr(ble_addr_t *addr)
{
- /* XXX: It is unfortunate that the function to retrieve the random address
- * is in the controller package. A host-only device ought to be able to
- * automically restore a random address.
- */
-#if MYNEWT_VAL(BLE_CONTROLLER)
+#if MYNEWT_VAL(BLE_HCI_VS)
+ struct ble_hci_vs_rd_static_addr_rp rsp;
int rc;
- rc = ble_hw_get_static_addr(addr);
+ rc = ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_VENDOR,
+ BLE_HCI_OCF_VS_RD_STATIC_ADDR),
+ NULL, 0, &rsp, sizeof(rsp));
if (rc == 0) {
+ addr->type = BLE_ADDR_RANDOM;
+ memcpy(addr->val, rsp.addr, sizeof(addr->val));
return 0;
}
#endif
|
refactor InsertRndPrintable
|
@@ -868,8 +868,7 @@ static void mangle_InsertRndPrintable(run_t* run) {
mangle_Inflate(run, off, len);
mangle_Move(run, off, off + len, run->dynamicFileSz);
- util_rndBuf(&run->dynamicFile[off], len);
- util_turnToPrintable(&run->dynamicFile[off], len);
+ util_rndBufPrintable(&run->dynamicFile[off], len);
}
static void mangle_ASCIIVal(run_t* run) {
|
Correct mistyping.
|
@@ -76,7 +76,7 @@ Peripherals are u-blox modules which accept commands (e.g. AT-commands) over a s
\* Through the u-blox [CellLocate](https://www.u-blox.com/en/product/celllocate) mobile network-based location service.
-# Strucure of `ubxlib`
+# Structure of `ubxlib`
The APIs for each type of u-blox module can be found in the relevant directory (e.g. [cell](/cell) for cellular modules and [ble](/ble)/[wifi](/wifi) for BLE/Wi-Fi modules). The [common](/common) directory contains APIs and 'helper' modules that are shared by u-blox modules, most importantly the [network](/common/network) API and the [sockets](/common/sockets) API. All APIs are documented in the API header files.
Examples demonstrating the use of the APIs can be found in the [example](/example) directory.
|
opae.admin: add rpm release CMake variable
|
@@ -27,7 +27,7 @@ cmake_minimum_required (VERSION 2.8)
# projectname is the same as the main-executable
project(opae.admin)
-
+set(OPAE_ADMIN_RPM_RELEASE 1)
set (ADMIN_STAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/stage)
find_program (RPM_BUILD
rpmbuild
@@ -51,7 +51,7 @@ add_custom_target(opae.admin.wheel
if (RPM_BUILD)
add_custom_target(opae.admin.rpm
- COMMAND ${PYTHON_EXECUTABLE} setup.py bdist_rpm
+ COMMAND ${PYTHON_EXECUTABLE} setup.py bdist_rpm --release ${OPAE_ADMIN_RPM_RELEASE}
WORKING_DIRECTORY ${ADMIN_STAGE_DIR}
COMMENT "Building opae.admin Python RPM distribution"
)
|
Fix error when first value in pu depth list is omitted
|
@@ -327,8 +327,8 @@ static int parse_pu_depth_list( const char *array, int32_t *depths_min, int32_t
int retval = 1;
//Reset depths in case multiple pu depth parameters are given
- memset( depths_max, -1, size * sizeof( *depths_max ) );
- memset( depths_min, -1, size * sizeof( *depths_min ) );
+ if(size > 1) memset( depths_max + 1, -1, (size - 1) * sizeof( *depths_max ) );
+ if(size > 1) memset( depths_min + 1, -1, (size - 1) * sizeof( *depths_min ) );
token = strtok( list, "," );
while( ptr < len && list[ptr + 1] == ',' )
|
[bsp][stm32]modify stm32l4xx template,preventing conflict with the linker files
|
* Change Logs:
* Date Author Notes
* 2018-11-5 SummerGift first version
+ * 2019-04-24 yangjie Use the end of ZI as HEAP_BEGIN
*/
#ifndef __BOARD_H__
@@ -28,7 +29,17 @@ extern "C" {
#define STM32_SRAM1_START (0x20000000)
#define STM32_SRAM1_END (STM32_SRAM1_START + STM32_SRAM1_SIZE * 1024)
-#define HEAP_BEGIN STM32_SRAM1_START
+#ifdef __CC_ARM
+extern int Image$$RW_IRAM1$$ZI$$Limit;
+#define HEAP_BEGIN ((void *)&Image$$RW_IRAM1$$ZI$$Limit)
+#elif __ICCARM__
+#pragma section="CSTACK"
+#define HEAP_BEGIN (__segment_end("CSTACK"))
+#else
+extern int __bss_end;
+#define HEAP_BEGIN ((void *)&__bss_end)
+#endif
+
#define HEAP_END STM32_SRAM1_END
void SystemClock_Config(void);
|
Use computed global transforms instead of local;
|
@@ -10,7 +10,7 @@ static void renderNode(Model* model, int nodeIndex) {
bool useMaterials = currentMaterial->isDefault;
lovrGraphicsPush();
- lovrGraphicsMatrixTransform(MATRIX_MODEL, model->localNodeTransforms + 16 * nodeIndex);
+ lovrGraphicsMatrixTransform(MATRIX_MODEL, model->globalNodeTransforms + 16 * nodeIndex);
float globalInverse[16];
mat4_set(globalInverse, model->globalNodeTransforms + nodeIndex * 16);
@@ -48,11 +48,12 @@ static void renderNode(Model* model, int nodeIndex) {
lovrMeshDraw(model->mesh, NULL);
}
+ lovrGraphicsPop();
+
for (int i = 0; i < node->children.length; i++) {
renderNode(model, node->children.data[i]);
}
- lovrGraphicsPop();
if (useMaterials) {
lovrGraphicsSetMaterial(currentMaterial);
}
|
[lv_list] Add list layout prototypes
|
@@ -78,6 +78,13 @@ enum {
};
typedef uint8_t lv_list_style_t;
+/** List layouts. **/
+enum {
+ LV_LIST_LAYOUT_HOR,
+ LV_LIST_LAYOUT_VER
+}
+typedef uint8_t lv_list_layout_t;
+
/**********************
* GLOBAL PROTOTYPES
**********************/
@@ -189,6 +196,13 @@ static inline void lv_list_set_anim_time(lv_obj_t * list, uint16_t anim_time)
*/
void lv_list_set_style(lv_obj_t * list, lv_list_style_t type, const lv_style_t * style);
+/**
+ * Set layout of a list
+ * @param list pointer to a list object
+ * @param layout which layout should be used
+ */
+void lv_list_set_layout(lv_obj_t * list, lv_list_layout_t layout);
+
/*=====================
* Getter functions
*====================*/
@@ -259,6 +273,13 @@ uint16_t lv_list_get_size(const lv_obj_t * list);
lv_obj_t * lv_list_get_btn_selected(const lv_obj_t * list);
#endif
+/**
+ * Get layout of a list
+ * @param list pointer to a list object
+ * @return layout which layout should be used
+ */
+lv_list_layout_t lv_list_get_layout(lv_obj_t * list);
+
/**
* Get the scroll bar mode of a list
* @param list pointer to a list object
|
kernel/task/prctl : Add not supported error message when disabled messaging configuration
If CONFIG_MESSAGING_IPC is not enabled, error message will be printed through sdbg, and errno will be set to ENOSYS.
|
@@ -165,6 +165,11 @@ int prctl(int option, ...)
}
}
break;
+#else
+ sdbg("Option not enabled: %d\n", option);
+ err = ENOSYS;
+ goto errout;
+#endif
#ifdef CONFIG_MESSAGING_IPC
case PR_MSG_SAVE:
{
@@ -209,13 +214,17 @@ int prctl(int option, ...)
ret = messaging_remove_list(port_name);
return ret;
}
-#endif
-#else
- sdbg("Option not enabled: %d\n", option);
+ break;
+#else /* CONFIG_MESSAGING_IPC */
+ case PR_MSG_SAVE:
+ case PR_MSG_READ:
+ case PR_MSG_REMOVE:
+ {
+ sdbg("Not supported.\n");
err = ENOSYS;
goto errout;
-#endif
-
+ }
+#endif /* CONFIG_MESSAGING_IPC */
case PR_GET_STKLOG:
{
#if defined(CONFIG_ENABLE_STACKMONITOR) && defined(CONFIG_DEBUG)
|
Fix pg_basebackup -E option.
Server side should exclude sub directory even parent directory
wanted.
|
@@ -877,7 +877,7 @@ sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces,
}
}
if (!skip_this_dir)
- size += sendDir(pathbuf, basepathlen, sizeonly, tablespaces, NIL);
+ size += sendDir(pathbuf, basepathlen, sizeonly, tablespaces, exclude);
}
else if (S_ISREG(statbuf.st_mode))
{
|
Component/bt: fix bt load boned in smp
|
@@ -429,8 +429,8 @@ void btc_dm_sec_cb_handler(btc_msg_t *msg)
switch (msg->act) {
case BTA_DM_ENABLE_EVT: {
btc_clear_services_mask();
- btc_storage_load_bonded_devices();
#if (SMP_INCLUDED == TRUE)
+ btc_storage_load_bonded_devices();
//load the bonding device to the btm layer
btc_storage_load_bonded_ble_devices();
#endif ///SMP_INCLUDED == TRUE
|
Simplify plugin://
|
@@ -192,9 +192,9 @@ typedef struct clap_preset_discovery_location {
// - file:/// for pointing to a file or directory; directories are scanned recursively
// eg: file:///home/abique/.u-he/Diva/presets/ (on Linux)
// eg: file:///C:/Users/abique/Documents/u-he/Diva.data/presets/ (on Windows)
- // - plugin://<plugin-abi>:<plugin-id> for presets which are bundled inside the plugin itself
- // eg: plugin://clap:com.u-he.Diva
- // see clap_plugin_id_t for more info.
+ // - plugin://<resource-id> for presets which are bundled inside the plugin itself
+ // the resource-id string is defined by the plugin and should unique to avoid clashing
+ // with other providers
const char *uri;
} clap_preset_discovery_location_t;
|
add the identifier to error messages in httpclient.c
|
@@ -161,7 +161,7 @@ static void on_error(h2o_httpclient_ctx_t *ctx, h2o_mem_pool_t *pool, const char
va_start(args, fmt);
int errlen = vsnprintf(errbuf, sizeof(errbuf), fmt, args);
va_end(args);
- fprintf(stderr, "%.*s\n", errlen, errbuf);
+ fprintf(stderr, "[httpclient.c] %.*s\n", errlen, errbuf);
/* defer using zero timeout to send pending GOAWAY frame */
create_timeout(ctx->loop, 0, on_exit_deferred, NULL);
|
protect against multiple io from pipe
|
@@ -291,6 +291,13 @@ complex float* create_cfl(const char* name, int D, const long dimensions[D])
;
+ static bool once_w = false;
+
+ if (once_w)
+ error("writing two inputs to pipe is not supported\n");
+
+ once_w = true;
+
const char* filename = tempnam(NULL, "bart-");
debug_printf(DP_DEBUG1, "Temp file for pipe: %s\n", filename);
@@ -416,6 +423,15 @@ static complex float* load_cfl_internal(const char* name, int D, long dimensions
case FILE_TYPE_PIPE:
+ ;
+
+ static bool once_r = false;
+
+ if (once_r)
+ error("reading two inputs from pipe is not supported\n");
+
+ once_r = true;
+
// read header from stdin
if (-1 == read_cfl_header(0, &filename, D, dimensions))
|
docs/conf.py: Use https for intersphinx link to docs.python.org.
To get rid of warning when building the docs saying there's a redirect from
http: to https:.
|
@@ -298,4 +298,4 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'python': ('http://docs.python.org/3.5', None)}
+intersphinx_mapping = {'python': ('https://docs.python.org/3.5', None)}
|
build UPDATE abi-check revision
|
@@ -354,7 +354,7 @@ gen_doc("${doxy_files}" ${SYSREPO_VERSION} ${SYSREPO_DESC} ${project_logo})
# generate API/ABI report
if ("${BUILD_TYPE_UPPER}" STREQUAL "ABICHECK")
- lib_abi_check(sysrepo ${SYSREPO_SOVERSION_FULL} 8ad68574d657a5d0ba34a644286a5bd037bf3888)
+ lib_abi_check(sysrepo ${SYSREPO_SOVERSION_FULL} a1b064b902ee4eaf2cacfe33213dacfd3eab7342)
endif()
# phony target for clearing sysrepo SHM
|
arch/arm/src/amebad: Modify amebad serial driver to get UART interrupt.
This patch modifies the up_lowgetc() API to get UART interrupt when a
character is received in the RX buffer.
|
@@ -738,10 +738,12 @@ void up_lowputc(char ch)
* int value, -1 if error, 0~255 if byte successfully read
*
****************************************************************************/
-char up_lowgetc(void)
+int up_lowgetc(void)
{
uint8_t rxd;
+ LOGUART_SetIMR(0);
rxd = LOGUART_GetChar(_TRUE);
+ LOGUART_SetIMR(1);
return rxd & 0xff;
}
|
dts-battery: Expand descriptions to explain use
Expand the manuf_name and device_name so that it is clear
what their use and origin is for.
TEST=zmake build nissa
BRANCH=none
|
@@ -9,10 +9,16 @@ compatible: "battery-fuel-gauge"
properties:
manuf_name:
- description: Manufacturer name
+ description: |
+ String returned by the smart battery attribute
+ ManufacturerName (0x20), which is used to help
+ uniquely identify the type of battery.
type: string
device_name:
- description: Model/Device name
+ description: |
+ String returned by the smart battery attribute
+ DeviceName (0x21), which is used to help
+ uniquely identify the type of battery.
type: string
ship_mode_wb_support:
description: |
|
Update tasks.json to add docs commands
|
"args": [],
"problemMatcher": [],
},
+ {
+ "label": "Docs: Install python plugins from requirements.txt file",
+ "type": "shell",
+ "command": "python -m pip install -r requirements.txt",
+ "options": {
+ "cwd": "${workspaceFolder}/docs"
+ },
+ "problemMatcher": []
+ },
+ {
+ "label": "Docs: Generate html",
+ "type": "shell",
+ "command": ".\\make html",
+ "options": {
+ "cwd": "${workspaceFolder}/docs"
+ },
+ "problemMatcher": []
+ },
+ {
+ "label": "Docs: Clean build directory",
+ "type": "shell",
+ "command": ".\\make clean",
+ "options": {
+ "cwd": "${workspaceFolder}/docs"
+ },
+ "problemMatcher": []
+ },
]
}
\ No newline at end of file
|
story: add new parsers to lib
|
"{(trip body)}"
"\0a"
==
+::
+:: Parsers
+::
+++ parse-commit
+ ;~ sfix
+ ;~ pfix (jest 'commit: ')
+ (cook @uv ;~(pfix (jest '0v') viz:ag))
+ ==
+ ::
+ (just '\0a')
+ ==
+::
+++ parse-title
+ ;~ sfix
+ (cook crip (star prn))
+ (jest '\0a\0a')
+ ==
+::
+++ parse-body-single
+ %- star
+ ;~ less
+ ;~(pose (jest '|||\0a') (jest '---\0a'))
+ (cook crip ;~(sfix (star prn) (just '\0a')))
+ ==
+::
+++ parse-prose-single ;~(plug parse-title parse-body-single)
+++ parse-rest-proses (star ;~(pfix (jest '|||\0a') parse-prose-single))
+++ parse-proses ;~(plug parse-prose-single parse-rest-proses)
+++ parse-chapter ;~(plug parse-commit parse-proses)
+++ parse-story (star ;~(sfix parse-chapter (jest '---\0a')))
+::
+:: Parse prose: a title, followed by a body
+::
+:: Parse proses: a prose, followed by zero or more proses, representing conflicts
+::
+:: Parse chapters (story entries): a commit followed by one or more proses
+::
+:: Parse story: zero or more chapters
+::
+::
--
\ No newline at end of file
|
host/mesh: pb_gatt: update delayable work
Switch to the new API. Adds a link check to the protocol timeout to
ensure the link is still active.
This is port of
|
@@ -36,7 +36,8 @@ static void reset_state(void)
{
link.conn_handle = BLE_HS_CONN_HANDLE_NONE;
- k_work_cancel_delayable(&link.prot_timer);
+ /* If this fails, the protocol timeout handler will exit early. */
+ (void)k_work_cancel_delayable(&link.prot_timer);
link.rx.buf = bt_mesh_proxy_get_buf();
}
@@ -54,6 +55,11 @@ static void link_closed(enum prov_bearer_link_status status)
static void protocol_timeout(struct ble_npl_event *work)
{
+ if (!link.conn_handle) {
+ /* Already disconnected */
+ return;
+ }
+
BT_DBG("Protocol timeout");
link_closed(PROV_BEARER_LINK_STATUS_TIMEOUT);
|
in progress: broken
|
@@ -64,9 +64,14 @@ public:
return m_pSsl;
}
+ void registerNetRequestBuilder( const string& name, INetRequestBulder& builder );
+ void setDefaultNetRequestBuilder( const string& name );
+
private:
CMutex m_sslMutex;
common::CAutoPtr<net::ISSL> m_pSsl;
+
+ map<const string&, INetRequestBuilder& builder>;
};
} // namespace common
|
[snitch] Add None value to DSPU enum types for muxes
|
@@ -208,12 +208,12 @@ module dspu #(
// Internal control signals
logic cmp_signed; // comparator operation is signed
enum logic [1:0] {
- Reg, Zero, ClipBound
+ None, Reg, Zero, ClipBound
} cmp_op_b_sel; // selection of shared comparator operands
logic clip_unsigned; // clip operation has "0" as lower bound
logic clip_register; // if 1 clip operation uses rs2, else ximm
enum logic [3:0] {
- Abs, Sle, Min, Max, Exths, Exthz, Extbs, Extbz, Clip
+ Nop, Abs, Sle, Min, Max, Exths, Exthz, Extbs, Extbz, Clip
} res_sel; // result selection
// --------------------
@@ -222,46 +222,56 @@ module dspu #(
always_comb begin
cmp_signed = 1'b1;
- cmp_op_b_sel = Reg;
+ cmp_op_b_sel = None;
clip_unsigned = 1'b0;
clip_register = 1'b0;
- res_sel = Abs;
+ res_sel = Nop;
unique casez (operator_i)
riscv_instr::P_ABS: begin
cmp_op_b_sel = Zero;
res_sel = Abs;
end
riscv_instr::P_SLET: begin
+ cmp_op_b_sel = Reg;
res_sel = Sle;
end
riscv_instr::P_SLETU: begin
cmp_signed = 1'b0;
+ cmp_op_b_sel = Reg;
res_sel = Sle;
end
riscv_instr::P_MIN: begin
+ cmp_op_b_sel = Reg;
res_sel = Min;
end
riscv_instr::P_MINU: begin
cmp_signed = 1'b0;
+ cmp_op_b_sel = Reg;
res_sel = Min;
end
riscv_instr::P_MAX: begin
+ cmp_op_b_sel = Reg;
res_sel = Max;
end
riscv_instr::P_MAXU: begin
cmp_signed = 1'b0;
+ cmp_op_b_sel = Reg;
res_sel = Max;
end
riscv_instr::P_EXTHS: begin
+ cmp_op_b_sel = Reg;
res_sel = Exths;
end
riscv_instr::P_EXTHZ: begin
+ cmp_op_b_sel = Reg;
res_sel = Exthz;
end
riscv_instr::P_EXTBS: begin
+ cmp_op_b_sel = Reg;
res_sel = Extbs;
end
riscv_instr::P_EXTBZ: begin
+ cmp_op_b_sel = Reg;
res_sel = Extbz;
end
riscv_instr::P_CLIP: begin
|
Correct path in travis yml
|
@@ -102,7 +102,8 @@ install:
- export GCC_URL=https://developer.arm.com/-/media/Files/downloads/gnu-rm/6_1-2017q1/gcc-arm-none-eabi-6-2017-q1-update-linux.tar.bz2?product=GNU%20ARM%20Embedded%20Toolchain,64-bit,,Linux,6-2017-q1-update
- if [ ! -e $GCC_DIR/bin/arm-none-eabi-g++ ]; then wget $GCC_URL -O $GCC_ARCHIVE;
tar xfj $GCC_ARCHIVE -C $HOME; fi
-- export PATH=$PATH:$GCC_DIR/bi
+- export PATH=$PATH:$GCC_DIR/bin
+
addons:
apt:
packages:
|
session BUGFIX explicit conversion required
|
@@ -71,13 +71,8 @@ nc_difftimespec(struct timespec *ts1, struct timespec *ts2)
{
int64_t nsec_diff = 0;
- if (ts1->tv_nsec > ts2->tv_nsec) {
- ts2->tv_nsec += 1000000000L;
- --ts2->tv_sec;
- }
-
- nsec_diff += (ts2->tv_sec - ts1->tv_sec) * 1000000000L;
- nsec_diff += ts2->tv_nsec - ts1->tv_nsec;
+ nsec_diff += (((int64_t)ts2->tv_sec) - ((int64_t)ts1->tv_sec)) * 1000000000L;
+ nsec_diff += ((int64_t)ts2->tv_nsec) - ((int64_t)ts1->tv_nsec);
return (nsec_diff ? nsec_diff / 1000000L : 0);
}
|
detect fake anonce/snonce
|
@@ -88,6 +88,7 @@ bool filtermacflag;
bool fcsflag;
bool wantrawflag;
bool gpxflag;
+bool fakeflag;
unsigned long long int maxtvdiff;
unsigned long long int maxrcdiff;
@@ -300,6 +301,7 @@ hexmodeflag = false;
wantrawflag = false;
filtermacflag = false;
gpxflag = false;
+fakeflag = true;
maxtvdiff = MAX_TV_DIFF;
maxrcdiff = MAX_RC_DIFF;
@@ -510,7 +512,10 @@ printf( " \n"
"packets with GPS data............: %llu\n"
"packets with FCS.................: %llu\n"
, basename(pcapinname), pcaptype, version_major, version_minor, pcapnghwinfo, pcapngosinfo, pcapngapplinfo, getdltstring(networktype), networktype, getendianessstring(endianess), geterrorstat(pcapreaderrors), rawpacketcount, skippedpacketcount, gpsdframecount, fcsframecount);
-
+if(fakeflag == true)
+ {
+ printf("warning..........................: fake packets detected!\n");
+ }
if(tscleanflag == true)
{
printf("warning..........................: zero value timestamps detected - this prevents EAPOL timeout calculation\n");
@@ -3885,6 +3890,18 @@ uint16_t authlen;
uint64_t rc;
uint16_t kl;
+uint8_t fakeanonce1[] =
+{
+0x07, 0xbc, 0x92, 0xea, 0x2f, 0x5a, 0x1e, 0xe2, 0x54, 0xf6, 0xb1, 0xb7, 0xe0, 0xaa, 0xd3, 0x53,
+0xf4, 0x5b, 0x0a, 0xac, 0xf9, 0xc9, 0x90, 0x2f, 0x90, 0xd8, 0x78, 0x80, 0xb7, 0x03, 0x0a, 0x20
+};
+
+uint8_t fakesnonce1[] =
+{
+0x95, 0x30, 0xd1, 0xc7, 0xc3, 0x55, 0xb9, 0xab, 0xe6, 0x83, 0xd6, 0xf3, 0x7e, 0xcb, 0x78, 0x02,
+0x75, 0x1f, 0x53, 0xcc, 0xb5, 0x81, 0xd1, 0x52, 0x3b, 0xb4, 0xba, 0xad, 0x23, 0xab, 0x01, 0x07
+};
+
if(caplen < (uint32_t)RC4DES_SIZE)
{
return;
@@ -3956,6 +3973,20 @@ if(memcmp(&nullnonce, wpak->nonce, 32) == 0)
return;
}
+if(memcmp(&fakeanonce1, wpak->nonce, 32) == 0)
+ {
+ fakeflag = true;
+ skippedpacketcount++;
+ return;
+ }
+
+if(memcmp(&fakesnonce1, wpak->nonce, 32) == 0)
+ {
+ fakeflag = true;
+ skippedpacketcount++;
+ return;
+ }
+
if(keyinfo == 1)
{
addeapol(tv_sec, tv_usec, macaddr1, macaddr2, 1, rc, authlen +4, packet);
|
Cirrus: Add CI badge to ReadMe
|
[](https://github.com/ElektraInitiative/libelektra/releases/latest)
[](https://travis-ci.org/ElektraInitiative/libelektra)
+[](https://cirrus-ci.com/github/sanssecours/elektra)
[](https://coveralls.io/github/ElektraInitiative/libelektra)
_Elektra serves as a universal and secure framework to access configuration
|
test-suite: make ucx tests optional
|
@@ -420,7 +420,7 @@ AM_CONDITIONAL(TAU_ENABLED,test "x$enable_tau" = "xyes" )
# UCX
AC_ARG_ENABLE([ucx],
[AS_HELP_STRING([--enable-ucx],[Enable ucx tests (default=yes)])],[],
- [AX_OPTION_DEFAULT(type=long,enable_ucx,yes)])
+ [AX_OPTION_DEFAULT(type=long,enable_ucx,no)])
AM_CONDITIONAL(UCX_ENABLED,test "x$enable_ucx" = "xyes" )
#------------------------------------------------------------------------------------------
# Autotools
|
rune/libenclave/skeleton: Declare the PAL PAI version in README
|
@@ -65,6 +65,8 @@ Runtimes: rune runc
```
## Run skeleton container image with rune
+Note that replace `${SKELETON_PAL_VERSION}` with the actual version number. Currently skeleton supports PAL API v1 and v2.
+
```shell
docker run -it --rm --runtime=rune \
-e ENCLAVE_TYPE=intelSgx \
|
[core] avoid select() FD_ISSET repeat on active fds
|
@@ -884,35 +884,10 @@ fdevent_select_event_set (fdevents *ev, fdnode *fdn, int events)
return 0;
}
-static int
-fdevent_select_event_get_revent (const fdevents *ev, int ndx)
-{
- int revents = 0;
- if (FD_ISSET(ndx, &ev->select_read)) revents |= FDEVENT_IN;
- if (FD_ISSET(ndx, &ev->select_write)) revents |= FDEVENT_OUT;
- if (FD_ISSET(ndx, &ev->select_error)) revents |= FDEVENT_ERR;
- return revents;
-}
-
-static int
-fdevent_select_event_next_fdndx (const fdevents *ev, int ndx)
-{
- const int max_fd = ev->select_max_fd + 1;
- for (int i = (ndx < 0) ? 0 : ndx + 1; i < max_fd; ++i) {
- if (FD_ISSET(i, &(ev->select_read))) return i;
- if (FD_ISSET(i, &(ev->select_write))) return i;
- if (FD_ISSET(i, &(ev->select_error))) return i;
- }
-
- return -1;
-}
-
static int
fdevent_select_poll (fdevents *ev, int timeout_ms)
{
- int n;
struct timeval tv;
-
tv.tv_sec = timeout_ms / 1000;
tv.tv_usec = (timeout_ms % 1000) * 1000;
@@ -920,16 +895,21 @@ fdevent_select_poll (fdevents *ev, int timeout_ms)
ev->select_write = ev->select_set_write;
ev->select_error = ev->select_set_error;
- n = select(ev->select_max_fd + 1,
- &ev->select_read, &ev->select_write, &ev->select_error, &tv);
- for (int ndx = -1, i = 0; i < n; ++i) {
- fdnode *fdn;
- ndx = fdevent_select_event_next_fdndx(ev, ndx);
- if (-1 == ndx) break;
- fdn = ev->fdarray[ndx];
- if (0 == ((uintptr_t)fdn & 0x3)) {
- int revents = fdevent_select_event_get_revent(ev, ndx);
+ const int nfds = ev->select_max_fd + 1;
+ const int n =
+ select(nfds, &ev->select_read, &ev->select_write, &ev->select_error, &tv);
+ if (n <= 0) return n;
+ for (int ndx = -1, i = n; ++ndx < nfds; ) {
+ int revents = 0;
+ if (FD_ISSET(ndx, &ev->select_read)) revents |= FDEVENT_IN;
+ if (FD_ISSET(ndx, &ev->select_write)) revents |= FDEVENT_OUT;
+ if (FD_ISSET(ndx, &ev->select_error)) revents |= FDEVENT_ERR;
+ if (revents) {
+ const fdnode *fdn = ev->fdarray[ndx];
+ if (0 == ((uintptr_t)fdn & 0x3))
(*fdn->handler)(fdn->ctx, revents);
+ if (0 == --i)
+ break;
}
}
return n;
|
remove GPS time synchronization from debian-wspr.sh
|
@@ -124,22 +124,10 @@ update-locale LANG=en_US.UTF-8
echo $timezone > etc/timezone
dpkg-reconfigure --frontend=noninteractive tzdata
-apt-get -y install openssh-server ca-certificates fake-hwclock \
+apt-get -y install openssh-server ca-certificates ntp ntpdate fake-hwclock \
usbutils psmisc lsof parted curl vim wpasupplicant hostapd isc-dhcp-server \
iw firmware-realtek firmware-ralink firmware-atheros firmware-brcm80211 \
- build-essential subversion libfftw3-dev libconfig-dev ifplugd ntfs-3g \
- parallel pps-tools
-
-apt-get -y build-dep ntp
-
-mkdir root/ntp
-cd root/ntp
-apt-get -y source ntp
-cd ntp-*
-dpkg-buildpackage -b
-cd ..
-dpkg -i ntp*.deb
-cd ../..
+ build-essential subversion libfftw3-dev libconfig-dev parallel ifplugd ntfs-3g
cd root
svn co svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx/lib/wsprd
@@ -153,16 +141,6 @@ sed -i 's/^PermitRootLogin.*/PermitRootLogin yes/' etc/ssh/sshd_config
touch etc/udev/rules.d/75-persistent-net-generator.rules
-cat <<- EOF_CAT > etc/udev/rules.d/80-gps-to-ntp.rules
-KERNEL=="ttyPS1", SYMLINK+="gps0"
-KERNEL=="pps0", SYMLINK+="gpspps0"
-EOF_CAT
-
-sed -i '/^# You do need to talk to an NTP server/i\\
-server 127.127.20.0 mode 18 minpoll 4 maxpoll 4 prefer\\
-fudge 127.127.20.0 flag1 1 flag2 0 flag3 1 time2 0.500\\
-' etc/ntp.conf
-
cat <<- EOF_CAT > etc/network/interfaces.d/eth0
iface eth0 inet dhcp
EOF_CAT
|
Update sedem image
r6209078 by Fix test
r6215954 by Sedem: Add release candidates table in release info
r6216301 by Step and start fix
|
},
"sedem": {
"formula": {
- "sandbox_id": 587809932,
+ "sandbox_id": 588690229,
"match": "SEDEM archive"
},
"executable": {
|
remove masked as it is capture by if statement below it
|
@@ -41,7 +41,7 @@ int main(){
fflush(stdout);
#pragma omp parallel num_threads(10)
{
- #pragma omp masked // teams distribute
+ // #pragma omp masked // teams distribute
if (omp_get_thread_num() == 0) {
printf("Thread 0 is going to launch a kernel\n");
fflush(stdout);
|
Update Travis CI link in README.md
|
-# SDL2 binding for Go [](https://travis-ci.org/veandco/go-sdl2) [](https://goreportcard.com/report/github.com/veandco/go-sdl2) [](https://houndci.com) [](https://opencollective.com/veandco)
+# SDL2 binding for Go [](https://app.travis-ci.com/github/veandco/go-sdl2) [](https://goreportcard.com/report/github.com/veandco/go-sdl2) [](https://houndci.com) [](https://opencollective.com/veandco)
`go-sdl2` is SDL2 wrapped for Go users. It enables interoperability between Go and the SDL2 library which is written in C. That means the original SDL2 installation is required for this to work.
|
Update ethernetif.c
if LWIP_NETIF_HOSTNAME enable, the length is 'sizeof(struct netif)+ LWIP_HOSTNAME_LEN',
not only equal to 'sizeof(struct netif)'.
|
@@ -503,7 +503,11 @@ rt_err_t eth_device_init_with_flag(struct eth_device *dev, const char *name, rt_
rt_kprintf("malloc netif failed\n");
return -RT_ERROR;
}
+#if LWIP_NETIF_HOSTNAME
+ rt_memset(netif, 0, sizeof(struct netif)+ LWIP_HOSTNAME_LEN);
+#else
rt_memset(netif, 0, sizeof(struct netif));
+#endif
/* set netif */
dev->netif = netif;
|
netdriver: no need to start namespaces from the preinit_array
|
@@ -108,13 +108,6 @@ static void netDriver_initNsIfNeeded(void) {
(int)getpid());
}
-/*
- * Initialize namespaces before e.g. ASAN, which can spawn threads, what can use
- * unshare(CLONE_NEWUSER|...) to fail
- */
-__attribute__((section(".preinit_array"), used)) void (*__local_libhfnetdriver_preinit)(
- void) = netDriver_initNsIfNeeded;
-
static int netDriver_sockConnAddr(const struct sockaddr *addr, socklen_t socklen) {
int sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP);
if (sock == -1) {
|
remove duplicate codes in ExecSetParamPlan
Just remove duplicate code in ExecSetParamPlan(), it repeated with line 1158.
|
@@ -1166,12 +1166,6 @@ PG_TRY();
astate = initArrayResultAny(subplan->firstColType,
CurrentMemoryContext, true);
- /*
- * Enforce forward scan direction regardless of caller. It's hard but not
- * impossible to get here in backward scan, so make it work anyway.
- */
- estate->es_direction = ForwardScanDirection;
-
/*
* Must switch to per-query memory context.
*/
|
Turn the l_likely and l_unlikely into public macros
I should ask Roberto about renaming them to luai_ everywhere.
|
#endif
-
-#if defined(LUA_CORE) || defined(LUA_LIB)
/* shorter names for Lua's own use */
#define l_likely(x) luai_likely(x)
#define l_unlikely(x) luai_unlikely(x)
-#endif
-
/* }================================================================== */
|
voxel: undefine CONFIG_CHIP_INIT_ROM_REGION
Supports NPCX797FC dose not leave unused flash space.
BRANCH=master
TEST=make buildall
|
#undef NPCX7_PWM1_SEL
#define NPCX7_PWM1_SEL 0 /* GPIO C2 is not used as PWM1. */
-#ifdef BOARD_VOXEL_NPCX797FC
/*
* The RAM and flash size combination on the the NPCX797FC does not leave
* any unused flash space that can be used to store the .init_rom section.
*/
#undef CONFIG_CHIP_INIT_ROM_REGION
-#endif
#define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands while in dev. */
|
interface: unnecessary const
|
@@ -56,8 +56,7 @@ class GcpManager {
this.#api.gcp.refreshToken()
.then(
(expiresIn: number) => {
- const interval = this.refreshInterval(expiresIn);
- this.refreshAfter(interval);
+ this.refreshAfter(this.refreshInterval(expiresIn));
})
.catch(
({reason}) => {
|
I made some updates to the open build script.
|
@@ -580,7 +580,7 @@ cd $dist/src
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
export PATH=\$PATH:/usr/bin/X11
-/usr/workspace/wsa/visit/visit/thirdparty_shared/2.13.0/cmake/3.8.1/linux-x86_64_gcc-4.8/bin/cmake . -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON -DVISIT_PARADIS:BOOL=ON >> ../../buildlog 2>&1
+/usr/workspace/wsa/visit/visit/thirdparty_shared/2.13.0/chaos5/cmake/3.8.1/linux-x86_64_gcc-4.9/bin/cmake . -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON -DVISIT_PARADIS:BOOL=ON >> ../../buildlog 2>&1
make -j 6 package >> ../../buildlog 2>&1
mv visit\$ver2.linux-x86_64.tar.gz ../..
cd ../..
@@ -632,7 +632,7 @@ gunzip -c $dist.tar.gz | tar xvf - > buildlog 2>&1
cd $dist/src
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
-/usr/workspace/wsa/visit/visit/thirdparty_shared/2.13.0/cmake/3.8.1/linux-x86_64_gcc-4.9/bin/cmake . -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON -DVISIT_PARADIS:BOOL=ON >> ../../buildlog 2>&1
+/usr/workspace/wsa/visit/visit/thirdparty_shared/2.13.0/toss3/cmake/3.8.1/linux-x86_64_gcc-4.9/bin/cmake . -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON -DVISIT_PARADIS:BOOL=ON >> ../../buildlog 2>&1
make -j 12 package >> ../../buildlog 2>&1
mv visit\$ver2.linux-x86_64.tar.gz ../..
cd ../..
@@ -682,7 +682,7 @@ cd $dist/src
ver=\`cat VERSION\`
ver2=\`echo \$ver | tr "." "_"\`
export PATH=\$PATH:/usr/bin/X11
-/usr/workspace/wsrzc/visit/visit/thirdparty_shared/2.12.0/cmake/3.0.2/linux-x86_64_gcc-4.9/bin/cmake . -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON -DVISIT_PARADIS:BOOL=ON >> ../../buildlog 2>&1
+/usr/workspace/wsrzc/visit/visit/thirdparty_shared/2.13.0/toss3/cmake/3.8.1/linux-x86_64_gcc-4.9/bin/cmake . -DCMAKE_BUILD_TYPE:STRING=Release -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON -DVISIT_PARADIS:BOOL=ON >> ../../buildlog 2>&1
make -j 12 package >> ../../buildlog 2>&1
mv visit\$ver2.linux-x86_64.tar.gz ../..
cd ../..
|
upload travis builds to server
|
@@ -8,6 +8,8 @@ matrix:
include:
- os: osx
osx_image: xcode9.3
+ env:
+ - OS_FOLDER=mac
- os: linux
addons:
@@ -15,12 +17,10 @@ matrix:
packages:
- libgtk-3-dev
- libasound2-dev
+ env:
+ - OS_FOLDER=linux
-deploy:
- provider: s3
- region: eu-central-1
- access_key_id: ${ACCESS_KEY_ID}
- secret_access_key: ${SECRET_ACCESS_KEY}
- bucket: "tic80"
- skip_cleanup: true
- local_dir: bin
+after_success:
+ - BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$OS_FOLDER/
+ - tar -cvzf tic80.tar.gz --directory=$HOME/build/nesbox/TIC-80/bin tic80 tic80-sokol
+ - curl --retry 3 --ftp-create-dirs -T tic80.tar.gz $BUILDS_SERVER_PATH/
|
examples/binary_update : refactoring on binary_update_main
1. It did not do unnecessary initialization.
2 It deleted the unnecessary comparison.
|
#define APP1_NAME "micom"
#define APP2_NAME "wifi"
-#define EXEC_NORMAL 0
+#define EXEC_FINITE 0
#define EXEC_INFINITE 1
static volatile bool is_running;
@@ -163,9 +163,9 @@ int binary_update_main(int argc, char *argv[])
{
int repetition_num = 1;
int option;
- char *cmd_arg = NULL;
- char *cnt_arg = NULL;
- int execution_type = EXEC_NORMAL;
+ char *cmd_arg;
+ char *cnt_arg;
+ int execution_type;
if (argc >= 4 || argc == 2) {
goto usage;
@@ -178,7 +178,7 @@ int binary_update_main(int argc, char *argv[])
cmd_arg = optarg;
break;
case 'n':
- execution_type = EXEC_NORMAL;
+ execution_type = EXEC_FINITE;
cnt_arg = optarg;
break;
case '?':
@@ -189,13 +189,13 @@ int binary_update_main(int argc, char *argv[])
/* Execute the binary update example. */
if (execution_type == EXEC_INFINITE) {
- if (cmd_arg && strncmp(cmd_arg, "start", strlen("start") + 1) == 0) {
+ if (strncmp(cmd_arg, "start", strlen("start") + 1) == 0) {
if (is_running) {
goto already_running;
}
inf_flag = true;
binary_update_execute_infinitely();
- } else if (cmd_arg && strncmp(cmd_arg, "stop", strlen("stop") + 1) == 0) {
+ } else if (strncmp(cmd_arg, "stop", strlen("stop") + 1) == 0) {
if (inf_flag == false) {
printf("There is no infinite running Binary Update example. Cannot stop the sample.\n");
return -1;
|
changes issuer indices to non nerd mode
|
@@ -266,7 +266,7 @@ void promptAndSetIssuer() {
fav = provider_getIssuer(*provider);
prompting:
for(i=0; i<size; i++)
- printf("[%d] %s\n", i, providers[i]);
+ printf("[%d] %s\n", i+1, providers[i]); // printed indices starts at 1 for non nerds
char* input = prompt("Issuer [%s]: ", fav);
char* iss = NULL;
if(!isValid(input)) {
@@ -276,10 +276,11 @@ prompting:
} else if (isdigit(*input)){
i = atoi(input);
free(input);
- if(i>size-1 || i<0) {
+ if(i>size || i<1) {
printf("input out of bound\n");
goto prompting;
}
+ i--; // printed indices starts at 1 for non nerds
iss = calloc(sizeof(char), strlen(providers[i])+1);
strcpy(iss, providers[i]);
} else {
|
relay: add some casts to avoid formatter warnings on some platforms
|
@@ -516,7 +516,7 @@ main(int argc, char * const argv[])
}
if (len != sizeof(sockbufsize)) {
fprintf(stderr, "getsockopt returned unexpected size: %u, "
- "expected %lu\n", len, sizeof(sockbufsize));
+ "expected %zu\n", len, sizeof(sockbufsize));
exit(1);
}
if (sockbufsize > (unsigned int)val)
@@ -700,7 +700,7 @@ main(int argc, char * const argv[])
startup_success = 1;
if (pidfile_handle) {
- fprintf(pidfile_handle, "%d\n", getpid());
+ fprintf(pidfile_handle, "%zu\n", (ssize_t)getpid());
fclose(pidfile_handle);
}
|
OPAL_PCI_SET_POWER_STATE: fix locking in error paths
Otherwise we could exit OPAL holding locks, potentially leading
to all sorts of problems later on.
Cc: stable # 5.3+
Fixes:
|
@@ -785,8 +785,10 @@ static int64_t opal_pci_set_power_state(uint64_t async_token,
switch (*state) {
case OPAL_PCI_SLOT_POWER_OFF:
if (!slot->ops.prepare_link_change ||
- !slot->ops.set_power_state)
+ !slot->ops.set_power_state) {
+ phb_unlock(phb);
return OPAL_UNSUPPORTED;
+ }
slot->async_token = async_token;
slot->ops.prepare_link_change(slot, false);
@@ -794,22 +796,28 @@ static int64_t opal_pci_set_power_state(uint64_t async_token,
break;
case OPAL_PCI_SLOT_POWER_ON:
if (!slot->ops.set_power_state ||
- !slot->ops.get_link_state)
+ !slot->ops.get_link_state) {
+ phb_unlock(phb);
return OPAL_UNSUPPORTED;
+ }
slot->async_token = async_token;
rc = slot->ops.set_power_state(slot, PCI_SLOT_POWER_ON);
break;
case OPAL_PCI_SLOT_OFFLINE:
- if (!pd)
+ if (!pd) {
+ phb_unlock(phb);
return OPAL_PARAMETER;
+ }
pci_remove_bus(phb, &pd->children);
phb_unlock(phb);
return OPAL_SUCCESS;
case OPAL_PCI_SLOT_ONLINE:
- if (!pd)
+ if (!pd) {
+ phb_unlock(phb);
return OPAL_PARAMETER;
+ }
pci_scan_bus(phb, pd->secondary_bus, pd->subordinate_bus,
&pd->children, pd, true);
pci_add_device_nodes(phb, &pd->children, pd->dn,
|
[CUDA] Don't rely on presence of opencl.kernels metadata
Use target kernel name when generating nvvm.annotations metadata.
|
@@ -53,7 +53,7 @@ namespace llvm
}
// TODO: Should these be proper passes?
-void pocl_add_kernel_annotations(llvm::Module *module);
+void pocl_add_kernel_annotations(llvm::Module *module, const char *kernel);
void pocl_cuda_fix_printf(llvm::Module *module);
void pocl_cuda_link_libdevice(llvm::Module *module,
const char *kernel, const char *gpu_arch);
@@ -92,7 +92,7 @@ int pocl_ptx_gen(const char *bc_filename,
pocl_cuda_fix_printf(module->get());
pocl_gen_local_mem_args(module->get());
pocl_insert_ptx_intrinsics(module->get());
- pocl_add_kernel_annotations(module->get());
+ pocl_add_kernel_annotations(module->get(), kernel_name);
pocl_map_libdevice_calls(module->get());
pocl_cuda_link_libdevice(module->get(), kernel_name, gpu_arch);
if (pocl_get_bool_option("POCL_DEBUG_PTX", 0))
@@ -151,37 +151,27 @@ int pocl_ptx_gen(const char *bc_filename,
return pocl_write_file(ptx_filename, ptx.c_str(), ptx.size(), 0, 0);
}
-void pocl_add_kernel_annotations(llvm::Module *module)
+void pocl_add_kernel_annotations(llvm::Module *module, const char *kernel)
{
llvm::LLVMContext& context = module->getContext();
- // Remove nvvm.annotations metadata since it is sometimes corrupt
- llvm::NamedMDNode *nvvm_annotations =
- module->getNamedMetadata("nvvm.annotations");
+ // Remove existing nvvm.annotations metadata since it is sometimes corrupt
+ auto nvvm_annotations = module->getNamedMetadata("nvvm.annotations");
if (nvvm_annotations)
nvvm_annotations->eraseFromParent();
- llvm::NamedMDNode *md_kernels = module->getNamedMetadata("opencl.kernels");
- if (!md_kernels)
- return;
-
- // Add nvvm.annotations metadata to mark kernel entry points
+ // Add nvvm.annotations metadata to mark kernel entry point
nvvm_annotations = module->getOrInsertNamedMetadata("nvvm.annotations");
- for (auto K = md_kernels->op_begin(); K != md_kernels->op_end(); K++)
- {
- if (!(*K)->getOperand(0))
- continue;
- llvm::ConstantAsMetadata *cam =
- llvm::dyn_cast<llvm::ConstantAsMetadata>((*K)->getOperand(0).get());
- if (!cam)
- continue;
-
- llvm::Function *function = llvm::dyn_cast<llvm::Function>(cam->getValue());
+ // Get handle to function
+ auto func = module->getFunction(kernel);
+ if (!func)
+ POCL_ABORT("[CUDA] ptx-gen: kernel function not found in module\n");
+ // Create metadata
llvm::Constant *one =
llvm::ConstantInt::getSigned(llvm::Type::getInt32Ty(context), 1);
- llvm::Metadata *md_f = llvm::ValueAsMetadata::get(function);
+ llvm::Metadata *md_f = llvm::ValueAsMetadata::get(func);
llvm::Metadata *md_n = llvm::MDString::get(context, "kernel");
llvm::Metadata *md_1 = llvm::ConstantAsMetadata::get(one);
@@ -189,7 +179,6 @@ void pocl_add_kernel_annotations(llvm::Module *module)
llvm::MDNode *node = llvm::MDNode::get(context, v_md);
nvvm_annotations->addOperand(node);
}
-}
void pocl_erase_function_and_callers(llvm::Function *func)
{
|
chat: DMs repositioned below grouped chats
|
@@ -68,9 +68,6 @@ export class Sidebar extends Component {
.map((each, i) => {
let channels = groupedChannels[each] || [];
if (channels.length === 0) return;
- if (groupedChannels["/~/"] && groupedChannels["/~/"].length !== 0) {
- i = i + 1;
- }
return(
<GroupItem
key={i}
@@ -86,7 +83,7 @@ export class Sidebar extends Component {
)
});
if (groupedChannels["/~/"] && groupedChannels["/~/"].length !== 0) {
- groupedItems.unshift(
+ groupedItems.push(
<GroupItem
association={"/~/"}
chatMetadata={props.associations["chat"]}
@@ -94,7 +91,7 @@ export class Sidebar extends Component {
inbox={props.inbox}
station={props.station}
unreads={props.unreads}
- index={0}
+ index={"/~/"}
key={"/~/"}
{...props}
/>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.