message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
example/ble_throughput fix the throughput server crash bug when running with throughput client | @@ -700,7 +700,7 @@ void app_main(void)
xTaskCreate(&throughput_server_task, "throughput_server_task", 4048, NULL, 15, NULL);
#if (CONFIG_EXAMPLE_GATTS_NOTIFY_THROUGHPUT)
- gatts_semaphore = xSemaphoreCreateMutex();
+ gatts_semaphore = xSemaphoreCreateBinary();
if (!gatts_semaphore) {
ESP_LOGE(GATTS_TAG, "%s, init fail, the gatts semaphore create fail.", __func__);
return;
|
Restrict GlobalizationPreferences::Languages exception capture to AccessDeniedException | @@ -41,7 +41,7 @@ namespace PAL_NS_BEGIN {
m_user_language = FromPlatformString(GlobalizationPreferences::Languages->GetAt(0));
m_user_timezone = WindowsEnvironmentInfo::GetTimeZone();
}
- catch (...)
+ catch (AccessDeniedException^)
{
// Windows 10 RS4+ OS bug: sometimes access to GlobalizationPreferences::Languages fails
// with "Access Denied" error. It is not certain if it's because the list is empty or
|
Fix typo in the byte code documentation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Vince | /**
* Several opcodes (mostly call and assignment opcodes) have
* two forms: one which does not push a return value onto
- * the stack, and another which does. The reasion is that
+ * the stack, and another which does. The reason is that
* the return value of these opcodes are often not used
* and the first form provides smaller byte code.
*
|
set card and dimm defaults for KU3 and FGT | @@ -102,15 +102,8 @@ while [ -z "$SETUP_DONE" ]; do
echo "ACTION_ROOT is set to \"$ACTION_ROOT\""
fi
- if [ ! -d "$HDK_ROOT" ]; then
- export HDK_ROOT=$FRAMEWORK_ROOT/cards/adku060_capi_1_1_release
- echo "Setting HDK_ROOT to \"$HDK_ROOT\""
- else
- echo "HDK_ROOT is set to \"$HDK_ROOT\""
- fi
-
if [ -z "$FPGACARD" ]; then
- export FPGACARD=FGT
+ export FPGACARD=KU3
echo "Setting FPGACARD to \"$FPGACARD\""
else
echo "FPGACARD is set to \"$FPGACARD\""
@@ -123,8 +116,24 @@ while [ -z "$SETUP_DONE" ]; do
echo "FPGACHIP is set to \"$FPGACHIP\""
fi
+ if [ ! -d "$HDK_ROOT" ]; then
+ if [ $FPGACARD = "KU3" ]
+ export HDK_ROOT=$FRAMEWORK_ROOT/cards/adku060_capi_1_1_release
+ else
+ export HDK_ROOT=$FRAMEWORK_ROOT/cards/flashgt_2016_3
+ fi
+
+ echo "Setting HDK_ROOT to \"$HDK_ROOT\""
+ else
+ echo "HDK_ROOT is set to \"$HDK_ROOT\""
+ fi
+
if [ ! -d "$DIMMTEST" ]; then
+ if [ $FPGACARD = "KU3" ]
export DIMMTEST=$FRAMEWORK_ROOT/cards/dimm_test-admpcieku3-v3_0_0
+ else
+ export DIMMTEST=$FRAMEWORK_ROOT/cards/flashgt_dimm
+ fi
echo "Setting DIMMTEST to \"$DIMMTEST\""
else
echo "DIMMTEST is set to \"$DIMMTEST\""
|
YAJL: Add array example to MSR test | @@ -113,6 +113,27 @@ kdb file user/examples/yajl/ | xargs cat
#> "number": 1337
#> }
+# Add an array
+kdb set user/examples/yajl/piggy/#0 straw
+kdb set user/examples/yajl/piggy/#1 sticks
+kdb set user/examples/yajl/piggy/#2 bricks
+
+# Retrieve an array key
+kdb get user/examples/yajl/piggy/#2
+#> bricks
+
+# Check the format of the configuration file
+kdb file user/examples/yajl | xargs cat
+#> {
+#> "key": "value",
+#> "number": 1337,
+#> "piggy": [
+#> "straw",
+#> "sticks",
+#> "bricks"
+#> ]
+#> }
+
# Undo modifications to the database
kdb rm -r /examples/yajl
sudo kdb umount /examples/yajl
|
fix for BSD cryptodev
by levitte | @@ -81,6 +81,14 @@ void engine_load_cryptodev_int(void)
#else
+/* Available on cryptodev-linux but not on FreeBSD 8.4 */
+# ifndef CRYPTO_HMAC_MAX_KEY_LEN
+# define CRYPTO_HMAC_MAX_KEY_LEN 512
+# endif
+# ifndef CRYPTO_CIPHER_MAX_KEY_LEN
+# define CRYPTO_CIPHER_MAX_KEY_LEN 64
+# endif
+
struct dev_crypto_state {
struct session_op d_sess;
int d_fd;
@@ -169,16 +177,22 @@ static struct {
{CRYPTO_ARC4, NID_rc4, 0, 16},
{CRYPTO_DES_CBC, NID_des_cbc, 8, 8},
{CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24},
+# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_3DES_ECB)
{CRYPTO_3DES_ECB, NID_des_ede3_ecb, 0, 24},
+# endif
{CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16},
{CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24},
{CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32},
+# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_AES_CTR)
{CRYPTO_AES_CTR, NID_aes_128_ctr, 14, 16},
{CRYPTO_AES_CTR, NID_aes_192_ctr, 14, 24},
{CRYPTO_AES_CTR, NID_aes_256_ctr, 14, 32},
+# endif
+# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_AES_ECB)
{CRYPTO_AES_ECB, NID_aes_128_ecb, 0, 16},
{CRYPTO_AES_ECB, NID_aes_192_ecb, 0, 24},
{CRYPTO_AES_ECB, NID_aes_256_ecb, 0, 32},
+# endif
{CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16},
{CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16},
{CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0},
|
Workaround for race condition in logger test failure. | @@ -74,6 +74,7 @@ increment_counter(Level) ->
Pid ! {increment, Level}.
get_counter(Level) ->
+ ?TIMER:sleep(50),
Pid = erlang:whereis(counter),
Ref = erlang:make_ref(),
Pid ! {self(), Ref, get_counter, Level},
|
Scripts: Refactoring | @@ -38,6 +38,9 @@ use strict;
use warnings;
$ARGV[0] or die "USAGE: $0 input.tsv\n";
+my $WRITE_TO_FILES = 1;
+my $WRITE_TO_PARAMDB = 0;
+
my ($paramId, $shortName, $name, $units, $cfVarName);
my ($discipline, $pcategory, $pnumber, $type1, $type2, $scaledValue1, $scaleFactor1, $scaledValue2, $scaleFactor2, $stat);
@@ -47,12 +50,13 @@ my $NAME_FILENAME = "name.def";
my $UNITS_FILENAME = "units.def";
my $CFVARNAME_FILENAME = "cfVarName.def";
-write_or_append(\*OUT_PARAMID, "$PARAMID_FILENAME");
-write_or_append(\*OUT_SHORTNAME, "$SHORTNAME_FILENAME");
-write_or_append(\*OUT_NAME, "$NAME_FILENAME");
-write_or_append(\*OUT_UNITS, "$UNITS_FILENAME");
-write_or_append(\*OUT_CFVARNAME, "$CFVARNAME_FILENAME");
-
+if ($WRITE_TO_FILES) {
+ create_or_append(\*OUT_PARAMID, "$PARAMID_FILENAME");
+ create_or_append(\*OUT_SHORTNAME, "$SHORTNAME_FILENAME");
+ create_or_append(\*OUT_NAME, "$NAME_FILENAME");
+ create_or_append(\*OUT_UNITS, "$UNITS_FILENAME");
+ create_or_append(\*OUT_CFVARNAME, "$CFVARNAME_FILENAME");
+}
my $first = 1;
while (<>) {
@@ -74,21 +78,25 @@ while (<>) {
$cfVarName = $shortName;
$cfVarName = '\\'.$shortName if ($shortName =~ /^[0-9]/);
+ if ($WRITE_TO_FILES) {
write_out_file(\*OUT_PARAMID, $name, $paramId);
write_out_file(\*OUT_SHORTNAME, $name, $shortName);
write_out_file(\*OUT_NAME, $name, $name);
write_out_file(\*OUT_UNITS, $name, $units);
write_out_file(\*OUT_CFVARNAME, $name, $cfVarName);
}
+}
+if ($WRITE_TO_FILES) {
print "Wrote output files: $PARAMID_FILENAME $SHORTNAME_FILENAME $NAME_FILENAME $UNITS_FILENAME $CFVARNAME_FILENAME\n";
close(OUT_PARAMID) or die "$PARAMID_FILENAME: $!";
close(OUT_SHORTNAME) or die "$SHORTNAME_FILENAME: $!";
close(OUT_NAME) or die "$NAME_FILENAME: $!";
close(OUT_UNITS) or die "$UNITS_FILENAME: $!";
close(OUT_CFVARNAME) or die "$CFVARNAME_FILENAME: $!";
+}
-
+# -------------------------------------------------------------------
sub write_out_file {
my $outfile = $_[0];
my $name = $_[1];
@@ -134,7 +142,7 @@ sub check_first_row_column_names {
die "Error: 1st row column titles wrong: Column 14 should be 'typeOfStatisticalProcessing'\n" if ($keys[13] ne "typeOfStatisticalProcessing");
}
-sub write_or_append {
+sub create_or_append {
my $outfile = $_[0];
my $fname = $_[1];
|
Report failed/crashing tool command lines
Closes | #include <stdlib.h>
#include <string.h>
#include <fcntl.h>
+#include <limits.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -245,10 +246,18 @@ ExecuteProcess(
{
result.m_ReturnCode = 1;
result.m_WasSignalled = true;
+
+ int sig = WTERMSIG(return_code);
+ TerminalIoPrintf(job_id, INT_MAX, "child process exited on signal %d: %s\n", sig, cmd_line);
}
else
{
result.m_ReturnCode = WEXITSTATUS(return_code);
+
+ if (0 != result.m_ReturnCode && !echo_cmdline)
+ {
+ TerminalIoPrintf(job_id, INT_MAX, "child process failed with exit code %d: %s\n", result.m_ReturnCode, cmd_line);
+ }
}
return result;
|
[hardware] Fix Makefile for modelsim command outside ETH | @@ -41,6 +41,7 @@ python ?= python3.6
# Check if the specified QuestaSim version exists
ifeq (, $(shell which $(questa_cmd)))
+ # Spaces are needed for indentation here!
$(warning "Specified QuestaSim version ($(questa_cmd)) not found in PATH $(PATH)")
questa_cmd =
endif
|
this wasn't committed for some reason | @@ -50,24 +50,23 @@ void DrawCoordinateSystem(
float x, float y, float z,
float qx, float qy, float qz, float qr)
{
- Quaternion i0,j0,k0;
- Quaternion i, j, k;
- Quaternion q;
+ FLT i0[3],j0[3],k0[3];
+ FLT i[3],j[3],k[3];
+ FLT q[4];
- // Calculate the i, j, and k vectors
- QuaternionSet(i0, 1, 0, 0, 0);
- QuaternionSet(j0, 0, 1, 0, 0);
- QuaternionSet(k0, 0, 0, 1, 0);
- QuaternionSet(q, qx, qy, qz, qr);
- QuaternionRot(i, q, i0);
- QuaternionRot(j, q, j0);
- QuaternionRot(k, q, k0);
+ i0[0]=1.0; i0[1]=0.0; i0[2]=0.0;
+ j0[0]=0.0; j0[1]=1.0; j0[2]=0.0;
+ k0[0]=0.0; k0[1]=0.0; k0[2]=1.0;
+ q [0]=qr; q [1]=qx; q [2]=qy; q [3]=qz;
+
+ quatrotatevector(i, q, i0);
+ quatrotatevector(j, q, j0);
+ quatrotatevector(k, q, k0);
- // Draw the coordinate system i red, j green, k blue
glBegin(GL_LINES);
- glColor3f(1, 0, 0); glVertex3f(x,z,y); glVertex3f(x+i.i,z+i.k,y+i.j);
- glColor3f(0, 1, 0); glVertex3f(x,z,y); glVertex3f(x+j.i,z+j.k,y+j.j);
- glColor3f(0, 0, 1); glVertex3f(x,z,y); glVertex3f(x+k.i,z+k.k,y+k.j);
+ glColor3f(1, 0, 0); glVertex3f(x,z,y); glVertex3f(x+i[0],z+i[2],y+i[1]);
+ glColor3f(0, 1, 0); glVertex3f(x,z,y); glVertex3f(x+j[0],z+j[2],y+j[1]);
+ glColor3f(0, 0, 1); glVertex3f(x,z,y); glVertex3f(x+k[0],z+k[2],y+k[1]);
glEnd();
}
|
ds json UPDATE use process owner/group when creating files
Instead of using the ones from the startup file.
Fixes | @@ -297,7 +297,7 @@ srpds_json_store(const struct lys_module *mod, sr_datastore_t ds, const struct l
{
mode_t perm = 0;
int rc;
- char *path = NULL, *owner = NULL, *group = NULL;
+ char *path = NULL;
switch (ds) {
case SR_DS_STARTUP:
@@ -316,22 +316,20 @@ srpds_json_store(const struct lys_module *mod, sr_datastore_t ds, const struct l
break;
}
- /* get the correct permissions to set for the new file */
- if ((rc = srpds_json_access_get(mod, ds, &owner, &group, &perm))) {
+ /* get the correct permissions to set for the new file (not owner/group because we may not have permissions to set them) */
+ if ((rc = srpds_json_access_get(mod, ds, NULL, NULL, &perm))) {
goto cleanup;
}
break;
}
/* store */
- if ((rc = srpds_json_store_(mod, ds, mod_data, owner, group, perm, 1))) {
+ if ((rc = srpds_json_store_(mod, ds, mod_data, NULL, NULL, perm, 1))) {
goto cleanup;
}
cleanup:
free(path);
- free(owner);
- free(group);
return rc;
}
|
remove stray string | @@ -44,7 +44,7 @@ static const char* g_server_usage =
" announce [<query>[:<port>] [<minutes>]]\n"
" ping <addr>\n";
-const char* g_server_usage_debug = "0"
+const char* g_server_usage_debug =
" blacklist <addr>\n"
" list blacklist|searches|announcements|nodes"
#ifdef FWD
|
stdatomic: support gcc built-in functions for esp32s2beta | @@ -6,9 +6,12 @@ else()
set(srcs "debug_helpers.c"
"debug_helpers_asm.S"
"eri.c"
- "stdatomic.c")
+ )
- if(CONFIG_IDF_TARGET_ESP32)
+ if(IDF_TARGET STREQUAL "esp32s2beta")
+ list(APPEND srcs "stdatomic.c")
+ endif()
+ if(IDF_TARGET STREQUAL "esp32")
list(APPEND srcs "trax.c")
endif()
endif()
|
[doc] update external links | @@ -29,13 +29,13 @@ Rather than attempting to maintain scripts for an unknown number of distros,
here are links to a few, which can be used as examples.
Arch:
-https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/lighttpd
+https://github.com/archlinux/svntogit-packages/tree/packages/lighttpd/trunk
Debian:
-https://anonscm.debian.org/cgit/pkg-lighttpd/lighttpd.git/tree/debian
+https://salsa.debian.org/debian/lighttpd
Fedora:
-http://pkgs.fedoraproject.org/cgit/rpms/lighttpd.git/tree/
+https://src.fedoraproject.org/rpms/lighttpd/tree/rawhide
Gentoo:
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-servers/lighttpd/files
|
[core] tighten chunkqueue_mark_written; better asm
chunkqueue_mark_written() also removes finished chunks from beginning of
chunkqueue instead of separate call to chunkqueue_remove_finished_chunks | @@ -1159,24 +1159,21 @@ void chunkqueue_append_cq_range (chunkqueue * const dst, const chunkqueue * cons
void chunkqueue_mark_written(chunkqueue *cq, off_t len) {
cq->bytes_out += len;
- for (chunk *c; (c = cq->first); ) {
+ for (chunk *c = cq->first; c; ) {
off_t c_len = chunk_remaining_length(c);
if (len >= c_len) { /* chunk got finished */
+ chunk * const x = c;
+ c = c->next;
len -= c_len;
- cq->first = c->next;
- chunk_release(c);
- if (0 == len) break;
+ chunk_release(x);
}
else { /* partial chunk */
c->offset += len;
+ cq->first = c;
return; /* chunk not finished */
}
}
-
- if (NULL == cq->first)
- cq->last = NULL;
- else
- chunkqueue_remove_finished_chunks(cq);
+ cq->first = cq->last = NULL;
}
void chunkqueue_remove_finished_chunks(chunkqueue *cq) {
|
wsman-soap-message: check for NULL from zalloc | @@ -65,6 +65,8 @@ WsmanMessage*
wsman_soap_message_new()
{
WsmanMessage *wsman_msg = u_zalloc(sizeof(WsmanMessage));
+ if (!wsman_msg)
+ return NULL;
u_buf_create(&wsman_msg->request);
u_buf_create(&wsman_msg->response);
// wsman_msg->charset = "UTF-8";
|
Add Intel Denverton | @@ -566,8 +566,8 @@ static gotoblas_t *get_coretype(void){
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
}
}
- //Apollo Lake
- if (model == 12) {
+ //Apollo Lake or Denverton
+ if (model == 12 || model == 15) {
return &gotoblas_NEHALEM;
}
return NULL;
|
Reintroduce missing function in pallenec
At some point we accidentally removed the pallenec_abort function. This caused
pallenec to crash instead of printing out a nice error message. | @@ -16,6 +16,10 @@ local args = p:parse()
-- Inspired by gcc, eg. "gcc: fatal error: no input files".
local compiler_name = arg[0]
+local function pallenec_abort(fmt, ...)
+ return util.abort(compiler_name .. ":" .. string.format(fmt, ...))
+end
+
local function compile(in_ext, out_ext)
local ok, errs = driver.compile(
compiler_name, in_ext, out_ext, args.source_file)
@@ -31,8 +35,7 @@ if args.compile_c then table.insert(flags, "--compile-c") end
if #flags >= 2 then
local conflicting = table.concat(flags, " and ")
- local msg = string.format("flags %s are mutually exclusive", conflicting)
- pallenec_abort(msg)
+ pallenec_abort("flags %s are mutually exclusive", conflicting)
end
if #flags == 0 then compile("pln", "so")
|
[CI] Fix duplicate job name | @@ -39,7 +39,7 @@ jobs:
x86_64-toolchain
axle-sysroot
- build-sysroot-and-toolchain:
+ build-kernel:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
|
Fix bugs in bitmap_alloc | int bitmap_alloc(unsigned int *array, int num_bits)
{
int bitindex;
- int wordindex;
+ int wordindex = 0;
- for (wordindex = 0; wordindex < num_bits; wordindex += 32)
- {
- if (array[wordindex] != 0xffffffff)
+ // Scan whole words at a time looking for a non-zero index
+ while (array[wordindex] == 0xffffffff)
{
+ if (++wordindex == num_bits / 32)
+ return -1;
+ }
+
// Search this word for the first zero bit. Inverting the bitmap
// allows us to scan for this, since there is no
// count-trailing-ones.
- bitindex = __builtin_ctz(~array[wordindex]);
- array[wordindex] |= 1 << bitindex;
+ bitindex = __builtin_clz(~array[wordindex]);
+ array[wordindex] |= 0x80000000 >> bitindex;
return wordindex * 32 + bitindex;
}
- }
-
- return -1;
-}
void bitmap_free(unsigned int *array, int index)
{
array[index / 32] &= ~(0x80000000 >> (index % 32));
}
+#ifdef TEST_BITMAP_ALLOC
+
+#define NUM_TEST_BITS 128
+
+void test_bitmap()
+{
+ unsigned int bitmap[NUM_TEST_BITS / 32];
+ int index;
+
+ memset(bitmap, 0, sizeof(bitmap));
+
+ for (index = 0; index < NUM_TEST_BITS; index++)
+ assert(bitmap_alloc(bitmap, NUM_TEST_BITS) == index);
+
+ assert(bitmap_alloc(bitmap, NUM_TEST_BITS) == -1);
+
+ for (index = 0; index < NUM_TEST_BITS; index += 3)
+ bitmap_free(bitmap, index);
+
+ for (index = 0; index < NUM_TEST_BITS; index += 3)
+ assert(bitmap_alloc(bitmap, NUM_TEST_BITS) == index);
+
+ kprintf("bitmap tests passed\n");
+}
+
+#endif
|
s5j/serial: add constraints on UART flowcontrol
RTS/CTS pins of UART2/3 are shared with other peripherals. To ensure
that those pins are mutually exclusive, add dependencies on Kconfig
entries. | @@ -248,6 +248,7 @@ config S5J_UART2_FLOWCONTROL
bool "UART2 Flow Control"
default n
depends on S5J_UART2
+ depends on !S5J_UART1
select S5J_UART_FLOWCONTROL
config S5J_UART3
@@ -261,6 +262,8 @@ config S5J_UART3_FLOWCONTROL
bool "UART3 Flow Control"
default n
depends on S5J_UART3
+ depends on !S5J_PWM0
+ depends on !S5J_PWM1
select S5J_UART_FLOWCONTROL
config S5J_UART4
|
Fix memory leak in `rxml_node_path` funcion (node.path method) | @@ -983,14 +983,18 @@ static VALUE rxml_node_path(VALUE self)
{
xmlNodePtr xnode;
xmlChar *path;
+ VALUE result = Qnil;
xnode = rxml_get_xnode(self);
path = xmlGetNodePath(xnode);
- if (path == NULL)
- return (Qnil);
- else
- return (rxml_new_cstr( path, NULL));
+ if (path)
+ {
+ result = rxml_new_cstr( path, NULL);
+ xmlFree(path);
+ }
+
+ return result;
}
/*
|
Remove unused parameter from ocf_mngt_cache_device_config | @@ -310,12 +310,6 @@ struct ocf_mngt_cache_device_config {
*/
bool force;
- /**
- * @brief Minimum free RAM required to start cache. Set during
- * cache start procedure
- */
- uint64_t min_free_ram;
-
/**
* @brief If set, cache features (like discard) are tested
* before starting cache
|
Added info about include X11 in ubuntu.
Added comment with X11 path in systems based on ubuntu. | @@ -10,6 +10,10 @@ MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
+# include X11 in Ubuntu
+# X11INC = /usr/include/X11R6
+# X11LIB = /usr/lib/X11R6
+
PKG_CONFIG = pkg-config
# includes and libs
|
Fix typo in answer file, introduced by | -- If the function AssignResGroupOnMaster() fails after getting a slot,
-- test the slot will be unassigned correctly.
+
DROP ROLE IF EXISTS role_test;
DROP
-- start_ignore
|
[kernel] avoid trouble when the nsds is empty | @@ -378,7 +378,6 @@ bool GlobalFrictionContact::preCompute(double time)
_w->resize(_sizeOutput);
_w->zero();
}
-
if(_globalVelocities->size() != _sizeGlobalOutput)
{
_globalVelocities->resize(_sizeGlobalOutput);
@@ -399,9 +398,12 @@ int GlobalFrictionContact::compute(double time)
return info;
updateMu();
// --- Call Numerics solver ---
+ if(_sizeGlobalOutput != 0)
+ {
info= solve();
DEBUG_EXPR(display(););
postCompute();
+ }
return info;
}
|
bump test-suite to 1.4 | Summary: Integration test suite for OpenHPC
Name: test-suite%{PROJ_DELIM}
-Version: 1.3.1
+Version: 1.4
Release: 1
License: Apache-2.0
Group: %{PROJ_NAME}/admin
|
replaced the remaining string.matches with tag_matches | @@ -124,7 +124,7 @@ declare_type("Name", {
})
function Checker:add_type(name, typ)
- assert(string.match(typ._tag, "^types%.T%."))
+ assert(typedecl.tag_matches(typ._tag, "types.T."))
self.symbol_table:add_symbol(name, checker.Name.Type(typ))
end
@@ -689,7 +689,7 @@ function Checker:check_exp_synthesize(exp)
check_type_is_condition(exp.exp, "'not' operator")
exp._type = types.T.Boolean()
else
- typedecl.tag_error(tag, string.format("unknown unary operator '%s'.", op))
+ typedecl.tag_error(op)
end
elseif tag == "ast.Exp.Binop" then
|
Fix generation of Python interface on Windows. | @@ -905,8 +905,6 @@ function (tinyspline_add_swig_library)
SOURCES "swig/${ARGS_TARGET}.i"
${TINYSPLINE_CXX_SOURCE_FILES})
endif()
- target_compile_definitions(${ARGS_TARGET}
- PUBLIC ${TINYSPLINE_CXX_DEFINITIONS})
# On Linux, we can (and for the sake of portability should) omit
# linking libraries.
if(NOT ${TINYSPLINE_PLATFORM_NAME} STREQUAL "linux")
@@ -921,6 +919,8 @@ function (tinyspline_add_swig_library)
set_target_properties(${ACTUAL_TARGET} PROPERTIES
FOLDER ${TINYSPLINE_BINDINGS_FOLDER_NAME}
COMPILE_FLAGS "${TINYSPLINE_BINDING_CXX_FLAGS} ${ARGS_FLAGS}")
+ target_compile_definitions(${ACTUAL_TARGET}
+ PUBLIC ${TINYSPLINE_CXX_DEFINITIONS})
if (${CMAKE_VERSION} VERSION_LESS "3.8.0")
set_property(TARGET ${ACTUAL_TARGET}
APPEND PROPERTY TYPE MODULE_LIBRARY)
|
Fix `make -j#`
I added more dependencies to the build recipes.
Without this change this command would fail for me: `make clean && make -j8`.
The culprit was that the obj directory structure was not created in
time. | @@ -230,7 +230,7 @@ build: create_obj_dir_structure $(BINDIR)/$(AGENT) $(BINDIR)/$(AGENTSERVER) $(BI
## Compile and generate depencency info
$(OBJDIR)/$(CLIENT)/$(CLIENT).o : $(APILIB)/$(SHARED_LIB_NAME_FULL)
-$(OBJDIR)/%.o : $(SRCDIR)/%.c
+$(OBJDIR)/%.o : $(SRCDIR)/%.c create_obj_dir_structure
@$(CC) $(CFLAGS) -c $< -o $@ -DVERSION=\"$(VERSION)\" -DCONFIG_PATH=\"$(CONFIG_PATH)\" $(DEFINE_USE_CJSON_SO) $(DEFINE_USE_LIST_SO)
@# Create dependency infos
@{ \
@@ -247,16 +247,16 @@ $(OBJDIR)/%.o : $(SRCDIR)/%.c
@echo "Compiled "$<" successfully!"
## Compile lib sources
-$(OBJDIR)/%.o : $(LIBDIR)/%.c
+$(OBJDIR)/%.o : $(LIBDIR)/%.c create_obj_dir_structure
@$(CC) $(CFLAGS) -c $< -o $@
@echo "Compiled "$<" successfully!"
## Compile position independent code
-$(PICOBJDIR)/%.o : $(SRCDIR)/%.c
+$(PICOBJDIR)/%.o : $(SRCDIR)/%.c create_picobj_dir_structure
@$(CC) $(CFLAGS) -fpic -fvisibility=hidden -c $< -o $@ -DVERSION=\"$(VERSION)\" -DCONFIG_PATH=\"$(CONFIG_PATH)\"
@echo "Compiled "$<" with pic successfully!"
-$(PICOBJDIR)/%.o : $(LIBDIR)/%.c
+$(PICOBJDIR)/%.o : $(LIBDIR)/%.c create_picobj_dir_structure
@$(CC) $(CFLAGS) -fpic -fvisibility=hidden -c $< -o $@
@echo "Compiled "$<" with pic successfully!"
|
travis: compile with -O3 by default
There are quite a few cases where optimization breaks a few tests,
optimization will be disabled on those platforms (hopefully
temporarily). I suspect a lot of them are actually compiler bugs
at this point, but creating minimal test cases could be a bit of
a pain. | @@ -13,6 +13,7 @@ env:
- BUILD_CPP_TESTS=ON
- CMAKE_GENERATOR='Ninja'
- RUN_TESTS=true
+ - OPTIMIZATION_FLAGS='-O3'
jobs:
include:
@@ -65,6 +66,8 @@ jobs:
- name: "aarch64"
arch: arm64
+ env:
+ - OPTIMIZATION_FLAGS=''
- name: "ppc64le"
arch: ppc64le
@@ -79,6 +82,7 @@ jobs:
- name: "-DSIMDE_NO_SHUFFLE_VECTOR"
env:
- COMPILER_FLAGS=-DSIMDE_NO_SHUFFLE_VECTOR
+ - OPTIMIZATION_FLAGS=''
- name: "pgcc"
env:
@@ -86,6 +90,7 @@ jobs:
- CXX_COMPILER=pgc++
- ARCH_FLAGS="-m64"
- BUILD_CPP_TESTS=OFF
+ - OPTIMIZATION_FLAGS=''
install:
- curl 'https://raw.githubusercontent.com/nemequ/pgi-travis/master/install-pgi.sh' | /bin/sh
@@ -102,6 +107,7 @@ jobs:
- ARCH_FLAGS=-qarch=auto
- C_COMPILER=xlc
- CXX_COMPILER=xlc++
+ - OPTIMIZATION_FLAGS=''
- name: osx
os: osx
@@ -111,12 +117,14 @@ jobs:
env:
- ARCH_FLAGS=""
- CMAKE_GENERATOR="Visual Studio 15 2017"
+ - OPTIMIZATION_FLAGS="/Ox"
- name: msvc x86_64
os: windows
env:
- ARCH_FLAGS=""
- CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
+ - OPTIMIZATION_FLAGS="/Ox"
- name: msvc arm
os: windows
@@ -124,10 +132,13 @@ jobs:
- ARCH_FLAGS=""
- CMAKE_GENERATOR="Visual Studio 15 2017 ARM"
- RUN_TESTS=false
+ - OPTIMIZATION_FLAGS="/Ox"
- name: "gcc-7 amd64"
compiler: gcc
arch: amd64
+ env:
+ - OPTIMIZATION_FLAGS=''
- name: "clang-7 amd64"
arch: amd64
@@ -138,6 +149,7 @@ jobs:
env:
- C_COMPILER=icc
- CXX_COMPILER=icpc
+ - OPTIMIZATION_FLAGS="/Ox"
- BUILD_CPP_TESTS=OFF
install:
- source /opt/intel/inteloneapi/compiler/latest/env/vars.sh
@@ -166,6 +178,7 @@ jobs:
- ARCH_FLAGS=""
- C_COMPILER=emcc
- CXX_COMPILER=emcc
+ - OPTIMIZATION_FLAGS=''
- CONFIGURE_WRAPPER=emconfigure
- BUILD_WRAPPER=emmake
- EXECUTABLE_EXTENSION=.js
|
docs: page break cleanup | %% \subsection{Optionally add \InfiniBand{} support services on {\em master} node} \label{sec:add_ofed}
%% \input{common/ibsupport_sms_sles}
-\vspace*{-0.3cm}
+\vspace*{-0.25cm}
\subsection{Complete basic Warewulf setup for {\em master} node} \label{sec:setup_ww}
\input{common/warewulf_setup}
\input{common/warewulf_setup_sles}
+\vspace*{-0.25cm}
\subsection{Define {\em compute} image for provisioning}
\input{common/warewulf_mkchroot_sles}
\input{common/slurm_startup}
%\clearpage
-\vspace*{-1cm}
+%\vspace*{-1cm}
\section{Run a Test Job} \label{sec:test_job}
\input{common/slurm_test_job}
|
Fix documentation for provider-signature
Fixes | @@ -43,7 +43,7 @@ provider-signature - The signature library E<lt>-E<gt> provider functions
/* Digest Sign */
int OSSL_FUNC_signature_digest_sign_init(void *ctx, const char *mdname,
- const char *props, void *provkey,
+ void *provkey,
const OSSL_PARAM params[]);
int OSSL_FUNC_signature_digest_sign_update(void *ctx, const unsigned char *data,
size_t datalen);
@@ -56,7 +56,7 @@ provider-signature - The signature library E<lt>-E<gt> provider functions
/* Digest Verify */
int OSSL_FUNC_signature_digest_verify_init(void *ctx, const char *mdname,
- const char *props, void *provkey,
+ void *provkey,
const OSSL_PARAM params[]);
int OSSL_FUNC_signature_digest_verify_update(void *ctx,
const unsigned char *data,
@@ -266,9 +266,7 @@ OSSL_FUNC_signature_set_ctx_md_params().
The key object should have been
previously generated, loaded or imported into the provider using the
key management (OSSL_OP_KEYMGMT) operation (see provider-keymgmt(7)>.
-The name of the digest to be used will be in the I<mdname> parameter. There may
-also be properties to be used in fetching the digest in the I<props> parameter,
-although this may be ignored by providers.
+The name of the digest to be used will be in the I<mdname> parameter.
OSSL_FUNC_signature_digest_sign_update() provides data to be signed in the I<data>
parameter which should be of length I<datalen>. A previously initialised
@@ -305,9 +303,7 @@ OSSL_FUNC_signature_set_ctx_md_params().
The key object should have been
previously generated, loaded or imported into the provider using the
key management (OSSL_OP_KEYMGMT) operation (see provider-keymgmt(7)>.
-The name of the digest to be used will be in the I<mdname> parameter. There may
-also be properties to be used in fetching the digest in the I<props> parameter,
-although this may be ignored by providers.
+The name of the digest to be used will be in the I<mdname> parameter.
OSSL_FUNC_signature_digest_verify_update() provides data to be verified in the I<data>
parameter which should be of length I<datalen>. A previously initialised
|
[numerics] correct the projection with the right polar cone | @@ -28,8 +28,7 @@ unsigned int projectionOnRollingCone(double* r, double mu, double mur)
double normT = hypot(r[1], r[2]);
double normMT = hypot(r[3], r[4]);
-
- if ((mu * normT <= - r[0]) && ((mur * normMT <= - r[0])))
+ if (mu * normT + mur * normMT <= - r[0])
{
r[0] = 0.0;
r[1] = 0.0;
|
Use reference counting to protect against concurrently unregistering the same serviceId multiple times.
Reference counting together with atomic compare-and-swap make celix_serviceRegistry_unregisterService MT-safe. | @@ -1202,6 +1202,7 @@ void celix_serviceRegistry_unregisterService(celix_service_registry_t* registry,
service_registration_t *entry = celix_arrayList_get(registrations, i);
if (serviceRegistration_getServiceId(entry) == serviceId) {
reg = entry;
+ serviceRegistration_retain(reg); // protect against concurrently unregistering the same serviceId multiple times
break;
}
}
@@ -1210,6 +1211,7 @@ void celix_serviceRegistry_unregisterService(celix_service_registry_t* registry,
if (reg != NULL) {
serviceRegistration_unregister(reg);
+ serviceRegistration_release(reg);
} else {
fw_log(registry->framework->logger, CELIX_LOG_LEVEL_ERROR, "Cannot unregister service for service id %li. This id is not present or owned by the provided bundle (bnd id %li)", serviceId, celix_bundle_getId(bnd));
}
|
fixed host exerciser md file path | @@ -180,7 +180,7 @@ man_pages = [
("docs/fpga_tools/opaevfio/opaevfio", 'opaevfio', u'Bind/Unbind accelerator to/from vfio-pci', [author], 8),
("docs/fpga_tools/opaeuio/opaeuio", 'opaeuio', u'Bind/Unbind DFL device to/from dfl-uio-pdev', [author], 8),
("docs/fpga_tools/userclk/userclk", 'userclk', u'Set AFU high and low clock frequency', [author], 8),
- ("docs/fpga_tools/host_exerciser.md/host_exerciser", 'host_exerciser', u'Host Exerciser lpbk and memory', [author], 8),
+ ("docs/fpga_tools/host_exerciser/host_exerciser.md", 'host_exerciser', u'Host Exerciser lpbk and memory', [author], 8),
("docs/fpga_api/fpga_api", 'fpga_api', u'OPAE C API', [author], 8),
("docs/fpga_api/fpga_cxx_api", 'fpga_cxx_api', u'OPAE C++ API', [author], 8),
("docs/fpga_api/fpga_python_api", 'fpga_python_api', u'OPAE Python API', [author], 8),
|
Make blockchain generation rev account serialization | @@ -461,6 +461,41 @@ function update_walletkitcoretests() {
sed -i '' -e "1,\$s/\/\/[ ]__NEW_BLOCKCHAIN_TEST_DEFN__/$test_defn/" $wkcoretests_include
}
+# Checks for the WKAccount.c file and if not existant, create a test file
+function check_create_wkaccount() {
+ wk_account_file=${output_path[$WKCORE_OUTPUT]}/src/walletkit/WKAccount.c
+ if [ ! -f $wk_account_file ]; then
+
+ echov " Creating new WKAccount.c file"
+ mkdir -p ${output_path[$WKCORE_OUTPUT]}/src/walletkit
+ touch $wk_account_file
+
+ echo // Version 6: The prior version >> $wk_account_file
+ echo "#define ACCOUNT_SERIALIZE_DEFAULT_VERSION 6" >> $wk_account_file
+ fi
+}
+
+# Create if necessary WKAccount.c and then update with the required
+# account serialization version which is bumped with each new blockchain
+#
+# @param ucsymbol The UpperCase blockchain mnemonic
+function update_wkaccount() {
+
+ ucsymbol=$1
+
+ wk_account_file=${output_path[$WKCORE_OUTPUT]}/src/walletkit/WKAccount.c
+ check_create_wkaccount
+
+ # WKNetworkType private static decl for new VALUE requires picking up
+ # the last emitted 'next value' which is part of the commented section
+ acct_ser_vers_repl="#define ACCOUNT_SERIALIZE_DEFAULT_VERSION\\s+[0-9]{1,}"
+ last_vers_value=`grep -Eo "$acct_ser_vers_repl" $wk_account_file | grep -Eo '[0-9]{1,}'`
+ next_vers_value=$((last_vers_value + 1))
+ next_vers_comment="\/\/ Version ${next_vers_value}: V${last_vers_value} + ${ucsymbol}"
+ next_vers="#define ACCOUNT_SERIALIZE_DEFAULT_VERSION ${next_vers_value}"
+ sed -i '' -e "1,\$s/#define ACCOUNT_SERIALIZE_DEFAULT_VERSION[[:space:]]*${last_vers_value}/$next_vers_comment\n$next_vers/" $wk_account_file
+}
+
# Updates the WKBase.h header file with required definitions
#
# @param ucsymbol The UpperCase blockchain mnemonic
@@ -818,6 +853,9 @@ if [ $pkg_enabled_result -eq 1 ]; then
# check for and create a new WKBase.h if necessary
update_wkbase $bc_symbol $bc_symbol_lc
+
+ # check for and create a new WKAccount.c if necessary
+ update_wkaccount $bc_symbol
fi
# Update naked templates for handlers
|
Avoid use-after-free if key update is initiated while ppe is pending
conn_rotate_keys() frees conn->pktns->crypto.tx.ckm. If there is a pending ppe, the ppe object still holds a reference to the freed memory and will eventually try to use it in ngtcp2_ppe_final(). | @@ -5893,6 +5893,7 @@ static void conn_rotate_keys(ngtcp2_conn *conn, int64_t pkt_num) {
assert(conn->crypto.key_update.new_rx_ckm);
assert(conn->crypto.key_update.new_tx_ckm);
assert(!conn->crypto.key_update.old_rx_ckm);
+ assert(!(conn->flags & NGTCP2_CONN_FLAG_PPE_PENDING));
conn->crypto.key_update.old_rx_ckm = pktns->crypto.rx.ckm;
|
Get window resize events in xterm. | #else
#include <termios.h>
#include <unistd.h>
+#include <signal.h>
#endif
#include "error.h"
@@ -264,6 +265,21 @@ static TCOD_Error xterm_recommended_console_size(
return TCOD_E_ERROR;
}
+#ifndef _WIN32
+static void xterm_on_window_change_signal(int signum) {
+ int columns, rows;
+ xterm_recommended_console_size(NULL, 1.0, &columns, &rows);
+ SDL_Event resize_event;
+ resize_event.type = SDL_WINDOWEVENT;
+ resize_event.window.event = SDL_WINDOWEVENT_RESIZED;
+ resize_event.window.timestamp = SDL_GetTicks();
+ resize_event.window.windowID = 0;
+ resize_event.window.data1 = columns;
+ resize_event.window.data2 = rows;
+ SDL_PushEvent(&resize_event);
+}
+#endif
+
TCOD_Context* TCOD_renderer_init_xterm(
int columns,
int rows,
@@ -305,6 +321,7 @@ TCOD_Context* TCOD_renderer_init_xterm(
TCOD_set_errorv("Could not set raw terminal mode.");
return NULL;
}
+ signal(SIGWINCH, xterm_on_window_change_signal);
#endif
fprintf(
stdout,
|
Summarized constants table. | @@ -422,9 +422,7 @@ where $h_{\rm P}$ is Planck's constant and $h$ is $H_0/100$ with $H_0$ in units
Including/excluding radiation in the computation of the comoving distances and the growth function can easily make a difference of $10^{-4}$ at the redshifts required in this comparison.
-We have performed a comparison of the physical constants used in \ccl to those used in {\tt GSL} and {\tt CLASS} as well as published sources such as NIST and Particle Physics Handbook. Where possible, we have set constants to the values that are used internally in {\tt CLASS}. This includes the value of the gravitational constant, the Boltzmann constant, the Planck constant, the speed of light, and the electron charge. {\tt CLASS} does not include a definition of the solar mass or the Stefan-Boltzmann constant so we use the values used by {\tt GSL}. We provide the relative difference between the values adopted in \ccl and other sources in table \ref{tab:constants_comparison}.
-
-\input{table_constants_comparison}
+We have performed a comparison of the physical constants used in \ccl to those used in {\tt GSL} and {\tt CLASS} as well as published sources such as NIST and Particle Physics Handbook. Where possible, we have set constants to the values that are used internally in {\tt CLASS}. This includes the value of the gravitational constant, the Boltzmann constant, the Planck constant, the speed of light, and the electron charge. {\tt CLASS} does not include a definition of the solar mass or the Stefan-Boltzmann constant so we use the values used by {\tt GSL}. After comparison between the physical constants used in \ccl and those of the sources mentioned above, we have found better than $10^{-4}$ agreement with everything except the gravitational constant.
The value of the gravitational constant, $G$, enters into the critical density. We found that failure to define $G$ with sufficient precision would result in lack of convergence at the $10^{-4}$ level between the different submissions. Importantly, note that CAMB barely has $10^{-4}$ precision in $G$ (and similarly, there might be other constants within CAMB/CLASS for which one should check the precision level). For \ccl, we are using the value from {\tt CLASS}.
|
[numerics] reduce verbose level | @@ -217,9 +217,9 @@ int rolling_fc3d_projectionOnConeWithLocalIteration_solve(RollingFrictionContact
/* double tau=dparam[4], tauinv=dparam[5], L= dparam[6], Lmin = dparam[7]; */
double tau=2.0/3.0, tauinv = 3.0/2.0, L= 0.9, Lmin =0.3;
- numerics_printf("-- rolling_fc3d_projectionOnConeWithLocalIteration_solve contact = %i", options->iparam[4] );
- numerics_printf("-- rolling_fc3d_projectionOnConeWithLocalIteration_solve | localiter \t| rho \t\t\t| error\t\t\t|");
- numerics_printf("-- | %i \t\t| %.10e\t| %.10e\t|", localiter, rho, localerror);
+ numerics_printf_verbose(2,"-- rolling_fc3d_projectionOnConeWithLocalIteration_solve contact = %i", options->iparam[4] );
+ numerics_printf_verbose(2,"-- rolling_fc3d_projectionOnConeWithLocalIteration_solve | localiter \t| rho \t\t\t| error\t\t\t|");
+ numerics_printf_verbose(2,"-- | %i \t\t| %.10e\t| %.10e\t|", localiter, rho, localerror);
/* printf ("localtolerance = %14.7e\n",localtolerance ); */
while ((localerror > localtolerance) && (localiter < iparam[0]))
@@ -362,10 +362,7 @@ int rolling_fc3d_projectionOnConeWithLocalIteration_solve(RollingFrictionContact
/* rho_k=1.0; */
/* rho=1.0; */
-
-
-
- numerics_printf("-- | %i \t\t| %.10e\t| %.10e\t|", localiter, rho, localerror);
+ numerics_printf_verbose(2,"-- | %i \t\t| %.10e\t| %.10e\t|", localiter, rho, localerror);
}
|
avx512bw: work around and ICC bug
ICC generates invalid code for this. For details, see | @@ -117,10 +117,17 @@ simde_mm512_adds_epu8 (simde__m512i a, simde__m512i b) {
a_ = simde__m512i_to_private(a),
b_ = simde__m512i_to_private(b);
+ #if !defined(HEDLEY_INTEL_VERSION)
SIMDE__VECTORIZE
- for (size_t i = 0 ; i < (sizeof(r_.m256i) / sizeof(r_.m256i[0])) ; i++) {
- r_.m256i[i] = simde_mm256_adds_epu8(a_.m256i[i], b_.m256i[i]);
+ for (size_t i = 0 ; i < (sizeof(r_.m128i) / sizeof(r_.m128i[0])) ; i++) {
+ r_.m128i[i] = simde_mm_adds_epu8(a_.m128i[i], b_.m128i[i]);
}
+ #else
+ SIMDE__VECTORIZE
+ for (size_t i = 0 ; i < (sizeof(r_.u8) / sizeof(r_.u8[0])) ; i++) {
+ r_.u8[i] = ((UINT8_MAX - a_.u8[i]) > b_.u8[i]) ? (a_.u8[i] + b_.u8[i]) : UINT8_MAX;
+ }
+ #endif
return simde__m512i_from_private(r_);
#endif
@@ -140,10 +147,17 @@ simde_mm512_adds_epu16 (simde__m512i a, simde__m512i b) {
a_ = simde__m512i_to_private(a),
b_ = simde__m512i_to_private(b);
+ #if !defined(HEDLEY_INTEL_VERSION)
SIMDE__VECTORIZE
for (size_t i = 0 ; i < (sizeof(r_.m256i) / sizeof(r_.m256i[0])) ; i++) {
r_.m256i[i] = simde_mm256_adds_epu16(a_.m256i[i], b_.m256i[i]);
}
+ #else
+ SIMDE__VECTORIZE
+ for (size_t i = 0 ; i < (sizeof(r_.u16) / sizeof(r_.u16[0])) ; i++) {
+ r_.u16[i] = ((UINT16_MAX - a_.u16[i]) > b_.u16[i]) ? (a_.u16[i] + b_.u16[i]) : UINT16_MAX;
+ }
+ #endif
return simde__m512i_from_private(r_);
#endif
|
ethio: implement +request-batch-rpc-loose
Produces batch request results regardless of node-side error.
Reimplements +request-batch-rpc-strict using it. | %+ strand-fail:strandio
%unexpected-multiple-results
[>(lent res)< ~]
-:: +request-batch-rpc-strict: send rpc request, with retry
+:: +request-batch-rpc-strict: send rpc requests, with retry
::
:: sends a batch request. produces results for all requests in the batch,
:: but only if all of them are successful.
`10
attempt-request
::
- +$ result [id=@t =json]
- +$ results (list result)
+ +$ results (list [id=@t =json])
+ ::
+ ++ attempt-request
+ =/ m (strand:strandio ,(unit results))
+ ^- form:m
+ ;< responses=(list response:rpc:jstd) bind:m
+ (request-batch-rpc-loose url reqs)
+ =- ?~ err
+ (pure:m `res)
+ (pure:m ~)
+ %+ roll responses
+ |= $: rpc=response:rpc:jstd
+ [res=results err=(list [id=@t code=@t message=@t])]
+ ==
+ ?: ?=(%error -.rpc)
+ [res [+.rpc err]]
+ ?. ?=(%result -.rpc)
+ [res [['' 'ethio-rpc-fail' (crip <rpc>)] err]]
+ [[+.rpc res] err]
+ --
+:: +request-batch-rpc-loose: send rpc requests, with retry
+::
+:: sends a batch request. produces results for all requests in the batch,
+:: including the ones that are unsuccessful.
+::
+++ request-batch-rpc-loose
+ |= [url=@ta reqs=(list [id=(unit @t) req=request:rpc:ethereum])]
+ |^ %+ (retry:strandio results)
+ `10
+ attempt-request
+ ::
+ +$ result response:rpc:jstd
+ +$ results (list response:rpc:jstd)
::
++ attempt-request
=/ m (strand:strandio ,(unit results))
((ar:dejs-soft:format parse-one-response) u.jon)
?~ array
(strand-fail:strandio %rpc-result-incomplete-batch >u.jon< ~)
- =- ?~ err
- (pure:m `res)
- (pure:m ~)
- %+ roll u.array
- |= $: rpc=response:rpc:jstd
- [res=results err=(list [id=@t code=@t message=@t])]
- ==
- ?: ?=(%error -.rpc)
- [res [+.rpc err]]
- ?. ?=(%result -.rpc)
- [res [['' 'ethio-rpc-fail' (crip <rpc>)] err]]
- [[+.rpc res] err]
+ (pure:m array)
::
++ parse-one-response
|= =json
=, dejs-soft:format
(ot id+so error+(ot code+no message+so ~) ~)
--
+::
:: +read-contract: calls a read function on a contract, produces result hex
::
++ read-contract
|
options/ansi: fix %p for strftime | #include <wchar.h>
#include <stdlib.h>
#include <ctype.h>
+#include <langinfo.h>
#include <bits/ensure.h>
#include <mlibc/debug.hpp>
@@ -248,19 +249,10 @@ size_t strftime(char *__restrict dest, size_t max_size,
p += chunk;
c += 2;
}else if (*(c + 1) == 'p') {
- if(tm->tm_hour < 12) {
- char time[] = "AM";
- auto chunk = snprintf(p, space, "%s", time);
+ auto chunk = snprintf(p, space, "%s", nl_langinfo((tm->tm_hour < 12) ? AM_STR : PM_STR));
if(chunk >= space)
return 0;
p += chunk;
- }else {
- char time[] = "PM";
- auto chunk = snprintf(p, space, "%s", time);
- if(chunk >= space)
- return 0;
- p += chunk;
- }
c += 2;
}else {
__ensure(!"Unknown format type.");
|
tests: add code generation test for 'for' | @@ -14,13 +14,14 @@ local function generate(ast, modname)
local CC = "gcc"
local CFLAGS = "--std=c99 -O2 -Wall -Ilua/src/ -fPIC"
- return os.execute(string.format([[
+ local cc_cmd = string.format([[
%s %s -shared %s.c lua/src/liblua.a -o %s.so
- ]], CC, CFLAGS, modname, modname))
+ ]], CC, CFLAGS, modname, modname)
+ return os.execute(cc_cmd)
end
local function call(modname, code)
- local cmd = string.format("lua -l %s -e \"%s\"",
+ local cmd = string.format("lua/src/lua -l %s -e \"%s\"",
modname, code)
return os.execute(cmd)
end
@@ -101,6 +102,26 @@ describe("Titan code generator ", function()
assert.truthy(ok, err)
end)
+ it("tests step value in 'for'", function()
+ local code = [[
+ function forstep(f: integer, t: integer, s: integer): integer
+ local v: integer = 0
+ for i = f, t, s do
+ v = v + i
+ end
+ return v
+ end
+ ]]
+ local ast, err = parser.parse(code)
+ assert.truthy(ast, err)
+ local ok, err = checker.check(ast, code, "test.titan")
+ assert.truthy(ok, err)
+ local ok, err = generate(ast, "titan_test")
+ assert.truthy(ok, err)
+ local ok, err = call("titan_test", "x = titan_test.forstep(1,10,2);assert(x==25)")
+ assert.truthy(ok, err)
+ end)
+
it("tests nil element in 'not'", function()
local code = [[
function testset(t: {integer}, i: integer, v: integer): integer
|
Use Ubuntu 18.04 on Travis CI | @@ -3,12 +3,13 @@ language: c
linux_gcc: &linux_gcc
os: linux
- dist: xenial
+ dist: bionic
compiler: gcc
addons:
apt:
update: true
- sources: [ ubuntu-toolchain-r-test ]
+ sources:
+ - sourceline: 'ppa:ubuntu-toolchain-r/test'
packages: [ autoconf bison flex libssl-dev libevent-dev clang gcc-9 ]
before_install:
- eval "export CC=gcc-9"
|
Minor formatting to README.md. | @@ -421,7 +421,6 @@ We receive many questions and issues that have been answered previously.
#### Incremental log processing ####
-
GoAccess has the ability to process logs incrementally through its internal
storage and dump its data to disk. It works in the following way:
@@ -437,7 +436,7 @@ stay on the same partition), in addition, it extracts a snippet of data from
the log along with the last line parsed of each file and the timestamp of the
last line parsed. e.g., inode:29627417|line:20012|ts:20171231235059
-First it compares if the snippet matches the log being parsed, if it does, it
+First, it compares if the snippet matches the log being parsed, if it does, it
assumes the log hasn't changed drastically, e.g., hasn't been truncated. If
the inode does not match the current file, it parses all lines. If the current
file matches the inode, it then reads the remaining lines and updates the count
|
Add some TODOs to the toplevel readme. | This project is a complete work in progress, with absolutely nothing functioning yet. The goal is to explore a new MK firmware
with a less restritive license and better BLE support, built on top of the [Zephyr Project](https://www.zephyrproject.org/)
+## TODO
+
+- Debouncing in the kscan driver itself? Only some GPIO drivers in Zephyr support it "natively"
+- Better DTS overlay setup for _keymaps_. Current use of SHIELDs works, but perhaps would be better with something more integrated.
+- Move most Kconfig setings to the board/keymap defconfigs and out of the toplevel `prj.conf` file.
+- Merge the Kscan GPIO driver upstream, or integrate it locally, to avoid use of Zephyr branch.
+- BLE SC by typing in the # prompted on the host.
+ - Store the connection being authenticated.
+ - Hook into endpoint flow to detect keypresses and store/send them to the connection once 6 are typed.
+- Display support, including displaying BLE SC auth numbers for "numeric comparison" mode if we have the screen.
+- Fix BT settings to work w/ Zephyr. Do we really need them?
+- Tests?
+
+## Long Term
+
+- Tool to convert keymap `info.json` files into a DTS keymap file?
+- Firmware build service?
|
Note the current version numbers reflect ABI breaks instead of API. | @@ -3,8 +3,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
-This project attempts to adhere to [Semantic Versioning](http://semver.org/)
-since `1.7.0`.
+This project attempts to adhere to [Semantic Versioning](http://semver.org/) since `1.7.0`.
+Versions since `1.7.0` only track ABI breaks and not API breaks.
## [Unreleased]
|
actions: check java_home helper | @@ -77,6 +77,7 @@ jobs:
echo "$JAVA_HOME/bin" >> $GITHUB_PATH
which javac || true
javac --version || true
+ /usr/libexec/java_home --failfast || true
cat $JAVA_HOME/Contents/Info.plist
- name: Configure CMake
|
Update: Metric.c: better initialize message, will make valgrind happy and is also safer | @@ -38,7 +38,7 @@ static int graphite_sockfd = 0;
void Metric_send( const char* path, int value)
{
- char message[GRAPHITE_MAX_MSG_LEN];
+ char message[GRAPHITE_MAX_MSG_LEN] = {0};
if(graphite_sockfd == 0)
{
graphite_sockfd = UDP_INIT_Sender();
|
Increase smoke failures allowed for epsdb to 5 | @@ -108,7 +108,7 @@ echo
set -x
epsdb_status="green"
# return pass, condpass, fial status (count)
-if [ "$efails" -ge "3" ]; then
+if [ "$efails" -ge "5" ]; then
echo "EPSDB smoke fails"
epsdb_status="red"
elif [ "$efails" -gt "0" ]; then
|
Double the wait time for ppc jobs in Travis CI | @@ -30,7 +30,7 @@ matrix:
before_script: &common-before
- COMMON_FLAGS="DYNAMIC_ARCH=1 TARGET=POWER8 NUM_THREADS=32"
script:
- - travis_wait 20 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
+ - travis_wait 40 make QUIET_MAKE=1 $COMMON_FLAGS $BTYPE
- make -C test $COMMON_FLAGS $BTYPE
- make -C ctest $COMMON_FLAGS $BTYPE
- make -C utest $COMMON_FLAGS $BTYPE
@@ -104,7 +104,7 @@ matrix:
- sudo apt-get update
- sudo apt-get install gcc-9 gfortran-9 -y
script:
- - travis_wait 20 make QUIET_MAKE=1 BINARY=64 USE_OPENMP=1 CC=gcc-9 FC=gfortran-9
+ - travis_wait 40 make QUIET_MAKE=1 BINARY=64 USE_OPENMP=1 CC=gcc-9 FC=gfortran-9
- make -C test $COMMON_FLAGS $BTYPE
- make -C ctest $COMMON_FLAGS $BTYPE
- make -C utest $COMMON_FLAGS $BTYPE
@@ -121,7 +121,7 @@ matrix:
- sudo apt-get update
- sudo apt-get install gcc-9 gfortran-9 -y
script:
- - travis_wait 20 make QUIET_MAKE=1 BUILD_BFLOAT16=1 BINARY=64 USE_OPENMP=1 CC=gcc-9 FC=gfortran-9
+ - travis_wait 40 make QUIET_MAKE=1 BUILD_BFLOAT16=1 BINARY=64 USE_OPENMP=1 CC=gcc-9 FC=gfortran-9
- make -C test $COMMON_FLAGS $BTYPE
- make -C ctest $COMMON_FLAGS $BTYPE
- make -C utest $COMMON_FLAGS $BTYPE
|
UI_UTIL_wrap_read_pem_callback: make sure to terminate the string received
The callback we're wrapping around may or may not return a
NUL-terminated string. Let's ensure it is. | @@ -104,7 +104,7 @@ static int ui_read(UI *ui, UI_STRING *uis)
switch (UI_get_string_type(uis)) {
case UIT_PROMPT:
{
- char result[PEM_BUFSIZE];
+ char result[PEM_BUFSIZE + 1];
const struct pem_password_cb_data *data =
UI_method_get_ex_data(UI_get_method(ui), ui_method_data_index);
int maxsize = UI_get_result_maxsize(uis);
@@ -112,6 +112,8 @@ static int ui_read(UI *ui, UI_STRING *uis)
maxsize > PEM_BUFSIZE ? PEM_BUFSIZE : maxsize,
data->rwflag, UI_get0_user_data(ui));
+ if (len >= 0)
+ result[len] = '\0';
if (len <= 0)
return len;
if (UI_set_result(ui, uis, result) >= 0)
|
fixed circ() mapped color | @@ -558,7 +558,7 @@ void tic_api_circ(tic_mem* memory, s32 x, s32 y, s32 r, u8 color)
{
initSidesBuffer();
drawEllipse(memory, x - r, y - r, x + r, y + r, 0, setElliSide);
- drawSidesBuffer(memory, y - r, y + r + 1, color);
+ drawSidesBuffer(memory, y - r, y + r + 1, mapColor(memory, color));
}
void tic_api_circb(tic_mem* memory, s32 x, s32 y, s32 r, u8 color)
@@ -570,7 +570,7 @@ void tic_api_elli(tic_mem* memory, s32 x, s32 y, s32 a, s32 b, u8 color)
{
initSidesBuffer();
drawEllipse(memory, x - a, y - b, x + a, y + b, 0, setElliSide);
- drawSidesBuffer(memory, y - b, y + b + 1, color);
+ drawSidesBuffer(memory, y - b, y + b + 1, mapColor(memory, color));
}
void tic_api_ellib(tic_mem* memory, s32 x, s32 y, s32 a, s32 b, u8 color)
|
Allow non-square icons if no text is shown. | @@ -146,7 +146,11 @@ void DrawButton(ButtonNode *bp)
iconHeight = iconWidth;
} else {
const int ratio = (bp->icon->width << 16) / bp->icon->height;
- const int maxIconWidth = Min(width, height) - 4;
+ int maxIconWidth = width - 4;
+ if(bp->text) {
+ /* Showing text, keep the icon square. */
+ maxIconWidth = Min(width, height) - 4;
+ }
iconHeight = height - 4;
iconWidth = (iconHeight * ratio) >> 16;
if(iconWidth > maxIconWidth) {
|
doc: Add fixed issues in v0.2 release note
Filter v0.2 fixed issues from github closed issue list. | @@ -17,6 +17,34 @@ ACRN device model, and documentation.
Version 0.2 new features
************************
+Fixed Issues
+============
+:acrn-issue:`663` - Black screen displayed after booting SOS/UOS
+
+:acrn-issue:`676` - Hypervisor and DM version numbers incorrect
+
+:acrn-issue:`1126` - VPCI coding style and bugs fixes for partition mode
+
+:acrn-issue:`1125` - VPCI coding style and bugs fixes found in integration testing for partition mode
+
+:acrn-issue:`1101` - missing acrn_mngr.h
+
+:acrn-issue:`1071` - hypervisor cannot boot on skylake i5-6500
+
+:acrn-issue:`1003` - CPU: cpu info is not correct
+
+:acrn-issue:`971` - acrncrashlog funcitons need to be enhance
+
+:acrn-issue:`843` - ACRN boot failure
+
+:acrn-issue:`721` - DM for IPU mediation
+
+:acrn-issue:`707` - Issues found with instructions for using Ubuntu as SOS
+
+:acrn-issue:`706` - Invisible mouse cursor in UOS
+
+:acrn-issue:`424` - ClearLinux desktop GUI of SOS fails to launch
+
Known Issues
************
|
process: correct the way its dependent on the dump plugin | include (LibAddMacros)
find_package (Pluginprocess)
+plugin_check_if_included ("dump")
+if (NOT NOT_INCLUDED)
if (PLUGINPROCESS_FOUND)
add_plugin (process
SOURCES
@@ -18,3 +20,6 @@ add_plugin (process
else (PLUGINPROCESS_FOUND)
message ("${PLUGINPROCESS_NOTFOUND_INFO}, excluding pluginprocess library, thus excluding the process plugin")
endif (PLUGINPROCESS_FOUND)
+else (NOT NOT_INCLUDED)
+ message ("dump plugin not found (${NOT_INCLUDED}), excluding the process plugin")
+endif (NOT NOT_INCLUDED)
|
Documentation: Add list of available packages | # Install
+## Status
+
+The graph below shows an (incomplete) list of available packages for Elektra.
+
+[](https://repology.org/metapackage/elektra/versions)
## Linux
|
in_proc: filter plugin support | @@ -252,6 +252,10 @@ static int generate_record_linux(struct flb_input_instance *i_ins,
/*
* Store the new data into the MessagePack buffer,
*/
+
+ /* Mark the start of a 'buffer write' operation */
+ flb_input_buf_write_start(i_ins);
+
msgpack_pack_array(&i_ins->mp_pck, 2);
msgpack_pack_uint64(&i_ins->mp_pck, time(NULL));
@@ -300,6 +304,8 @@ static int generate_record_linux(struct flb_input_instance *i_ins,
msgpack_pack_uint64(&i_ins->mp_pck, fds);
}
+ flb_input_buf_write_end(i_ins);
+
return 0;
}
|
Fix missing whitespace trimming on strings
Update resource.cpp | @@ -995,34 +995,10 @@ bool ResourceItem::toBool() const
}
bool ResourceItem::setValue(const QString &val, ValueSource source)
-{
- if (m_rid->type == DataTypeString)
- {
- setItemString(val);
- }
-
- if (m_str)
- {
- if (m_rid->type == DataTypeTime)
{
return setValue(QVariant(val), source);
}
- m_valueSource = source;
- m_lastSet = QDateTime::currentDateTime();
- m_flags |= FlagNeedPushSet;
- if (*m_str != val)
- {
- *m_str = val;
- m_lastChanged = m_lastSet;
- m_flags |= FlagNeedPushChange;
- }
- return true;
- }
-
- return false;
-}
-
bool ResourceItem::setValue(qint64 val, ValueSource source)
{
if (m_rid->validMin != 0 || m_rid->validMax != 0)
|
chore(btnmatrix) removed unnecessary semicolon
Removed an unnecessary semicolon at line 97 ( `lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;` ) | @@ -94,7 +94,7 @@ void lv_btnmatrix_set_map(lv_obj_t * obj, const char * map[])
LV_ASSERT_OBJ(obj, MY_CLASS);
if(map == NULL) return;
- lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;;
+ lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;
/*Analyze the map and create the required number of buttons*/
allocate_btn_areas_and_controls(obj, map);
|
docs: update CN translation for fatfs.rst | @@ -14,6 +14,7 @@ Using FatFs with VFS
The header file :component_file:`fatfs/vfs/esp_vfs_fat.h` defines the functions for connecting FatFs and VFS.
The function :cpp:func:`esp_vfs_fat_register` allocates a ``FATFS`` structure and registers a given path prefix in VFS. Subsequent operations on files starting with this prefix are forwarded to FatFs APIs.
+
The function :cpp:func:`esp_vfs_fat_unregister_path` deletes the registration with VFS, and frees the ``FATFS`` structure.
Most applications use the following workflow when working with ``esp_vfs_fat_`` functions:
@@ -88,10 +89,12 @@ They provide implementation of disk I/O functions for SD/MMC cards and can be re
FATFS partition generator
-------------------------
-We provide partition generator for FATFS (:component_file:`wl_fatfsgen.py<fatfs/wl_fatfsgen.py>`)
-which is integrated into the build system and could be easily used in the user project.
+We provide a partition generator for FATFS (:component_file:`wl_fatfsgen.py<fatfs/wl_fatfsgen.py>`) which is integrated into the build system and could be easily used in the user project.
+
The tool is used to create filesystem images on a host and populate it with content of the specified host folder.
+
The script is based on the partition generator (:component_file:`fatfsgen.py<fatfs/fatfsgen.py>`) and except for generating partition also initializes wear levelling.
+
Current implementation supports short file names and FAT12. Long file names, and FAT16 are subjects of the future work.
@@ -107,11 +110,12 @@ If you prefer generating partition without wear levelling support you can use ``
fatfs_create_rawflash_image(<partition> <base_dir> [FLASH_IN_PROJECT])
``fatfs_create_spiflash_image`` respectively ``fatfs_create_rawflash_image`` must be called from project's CMakeLists.txt.
+
If you decided because of any reason to use ``fatfs_create_rawflash_image`` (without wear levelling support) beware that it supports mounting only in read-only mode in the device.
The arguments of the function are as follows:
-1. partition - the name of the partition, you can define in partition table (e.g. :example_file:`storage/fatfsgen/partitions_example.csv`)
+1. partition - the name of the partition as defined in the partition table (e.g. :example_file:`storage/fatfsgen/partitions_example.csv`).
2. base_dir - the directory that will be encoded to FATFS partition and optionally flashed into the device. Beware that you have to specified suitable size of the partition in the partition table.
|
honggfuzz.h: initialize timing mutex | @@ -422,6 +422,7 @@ bool cmdlineParse(int argc, char* argv[], honggfuzz_t* hfuzz) {
.feedback = PTHREAD_MUTEX_INITIALIZER,
.report = PTHREAD_MUTEX_INITIALIZER,
.input = PTHREAD_MUTEX_INITIALIZER,
+ .timing = PTHREAD_MUTEX_INITIALIZER,
},
/* Linux code */
|
Add test for the optional record field separator | @@ -643,8 +643,8 @@ describe("Titan parser", function()
assert_program_ast([[
record List
- p: {Point};
- next: List;
+ p: {Point}
+ next: List
end
]], {
{ _tag = "TopLevel_Record",
@@ -656,6 +656,26 @@ describe("Titan parser", function()
})
end)
+ it("can parse the record field optional separator", function()
+ local ast = {{ fields = { { name = "x" }, { name = "y" } } }}
+
+ assert_program_ast([[
+ record Point x: float y: float end
+ ]], ast)
+
+ assert_program_ast([[
+ record Point x: float; y: float end
+ ]], ast)
+
+ assert_program_ast([[
+ record Point x: float y: float; end
+ ]], ast)
+
+ assert_program_ast([[
+ record Point x: float; y: float; end
+ ]], ast)
+ end)
+
it("can parse record constructors", function()
assert_expression_ast([[ { x = 1.1, y = 2.2 } ]],
{ _tag = "Exp_InitList", fields = {
|
[tech_cells_generic] Remove deprecated modules | @@ -13,25 +13,25 @@ sources:
- target: all(fpga, xilinx)
files:
- - src/deprecated/cluster_clk_cells_xilinx.sv
+ # - src/deprecated/cluster_clk_cells_xilinx.sv
- src/fpga/tc_clk_xilinx.sv
- src/fpga/tc_sram_xilinx.sv
- target: not(all(fpga, xilinx))
files:
# Level 0
- - src/deprecated/cluster_clk_cells.sv
- - src/deprecated/pulp_clk_cells.sv
+ # - src/deprecated/cluster_clk_cells.sv
+ # - src/deprecated/pulp_clk_cells.sv
- src/rtl/tc_clk.sv
- target: not(synthesis)
files:
- - src/deprecated/cluster_pwr_cells.sv
- - src/deprecated/generic_memory.sv
- - src/deprecated/generic_rom.sv
- - src/deprecated/pad_functional.sv
- - src/deprecated/pulp_buffer.sv
- - src/deprecated/pulp_pwr_cells.sv
+ # - src/deprecated/cluster_pwr_cells.sv
+ # - src/deprecated/generic_memory.sv
+ # - src/deprecated/generic_rom.sv
+ # - src/deprecated/pad_functional.sv
+ # - src/deprecated/pulp_buffer.sv
+ # - src/deprecated/pulp_pwr_cells.sv
- src/tc_pwr.sv
- target: test
|
JANITORIAL: (fpe.c) Correct spelling mistakes in comments
relevent -> relevant | @@ -38,7 +38,7 @@ void fpe_Dispose(glstate_t *glstate) {
void APIENTRY_GL4ES fpe_ReleventState_DefaultVertex(fpe_state_t *dest, fpe_state_t *src, shaderconv_need_t* need)
{
- // filter out some non relevent state (like texture stuff if texture is disabled)
+ // filter out some non relevant state (like texture stuff if texture is disabled)
memcpy(dest, src, sizeof(fpe_state_t));
// alpha test
if(!dest->alphatest) {
@@ -135,7 +135,7 @@ void APIENTRY_GL4ES fpe_ReleventState_DefaultVertex(fpe_state_t *dest, fpe_state
void APIENTRY_GL4ES fpe_ReleventState(fpe_state_t *dest, fpe_state_t *src, int fixed)
{
- // filter out some non relevent state (like texture stuff if texture is disabled)
+ // filter out some non relevant state (like texture stuff if texture is disabled)
memcpy(dest, src, sizeof(fpe_state_t));
// alpha test
if(!dest->alphatest) {
|
18.01.2 Release Notes | # Release Notes {#release_notes}
* @subpage release_notes_1804
+* @subpage release_notes_18012
* @subpage release_notes_18011
* @subpage release_notes_1801
* @subpage release_notes_1710
@@ -1478,6 +1479,15 @@ Found 1036 api message signature differences
+@page release_notes_18012 Release notes for VPP 18.01.2
+
+This is bug fix release.
+
+For the full list of fixed issues please refer to:
+- fd.io [JIRA](https://jira.fd.io)
+- git [commit log](https://git.fd.io/vpp/log/?h=stable/1801)
+
+
@page release_notes_18011 Release notes for VPP 18.01.1
This is bug fix release.
|
moli: fix type-c cannot negotiation to 20V
BRANCH=none
TEST=make -j BOARD=moli
TEST=VBUS change from 5V to 20V | @@ -84,6 +84,8 @@ int board_set_active_charge_port(int port)
switch (port) {
case CHARGE_PORT_TYPEC0:
case CHARGE_PORT_TYPEC1:
+ gpio_set_level(GPIO_EN_PPVAR_BJ_ADP_L, 1);
+ break;
case CHARGE_PORT_BARRELJACK:
/* Make sure BJ adapter is sourcing power */
if (gpio_get_level(GPIO_BJ_ADP_PRESENT_ODL))
|
Optimize: u3a_malt takes care of trailing zeros. | (x==0) ? 0 : \
1 + ((x - 1) / y);
-/*
- TODO Don't do the double flop.
-*/
u3_noun u3qc_repn(u3_atom bits, u3_noun blox) {
if ( !_(u3a_is_cat(bits) || bits==0 || bits>31) ) {
return u3m_bail(c3__fail);
}
- blox = u3kb_flop(blox);
-
- //
- // We need to enforce the invariant that the result does not contain
- // leading (? TODO). Since each input block must be smaller than
- // a word, simply stripping off leading zero blocks is enough to
- // ensure this.
- //
- // We also verify that each input block is a direct atom.
- //
- while (1) {
- if (blox == 0) {
- return 0;
- }
-
- u3_noun blok_n = u3h(blox);
-
- if (!_(u3a_is_cat(blok_n)))
- return u3m_bail(c3__fail);
-
- if (blok_n != 0) break;
-
- blox = u3t(blox);
- }
-
- blox = u3kb_flop(blox);
-
//
// Calculate input and output size.
//
@@ -77,16 +47,15 @@ u3_noun u3qc_repn(u3_atom bits, u3_noun blox) {
// once full.
//
// acc register
- // idx where the register will be flushed to
// use number of register bits filled (used)
+ // cur next buffer word to flush into.
//
- c3_w acc=0, idx=0, use=0;
+ c3_w acc=0, use=0, *cur=buf;
void flush() {
- buf[idx++] = acc;
- acc = 0;
- use = 0;
+ *cur++ = acc;
+ acc = use = 0;
}
c3_w slice(c3_w sz, c3_w off, c3_w val) {
@@ -94,9 +63,14 @@ u3_noun u3qc_repn(u3_atom bits, u3_noun blox) {
}
for (c3_w i=0; i<num_blox; i++) {
- c3_w blok = u3a_h(blox);
+ u3_noun blok_n = u3h(blox);
blox = u3t(blox);
+ if (!_(u3a_is_cat(blok_n)))
+ return u3m_bail(c3__fail);
+
+ c3_w blok = blok_n;
+
for (c3_w rem_in_blok=bits; rem_in_blok;) {
c3_w rem_in_acc = 32 - use;
if (rem_in_blok == rem_in_acc) { // EQ
@@ -114,7 +88,6 @@ u3_noun u3qc_repn(u3_atom bits, u3_noun blox) {
flush();
}
}
-
}
//
|
fix rubymac project | remoteGlobalIDString = A8A6D30E1E24AADD00016427;
remoteInfo = rubymac;
};
- FA3C262E1DA6E8EB0064EE64 /* PBXContainerItemProxy */ = {
+ A8CAD3D61E67400800ED8E7E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5C04408B0EF7DC290014E5C6 /* rhorubylib.xcodeproj */;
proxyType = 1;
- remoteGlobalIDString = D2AAC045055464E500DB518D;
- remoteInfo = rhorubylib;
+ remoteGlobalIDString = A8A6D30D1E24AADD00016427;
+ remoteInfo = rubymac;
};
/* End PBXContainerItemProxy section */
buildRules = (
);
dependencies = (
- FA3C262F1DA6E8EB0064EE64 /* PBXTargetDependency */,
+ A8CAD3D71E67400800ED8E7E /* PBXTargetDependency */,
);
name = RubyMac;
productInstallPath = "$(HOME)/bin";
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- FA3C262F1DA6E8EB0064EE64 /* PBXTargetDependency */ = {
+ A8CAD3D71E67400800ED8E7E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- name = rhorubylib;
- targetProxy = FA3C262E1DA6E8EB0064EE64 /* PBXContainerItemProxy */;
+ name = rubymac;
+ targetProxy = A8CAD3D61E67400800ED8E7E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
|
output_calyptia: update ifdef FLB_CHUNK_TRACE to FLB_HAVE_CHUNK_TRACE. | @@ -356,7 +356,7 @@ static int calyptia_http_do(struct flb_calyptia *ctx, struct flb_http_client *c,
sizeof(CALYPTIA_H_AGENT_TOKEN) - 1,
ctx->agent_token, flb_sds_len(ctx->agent_token));
}
-#ifdef FLB_CHUNK_TRACE
+#ifdef FLB_HAVE_CHUNK_TRACE
else if (type == CALYPTIA_ACTION_TRACE) {
flb_http_add_header(c,
CALYPTIA_H_CTYPE, sizeof(CALYPTIA_H_CTYPE) - 1,
@@ -921,7 +921,7 @@ static void cb_calyptia_flush(struct flb_event_chunk *event_chunk,
}
}
-#ifdef FLB_CHUNK_TRACE
+#ifdef FLB_HAVE_CHUNK_TRACE
if (event_chunk->type == (FLB_EVENT_TYPE_LOG | FLB_EVENT_TYPE_HAS_TRACE)) {
json = flb_pack_msgpack_to_json_format(event_chunk->data,
event_chunk->size,
@@ -1053,7 +1053,7 @@ static struct flb_config_map config_map[] = {
"Label to append to the generated metric."
},
-#ifdef FLB_CHUNK_TRACE
+#ifdef FLB_HAVE_CHUNK_TRACE
{
FLB_CONFIG_MAP_STR, "pipeline_id", NULL,
0, FLB_TRUE, offsetof(struct flb_calyptia, pipeline_id),
|
connection: added peer info lookup helper | @@ -21,7 +21,10 @@ void flb_connection_init(struct flb_connection *connection,
connection->attrs = type_specific_attributes;
connection->tls_session = NULL;
- connection->remote_host = (char *) "remote host unset";
+ connection->raw_remote_host_family = 0;
+ connection->raw_remote_host[0] = '\0';
+
+ connection->remote_host[0] = '\0';
connection->remote_port = 0;
connection->ka_count = 0;
@@ -43,6 +46,21 @@ void flb_connection_init(struct flb_connection *connection,
flb_connection_reset_connection_timeout(connection);
}
+int flb_connection_get_remote_address(struct flb_connection *connection)
+{
+ size_t dummy_size_receptacle;
+
+ return flb_net_socket_peer_info(connection->fd,
+ &connection->remote_port,
+ connection->raw_remote_host,
+ sizeof(connection->raw_remote_host),
+ &dummy_size_receptacle,
+ connection->remote_host,
+ sizeof(connection->remote_host),
+ &dummy_size_receptacle,
+ &connection->raw_remote_host_family);
+}
+
int flb_connection_get_flags(struct flb_connection *connection)
{
int result;
|
Correct UART pins on the nrf528xx
Flip TX and RX so the UART is setup correctly. | @@ -86,13 +86,13 @@ extern uint32_t led_pwr_pin;
#define NRF52820_RESET_PIN NRF_GPIO_PIN_MAP(0, 6)
#define NRF52820_USB_LED_PIN NRF_GPIO_PIN_MAP(0, 14)
#define NRF52820_PWR_LED_PIN NRF_GPIO_PIN_MAP(0, 15)
-#define NRF52820_UART_TX_PIN NRF_GPIO_PIN_MAP(0, 8) // From IMCU to target
-#define NRF52820_UART_RX_PIN NRF_GPIO_PIN_MAP(0, 29) // From target to IMCU
+#define NRF52820_UART_TX_PIN NRF_GPIO_PIN_MAP(0, 29) // From IMCU to target
+#define NRF52820_UART_RX_PIN NRF_GPIO_PIN_MAP(0, 8) // From target to IMCU
#define NRF52833_RESET_PIN NRF_GPIO_PIN_MAP(1, 9)
#define NRF52833_USB_LED_PIN NRF_GPIO_PIN_MAP(0, 15)
#define NRF52833_PWR_LED_PIN NRF_GPIO_PIN_MAP(0, 17)
-#define NRF52833_UART_TX_PIN NRF_GPIO_PIN_MAP(0, 3) // From IMCU to target
-#define NRF52833_UART_RX_PIN NRF_GPIO_PIN_MAP(0, 2) // From target to IMCU
+#define NRF52833_UART_TX_PIN NRF_GPIO_PIN_MAP(0, 2) // From IMCU to target
+#define NRF52833_UART_RX_PIN NRF_GPIO_PIN_MAP(0, 3) // From target to IMCU
#endif
|
Prevent wrongly showing deCONZ Upgrade firmware page for ConBee II | @@ -412,7 +412,11 @@ void DeRestPluginPrivate::queryFirmwareVersion()
{
// if even after some time no firmware was detected
// ASSUME that a device is present and reachable but might not have firmware installed
- if (getUptime() >= FW_WAIT_UPDATE_READY)
+ if (gwDeviceName == QLatin1String("ConBee II"))
+ {
+ // ignore
+ }
+ else if (getUptime() >= FW_WAIT_UPDATE_READY)
{
QString str;
str.sprintf("0x%08x", GW_MIN_AVR_FW_VERSION);
|
test: don't panic after building non-/tests files | ^- (list test)
:: strip off leading 'tests' from :path
::
- =. path ?>(?=([%tests *] path) t.path)
+ ?. ?=([%tests *] path) ~
+ =/ path t.path ::NOTE TMI
:: for each test, add the test's name to :path
::
%+ turn test-arms
|
[bootloader] Do not save the app mode when bootloader jump, let the applicative Luos_engine write it instead, fix | @@ -430,7 +430,6 @@ void LuosBootloader_MsgHandler(msg_t *input)
{
// boot the application programmed in dedicated flash partition
LuosBootloader_DeInit();
- LuosHAL_SetMode((uint8_t)JUMP_TO_APP_MODE);
LuosBootloader_JumpToApp();
}
else
|
Remove root directory from Windows zip releases
Put the scrcpy files at the root of the zip archive. This avoids an
unnecessary level of directories when extracting. | @@ -125,12 +125,12 @@ dist-win64: build-server build-win64 build-win64-noconsole
cp prebuilt-deps/SDL2-2.0.8/x86_64-w64-mingw32/bin/SDL2.dll "$(DIST)/$(WIN64_TARGET_DIR)/"
zip-win32: dist-win32
- cd "$(DIST)"; \
- zip -r "$(WIN32_TARGET)" "$(WIN32_TARGET_DIR)"
+ cd "$(DIST)/$(WIN32_TARGET_DIR)"; \
+ zip -r "../$(WIN32_TARGET)" .
zip-win64: dist-win64
- cd "$(DIST)"; \
- zip -r "$(WIN64_TARGET)" "$(WIN64_TARGET_DIR)"
+ cd "$(DIST)/$(WIN64_TARGET_DIR)"; \
+ zip -r "../$(WIN64_TARGET)" .
sums:
cd "$(DIST)"; \
|
add api trace print
/vpp/src/vlibapi/api_shared.c
after "set api-trace debug on",api trace will be print ontime when clients send msg to vpp. | @@ -466,6 +466,7 @@ vl_msg_api_handler_with_vm_node (api_main_t * am,
{
u16 id = ntohs (*((u16 *) the_msg));
u8 *(*handler) (void *, void *, void *);
+ u8 *(*print_fp) (void *, void *);
if (PREDICT_FALSE (vm->elog_trace_api_messages))
{
@@ -491,9 +492,23 @@ vl_msg_api_handler_with_vm_node (api_main_t * am,
{
handler = (void *) am->msg_handlers[id];
- if (am->rx_trace && am->rx_trace->enabled)
+ if (PREDICT_FALSE (am->rx_trace && am->rx_trace->enabled))
vl_msg_api_trace (am, am->rx_trace, the_msg);
+ if (PREDICT_FALSE (am->msg_print_flag))
+ {
+ fformat (stdout, "[%d]: %s\n", id, am->msg_names[id]);
+ print_fp = (void *) am->msg_print_handlers[id];
+ if (print_fp == 0)
+ {
+ fformat (stdout, " [no registered print fn for msg %d]\n", id);
+ }
+ else
+ {
+ (*print_fp) (the_msg, vm);
+ }
+ }
+
if (!am->is_mp_safe[id])
{
vl_msg_api_barrier_trace_context (am->msg_names[id]);
|
Fixed issue
Fixed a typo in redis-csv output module that will cause binary field
overwriting prior fields in the output. | @@ -182,7 +182,7 @@ void make_csv_string(fieldset_t *fs, char *out, size_t len)
log_fatal("redis-csv",
"out of memory---will overflow");
}
- hex_encode_str(out, (unsigned char *)f->value.ptr,
+ hex_encode_str(dataloc, (unsigned char *)f->value.ptr,
f->len);
} else if (f->type == FS_NULL) {
// do nothing
|
[ivshmem] Fixed issue with rev 0 devices failing to init | @@ -89,6 +89,8 @@ NTSTATUS IVSHMEMEvtDevicePrepareHardware(_In_ WDFDEVICE Device, _In_ WDFCMRESLIS
++deviceContext->interruptCount;
}
+ if (deviceContext->interruptCount > 0)
+ {
deviceContext->interrupts = (WDFINTERRUPT*)MmAllocateNonCachedMemory(
sizeof(WDFINTERRUPT) * deviceContext->interruptCount);
@@ -97,6 +99,7 @@ NTSTATUS IVSHMEMEvtDevicePrepareHardware(_In_ WDFDEVICE Device, _In_ WDFCMRESLIS
DEBUG_ERROR("Failed to allocate space for %d interrupts", deviceContext->interrupts);
return STATUS_DEVICE_CONFIGURATION_ERROR;
}
+ }
for (ULONG i = 0; i < resCount; ++i)
{
|
trace.py: fix compiler warning
Compiler shows warning "incompatible integer to pointer conversion
initializing" while compiling bpf program.
This patch adds necessary typecast when assigning PT_REGS_PARAM vaules
to struct pt_regs pointer | @@ -216,17 +216,17 @@ class Probe(object):
}
aliases_indarg = {
- "arg1": "({u64 _val; struct pt_regs *_ctx = PT_REGS_PARM1(ctx);"
+ "arg1": "({u64 _val; struct pt_regs *_ctx = (struct pt_regs *)PT_REGS_PARM1(ctx);"
" bpf_probe_read(&_val, sizeof(_val), &(PT_REGS_PARM1(_ctx))); _val;})",
- "arg2": "({u64 _val; struct pt_regs *_ctx = PT_REGS_PARM2(ctx);"
+ "arg2": "({u64 _val; struct pt_regs *_ctx = (struct pt_regs *)PT_REGS_PARM2(ctx);"
" bpf_probe_read(&_val, sizeof(_val), &(PT_REGS_PARM2(_ctx))); _val;})",
- "arg3": "({u64 _val; struct pt_regs *_ctx = PT_REGS_PARM3(ctx);"
+ "arg3": "({u64 _val; struct pt_regs *_ctx = (struct pt_regs *)PT_REGS_PARM3(ctx);"
" bpf_probe_read(&_val, sizeof(_val), &(PT_REGS_PARM3(_ctx))); _val;})",
- "arg4": "({u64 _val; struct pt_regs *_ctx = PT_REGS_PARM4(ctx);"
+ "arg4": "({u64 _val; struct pt_regs *_ctx = (struct pt_regs *)PT_REGS_PARM4(ctx);"
" bpf_probe_read(&_val, sizeof(_val), &(PT_REGS_PARM4(_ctx))); _val;})",
- "arg5": "({u64 _val; struct pt_regs *_ctx = PT_REGS_PARM5(ctx);"
+ "arg5": "({u64 _val; struct pt_regs *_ctx = (struct pt_regs *)PT_REGS_PARM5(ctx);"
" bpf_probe_read(&_val, sizeof(_val), &(PT_REGS_PARM5(_ctx))); _val;})",
- "arg6": "({u64 _val; struct pt_regs *_ctx = PT_REGS_PARM6(ctx);"
+ "arg6": "({u64 _val; struct pt_regs *_ctx = (struct pt_regs *)PT_REGS_PARM6(ctx);"
" bpf_probe_read(&_val, sizeof(_val), &(PT_REGS_PARM6(_ctx))); _val;})",
}
|
network/tc: Delete testcase function
Delete the tc_net_recvfrom_sock_n function.
This test case is testing recvfrom, but it is wrong from socket creation.
The code is meaningless because it differs from the testing purpose. | @@ -58,32 +58,6 @@ void tc_net_recvfrom_p(int fd)
}
-/**
- * @testcase :tc_net_recvfrom_sock_n
- * @brief :negative testcase using udp
- * @scenario :
- * @apicovered :recvfrom()
- * @precondition :
- * @postcondition :
- */
-void tc_net_recvfrom_sock_n(void)
-{
- char buffer[MAXRCVLEN];
- struct sockaddr_storage serverStorage;
- socklen_t addr_size;
- int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_UDP);
- if (fd < 0) {
- printf("socket fail %s:%d", __FUNCTION__, __LINE__);
- return;
- }
- int ret = recvfrom(fd, buffer, MAXRCVLEN, 0, (struct sockaddr *)&serverStorage, &addr_size);
-
- TC_ASSERT_EQ_CLEANUP("recvfrom", ret, -1, close(fd));
- TC_SUCCESS_RESULT();
- close(fd);
-
-}
-
/**
* @testcase :tc_net_recvfrom_n
* @brief :negative testcase using udp
@@ -113,7 +87,6 @@ void tc_net_recvfrom_n(int fd)
* Postconditions :
* @return :void *
*/
-
void *recvfrom_udpserver(void *args)
{
struct sockaddr_in sa;
@@ -137,7 +110,6 @@ void *recvfrom_udpserver(void *args)
}
tc_net_recvfrom_p(SocketFD);
- tc_net_recvfrom_sock_n();
tc_net_recvfrom_n(SocketFD);
close(SocketFD);
@@ -309,6 +281,7 @@ void *recvfrom_tcpserver(void *args)
printf("Socket creation fail %s:%d\n", __FUNCTION__, __LINE__);
return 0;
}
+
memset(&sa, 0, sizeof(sa));
sa.sin_family = PF_INET;
|
test FEATURE xpath hash test for leaf-lists | @@ -97,6 +97,9 @@ setup(void **state)
"}"
"}"
"}"
+ "leaf-list ll2 {"
+ "type string;"
+ "}"
"}"
"}";
@@ -191,6 +194,10 @@ test_hash(void **state)
"<a>val_b</a>"
"</ll>"
"</ll>"
+ "<ll2>one</ll2>"
+ "<ll2>two</ll2>"
+ "<ll2>three</ll2>"
+ "<ll2>four</ll2>"
"</c>";
struct lyd_node *tree, *node;
struct ly_set *set;
@@ -237,6 +244,18 @@ test_hash(void **state)
ly_set_free(set, NULL);
+ /* hashes used even for leaf-lists */
+ assert_int_equal(LY_SUCCESS, lyd_find_xpath(tree, "/a:c/ll2[. = 'three']", &set));
+ assert_int_equal(1, set->count);
+
+ node = set->objs[0];
+ assert_string_equal(node->schema->name, "ll2");
+ val_str = lyd_value2str((struct lyd_node_term *)node, &dynamic);
+ assert_int_equal(0, dynamic);
+ assert_string_equal(val_str, "three");
+
+ ly_set_free(set, NULL);
+
/* not found using hashes */
assert_int_equal(LY_SUCCESS, lyd_find_xpath(tree, "/a:c/ll[a='val_d']", &set));
assert_int_equal(0, set->count);
|
Reuse entity timestamp values on project load (prevents unnecessary changes to gbsproj file ending up in version control) | @@ -64,6 +64,7 @@ const loadProject = async (projectPath) => {
return {
...background,
id: oldBackground.id,
+ _v: oldBackground._v,
tileColors:
oldBackground?.tileColors !== undefined
? oldBackground.tileColors
@@ -93,6 +94,7 @@ const loadProject = async (projectPath) => {
...oldSprite,
...sprite,
id: oldSprite.id,
+ _v: oldSprite._v,
canvasWidth: oldSprite.canvasWidth || 32,
canvasHeight: oldSprite.canvasHeight || 32,
animations: Array.from(Array(8)).map((_, animationIndex) => ({
@@ -130,6 +132,7 @@ const loadProject = async (projectPath) => {
return {
...track,
id: oldTrack.id,
+ _v: oldTrack._v,
settings: {
...oldTrack.settings,
},
@@ -151,6 +154,7 @@ const loadProject = async (projectPath) => {
return {
...font,
id: oldFont.id,
+ _v: oldFont._v,
};
}
return font;
@@ -169,6 +173,7 @@ const loadProject = async (projectPath) => {
return {
...avatar,
id: oldAvatar.id,
+ _v: oldAvatar._v,
};
}
return avatar;
@@ -187,6 +192,7 @@ const loadProject = async (projectPath) => {
return {
...emote,
id: oldEmote.id,
+ _v: oldEmote._v,
};
}
return emote;
|
mbedtls: fix possible false success in ...check_tags() helpers
We should report a error when the security check of the security
tag was not made. In the other case false success is possible and
is not observable by the software.
Technically this could lead to a security flaw. | @@ -505,7 +505,7 @@ int mbedtls_cipher_update_ad( mbedtls_cipher_context_t *ctx,
}
#endif
- return( 0 );
+ return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE );
}
#endif /* MBEDTLS_GCM_C || MBEDTLS_CHACHAPOLY_C */
@@ -1134,7 +1134,7 @@ int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,
}
#endif
- return( 0 );
+ return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE );
}
int mbedtls_cipher_check_tag( mbedtls_cipher_context_t *ctx,
@@ -1161,11 +1161,8 @@ int mbedtls_cipher_check_tag( mbedtls_cipher_context_t *ctx,
}
#endif /* MBEDTLS_USE_PSA_CRYPTO */
- /* Status to return on a non-authenticated algorithm. It would make sense
- * to return MBEDTLS_ERR_CIPHER_INVALID_CONTEXT or perhaps
- * MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA, but at the time I write this our
- * unit tests assume 0. */
- ret = 0;
+ /* Status to return on a non-authenticated algorithm. */
+ ret = MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE;
#if defined(MBEDTLS_GCM_C)
if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode )
|
Update new TLS version options to s_time man page | @@ -22,6 +22,10 @@ B<openssl> B<s_time>
[B<-nameopt option>]
[B<-time seconds>]
[B<-ssl3>]
+[B<-tls1>]
+[B<-tls1_1>]
+[B<-tls1_2>]
+[B<-tls1_3>]
[B<-bugs>]
[B<-cipher cipherlist>]
[B<-ciphersuites val>]
@@ -109,19 +113,13 @@ Performs the timing test using the same session ID; this can be used as a test
that session caching is working. If neither B<-new> nor B<-reuse> are
specified, they are both on by default and executed in sequence.
-=item B<-ssl3>
+=item B<-ssl3>, B<-tls1>, B<-tls1_1>, B<-tls1_2>, B<-tls1_3>
-This option disables the use of SSL version 3. By default
-the initial handshake uses a method which should be compatible with all
-servers and permit them to use SSL v3 or TLS as appropriate.
-
-The timing program is not as rich in options to turn protocols on and off as
-the L<s_client(1)> program and may not connect to all servers.
-Unfortunately there are a lot of ancient and broken servers in use which
-cannot handle this technique and will fail to connect. Some servers only
-work if TLS is turned off with the B<-ssl3> option.
-
-Note that this option may not be available, depending on how
+These options enable specific SSL or TLS protocol versions for the handshake
+initiated by B<s_time>.
+By default B<s_time> negotiates the highest mutually supported protocol
+version.
+Note that not all protocols and flags may be available, depending on how
OpenSSL was built.
=item B<-bugs>
|
[libgui] Bordered can draw with Rc | use agx_definitions::{
Color, Drawable, LayerSlice, Line, Point, Rect, RectInsets, StrokeThickness,
};
+use alloc::rc::Rc;
use crate::ui_elements::UIElement;
@@ -16,6 +17,17 @@ pub trait Bordered: Drawable + UIElement {
}
}
+ fn draw_rc(self: Rc<Self>) {
+ let mut slice = self.get_slice();
+
+ if !self.border_enabled() {
+ self.draw_inner_content(slice.frame, &mut slice);
+ } else {
+ let mut content_slice = slice.get_slice(self.draw_border());
+ self.draw_inner_content(slice.frame, &mut content_slice);
+ }
+ }
+
fn border_enabled(&self) -> bool {
true
}
@@ -32,10 +44,12 @@ pub trait Bordered: Drawable + UIElement {
if !self.border_enabled() {
return Rect::from_parts(Point::zero(), self.frame().size);
}
-
let onto = &mut self.get_slice();
let insets = self.border_insets();
+ self.draw_border_with_insets(onto, insets)
+ }
+ fn draw_border_with_insets(&self, onto: &mut LayerSlice, insets: RectInsets) -> Rect {
// TODO(PT): This currently assumes an even inset across all sides
// Verify this assumption first
/*
|
Android: Allow having a key pass (not just a keystore pass) | @@ -770,6 +770,7 @@ elseif(ANDROID)
sign
--ks ${ANDROID_KEYSTORE}
${ANDROID_APKSIGNER_KEYSTORE_PASS} ${ANDROID_KEYSTORE_PASS}
+ $<$<BOOL:${ANDROID_KEY_PASS}>:--key-pass> $<$<BOOL:${ANDROID_KEY_PASS}>:${ANDROID_KEY_PASS}>
--in lovr.unsigned.apk
--out lovr.apk
COMMAND ${CMAKE_COMMAND} -E remove lovr.unaligned.apk lovr.unsigned.apk AndroidManifest.xml Activity.java
|
use kconfig to add config options | @@ -175,6 +175,21 @@ menu "TinyUSB Stack"
help
Enable TinyUSB MIDI feature.
endmenu # "MIDI"
+
+ menu "Human Interface Device Class (HID)"
+ config TINYUSB_HID_ENABLED
+ bool "Enable TinyUSB HID feature"
+ default n
+ help
+ Enable TinyUSB HID feature.
+
+ config TINYUSB_HID_BUFSIZE
+ depends on TINYUSB_HID_ENABLED
+ int "Report buffer size of TinyUSB HID device"
+ default 16
+ help
+ Set TinyUSB HID device report buffer size.
+ endmenu # "HID Device Class (HID)"
endif # TINYUSB
endmenu # "TinyUSB Stack"
|
s5j/sss: do not use Kconfig constants
Instead of using constants that are defined by Kconfig, use geometry
information provided by underlying MTD device.
This is a prepration step for removing CONFIG_S5J_FLASH_XXX that are not
actually configurable, but in Kconfig so making people confused. | @@ -41,8 +41,8 @@ int sss_ro_read(unsigned int start_offset, unsigned char *buf, unsigned int byte
FAR struct inode *pnode = NULL;
char *devname = sss_get_flash_device_name();
unsigned char *read_buf = NULL;
- unsigned int start_sector = 0, end_sector = 0;
- unsigned int nsector = 0;
+ unsigned int start_sector, end_sector;
+ unsigned int nsector;
unsigned int end_offset = start_offset + byte_size;
/* Check input bound */
@@ -50,11 +50,6 @@ int sss_ro_read(unsigned int start_offset, unsigned char *buf, unsigned int byte
return ERROR_SSTORAGE_SFS_FREAD;
}
- /* Calculate the sector number what we sholuld read */
- start_sector = start_offset / CONFIG_S5J_FLASH_SECTOR_SIZE;
- end_sector = end_offset / CONFIG_S5J_FLASH_SECTOR_SIZE;
- nsector = end_sector - start_sector + ((end_offset % CONFIG_S5J_FLASH_SECTOR_SIZE) ? (1) : (0));
-
/* Open the mtd block device */
ret = open_blockdriver(devname, 0, &pnode);
if (ret < 0) {
@@ -69,13 +64,18 @@ int sss_ro_read(unsigned int start_offset, unsigned char *buf, unsigned int byte
goto read_out;
}
+ /* Calculate the sector number what we sholuld read */
+ start_sector = start_offset / geo.erasesize;
+ end_sector = end_offset / geo.erasesize;
+ nsector = end_sector - start_sector + ((end_offset % geo.erasesize) ? (1) : (0));
+
if (geo.erasesize * geo.neraseblocks < end_offset) {
ret = ERROR_SSTORAGE_INVALID_DATA_LEN;
goto read_out;
}
/* Allocate temporary read buffer */
- read_buf = (unsigned char *)malloc(nsector * CONFIG_S5J_FLASH_SECTOR_SIZE);
+ read_buf = (unsigned char *)malloc(nsector * geo.erasesize);
if (read_buf == NULL) {
fdbg("Fail to allocate memory\n");
ret = ERROR_SSTORAGE_SFS_FREAD;
@@ -89,7 +89,7 @@ int sss_ro_read(unsigned int start_offset, unsigned char *buf, unsigned int byte
ret = ERROR_SSTORAGE_SFS_FREAD;
goto read_out;
}
- memcpy(buf, read_buf + (start_offset % CONFIG_S5J_FLASH_SECTOR_SIZE), byte_size);
+ memcpy(buf, read_buf + (start_offset % geo.erasesize), byte_size);
read_out:
if (close_blockdriver(pnode)) {
|
nva/nvapy: Expose endian type to Python module
NvaCard_.endian (0 = little-endian, 1 = big-endian) | @@ -3,6 +3,7 @@ cdef extern from "nvhw/chipset.h":
unsigned pmc_id
int chipset
int card_type
+ int endian
cdef extern from "nva.h":
struct nva_card:
@@ -69,6 +70,7 @@ cdef NvaCard_ nva_wrapcard(nva_card *ccard):
card.chipset = ccard.chipset.chipset
card.pmc_id = ccard.chipset.pmc_id
card.card_type = ccard.chipset.card_type
+ card.endian = ccard.chipset.endian
return card
if nva_init():
|
zephyr/test/i2c/src/main.c: Format with clang-format
BRANCH=none
TEST=none | @@ -27,7 +27,6 @@ static void test_i2c_port_count(void)
/* Test case main entry. */
void test_main(void)
{
- ztest_test_suite(test_i2c,
- ztest_user_unit_test(test_i2c_port_count));
+ ztest_test_suite(test_i2c, ztest_user_unit_test(test_i2c_port_count));
ztest_run_test_suite(test_i2c);
}
|
Scripts: Remove checks for deleted plugins | @@ -216,9 +216,7 @@ is_not_rw_storage() {
-o "x$PLUGIN" = "xaugeas" \
-o "x$PLUGIN" = "xcsvstorage" \
-o "x$PLUGIN" = "xdpkg" \
- -o "x$PLUGIN" = "xregexstore" \
-o "x$PLUGIN" = "xpasswd" \
- -o "x$PLUGIN" = "xsimplespeclang" \
-o "x$PLUGIN" = "xmozprefs" \
-o "x$PLUGIN" = "xfile" \
-o "x$PLUGIN" = "xruby" \
@@ -229,17 +227,11 @@ is_not_rw_storage() {
-o "x$PLUGIN" = "xmmapstorage" \
-o "x$PLUGIN" = "xmmapstorage_crc" \
-o "x$PLUGIN" = "xmultifile" \
- -o "x$PLUGIN" = "xcamel" \
-o "x$PLUGIN" = "xsimpleini" \
- -o "x$PLUGIN" = "xyambi" \
- -o "x$PLUGIN" = "xtcl" \
-o "x$PLUGIN" = "xmini" \
- -o "x$PLUGIN" = "xyaypeg" \
-o "x$PLUGIN" = "xyamlcpp" \
- -o "x$PLUGIN" = "xyawn" \
-o "x$PLUGIN" = "xkconfig" \
- -o "x$PLUGIN" = "xtoml" \
- -o "x$PLUGIN" = "xdini"
+ -o "x$PLUGIN" = "xtoml"
}
is_plugin_available() {
@@ -996,4 +988,13 @@ export_check() {
#
#
#
+#
+#
+#
+#
+#
+#
+#
+#
+#
# empty lines up to 1000 so that line numbers in the resulting scripts are more useful
|
docs: add a note for deep sleep crc check | @@ -100,3 +100,18 @@ For example, the equivalent example in ``rtc_wake_stub_counter.c``::
The second way is a better option if you need to use strings, or write other more complex code.
To reduce wake-up time use the `CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP` Kconfig option, see more information in :doc:`Fast boot from Deep Sleep <bootloader>`.
+
+CRC Check For Wake Stubs
+------------------------
+
+.. only:: SOC_PM_SUPPORT_DEEPSLEEP_VERIFY_STUB_ONLY
+
+ During deep sleep, only the wake stubs area of RTC Fast memory is validated with CRC. When {IDF_TARGET_NAME} wakes up from deep sleep, the wake stubs area is validated again. If the validation passes, the wake stubs code will be executed. Otherwise, the normal initialization, bootloader, and esp-idf codes will be executed.
+
+.. only:: not SOC_PM_SUPPORT_DEEPSLEEP_VERIFY_STUB_ONLY
+
+ During deep sleep, all RTC Fast memory areas will be validated with CRC. When {IDF_TARGET_NAME} wakes up from deep sleep, the RTC fast memory will be validated with CRC again. If the validation passes, the wake stubs code will be executed. Otherwise, the normal initialization, bootloader and esp-idf codes will be executed.
+
+.. note::
+
+ When the `CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP` option is enabled, all the RTC fast memory except the wake stubs area is added to the heap.
|
gadgets/snapshot/process: Enable tid column when -t/--showThreads is used | @@ -35,6 +35,11 @@ type ProcessParser struct {
}
func newProcessParser(outputConfig *commonutils.OutputConfig, flags *ProcessFlags, cols *columns.Columns[types.Event], options ...commonutils.Option) (SnapshotParser[types.Event], error) {
+ if flags.showThreads {
+ col, _ := cols.GetColumn("tid")
+ col.Visible = true
+ }
+
gadgetParser, err := commonutils.NewGadgetParser(outputConfig, cols, options...)
if err != nil {
return nil, commonutils.WrapInErrParserCreate(err)
|
BND: Update timeref usage | @@ -762,8 +762,8 @@ void DEV_BindingTableVerifyHandler(Device *device, const Event &event)
}
else
{
- const auto now = QDateTime::currentMSecsSinceEpoch();
- const auto dt = i->confirmedMsSinceEpoch() > 0 ? (now - i->confirmedMsSinceEpoch()) / 1000: -1;
+ const auto now = deCONZ::steadyTimeRef();
+ const auto dt = isValid(bnd.confirmedTimeRef()) ? (now - i->confirmedTimeRef()).val / 1000: -1;
if (i->dstAddressMode() == deCONZ::ApsExtAddress)
{
|
filter_kubernetes: register metadata | #include <fluent-bit/flb_upstream.h>
#include <fluent-bit/flb_http_client.h>
#include <fluent-bit/flb_pack.h>
+#include <fluent-bit/flb_env.h>
#include <fluent-bit/tls/flb_tls.h>
#include <sys/types.h>
@@ -229,6 +230,23 @@ static int refresh_token_if_needed(struct flb_kube *ctx)
return 0;
}
+static void expose_k8s_meta(struct flb_kube *ctx)
+{
+ char *tmp;
+ struct flb_env *env;
+
+ env = ctx->config->env;
+
+ flb_env_set(env, "k8s", "enabled");
+ flb_env_set(env, "k8s.namespace", ctx->namespace);
+ flb_env_set(env, "k8s.pod_name", ctx->podname);
+
+ tmp = (char *) flb_env_get(env, "NODE_NAME");
+ if (tmp) {
+ flb_env_set(env, "k8s.node_name", tmp);
+ }
+}
+
/* Load local information from a POD context */
static int get_local_pod_info(struct flb_kube *ctx)
{
@@ -273,6 +291,7 @@ static int get_local_pod_info(struct flb_kube *ctx)
return FLB_FALSE;
}
+ expose_k8s_meta(ctx);
return FLB_TRUE;
}
|
Updater: Use native for directory write checking | @@ -26,14 +26,14 @@ BOOLEAN UpdaterCheckApplicationDirectory(
HANDLE fileHandle;
PPH_STRING fileName;
- fileName = PhGetApplicationDirectoryFileNameWin32(&fileNameStringRef);
+ fileName = PhGetApplicationDirectoryFileName(&fileNameStringRef, TRUE);
if (PhIsNullOrEmptyString(fileName))
return FALSE;
- if (NT_SUCCESS(PhCreateFileWin32(
+ if (NT_SUCCESS(PhCreateFile(
&fileHandle,
- PhGetString(fileName),
+ &fileName->sr,
FILE_GENERIC_WRITE | DELETE,
FILE_ATTRIBUTE_NORMAL,
FILE_SHARE_READ | FILE_SHARE_DELETE,
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.