message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
GBP: test case hardening against timing races | @@ -1444,7 +1444,7 @@ class TestGBP(VppTestCase):
# lower the inactive threshold so these tests pass in a
# reasonable amount of time
#
- self.vapi.gbp_endpoint_learn_set_inactive_threshold(1)
+ self.vapi.gbp_endpoint_learn_set_inactive_threshold(2)
#
# IP tables
@@ -1839,7 +1839,7 @@ class TestGBP(VppTestCase):
# lower the inactive threshold so these tests pass in a
# reasonable amount of time
#
- self.vapi.gbp_endpoint_learn_set_inactive_threshold(1)
+ self.vapi.gbp_endpoint_learn_set_inactive_threshold(2)
#
# IP tables
@@ -2014,7 +2014,7 @@ class TestGBP(VppTestCase):
# lower the inactive threshold so these tests pass in a
# reasonable amount of time
#
- self.vapi.gbp_endpoint_learn_set_inactive_threshold(1)
+ self.vapi.gbp_endpoint_learn_set_inactive_threshold(2)
#
# IP tables
@@ -2384,30 +2384,29 @@ class TestGBP(VppTestCase):
rep_88.remove_vpp_config()
rep_2.remove_vpp_config()
- self.logger.info(self.vapi.cli("show gbp endpoint"))
-
- self.assertFalse(find_gbp_endpoint(self, ip=rep_88.ip4.address))
+ self.assertTrue(find_gbp_endpoint(self, ip=rep_2.ip4.address))
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
- IP(src=ep.ip4.address, dst=rep_88.ip4.address) /
+ IP(src=ep.ip4.address, dst=rep_2.ip4.address) /
UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
- rxs = self.send_and_expect(self.pg0, [p], self.pg4)
+ rxs = self.send_and_expect(self.pg0, [p], self.pg2)
- self.assertTrue(find_gbp_endpoint(self, ip=rep_2.ip4.address))
+ self.assertFalse(find_gbp_endpoint(self, ip=rep_88.ip4.address))
p = (Ether(src=ep.mac, dst=self.loop0.local_mac) /
- IP(src=ep.ip4.address, dst=rep_2.ip4.address) /
+ IP(src=ep.ip4.address, dst=rep_88.ip4.address) /
UDP(sport=1234, dport=1234) /
Raw('\xa5' * 100))
- rxs = self.send_and_expect(self.pg0, [p], self.pg2)
+ rxs = self.send_and_expect(self.pg0, [p], self.pg4)
#
# to appease the testcase we cannot have the registered EP stll
# present (because it's DP learnt) when the TC ends so wait until
# it is removed
#
- self.sleep(2)
+ self.wait_for_ep_timeout(ip=rep_88.ip4.address)
+ self.wait_for_ep_timeout(ip=rep_2.ip4.address)
#
# shutdown with learnt endpoint present
@@ -2458,7 +2457,7 @@ class TestGBP(VppTestCase):
# lower the inactive threshold so these tests pass in a
# reasonable amount of time
#
- self.vapi.gbp_endpoint_learn_set_inactive_threshold(1)
+ self.vapi.gbp_endpoint_learn_set_inactive_threshold(2)
#
# IP tables
|
[build/docs] Add note about SPLIT_DWARF and its misuses and caveats explained in | @@ -3438,6 +3438,7 @@ when ($STRIP_DEBUG_INFO) {
### @usage: SPLIT_DWARF()
###
### Emit debug info for the PROGRAM/DLL as a separate file <module_name>.debug.
+### NB: It does not help you to save process RSS but can add problems (see e.g. BEGEMOT-2147).
macro SPLIT_DWARF() {
SET(SPLIT_DWARF_VALUE yes)
}
|
Improve default palette colors | @@ -129,7 +129,7 @@ const loadProject = async (projectPath) => {
{
id: "default-bg-5",
name: "Default BG 5",
- colors: ["F8F8b8", "90C8C8", "486878", "082048"],
+ colors: ["F8F8B8", "90C8C8", "486878", "082048"],
},
{
id: "default-bg-6",
@@ -139,12 +139,12 @@ const loadProject = async (projectPath) => {
{
id: "default-sprite",
name: "Default Sprites",
- colors: ["D8D8C0", "C8B070", "B05010", "000000"],
+ colors: ["F8F0E0", "D88078", "B05010", "000000"],
},
{
id: "default-ui",
name: "Default UI",
- colors: ["F8C0F8", "E89850", "983860", "383898"],
+ colors: ["F8F8B8", "90C8C8", "486878", "082048"],
},
];
|
Fix wrong endianness conversion.
section->flags is 64bit or 32bit for ELF64 and ELF32 files respectively. Different endianness conversion functions must be called for each case. | @@ -220,7 +220,7 @@ void parse_elf_header_##bits##_##bo( \
{ \
set_integer(yr_##bo##32toh(section->type), elf_obj, \
"sections[%i].type", i); \
- set_integer(yr_##bo##32toh(section->flags), elf_obj, \
+ set_integer(yr_##bo##bits##toh(section->flags), elf_obj, \
"sections[%i].flags", i); \
set_integer(yr_##bo##bits##toh(section->addr), elf_obj, \
"sections[%i].address", i); \
|
Tidy platform scene | @@ -67,13 +67,12 @@ void Start_Platform() {
void Update_Platform() {
WORD tile_x, tile_y;
- UBYTE camera_y, player_y, i, a;
+ UBYTE i, a;
UINT16 tmp_y;
UBYTE hit_actor = 0;
UBYTE hit_trigger = 0;
// Move NPCs
- /*
for (i = 1; i < actors_active_size; i++)
{
a = actors_active[i];
@@ -86,7 +85,6 @@ void Update_Platform() {
actors[a].pos.y--;
}
}
- */
// Update scene pos from player pos
pos_x = ((player.pos.x + 4u) << 4) + (pos_x & 0xF);
@@ -205,9 +203,6 @@ void Update_Platform() {
LOG_VALUE("pos_x", pos_x);
LOG_VALUE("pos_y", pos_y);
- // LOG("pos_y=%d pos_y>>4=%d vel_y=%d\n", pos_y, pos_y >> 4, vel_y);
- // LOG("pos_x=%d pos_x>>4=%d vel_x=%d tile_x=%u\n", pos_x, pos_x >> 4, vel_x, tile_x);
- // LOG("pos_x=%d pos_x>>4=%d vel_x=%d tile_x=%u\n", pos_x, pos_x >> 4, vel_x, tile_x);
player.pos.x = (pos_x >> 4) - 4u;
player.pos.y = pos_y >> 4;
@@ -231,8 +226,6 @@ void Update_Platform() {
}
cam_pos.y = pos_y_delayed - PLATFORM_CAMERA_OFFSET_Y;
- // If player was moving on the previous frame
- // if (player.moving) {
// Check for trigger collisions
hit_trigger = TriggerAtTile(tile_x, tile_y);
if (hit_trigger != MAX_TRIGGERS) {
@@ -241,18 +234,4 @@ void Update_Platform() {
player.moving = FALSE;
return;
}
- // }
-
- // LOG_VALUE("pos_y_delayed", pos_y_delayed);
- // LOG_VALUE("cam_pos.y", cam_pos.y);
-
- // if (INPUT_SELECT_PRESSED) {
- // player.pos.x = 16;
- // player.pos.y = 16;
- // }
-
- // if (INPUT_START_PRESSED) {
- // player.pos.x = 1024;
- // player.pos.y = 24;
- // }
}
|
dm: optimize the parameter compatibility
This patch checks the obsoleted parameters and print some warnings
instead of exiting the acrn-dm directly. The following obsoleted
parameters are covered:
i, --ioc_node
G, --gvtargs
Y, --mptgen
vsbl
part_info
pm_by_vuart
pm_notify_channel
Acked-by: Wang, Yu1 | @@ -190,6 +190,11 @@ usage(int code)
exit(code);
}
+static void outdate(char *msg)
+{
+ pr_warn("The \"%s\" parameter is obsolete and ignored\n", msg);
+}
+
static void
print_version(void)
{
@@ -868,7 +873,7 @@ main(int argc, char *argv[])
break;
break;
case 'i': /* obsolete parameter */
- ioc_parse(optarg);
+ outdate("-i, --ioc_node");
break;
case 'l':
@@ -888,7 +893,7 @@ main(int argc, char *argv[])
errx(EX_USAGE, "invalid memsize '%s'", optarg);
break;
case 'Y': /* obsolete parameter */
- mptgen = 0;
+ outdate("-Y, --mptgen");
break;
case 'k':
if (acrn_parse_kernel(optarg) != 0)
@@ -907,15 +912,13 @@ main(int argc, char *argv[])
break;
break;
case 'G': /* obsolete parameter */
- if (acrn_parse_gvtargs(optarg) != 0)
- errx(EX_USAGE, "invalid GVT param %s", optarg);
+ outdate("-G, --gvtargs");
break;
case 'v':
print_version();
break;
case CMD_OPT_VSBL: /* obsolete parameter */
- if (high_bios_size() == 0 && acrn_parse_vsbl(optarg) != 0)
- errx(EX_USAGE, "invalid vsbl param %s", optarg);
+ outdate("--vsbl");
break;
case CMD_OPT_OVMF:
if (!vsbl_file_name && acrn_parse_ovmf(optarg) != 0)
@@ -927,11 +930,7 @@ main(int argc, char *argv[])
errx(EX_USAGE, "invalid pcpu param %s", optarg);
break;
case CMD_OPT_PART_INFO: /* obsolete parameter */
- if (acrn_parse_guest_part_info(optarg) != 0) {
- errx(EX_USAGE,
- "invalid guest partition info param %s",
- optarg);
- }
+ outdate("--part_info");
break;
case CMD_OPT_TRUSTY_ENABLE:
trusty_enabled = 1;
@@ -999,10 +998,10 @@ main(int argc, char *argv[])
errx(EX_USAGE, "invalid pm_notify_channel: %s", optarg);
} else
errx(EX_USAGE, "invalid pm_notify_channel: %s", optarg);
+ pr_warn("The \"--pm_notify_channel\" parameter is obsolete\n");
break;
case CMD_OPT_PM_BY_VUART: /* obsolete parameter */
- if (parse_pm_by_vuart(optarg) != 0)
- errx(EX_USAGE, "invalid pm-by-vuart params %s", optarg);
+ outdate("--pm_by_vuart");
break;
case CMD_OPT_WINDOWS:
is_winvm = true;
|
Fixed cpu function sort | @@ -98,24 +98,24 @@ modules:
ksceKernelCpuEnableInterrupts: 0xF5BAD43B
ksceKernelCpuGetCpuId: 0x5E4D5DE1
ksceKernelCpuIsVaddrMapped: 0x337CBDF3
- ksceKernelSpinlockLowLock: 0xBF82DEB2
- ksceKernelSpinlockLowTryLock: 0x5AC9D394
- ksceKernelSpinlockLowUnlock: 0xD6ED0C46
- ksceKernelSpinlockLowLockCpuSuspendIntr: 0xD32ACE9E
- ksceKernelSpinlockLowTryLockCpuSuspendIntr: 0x27C0B340
- ksceKernelSpinlockLowUnlockCpuResumeIntr: 0x7BB9D5DF
ksceKernelRWSpinlockLowReadLock: 0xCAC9AE80
- ksceKernelRWSpinlockLowTryReadLock: 0x093925BD
- ksceKernelRWSpinlockLowReadUnlock: 0xF5FD5676
ksceKernelRWSpinlockLowReadLockCpuSuspendIntr: 0xEC53D007
- ksceKernelRWSpinlockLowTryReadLockCpuSuspendIntr: 0xF02467D1
+ ksceKernelRWSpinlockLowReadUnlock: 0xF5FD5676
ksceKernelRWSpinlockLowReadUnlockCpuResumeIntr: 0x740A0750
- ksceKernelRWSpinlockLowWriteLock: 0x3F42B434
+ ksceKernelRWSpinlockLowTryReadLock: 0x093925BD
+ ksceKernelRWSpinlockLowTryReadLockCpuSuspendIntr: 0xF02467D1
ksceKernelRWSpinlockLowTryWriteLock: 0x4F7790B4
- ksceKernelRWSpinlockLowWriteUnlock: 0xCB8ABDF0
- ksceKernelRWSpinlockLowWriteLockCpuSuspendIntr: 0x4C38CE4D
ksceKernelRWSpinlockLowTryWriteLockCpuSuspendIntr: 0xDE6482C6
+ ksceKernelRWSpinlockLowWriteLock: 0x3F42B434
+ ksceKernelRWSpinlockLowWriteLockCpuSuspendIntr: 0x4C38CE4D
+ ksceKernelRWSpinlockLowWriteUnlock: 0xCB8ABDF0
ksceKernelRWSpinlockLowWriteUnlockCpuResumeIntr: 0x9EC91017
+ ksceKernelSpinlockLowLock: 0xBF82DEB2
+ ksceKernelSpinlockLowLockCpuSuspendIntr: 0xD32ACE9E
+ ksceKernelSpinlockLowTryLock: 0x5AC9D394
+ ksceKernelSpinlockLowTryLockCpuSuspendIntr: 0x27C0B340
+ ksceKernelSpinlockLowUnlock: 0xD6ED0C46
+ ksceKernelSpinlockLowUnlockCpuResumeIntr: 0x7BB9D5DF
SceCpuForKernel:
kernel: true
nid: 0x54BF2BAB
|
Missing loc in builtins
Just for consistency... | @@ -18,7 +18,7 @@ builtins.io_write._type = types.T.Builtin(builtins.io_write)
builtins.table_insert = ast.Toplevel.Builtin(loc, "table.insert")
builtins.table_insert._type = types.T.Builtin(builtins.table_insert)
-builtins.table_remove = ast.Toplevel.Builtin(false, "table.remove")
+builtins.table_remove = ast.Toplevel.Builtin(loc, "table.remove")
builtins.table_remove._type = types.T.Builtin(builtins.table_remove)
return builtins
|
Dropping TStringBuf::c_str. | @@ -952,15 +952,15 @@ namespace {
insert("::1");
}
- inline bool IsLocalName(TStringBuf name) const noexcept {
+ inline bool IsLocalName(const char* name) const noexcept {
struct sockaddr_in sa;
memset(&sa, 0, sizeof(sa));
- if (inet_pton(AF_INET, name.c_str(), &(sa.sin_addr)) == 1) {
+ if (inet_pton(AF_INET, name, &(sa.sin_addr)) == 1) {
return (InetToHost(sa.sin_addr.s_addr) >> 24) == 127;
}
- return find(name) != end();
+ return contains(name);
}
};
}
|
Deleted previous, commented-out version of EN_setlinktype | @@ -4963,45 +4963,6 @@ int DLLEXPORT EN_setlinktype(EN_ProjectHandle ph, int *index, EN_LinkType type)
// Find the index of this new link
EN_getlinkindex(ph, id, index);
return set_error(p->error_handle, errcode);
-
- /***********************************************
- int i;
- EN_LinkType fromType;
-
- EN_Project *p = (EN_Project*)ph;
-
- EN_Network *net = &p->network;
-
- if (!p->Openflag)
- return set_error(p->error_handle, 102);
-
- // Check if a link with the id exists
- if (EN_getlinkindex(p, id, &i) != 0)
- return set_error(p->error_handle, 215);
-
- // Get the current type of the link
- EN_getlinktype(p, i, &fromType);
- if (fromType == toType)
- return set_error(p->error_handle, 0);
-
- // Change link from Pipe
- if (toType <= EN_PIPE) {
- net->Npipes++;
- } else if (toType == EN_PUMP) {
- net->Npumps++;
- net->Pump[net->Npumps].Link = i;
- } else {
- net->Nvalves++;
- net->Valve[net->Nvalves].Link = i;
- }
-
- if (fromType <= EN_PIPE) {
- net->Npipes--;
- } else if (fromType == EN_PUMP) {
- net->Npumps--;
- }
- return set_error(p->error_handle, 0);
-**********************************************/
}
int DLLEXPORT EN_addnode(EN_ProjectHandle ph, char *id, EN_NodeType nodeType) {
|
Refactor the debugger multiple command usages
JerryScript-DCO-1.0-Signed-off-by: Levente Orban | @@ -167,9 +167,7 @@ class DebuggerPrompt(Cmd):
""" Insert breakpoints on the given lines """
self.insert_breakpoint(args)
- def do_b(self, args):
- """ Insert breakpoints on the given lines """
- self.insert_breakpoint(args)
+ do_b = do_break
def exec_command(self, args, command_id):
self.stop = True
@@ -185,28 +183,19 @@ class DebuggerPrompt(Cmd):
self.cont = True
print("Press enter to stop JavaScript execution.")
- def do_c(self, args):
- """ Continue execution """
- self.exec_command(args, JERRY_DEBUGGER_CONTINUE)
- self.stop = True
- self.cont = True
- print("Press enter to stop JavaScript execution.")
+ do_c = do_continue
def do_step(self, args):
""" Next breakpoint, step into functions """
self.exec_command(args, JERRY_DEBUGGER_STEP)
- def do_s(self, args):
- """ Next breakpoint, step into functions """
- self.exec_command(args, JERRY_DEBUGGER_STEP)
+ do_s = do_step
def do_next(self, args):
""" Next breakpoint in the same context """
self.exec_command(args, JERRY_DEBUGGER_NEXT)
- def do_n(self, args):
- """ Next breakpoint in the same context """
- self.exec_command(args, JERRY_DEBUGGER_NEXT)
+ do_n = do_next
def do_list(self, args):
""" Lists the available breakpoints """
@@ -270,9 +259,7 @@ class DebuggerPrompt(Cmd):
""" Get backtrace data from debugger """
self.exec_backtrace(args)
- def do_bt(self, args):
- """ Get backtrace data from debugger """
- self.exec_backtrace(args)
+ do_bt = do_backtrace
def do_src(self, args):
""" Get current source code """
@@ -331,9 +318,7 @@ class DebuggerPrompt(Cmd):
""" Evaluate JavaScript source code """
self.eval_string(args)
- def do_e(self, args):
- """ Evaluate JavaScript source code """
- self.eval_string(args)
+ do_e = do_eval
class Multimap(object):
|
Fix a bug in create_ssl_ctx_pair()
The max protocol version was only being set on the server side. It should
have been done on both the client and the server. | @@ -531,10 +531,10 @@ int create_ssl_ctx_pair(const SSL_METHOD *sm, const SSL_METHOD *cm,
goto err;
if (clientctx != NULL
&& ((min_proto_version > 0
- && !TEST_true(SSL_CTX_set_min_proto_version(serverctx,
+ && !TEST_true(SSL_CTX_set_min_proto_version(clientctx,
min_proto_version)))
|| (max_proto_version > 0
- && !TEST_true(SSL_CTX_set_max_proto_version(serverctx,
+ && !TEST_true(SSL_CTX_set_max_proto_version(clientctx,
max_proto_version)))))
goto err;
|
drawcia: Add keyboard backlight support
BRANCH=none
TEST=Set FW_CONFIG to 0x0100 and make sure "ectool inventory"
had keyboard backlight present. | #define CONFIG_TABLET_MODE_SWITCH
#define CONFIG_GMR_TABLET_MODE
+/* Keyboard */
+#define CONFIG_PWM_KBLIGHT
+
/* TCPC */
#define CONFIG_USB_PD_PORT_MAX_COUNT 2
#define CONFIG_USB_PD_TCPM_ITE_ON_CHIP /* C0: ITE EC TCPC */
|
system: Rename SYSTEM_IMAGE_RW to EC_IMAGE_RW
This is left out from CL:2036599.
BRANCH=none
TEST=build helios with EFS2 enabled. | @@ -208,7 +208,7 @@ static void verify_and_jump(void)
enable_pd();
break;
case CR50_COMM_SUCCESS:
- rv = system_run_image_copy(SYSTEM_IMAGE_RW);
+ rv = system_run_image_copy(EC_IMAGE_RW);
CPRINTS("Failed to jump (0x%x)", rv);
show_critical_error();
break;
|
compressor: read_from() docstring grammer | @@ -607,7 +607,7 @@ static ZstdCompressionObj* ZstdCompressor_compressobj(ZstdCompressor* self, PyOb
PyDoc_STRVAR(ZstdCompressor_read_to_iter__doc__,
"read_to_iter(reader, [size=0, read_size=default, write_size=default])\n"
-"Read uncompress data from a reader and return an iterator\n"
+"Read uncompressed data from a reader and return an iterator\n"
"\n"
"Returns an iterator of compressed data produced from reading from ``reader``.\n"
"\n"
|
common/event_log.c: Format with clang-format
BRANCH=none
TEST=none | @@ -44,8 +44,8 @@ static size_t log_tail_next;
/* Size of one FIFO entry */
#define ENTRY_SIZE(payload_sz) (1 + DIV_ROUND_UP((payload_sz), UNIT_SIZE))
-void log_add_event(uint8_t type, uint8_t size, uint16_t data,
- void *payload, uint32_t timestamp)
+void log_add_event(uint8_t type, uint8_t size, uint16_t data, void *payload,
+ uint32_t timestamp)
{
struct event_log_entry *r;
size_t payload_size = EVENT_LOG_SIZE(size);
@@ -78,8 +78,8 @@ void log_add_event(uint8_t type, uint8_t size, uint16_t data,
r->size = size;
r->data = data;
/* copy the payload into the FIFO */
- first = MIN(total_size - 1, (UNIT_COUNT -
- (current_tail & UNIT_COUNT_MASK)) - 1);
+ first = MIN(total_size - 1,
+ (UNIT_COUNT - (current_tail & UNIT_COUNT_MASK)) - 1);
if (first)
memcpy(r->payload, payload, first * UNIT_SIZE);
if (first < total_size - 1)
@@ -179,8 +179,6 @@ static int command_dlog(int argc, char **argv)
}
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(dlog,
- command_dlog,
- "[clear]",
+DECLARE_CONSOLE_COMMAND(dlog, command_dlog, "[clear]",
"Display/clear TPM event logs");
#endif
|
Add missing include file.
Specifically, include e_os.h to pick up alloca definition for WIN32. | # endif
# endif
+#include "e_os.h"
#include "internal/cryptlib.h"
#if !defined(OPENSSL_NO_STDIO)
# include <stdio.h>
-# ifdef _WIN32
-# include <windows.h>
-# endif
# ifdef __DJGPP__
# include <unistd.h>
# endif
|
Fix modules tab LoadCount for x64 (1/2) | @@ -3136,6 +3136,24 @@ BOOLEAN NTAPI PhpEnumProcessModulesCallback(
}
}
+ if (WindowsVersion >= WINDOWS_8)
+ {
+ LDR_DDAG_NODE ldrDagNode = { 0 };
+
+ if (NT_SUCCESS(NtReadVirtualMemory(
+ ProcessHandle,
+ Entry->DdagNode,
+ &ldrDagNode,
+ sizeof(LDR_DDAG_NODE),
+ NULL
+ )))
+ {
+ // HACK: Fixup the module load count (64bit only).
+ // Temp fix until PhpModuleQueryWorker can be updated with Stage2.
+ Entry->ObsoleteLoadCount = (USHORT)ldrDagNode.LoadCount;
+ }
+ }
+
// Execute the callback.
cont = parameters->Callback(Entry, parameters->Context);
|
point to the right session.js | =content "width=device-width, initial-scale=1, shrink-to-fit=no";
;link(rel "stylesheet", href "/~publish/index.css");
;script@"/~/channel/channel.js";
- ;script@"/session.js";
+ ;script@"/~modulo/session.js";
;script: window.injectedState = {(en-json:html inject)}
==
::
|
Fix clang compilation on aarch64: replace -pie with -fPIE for dpdk compilation.
Fixes clang error: argument unused during compilation: '-pie'
by replacing it with -fPIE | @@ -145,7 +145,11 @@ JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
$(shell grep -c ^processor /proc/cpuinfo), 2)
# compiler/linker custom arguments
+ifeq ($(DPDK_CC),clang)
+DPDK_CPU_CFLAGS := -fPIE -fPIC
+else
DPDK_CPU_CFLAGS := -pie -fPIC
+endif
ifeq ($(DPDK_DEBUG),n)
DPDK_EXTRA_CFLAGS := -g -mtune=$(DPDK_TUNE)
|
include/system.h: Format with clang-format
BRANCH=none
TEST=none | @@ -369,7 +369,8 @@ const char *system_get_build_info(void);
#ifndef TEST_FUZZ
noreturn
#endif
-void system_reset(int flags);
+ void
+ system_reset(int flags);
/**
* Set a scratchpad register to the specified value.
@@ -440,7 +441,6 @@ __override_proto const char *board_read_serial(void);
*/
__override_proto int board_write_serial(const char *serial);
-
/**
* Optional board-level callback functions to read a unique MAC address per
* chip. Default implementation reads from flash.
@@ -525,7 +525,9 @@ timestamp_t system_get_rtc(void);
#ifdef CONFIG_RTC
void print_system_rtc(enum console_channel channel);
#else
-static inline void print_system_rtc(enum console_channel channel) { }
+static inline void print_system_rtc(enum console_channel channel)
+{
+}
#endif /* !defined(CONFIG_RTC) */
/**
@@ -556,7 +558,6 @@ enum {
SLEEP_MASK_EMMC = BIT(14), /* eMMC emulation ongoing */
SLEEP_MASK_FORCE_NO_DSLEEP = BIT(15), /* Force disable. */
-
/*
* Sleep masks to prevent using slow speed clock in deep sleep.
*/
@@ -580,8 +581,7 @@ extern atomic_t sleep_mask;
#ifndef CONFIG_LOW_POWER_S0
#define DEEP_SLEEP_ALLOWED (!(sleep_mask & 0x0000ffff))
#else
-#define DEEP_SLEEP_ALLOWED (!(sleep_mask & 0x0000ffff & \
- (~SLEEP_MASK_AP_RUN)))
+#define DEEP_SLEEP_ALLOWED (!(sleep_mask & 0x0000ffff & (~SLEEP_MASK_AP_RUN)))
#endif
#define LOW_SPEED_DEEP_SLEEP_ALLOWED (!(sleep_mask & 0xffff0000))
|
metadata: move rgbcolor | @@ -1061,6 +1061,13 @@ usedby/plugins= macaddr
description = "Marks a key as MAC address. Used to validate MAC addresses and
returns integer representations on get."
+[check/rgbcolor]
+type= empty
+status = implemented
+usedby/plugin= rgbcolor
+description= "check if value is a valid rgbcolor in hexformat
+ will normalize all values to decimal rrggbbaa"
+
@@ -1153,12 +1160,6 @@ description= "Who should see this configuration setting?
- developer: settings only relevant for developers of the application
- internal: settings which should not be seen by anyone. (e.g. intermediate steps for calculations)"
-[check/rgbcolor]
-type= empty
-status = implemented
-usedby/plugin= rgbcolor
-description= "check if value is a valid rgbcolor in hexformat
- will normalize all values to decimal rrggbbaa"
#
# Old stuff inherited from filesys plugin
|
tests: move bfd over gre to extended tests
This test should be fixed or removed.
EXTENDED_TESTS should not become "BROKEN_TESTS"
Type: test | @@ -1790,6 +1790,7 @@ class BFDFIBTestCase(VppTestCase):
packet[IPv6].dst)
[email protected](running_extended_tests, "part of extended tests")
class BFDTunTestCase(VppTestCase):
""" BFD over GRE tunnel """
|
Update sysinfo_sources.cpp
Fix for -- warning: operator '?:' has lower precedence than '<<'; '<<' will be evaluated first [-Wparentheses] | @@ -216,7 +216,7 @@ sysinfo_sources_impl::sysinfo_sources_impl() : sysinfo_sources()
int hh = lt.tm_gmtoff / 3600;
int mm = (lt.tm_gmtoff / 60) % 60;
std::ostringstream oss;
- oss << (hh<0)?"-":"+"; // +hh:mm or -hh:mm
+ oss << ((hh<0)?"-":"+"); // +hh:mm or -hh:mm
oss << std::setw(2) << std::setfill('0') << std::abs(hh);
oss << std::setw(1) << ":";
oss << std::setw(2) << std::setfill('0') << std::abs(mm);
|
libflash/file: greatly increase perf of file_erase()
Do 4096 byte chunks not 8 byte chunks. A ffspart invocation constructing
a 64MB PNOR goes from a couple of seconds to ~0.1seconds with this
patch. | @@ -117,15 +117,17 @@ static int file_write(struct blocklevel_device *bl, uint64_t dst, const void *sr
*/
static int file_erase(struct blocklevel_device *bl, uint64_t dst, uint64_t len)
{
- unsigned long long int d = ULLONG_MAX;
+ char buf[4096];
int i = 0;
int rc;
+ memset(buf, ~0, sizeof(buf));
+
while (len - i > 0) {
- rc = file_write(bl, dst + i, &d, len - i > sizeof(d) ? sizeof(d) : len - i);
+ rc = file_write(bl, dst + i, buf, len - i > sizeof(buf) ? sizeof(buf) : len - i);
if (rc)
return rc;
- i += len - i > sizeof(d) ? sizeof(d) : len - i;
+ i += (len - i > sizeof(buf)) ? sizeof(buf) : len - i;
}
return 0;
|
finetune the RA parsing procedure | @@ -369,30 +369,48 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
for (ndx = 0; ndx + sizeof(struct icmpv6_prefixinfo_s) <= optlen; )
{
- FAR struct icmpv6_srclladdr_s *sllopt =
- (FAR struct icmpv6_srclladdr_s *)&options[ndx];
+ FAR struct icmpv6_generic_s *opt =
+ (FAR struct icmpv6_generic_s *)&options[ndx];
- if (sllopt->opttype == ICMPv6_OPT_SRCLLADDR)
+ switch (opt->opttype)
+ {
+ case ICMPv6_OPT_SRCLLADDR:
{
+ FAR struct icmpv6_srclladdr_s *sllopt =
+ (FAR struct icmpv6_srclladdr_s *)opt;
neighbor_add(dev, ipv6->srcipaddr, sllopt->srclladdr);
}
+ break;
- FAR struct icmpv6_prefixinfo_s *opt =
- (FAR struct icmpv6_prefixinfo_s *)&options[ndx];
+ case ICMPv6_OPT_PREFIX:
+ {
+ FAR struct icmpv6_prefixinfo_s *prefixopt =
+ (FAR struct icmpv6_prefixinfo_s *)opt;
- /* Is this the sought for prefix? Is it the correct size? Is
- * the "A" flag set?
- */
+ /* Is the "A" flag set? */
- if (opt->opttype == ICMPv6_OPT_PREFIX &&
- (opt->flags & ICMPv6_PRFX_FLAG_A) != 0)
+ if ((prefixopt->flags & ICMPv6_PRFX_FLAG_A) != 0)
{
- /* Yes.. Notify any waiting threads */
+ /* Notify any waiting threads */
icmpv6_rnotify(dev, ipv6->srcipaddr,
- opt->prefix, opt->preflen);
+ prefixopt->prefix, prefixopt->preflen);
prefix = true;
}
+ }
+ break;
+
+ case ICMPv6_OPT_MTU:
+ {
+ FAR struct icmpv6_mtu_s *mtuopt =
+ (FAR struct icmpv6_mtu_s *)opt;
+ dev->d_pktsize = mtuopt->mtu;
+ }
+ break;
+
+ default:
+ break;
+ }
/* Skip to the next option (units of octets) */
|
Fix a bug in glm_lookat_lh
Fix the order of arguments passed to glm_vec3_crossn to avoid the negation of X axis. | @@ -37,7 +37,7 @@ glm_lookat_lh(vec3 eye, vec3 center, vec3 up, mat4 dest) {
glm_vec3_sub(center, eye, f);
glm_vec3_normalize(f);
- glm_vec3_crossn(f, up, s);
+ glm_vec3_crossn(up, f, s);
glm_vec3_cross(s, f, u);
dest[0][0] = s[0];
|
Fix hexconv_hexlify() | @@ -56,7 +56,7 @@ fromhex(char c)
int
hexconv_hexlify(const uint8_t *data, int data_len, char *text, int text_size)
{
- static const char *HEX = "01234567890abcdef";
+ static const char *HEX = "0123456789abcdef";
int i, p;
for(i = 0, p = 0; p + 1 < text_size && i < data_len; i++) {
|
"Fixed" another weird %ap-lame. | |= {wir/wire piz/prize}
^- (quip move _+>)
=^ mos +>.$
+ :: this shouldn't be necessary, but see the TODO below.
+ ?: ?=($burden -.piz)
%- pre-bake
- ta-done:(ta-take:ta wir piz)
+ =< ta-done
+ %+ roll ~(tap by sos.piz)
+ |= {{n/naem b/burden} _ta}
+ =< so-done
+ (~(so-bear so n ~ (fall (~(get by stories) n) *story)) b)
+ %- pre-bake
+ ta-done:(ta-take:ta wir piz) ::TODO %ap-lame for %burden prize...
=^ mow +>.$
log-all-to-file
[(welp mos mow) +>.$]
|
Adds xerces-c for gporca
Solves | @@ -10,6 +10,7 @@ fi
brew install bash-completion
brew install conan
brew install cmake # gporca
+brew install xerces-c #gporca
brew install libyaml # enables `--enable-mapreduce`
brew install libevent # gpfdist
brew install apr # gpperfmon
|
gitlab: Add npcx7/9_evb to build test
This adds npcx7/9_evb to the GitLab CI build test.
BRANCH=none
TEST=run on gitlab server | @@ -194,6 +194,16 @@ native_posix:
TOOLCHAIN: "host"
<<: *build_template
+npcx7_evb:
+ variables:
+ PROJECT: "npcx7"
+ <<: *build_template
+
+npcx9_evb:
+ variables:
+ PROJECT: "npcx9"
+ <<: *build_template
+
skyrim:
variables:
PROJECT: "skyrim"
|
graph-pull-hook: fix scry helper | +* this .
def ~(. (default-agent this %|) bowl)
dep ~(. (default:pull-hook this config) bowl)
+ gra ~(. graph bowl)
::
++ on-init on-init:def
++ on-save !>(~)
++ on-pull-kick
|= =resource
^- (unit path)
- =/ maybe-time (peek-update-log:graph resource)
+ =/ maybe-time (peek-update-log:gra resource)
?~ maybe-time `/
`/(scot %da u.maybe-time)
--
|
snap_path.sh: Adding ACTION_ROOT only if defined | #!/bin/bash
#
-# Copyright 2016, International Business Machines
+# Copyright 2017 International Business Machines
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# This script needs to get sourced in order to effectively change $PATH
export SNAP_ROOT=$(dirname $(readlink -f "$BASH_SOURCE"))
[ -f "${SNAP_ROOT}/snap_env.sh" ] && . ${SNAP_ROOT}/snap_env.sh
-export PATH=$PATH:$SNAP_ROOT/software/tools:$ACTION_ROOT/sw
+export PATH=$PATH:$SNAP_ROOT/software/tools
+[ -n "$ACTION_ROOT" ] && export $PATH=$PATH:$ACTION_ROOT/sw
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP_ROOT/software/lib
|
ctype: add doc | @@ -227,6 +227,7 @@ copied by the `spec` plugin just before):
- [path](path/) by checking files on file system
- [type](type/) using run-time type checking (CORBA types/)
- [enum](enum/) compares the keyvalue against a list of valid values
+- [ctype](ctype/) type checking (CORBA types) and enum functionality, written in C
- [mathcheck](mathcheck/) by mathematical expressions using key values as operands
- [conditionals](conditionals/) by using if-then-else like statements
- [required](required/) rejects non-required keys
|
groups:Remove button for registering prot. handler in settings | import {
- Button,
Col,
ManagedToggleSwitchField as Toggle, Text
} from '@tlon/indigo-react';
import { Form, FormikHelpers } from 'formik';
import _ from 'lodash';
-import React, { useCallback, useState } from 'react';
+import React, { useCallback } from 'react';
import { isWatching } from '~/logic/lib/hark';
import useHarkState from '~/logic/state/hark';
import { FormikOnBlur } from '~/views/components/FormikOnBlur';
@@ -72,8 +71,6 @@ export function NotificationPreferences() {
}
}, [graphConfig, dnd]);
- const [notificationsAllowed, setNotificationsAllowed] = useState('Notification' in window && Notification.permission !== 'default');
-
return (
<>
<BackButton />
@@ -90,14 +87,6 @@ export function NotificationPreferences() {
<FormikOnBlur initialValues={initialValues} onSubmit={onSubmit}>
<Form>
<Col gapY="4">
- {notificationsAllowed || !('Notification' in window)
- ? null
- : <Button alignSelf='flex-start' onClick={() => {
- Notification.requestPermission().then(() => {
- setNotificationsAllowed(Notification.permission !== 'default');
- });
- }}>Allow Browser Notifications</Button>
- }
<Toggle
label="Do not disturb"
id="dnd"
|
Don't pass 0 to __builtin_clzll which is undefined | @@ -230,9 +230,17 @@ void ngtcp2_cc_cubic_cc_free(ngtcp2_cc *cc, const ngtcp2_mem *mem) {
}
static uint64_t ngtcp2_cbrt(uint64_t n) {
- int d = __builtin_clzll(n);
- uint64_t a = 1ULL << ((64 - d) / 3 + 1);
+ int d;
+ uint64_t a;
int i;
+
+ if (n == 0) {
+ return 0;
+ }
+
+ d = __builtin_clzll(n);
+ a = 1ULL << ((64 - d) / 3 + 1);
+
for (i = 0; a * a * a > n; ++i) {
a = (2 * a + n / a / a) / 3;
}
|
YAML CPP: Reformat Doxygen comments | @@ -49,8 +49,7 @@ NameIterator relativeKeyIterator (Key const & key, Key const & parent)
* @param data This node stores the data specified via `keyIterator`.
* @param keyIterator This iterator specifies the current part of the key name this function adds to `data`.
* @param key This parameter specifies the key that should be added to `data`.
- *
-**/
+ */
void addKey (YAML::Node & data, NameIterator & keyIterator, Key const & key)
{
if (keyIterator == --key.end ())
@@ -71,8 +70,7 @@ void addKey (YAML::Node & data, NameIterator & keyIterator, Key const & key)
* @param data This node stores the data specified via `mappings`.
* @param mappings This keyset specifies all keys and values this function adds to `data`.
* @param parent This key is the root of all keys stored in `mappings`.
- *
-**/
+ */
void addKeys (YAML::Node & data, KeySet const & mappings, Key const & parent)
{
for (auto key : mappings)
|
drivers/video: Skip all action if video_framebuff_realloc_container doesn't change the container size | @@ -110,34 +110,31 @@ void video_framebuff_uninit(video_framebuff_t *fbuf)
int video_framebuff_realloc_container(video_framebuff_t *fbuf, int sz)
{
- if (fbuf->vbuf_alloced == NULL || fbuf->container_size != sz)
- {
- if (fbuf->container_size != sz)
+ if (fbuf->container_size == sz)
{
+ return OK;
+ }
+
if (fbuf->vbuf_alloced != NULL)
{
kmm_free(fbuf->vbuf_alloced);
- }
-
fbuf->vbuf_alloced = NULL;
fbuf->container_size = 0;
}
if (sz > 0)
{
- fbuf->vbuf_alloced
- = (vbuf_container_t *)kmm_malloc(sizeof(vbuf_container_t)*sz);
+ fbuf->vbuf_alloced =
+ (vbuf_container_t *)kmm_malloc(sizeof(vbuf_container_t) * sz);
if (fbuf->vbuf_alloced == NULL)
{
return -ENOMEM;
}
- }
fbuf->container_size = sz;
}
cleanup_container(fbuf);
-
return OK;
}
|
Added support for the stm32f7 to pwm_test. | #include <easing/easing.h>
#include <console/console.h>
+#if MYNEWT_VAL(MCU_STM32F7)
+# define PWM_TEST_CH_CFG_PIN MCU_AFIO_GPIO(LED_2, 2)
+# define PWM_TEST_CH_CFG_INV false
+# define PWM_TEST_CH_NUM 1
+# define PWM_TEST_IRQ_PRIO 0
+#else
+# define PWM_TEST_CH_CFG_PIN LED_BLINK_PIN
+# define PWM_TEST_CH_CFG_INV true
+# define PWM_TEST_CH_NUM 0
+# define PWM_TEST_IRQ_PRIO 3
+#endif
+
+#if MYNEWT_VAL(SOFT_PWM)
+# define PWM_TEST_DEV "spwm0"
+#else
+# define PWM_TEST_DEV "pwm0"
+#endif
+
struct pwm_dev *pwm;
static uint32_t pwm_freq = 200;
static uint32_t max_steps = 200; /* two seconds motion up/down */
@@ -37,7 +55,7 @@ pwm_cycle_handler(void* unused)
{
int16_t eased;
eased = easing_funct(step, max_steps, top_val);
- pwm_set_duty_cycle(pwm, 0, eased);
+ pwm_set_duty_cycle(pwm, PWM_TEST_CH_NUM, eased);
if (step >= max_steps || step <= 0) {
up = !up;
}
@@ -96,13 +114,13 @@ int
pwm_init(void)
{
struct pwm_chan_cfg chan_conf = {
- .pin = LED_BLINK_PIN,
- .inverted = true,
+ .pin = PWM_TEST_CH_CFG_PIN,
+ .inverted = PWM_TEST_CH_CFG_INV,
.data = NULL,
};
struct pwm_dev_cfg dev_conf = {
.n_cycles = pwm_freq * 6, /* 6 seconds cycles */
- .int_prio = 3,
+ .int_prio = PWM_TEST_IRQ_PRIO,
.cycle_handler = pwm_cycle_handler, /* this won't work on soft_pwm */
.seq_end_handler = pwm_end_seq_handler, /* this won't work on soft_pwm */
.cycle_data = NULL,
@@ -111,11 +129,7 @@ pwm_init(void)
};
int rc;
-#if MYNEWT_VAL(SOFT_PWM)
- pwm = (struct pwm_dev *) os_dev_open("spwm0", 0, NULL);
-#else
- pwm = (struct pwm_dev *) os_dev_open("pwm0", 0, NULL);
-#endif
+ pwm = (struct pwm_dev *) os_dev_open(PWM_TEST_DEV, 0, NULL);
pwm_configure_device(pwm, &dev_conf);
@@ -123,12 +137,12 @@ pwm_init(void)
pwm_set_frequency(pwm, pwm_freq);
top_val = (uint16_t) pwm_get_top_value(pwm);
- /* setup led 1 */
- rc = pwm_configure_channel(pwm, 0, &chan_conf);
+ /* setup led */
+ rc = pwm_configure_channel(pwm, PWM_TEST_CH_NUM, &chan_conf);
assert(rc == 0);
/* console_printf ("Easing: sine io\n"); */
- rc = pwm_set_duty_cycle(pwm, 0, top_val);
+ rc = pwm_set_duty_cycle(pwm, PWM_TEST_CH_NUM, top_val);
rc = pwm_enable(pwm);
assert(rc == 0);
|
Improve start.go usage msg | @@ -15,12 +15,14 @@ import (
* force -
*/
-const startUsage string = `The following actions will be performed on the host and in all relevant containers:
-- Extraction of libscope.so to /usr/lib/appscope/<version>/
-- Extraction of the filter input to /usr/lib/appscope/<version>/
+func getStartUsage(version string) string {
+ return fmt.Sprintf(`The following actions will be performed on the host and in all relevant containers:
+ - Extraction of libscope.so to /usr/lib/appscope/%s/
+ - Extraction of the filter input to /usr/lib/appscope/%s/
- Attach to all existing "allowed" processes defined in the filter file
-- Install etc/profile.d/scope.sh script to preload /usr/lib/appscope/<version>/libscope.so
-- Modify the relevant service configurations to preload /usr/lib/appscope/<version>/libscope.so`
+ - Install etc/profile.d/scope.sh script to preload /usr/lib/appscope/%s/libscope.so
+ - Modify the relevant service configurations to preload /usr/lib/appscope/%s/libscope.so`, version, version, version, version)
+}
// startCmd represents the start command
var startCmd = &cobra.Command{
@@ -28,7 +30,7 @@ var startCmd = &cobra.Command{
Short: "Start scoping a filtered selection of processes and services",
Long: `Start scoping a filtered selection of processes and services on the host and in all relevant containers.
-` + startUsage,
+` + getStartUsage("<version>"),
Example: ` scope start < example_filter.yml
cat example_filter.json | scope start`,
Args: cobra.NoArgs,
@@ -37,8 +39,8 @@ var startCmd = &cobra.Command{
force, _ := cmd.Flags().GetBool("force")
if !force {
- fmt.Printf(startUsage)
- fmt.Println("\n\nIf you wish to proceed, run again with the -f flag.")
+ fmt.Println(getStartUsage(internal.GetNormalizedVersion()))
+ fmt.Println("\nIf you wish to proceed, run again with the -f flag.")
os.Exit(0)
}
if err := start.Start(); err != nil {
|
Change fix with ev/call | [host port &opt handler type]
(def s (net/listen host port type))
(if handler
- (ev/go (coro (net/accept-loop s handler))))
+ (ev/call (fn [] (net/accept-loop s handler))))
s))
(undef guarddef)
|
Fix reset simulation | @@ -613,11 +613,10 @@ Asset::resetSimulation()
{
assert(myNodeInfo.id >= 0);
- //TODO: HAPI 3
- //HAPI_ResetSimulation(
- // Util::theHAPISession.get(),
- // myAssetInfo.id
- // );
+ HAPI_ResetSimulation(
+ Util::theHAPISession.get(),
+ myNodeInfo.id
+ );
}
MString
|
Fix example in http_sendstatus man page | @@ -38,5 +38,5 @@ Zero in the case of success. On error returns -1 and sets _errno_ to one of the
# EXAMPLE
```c
-int rc = http_sendfield(s, "Host", "www.example.org", -1);
+int rc = http_sendstatus(s, 404, "Not found", -1);
```
|
vere: long-only opt for http/s port
Also includes in usage. | @@ -151,8 +151,8 @@ _main_getopt(c3_i argc, c3_c** argv)
{ "replay-to", required_argument, NULL, 'n' },
{ "profile", no_argument, NULL, 'P' },
{ "ames-port", required_argument, NULL, 'p' },
- { "http-port", required_argument, NULL, 'h' },
- { "https-port", required_argument, NULL, 'T' },
+ { "http-port", required_argument, NULL, c3__http },
+ { "https-port", required_argument, NULL, c3__htls },
{ "quiet", no_argument, NULL, 'q' },
{ "versions", no_argument, NULL, 'R' },
{ "replay-from", required_argument, NULL, 'r' },
@@ -170,8 +170,7 @@ _main_getopt(c3_i argc, c3_c** argv)
};
while ( -1 != (ch_i=getopt_long(argc, argv,
- "A:B:C:DF:G:H:I:J:K:LPRST:X:Y:Z:"
- "ab:cde:gh:i:jk:ln:p:qr:stu:vw:x",
+ "A:B:C:DF:G:H:I:J:K:LPRSX:Y:Z:ab:cde:gi:jk:ln:p:qr:stu:vw:x",
lop_u, &lid_i)) )
{
switch ( ch_i ) {
@@ -263,13 +262,13 @@ _main_getopt(c3_i argc, c3_c** argv)
} else u3_Host.ops_u.por_s = arg_w;
break;
}
- case 'h': {
+ case c3__http: {
if ( c3n == _main_readw(optarg, 65536, &arg_w) ) {
return c3n;
} else u3_Host.ops_u.per_s = arg_w;
break;
}
- case 'T': {
+ case c3__htls: {
if ( c3n == _main_readw(optarg, 65536, &arg_w) ) {
return c3n;
} else u3_Host.ops_u.pes_s = arg_w;
@@ -549,6 +548,8 @@ u3_ve_usage(c3_i argc, c3_c** argv)
"-n, --replay-to NUMBER Replay up to event\n",
"-P, --profile Profiling\n",
"-p, --ames-port PORT Set the ames port to bind to\n",
+ " --http-port PORT Set the http port to bind to\n",
+ " --https-port PORT Set the https port to bind to\n",
"-q, --quiet Quiet\n",
"-R, --versions Report urbit build info\n",
"-r, --replay-from NUMBER Load snapshot from event\n",
|
util/misc_util: Fix unchecked error
It's unlikely, but let's check for ftell() errors.
BRANCH=none
TEST=none
Found-by: Coverity Scan
Commit-Ready: Patrick Georgi
Tested-by: Patrick Georgi | @@ -48,7 +48,10 @@ char *read_file(const char *filename, int *size)
fseek(f, 0, SEEK_END);
*size = ftell(f);
rewind(f);
- if (*size > 0x100000) {
+ if ((*size > 0x100000) || (*size < 0)) {
+ if (*size < 0)
+ perror("ftell failed");
+ else
fprintf(stderr, "File seems unreasonably large\n");
fclose(f);
return NULL;
|
Enable LV_DRAG_DIR_ALL by default in object initializer
It was previously enabled by `lv_obj_set_drag`. | @@ -253,7 +253,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
/*Set attributes*/
new_obj->click = 1;
new_obj->drag = 0;
- new_obj->drag_dir = 0;
+ new_obj->drag_dir = LV_DRAG_DIR_ALL;
new_obj->drag_throw = 0;
new_obj->drag_parent = 0;
new_obj->hidden = 0;
@@ -1096,9 +1096,6 @@ void lv_obj_set_drag(lv_obj_t * obj, bool en)
{
if(en == true) lv_obj_set_click(obj, true); /*Drag is useless without enabled clicking*/
obj->drag = (en == true ? 1 : 0);
- if(en && obj->drag_dir == 0) {
- obj->drag_dir = LV_DRAG_DIR_HOR | LV_DRAG_DIR_VER;
- }
}
/**
|
odissey: add describe message to extended queries set | @@ -538,6 +538,7 @@ od_frontend_remote(od_client_t *client)
/* extended queries */
if (type == 'P' || /* Parse */
type == 'B' || /* Bind */
+ type == 'D' || /* Describe */
type == 'E' || /* Execute */
type == 'C') /* Close */
{
|
[skip ci] chang title color | @@ -25,7 +25,7 @@ param (
' /_/\_\_|_| |_|\__ \|_|\_\____| getter '
' '
' ')
- Write-Host $([string]::Join("`n", $logo)) -BackgroundColor White -ForegroundColor DarkBlue
+ Write-Host $([string]::Join("`n", $logo)) -ForegroundColor Green
}
if ($IsLinux -or $IsMacOS) {
|
ORB: pre-compute umax. | @@ -26,6 +26,11 @@ typedef struct {
int y;
} sample_point_t;
+static const int u_max[] = {
+ 15, 15, 15, 15, 14, 14, 14, 13,
+ 13, 12, 11, 10, 9, 8, 6, 3, 0
+};
+
const static int sample_pattern[256*4] = {
8,-3, 9,5/*mean (0), correlation (0)*/,
4,2, 7,-12/*mean (1.12461e-05), correlation (0.0437584)*/,
@@ -285,7 +290,7 @@ const static int sample_pattern[256*4] = {
-1,-6, 0,-11/*mean (0.127148), correlation (0.547401)*/
};
-static int comp_angle(image_t *img, kp_t *kp, int *u_max, float *a, float *b)
+static int comp_angle(image_t *img, kp_t *kp, float *a, float *b)
{
int step = img->w;
int half_k = 31/2;
@@ -342,25 +347,6 @@ array_t *orb_find_keypoints(image_t *img, bool normalized, int threshold, rectan
array_t *kpts;
array_alloc(&kpts, xfree);
- // TODO pre-compute this
- // pre-compute the end of a row in a circular patch
- int halfPatchSize = 31 / 2;
- int umax[halfPatchSize + 2];
- int v, v0, vmax = (int) floorf(halfPatchSize * fast_sqrtf(2.0f) / 2 + 1);
- int vmin = (int) ceilf(halfPatchSize * fast_sqrtf(2.0f) / 2);
- for (v = 0; v <= vmax; ++v) {
- umax[v] = (int) roundf(fast_sqrtf((float)halfPatchSize * halfPatchSize - v * v));
- }
-
- // Make sure we are symmetric
- for (v = halfPatchSize, v0 = 0; v >= vmin; --v) {
- while (umax[v0] == umax[v0 + 1]) {
- ++v0;
- }
- umax[v] = v0;
- ++v0;
- }
-
int octave = 1;
rectangle_t roi_scaled;
@@ -414,7 +400,7 @@ array_t *orb_find_keypoints(image_t *img, bool normalized, int threshold, rectan
int x, y;
float a, b;
sample_point_t *pattern = (sample_point_t*) sample_pattern;
- kpt->angle = comp_angle(&img_scaled, kpt, umax, &a, &b);
+ kpt->angle = comp_angle(&img_scaled, kpt, &a, &b);
#if 1
#define GET_VALUE(idx) \
(x = (int) roundf(pattern[idx].x*a - pattern[idx].y*b), \
|
Clean up writeFuncImplArgChecks.
Also fix a bug where a comparison with "<nil>" would be emitted in
something like "if (a_lw < <nil> || a_lw > 8)". | @@ -593,7 +593,8 @@ func (g *gen) writeFuncImpl(n *a.Func) error {
}
func (g *gen) writeFuncImplArgChecks(n *a.Func) error {
- badArg := false
+ checks := []string(nil)
+
for _, o := range n.In().Fields() {
o := o.Field()
oTyp := o.XType()
@@ -601,15 +602,11 @@ func (g *gen) writeFuncImplArgChecks(n *a.Func) error {
// TODO: Also check elements, for array-typed arguments.
continue
}
+
switch {
case oTyp.Decorator().Key() == t.KeyPtr:
- if badArg {
- g.writes(" || ")
- } else {
- g.writes("if (")
- }
- g.printf("!%s%s", aPrefix, o.Name().String(g.tm))
- badArg = true
+ checks = append(checks, fmt.Sprintf("!%s%s", aPrefix, o.Name().String(g.tm)))
+
case oTyp.IsRefined():
bounds := [2]*big.Int{}
for i, b := range oTyp.Bounds() {
@@ -629,23 +626,28 @@ func (g *gen) writeFuncImplArgChecks(n *a.Func) error {
}
}
for i, b := range bounds {
- if badArg {
- g.writes(" || ")
- } else {
- g.writes("if (")
+ if b != nil {
+ op := '<'
+ if i != 0 {
+ op = '>'
+ }
+ checks = append(checks, fmt.Sprintf("%s%s %c %s", aPrefix, o.Name().String(g.tm), op, b))
+ }
}
- g.printf("%s%s", aPrefix, o.Name().String(g.tm))
- if i == 0 {
- g.writeb('<')
- } else {
- g.writeb('>')
}
- g.printf("%s", b)
- badArg = true
}
+
+ if len(checks) == 0 {
+ return nil
+ }
+
+ g.writes("if (")
+ for i, c := range checks {
+ if i != 0 {
+ g.writes(" || ")
}
+ g.writes(c)
}
- if badArg {
g.writes(") {")
if n.Suspendible() {
g.printf("status = puffs_%s_error_bad_argument; goto cleanup0;", g.pkgName)
@@ -655,7 +657,6 @@ func (g *gen) writeFuncImplArgChecks(n *a.Func) error {
g.printf("return;")
}
g.writes("}\n")
- }
return nil
}
|
Final correction for reverse command | @@ -2381,10 +2381,10 @@ int DeRestPluginPrivate::setLightAttributes(const ApiRequest &req, ApiResponse &
//taskRef.transitionTime = 4;
//taskRef.onTime = 0;
- QByteArray direction = QByteArray("\x00\x00", 2);
+ QByteArray direction = QByteArray("\x00", 1);
if (map["reverse"].toBool())
{
- direction = QByteArray("\x00\x01", 2);
+ direction = QByteArray("\x01", 1);
}
if (sendTuyaRequest(taskRef, TaskTuyaRequest, DP_TYPE_ENUM, DP_IDENTIFIER_WORK_STATE, direction))
|
Fix crash on non-string thread errors;
Non-string errors are currently ignored. This is consistent with
love, and is pretty obscure, but maybe it can be improved at some point. | @@ -38,10 +38,12 @@ static int threadRunner(void* data) {
}
}
+ mtx_lock(&thread->lock);
+
// Error handling
size_t length;
const char* error = lua_tolstring(L, -1, &length);
- mtx_lock(&thread->lock);
+ if (error) {
thread->error = malloc(length + 1);
if (thread->error) {
memcpy(thread->error, error, length + 1);
@@ -50,6 +52,8 @@ static int threadRunner(void* data) {
.data.thread = { thread, thread->error }
});
}
+ }
+
thread->running = false;
mtx_unlock(&thread->lock);
lovrRelease(Thread, thread);
|
Rearranged the tutorial order slightly to put the easier ones earlier within each section. | @@ -80,22 +80,22 @@ Also feel free to download our [cheat sheet](https://contiki-ng.github.io/resour
Basics:
* [Hello, World!](/doc/tutorials/Hello,-World!.md)
* [Logging](/doc/tutorials/Logging.md)
-* [NG shell](/doc/tutorials/Shell.md)
* [RAM and ROM usage](/doc/tutorials/RAM-and-ROM-usage.md)
+* [NG shell](/doc/tutorials/Shell.md)
+* [Timers and events](/doc/tutorials/Timers-and-events.md)
* [Simple energy usage estimation](/doc/tutorials/Instrumenting-Contiki-NG-applications-with-energy-usage-estimation.md)
* [Custom Energest application](/doc/tutorials/Energy-monitoring.md)
-* [Timers and events](/doc/tutorials/Timers-and-events.md)
Networking:
+* [CoAP](/doc/tutorials/CoAP.md)
* [IPv6 ping](/doc/tutorials/IPv6-ping.md)
* [RPL basics](/doc/tutorials/RPL.md)
* [RPL with border router](/doc/tutorials/RPL-border-router.md)
-* [TSCH and 6TiSCH](/doc/tutorials/TSCH-and-6TiSCH.md)
-* [Switching from CSMA to TSCH](/doc/tutorials/Switching-to-TSCH.md)
-* [CoAP](/doc/tutorials/CoAP.md)
* [LWM2M, IPSO objects, and NAT64](/doc/tutorials/LWM2M-and-IPSO-Objects.md)
* [LWM2M Queue Mode](/doc/tutorials/LWM2M-and-IPSO-Objects-with-Queue-Mode.md)
* [MQTT](/doc/tutorials/MQTT.md)
+* [Switching from CSMA to TSCH](/doc/tutorials/Switching-to-TSCH.md)
+* [TSCH and 6TiSCH](/doc/tutorials/TSCH-and-6TiSCH.md)
Simulation:
* [Cooja: getting started](/doc/tutorials/Running-Contiki-NG-in-Cooja.md)
|
proper search for available tcp port | /*
* Function: find_available_port
*
- * Description: find a port number that can be bound to
+ * Description: find a tcp port number that can be bound to
*
- * In Args: minimum and maximum ports to use for searching
+ * In Args:
*
* Out Args:
*
* Returns: available port number
* Side Effect: exit(1) in case of error or not found
*/
-uint16_t find_available_port(uint16_t first_port, uint16_t last_port) {
-
- for(uint16_t port=first_port; port <= last_port; port++) {
-
+uint16_t find_available_port() {
int s = socket(AF_INET, SOCK_STREAM, 0);
if (s < 0) {
printf("error: failed to create socket!\n");
@@ -55,23 +52,25 @@ uint16_t find_available_port(uint16_t first_port, uint16_t last_port) {
memset(&addr, 0, sizeof addr);
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = INADDR_ANY;
- addr.sin_port = htons(port);
+ addr.sin_port = 0;
- int res = bind(s, (struct sockaddr *) &addr, sizeof addr);
- if (res < 0) {
- if (errno != EADDRINUSE) {
- perror("unexpected bind error");
- }
+ if(bind(s, (struct sockaddr *) &addr, sizeof addr) < 0) {
+ perror("bind error");
+ exit(1);
}
+
+ socklen_t l = sizeof addr;
+ memset(&addr, 0, l);
+ if(getsockname(s, (struct sockaddr *) &addr, &l)) {
+ perror("getsockname error");
close(s);
- if (res >= 0) {
- return port;
- }
- }
- printf("error: failed to find an available port\n");
exit(1);
}
+ close(s);
+ return ntohs(addr.sin_port);
+}
+
/*
* Function: launch_owampd
*
@@ -220,7 +219,7 @@ main(
char **argv
) {
- uint16_t port = find_available_port(1024, 0xffff);
+ uint16_t port = find_available_port();
printf("found available port: %d, 0x%04x\n", port, port);
int exit_code = 1;
|
codegen: fix non-posix sed commands again | @@ -69,7 +69,8 @@ for test_folder in @CMAKE_SOURCE_DIR@/tests/shell/gen/*/; do
rm "$output_folder$test_name.stdout"
if [ -e "$test_folder$test_name.stderr" ]; then
- sed -e "s#$KDB#kdb#" -e '1!b' -e '/^The command kdb gen terminated unsuccessfully with the info:$/d' -i "$output_folder$test_name.stderr"
+ sed -e "s#$KDB#kdb#" -e '1!b' -e '/^The command kdb gen terminated unsuccessfully with the info:$/d' "$output_folder$test_name.stderr" > "$output_folder$test_name.stderr2"
+ mv "$output_folder$test_name.stderr2" "$output_folder$test_name.stderr"
diff -u "$test_folder$test_name.stderr" "$output_folder$test_name.stderr" | sed -e "1d" -e "2d" > "$output_folder$test_name.stderr.diff"
if [ -s "$output_folder$test_name.stderr.diff" ]; then
|
Fix multiple url values | @@ -95,6 +95,7 @@ public class DatafariUpdateProcessor extends UpdateRequestProcessor {
* urlHierarchy);
*/
+ doc.remove("url");
doc.addField("url", url);
String filename = "";
|
naive: fix signature parsing | ::
++ sig
|= params=(map @t json)
- ^- (unit @)
+ ^- (unit @ux)
?~ sig=(~(get by params) 'sig') ~
- (so:dejs-soft:format u.sig)
+ =; ans=(unit (unit @ux))
+ ?~(ans ~ u.ans)
+ %. u.sig
+ =, dejs-soft:format
+ (cu to-hex so)
::
++ from
|= params=(map @t json)
^- [(unit cage) response:rpc]
?. (params:validate params)
[~ ~(params error id)]
- =/ sig=(unit @) (sig:from-json params)
+ =/ sig=(unit @ux) (sig:from-json params)
=/ from=(unit [@p proxy:naive]) (from:from-json params)
=/ raw=(unit octs) (raw:from-json params)
=/ data=(unit @p) (ship:data:from-json params)
^- [(unit cage) response:rpc]
?. (params:validate params)
[~ ~(params error id)]
- =/ sig=(unit @) (sig:from-json params)
+ =/ sig=(unit @ux) (sig:from-json params)
=/ from=(unit [@p proxy:naive]) (from:from-json params)
=/ raw=(unit octs) (raw:from-json params)
=/ data=(unit @ux) (address:data:from-json params)
^- [(unit cage) response:rpc]
?. (params:validate params)
[~ ~(params error id)]
- =/ sig=(unit @) (sig:from-json params)
+ =/ sig=(unit @ux) (sig:from-json params)
=/ from=(unit [ship @t]) (from:from-json params)
=/ raw=(unit octs) (raw:from-json params)
=/ data=(unit [@ux ?]) (address-transfer:data:from-json params)
^- [(unit cage) response:rpc]
?. (params:validate params)
[~ ~(params error id)]
- =/ sig=(unit @) (sig:from-json params)
+ =/ sig=(unit @ux) (sig:from-json params)
=/ from=(unit [ship @t]) (from:from-json params)
=/ raw=(unit octs) (raw:from-json params)
=/ data=(unit [encrypt=@ auth=@ crypto-suite=@ breach=?])
^- [(unit cage) response:rpc]
?. (params:validate params)
[~ ~(params error id)]
- =/ sig=(unit @) (sig:from-json params)
+ =/ sig=(unit @ux) (sig:from-json params)
=/ from=(unit [@p proxy:naive]) (from:from-json params)
=/ raw=(unit octs) (raw:from-json params)
=/ data=(unit [@p @ux]) (address-ship:data:from-json params)
|
Add basic support for UWP in CMakeLists.txt | @@ -235,7 +235,7 @@ set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
#
# TINYSPLINE_PLATFORM_NAME
# Name of target platform in lowercase. Supported values are: 'linux',
-# 'macosx', and 'windows'.
+# 'macosx', 'windows', and 'uwp' (Universal Windows Platform).
#
# TINYSPLINE_PLATFORM_ARCH
# Architecture of target platform. Supported values are: 'x86' and 'x86_64'.
@@ -249,6 +249,8 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(TINYSPLINE_PLATFORM_NAME "macosx" CACHE INTERNAL "")
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(TINYSPLINE_PLATFORM_NAME "windows" CACHE INTERNAL "")
+elseif(${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
+ set(TINYSPLINE_PLATFORM_NAME "uwp" CACHE INTERNAL "")
else()
message(FATAL_ERROR
"Unsupported target platform: ${CMAKE_SYSTEM_NAME}")
@@ -1422,6 +1424,8 @@ if(${TINYSPLINE_WITH_CSHARP})
set(TINYSPLINE_NUGET_RID "osx")
elseif(${TINYSPLINE_PLATFORM_NAME} STREQUAL "windows")
set(TINYSPLINE_NUGET_RID "win")
+ elseif(${TINYSPLINE_PLATFORM_NAME} STREQUAL "uwp")
+ set(TINYSPLINE_NUGET_RID "win10")
else()
message(FATAL_ERROR "Unable to determine Nuget RID (platform)")
endif()
|
nimble/ble_hs_conn: Minor coding style fix | @@ -112,8 +112,8 @@ struct ble_l2cap_chan *ble_hs_conn_chan_find_by_dcid(struct ble_hs_conn *conn,
uint16_t cid);
int ble_hs_conn_chan_insert(struct ble_hs_conn *conn,
struct ble_l2cap_chan *chan);
-void
-ble_hs_conn_delete_chan(struct ble_hs_conn *conn, struct ble_l2cap_chan *chan);
+void ble_hs_conn_delete_chan(struct ble_hs_conn *conn,
+ struct ble_l2cap_chan *chan);
void ble_hs_conn_addrs(const struct ble_hs_conn *conn,
struct ble_hs_conn_addrs *addrs);
|
Update FireSim instructions | @@ -9,9 +9,56 @@ FireSim allows RTL-level simulation at orders-of-magnitude faster speeds than so
FireSim also provides additional device models to allow full-system simulation, including memory models and network models.
FireSim currently supports running only on Amazon EC2 F1 FPGA-enabled virtual instances on the public cloud.
-In order to simulate your Chipyard design using FireSim, you should follow the following steps:
+In order to simulate your Chipyard design using FireSim, if you have not
+already, follow the initial EC2 setup instructions as detailed in the `FireSim
+documentation <http://docs.fires.im/en/latest/Initial-Setup/index.html>`__.
+Then clone your full Chipyard repository onto your Amazon EC2 FireSim manager
+instance, and setup your Chipyard repository as you would normally.
-Follow the initial EC2 setup instructions as detailed in the `FireSim documentation <http://docs.fires.im/en/latest/Initial-Setup/index.html>`__.
-Then clone your full Chipyard repository onto your Amazon EC2 FireSim manager instance.
+When you are ready to use FireSim, initalize it as library in Chipyard by running:
-Enter the ``sims/FireSim`` directory, and follow the FireSim instructions for `running a simulation <http://docs.fires.im/en/latest/Running-Simulations-Tutorial/index.html>`__.
+.. code-block:: shell
+
+ # At the root of your chipyard repo
+ ./scripts/firesim-setup.sh --fast
+
+
+``firesim-setup.sh`` initializes additional submodules and then invokes
+firesim's ``build-setup.sh`` script. ``firesim-setup.sh`` accepts all of the same arguments and
+passes them through to ``build-setup.sh``, adding ``--library`` to properly
+initialize FireSim as a library submodule in chipyard. You may run
+``./sims/firesim/build-setup.sh --help`` to see more options.
+
+In order to build bitstreams, run simulations, or to generate MIDAS-transformed RTL for your
+simulator, you'll need to source one of the following three environments:
+
+.. code-block:: shell
+
+ cd sims/firesim
+ # (Recommended) The default manager environment (includes env.sh)
+ source sourceme-f1-manager.sh
+
+ # OR A minimal environment to run recipes out of sim/ (to invoke MIDAS; run MIDAS-level RTL simulation)generate RTL; transform At the root of your chipyard repo
+ source env.sh
+
+ # OR A complete environment to run local FPGA builds with Vivado
+ source sourceme-f1-full.sh
+
+At this point you're ready to use FireSim with Chipyard. If you're not already
+familiar with FireSim, please refer to the `FireSim Docs <http://docs.fires.im/>`__, and proceed
+through the rest of the tutorial.
+
+
+Current Limitations:
+++++++++++++++++++++
+
+FireSim integration in chipyard is still a work in progress. Presently, you
+cannot build a FireSim simulator from any generator project in Chipyard except ``firechip``,
+which properly invokes MIDAS on the target RTL.
+
+In the interim, workaround this limitation by importing Config and Module
+classes from other generator projects into FireChip. You should then be able to
+refer to those classes or an alias of them in your ``DESIGN`` or ``TARGET_CONFIG``
+variables. Note that if your target machine has I/O not provided in the default
+FireChip targets (see ``generators/firechip/src/main/scala/Targets.scala``) you may need
+to write a custom endpoint.
|
fix master pipeline gpload fail
gpload test case 60 lead to fail, deleteing it for now | @@ -1046,16 +1046,3 @@ def test_59_gpload_yaml_wrong_port():
copy_data('external_file_01.txt','data_file.txt')
write_config_file(port='111111',format='text',file='data_file.txt',table='texttable')
-@prepare_before_test(num=60)
-def test_60_gpload_local_hostname():
- "60 gpload yaml local host with 127.0.0.1 and none and a not exist host"
- copy_data('external_file_01.txt','data_file.txt')
- write_config_file(local_host=['127.0.0.1'],format='text',file='data_file.txt',table='texttable')
- write_config_file(config='config/config_file2',local_host=None,format='text',file='data_file.txt',table='texttable')
- write_config_file(config='config/config_file3',local_host=['123.123.1.1'],format='text',file='data_file.txt',table='texttable')
- f = open('query60.sql','w')
- f.write("\\! gpload -f "+mkpath('config/config_file')+"\n")
- f.write("\\! gpload -f "+mkpath('config/config_file2')+"\n")
- f.write("\\! gpload -f "+mkpath('config/config_file3')+"\n")
- f.close()
-
|
Addressed review comment from | @@ -276,6 +276,7 @@ int packed_rr_to_string(struct ub_packed_rrset_key* rrset, size_t i,
entry.data;
uint8_t rr[65535];
size_t rlen = rrset->rk.dname_len + 2 + 2 + 4 + d->rr_len[i];
+ time_t adjust = 0;
log_assert(dest_len > 0 && dest);
if(rlen > dest_len) {
dest[0] = 0;
@@ -286,8 +287,10 @@ int packed_rr_to_string(struct ub_packed_rrset_key* rrset, size_t i,
memmove(rr+rrset->rk.dname_len, &rrset->rk.type, 2);
else sldns_write_uint16(rr+rrset->rk.dname_len, LDNS_RR_TYPE_RRSIG);
memmove(rr+rrset->rk.dname_len+2, &rrset->rk.rrset_class, 2);
+ adjust = SERVE_ORIGINAL_TTL ? d->ttl_add : now;
+ if (d->rr_ttl[i] < adjust) adjust = d->rr_ttl[i]; /* Prevent negative TTL overflow */
sldns_write_uint32(rr+rrset->rk.dname_len+4,
- (uint32_t)(d->rr_ttl[i]-(SERVE_ORIGINAL_TTL ? d->ttl_add : now)));
+ (uint32_t)(d->rr_ttl[i]-adjust));
memmove(rr+rrset->rk.dname_len+8, d->rr_data[i], d->rr_len[i]);
if(sldns_wire2str_rr_buf(rr, rlen, dest, dest_len) == -1) {
log_info("rrbuf failure %d %s", (int)d->rr_len[i], dest);
@@ -333,6 +336,7 @@ packed_rrset_copy_region(struct ub_packed_rrset_key* key,
struct packed_rrset_data* data = (struct packed_rrset_data*)
key->entry.data;
size_t dsize, i;
+ time_t adjust = 0;
if(!ck)
return NULL;
ck->id = key->id;
@@ -351,14 +355,15 @@ packed_rrset_copy_region(struct ub_packed_rrset_key* key,
ck->entry.data = d;
packed_rrset_ptr_fixup(d);
/* make TTLs relative - once per rrset */
+ adjust = SERVE_ORIGINAL_TTL ? data->ttl_add : now;
for(i=0; i<d->count + d->rrsig_count; i++) {
- if(d->rr_ttl[i] < now)
+ if(d->rr_ttl[i] < adjust)
d->rr_ttl[i] = SERVE_EXPIRED?SERVE_EXPIRED_REPLY_TTL:0;
- else d->rr_ttl[i] -= SERVE_ORIGINAL_TTL ? data->ttl_add : now;
+ else d->rr_ttl[i] -= adjust;
}
- if(d->ttl < now)
+ if(d->ttl < adjust)
d->ttl = SERVE_EXPIRED?SERVE_EXPIRED_REPLY_TTL:0;
- else d->ttl -= SERVE_ORIGINAL_TTL ? data->ttl_add : now;
+ else d->ttl -= adjust;
d->ttl_add = 0; /* TTLs have been made relative */
return ck;
}
|
[] should evaluate to ()
This is consistent with most bracket tuples. | @@ -628,7 +628,7 @@ JanetSlot janetc_value(JanetFopts opts, Janet x) {
const Janet *tup = janet_unwrap_tuple(x);
/* Empty tuple is tuple literal */
if (janet_tuple_length(tup) == 0) {
- ret = janetc_cslot(x);
+ ret = janetc_cslot(janet_wrap_tuple(janet_tuple_n(NULL, 0)));
} else if (janet_tuple_flag(tup) & JANET_TUPLE_FLAG_BRACKETCTOR) { /* [] tuples are not function call */
ret = janetc_tuple(opts, x);
} else {
|
Add method to log error without throwable
Add Ln.e(message) in addition to Ln.e(message, error). | @@ -52,7 +52,13 @@ public final class Ln {
if (isEnabled(Level.ERROR)) {
Log.e(TAG, message, throwable);
System.out.println("ERROR: " + message);
+ if (throwable != null) {
throwable.printStackTrace();
}
}
}
+
+ public static void e(String message) {
+ e(message, null);
+ }
+}
|
external-links.txt: also run with cmake | @@ -35,7 +35,7 @@ set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/scripts/cmake/Modules/")
file (REMOVE "${CMAKE_BINARY_DIR}/extra_install_manifest.txt")
-install (CODE "file (REMOVE \"${CMAKE_BINARY_DIR}/external-links.txt\")")
+file (REMOVE "${CMAKE_BINARY_DIR}/external-links.txt")
# needed by ifs below
include (scripts/cmake/ElektraCache.cmake)
|
Docs: Added requirement for ResizeAppleGpuBars | @@ -40,6 +40,7 @@ Utility to validate whether a `config.plist` matches requirements and convention
- When `AllowRelocationBlock` is enabled, `ProvideCustomSlide` should be enabled altogether.
- When `EnableSafeModeSlide` is enabled, `ProvideCustomSlide` should be enabled altogether.
- If `ProvideMaxSlide` is set to a number greater than zero, `ProvideCustomSlide` should be enabled altogether.
+- `ResizeAppleGpuBars` must be set to `0` or `-1`.
- When `DisableVariableWrite`, `EnableWriteUnprotector`, or `ProvideCustomSlide` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
### DeviceProperties
|
Fix link in capi docs.
Add the missing trailing backtick that was missed in the original commit for
these docs. | @@ -261,7 +261,7 @@ will be called once with the ``CALLBACK_MSG_TOO_MANY_MATCHES``. When this happen
warning. If your callback returns ``CALLBACK_CONTINUE``, the string will be disabled
and scanning will continue, otherwise scanning will be halted.
-Your callback will be called from the console module (:ref:`console-module)
+Your callback will be called from the console module (:ref:`console-module`)
with the ``CALLBACK_MSG_CONSOLE_LOG`` message. When this happens, the
``message_data`` argument will be a ``char*`` that is the string generated
by the console module. Your callback can do whatever it wants with this string,
|
dc-offset: set correct flags on the offset param | @@ -31,7 +31,7 @@ namespace clap {
: CorePlugin(PathProvider::create(pluginPath, "dc-offset"), descriptor(), host) {
_parameters.addParameter(clap_param_info{
kParamIdOffset,
- 0,
+ CLAP_PARAM_IS_MODULATABLE | CLAP_PARAM_REQUIRES_PROCESS,
nullptr,
"offset",
"/",
|
fix(list) guard image creation with LV_USE_IMG | @@ -81,10 +81,12 @@ lv_obj_t * lv_list_add_btn(lv_obj_t * list, const char * icon, const char * txt)
lv_obj_set_size(obj, LV_PCT(100), LV_SIZE_CONTENT);
lv_obj_set_flex_flow(obj, LV_FLEX_FLOW_ROW);
+#if LV_USE_IMG == 1
if(icon) {
lv_obj_t * img = lv_img_create(obj);
lv_img_set_src(img, icon);
}
+#endif
if(txt) {
lv_obj_t * label = lv_label_create(obj);
|
Correcting debian/gbp.conf to build from 4.4.1 branch | @@ -4,8 +4,8 @@ builder = DIST=stretch /usr/bin/git-pbuilder
# tell git-buildpackage how to clean the source tree
cleaner = fakeroot debian/rules clean
# default branch for upstream sources and debian packaging (should usually be equal for pS)
-upstream-branch =
-debian-branch =
+upstream-branch = 4.4.1
+debian-branch = 4.4.1
# the default tag formats used:
upstream-tag = v%(version)s
debian-tag = debian/%(version)s
|
Fix examples copy | @@ -38,11 +38,14 @@ import SafariServices
UserDefaults.standard.set(true, forKey: key)
DispatchQueue.global().async {
- if FileManager.default.fileExists(atPath: examplesURL.path) {
- try? FileManager.default.removeItem(at: examplesURL)
+
+ let destURL = (DocumentBrowserViewController.iCloudContainerURL ?? DocumentBrowserViewController.localContainerURL).appendingPathComponent(examplesURL.lastPathComponent)
+
+ if FileManager.default.fileExists(atPath: destURL.path) {
+ try? FileManager.default.removeItem(at: destURL)
}
- try? FileManager.default.copyItem(at: examplesURL, to: (DocumentBrowserViewController.iCloudContainerURL ?? DocumentBrowserViewController.localContainerURL).appendingPathComponent(examplesURL.lastPathComponent))
+ try? FileManager.default.copyItem(at: examplesURL, to: destURL)
}
}
|
CI/CD: use the rune state command to check the container status before doing remote attestation test
Fixes | @@ -90,10 +90,21 @@ jobs:
if: ${{ contains(matrix.sgx, 'SGX1') }}
run: docker exec $rune_test bash -c "rune --debug run skeleton-enclave-container" &
+ - name: Wait RA containers Running
+ if: ${{ contains(matrix.sgx, 'SGX1') }}
+ timeout-minutes: 2
+ run: |
+ docker exec $rune_test bash -c "while true; do
+ rune state skeleton-enclave-container
+ if [ $? -eq 0 ]; then
+ break
+ fi
+ sleep 5
+ done"
+
- name: Get remote report with rune attest command
if: ${{ contains(matrix.sgx, 'SGX1') }}
- run: docker exec $rune_test bash -c "sleep 10;
- rune --debug attest --isRA --linkable=false --spid=${{ secrets.SPID }} --subscription-key=${{ secrets.SUB_KEY }} skeleton-enclave-container"
+ run: docker exec $rune_test bash -c "rune --debug attest --isRA --linkable=false --spid=${{ secrets.SPID }} --subscription-key=${{ secrets.SUB_KEY }} skeleton-enclave-container"
- name: Get local report with rune attest command
if: ${{ contains(matrix.sgx, 'SGX1') }}
|
Update links and add a new one to the latest memory usage and binary footprint results for Artik053
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka | @@ -22,9 +22,10 @@ Memory usage and Binary footprint are measured at [here](https://jerryscript-pro
The following table shows the latest results on the devices:
-| STM32F4-Discovery | [](https://jerryscript-project.github.io/jerryscript-test-results/?view=stm32) |
+| STM32F4-Discovery | [](https://jerryscript-project.github.io/jerryscript-test-results/?view=stm32f4dis) |
| :---: | :---: |
-| **Raspberry Pi 2** | [](https://jerryscript-project.github.io/jerryscript-test-results/?view=rpi2) |
+| **Raspberry Pi 2** | [](https://jerryscript-project.github.io/jerryscript-test-results/?view=rpi2) |
+| **Artik053** | [](https://jerryscript-project.github.io/jerryscript-test-results/?view=artik053) |
IRC channel: #jerryscript on [freenode](https://freenode.net)
Mailing list: [email protected], you can subscribe [here](https://groups.io/g/jerryscript-dev) and access the mailing list archive [here](https://groups.io/g/jerryscript-dev/topics).
|
This code makes assumption that get_script_config(tic)->singleComment is 3 chars long | @@ -1078,13 +1078,8 @@ static void setCodeMode(Code* code, s32 mode)
static void commentLine(Code* code)
{
- static char Comment[] = "-- ";
- enum {Size = sizeof Comment-1};
-
- tic_mem* tic = code->tic;
-
- memcpy(Comment, tic->api.get_script_config(tic)->singleComment,
- strlen(tic->api.get_script_config(tic)->singleComment));
+ const char* comment = code->tic->api.get_script_config(code->tic)->singleComment;
+ size_t size = strlen(comment);
char* line = getLine(code);
@@ -1092,23 +1087,23 @@ static void commentLine(Code* code)
while((*line == ' ' || *line == '\t') && line < end) line++;
- if(memcmp(line, Comment, Size))
+ if(memcmp(line, comment, size))
{
- if (strlen(code->src) + Size >= sizeof(tic_code))
+ if (strlen(code->src) + size >= sizeof(tic_code))
return;
- memmove(line + Size, line, strlen(line)+1);
- memcpy(line, Comment, Size);
+ memmove(line + size, line, strlen(line)+1);
+ memcpy(line, comment, size);
if(code->cursor.position > line)
- code->cursor.position += Size;
+ code->cursor.position += size;
}
else
{
- memmove(line, line + Size, strlen(line + Size)+1);
+ memmove(line, line + size, strlen(line + size)+1);
- if(code->cursor.position > line + Size)
- code->cursor.position -= Size;
+ if(code->cursor.position > line + size)
+ code->cursor.position -= size;
}
code->cursor.selection = NULL;
|
[skip ci] Update main README | @@ -50,6 +50,7 @@ If used for research, please cite Chipyard by the following publication:
* **Chipyard**
* A. Amid, et al. *IEEE Micro'20* [PDF](https://ieeexplore.ieee.org/document/9099108).
* A. Amid, et al. *DAC'20* [PDF](https://ieeexplore.ieee.org/document/9218756).
+ * A. Amid, et al. *ISCAS'21* [PDF](https://ieeexplore.ieee.org/abstract/document/9401515).
These additional publications cover many of the internal components used in Chipyard. However, for the most up-to-date details, users should refer to the Chipyard docs.
@@ -57,6 +58,7 @@ These additional publications cover many of the internal components used in Chip
* **Rocket Chip**: K. Asanovic, et al., *UCB EECS TR*. [PDF](http://www2.eecs.berkeley.edu/Pubs/TechRpts/2016/EECS-2016-17.pdf).
* **BOOM**: C. Celio, et al., *Hot Chips 30*. [PDF](https://www.hotchips.org/hc30/1conf/1.03_Berkeley_BROOM_HC30.Berkeley.Celio.v02.pdf).
* **SonicBOOM (BOOMv3)**: J. Zhao, et al., *CARRV'20*. [PDF](https://carrv.github.io/2020/papers/CARRV2020_paper_15_Zhao.pdf).
+ * **COBRA (BOOM Branch Prediction)**: J. Zhao, et al., *ISPASS'21*. [PDF](https://ieeexplore.ieee.org/document/9408173).
* **Hwacha**: Y. Lee, et al., *ESSCIRC'14*. [PDF](http://hwacha.org/papers/riscv-esscirc2014.pdf).
* **Gemmini**: H. Genc, et al., *arXiv*. [PDF](https://arxiv.org/pdf/1911.09925).
* **Sims**
@@ -69,12 +71,13 @@ These additional publications cover many of the internal components used in Chip
* **Chisel**: J. Bachrach, et al., *DAC'12*. [PDF](https://people.eecs.berkeley.edu/~krste/papers/chisel-dac2012.pdf).
* **FIRRTL**: A. Izraelevitz, et al., *ICCAD'17*. [PDF](https://ieeexplore.ieee.org/document/8203780).
* **Chisel DSP**: A. Wang, et al., *DAC'18*. [PDF](https://ieeexplore.ieee.org/document/8465790).
+ * **FireMarshal**: N. Pemberton, et al., *ISPASS'21*. [PDF](https://ieeexplore.ieee.org/document/9408192).
* **VLSI**
* **Hammer**: E. Wang, et al., *ISQED'20*. [PDF](https://www.isqed.org/English/Archives/2020/Technical_Sessions/113.html).
-[hwacha]:http://hwacha.org
+[hwacha]:https://www2.eecs.berkeley.edu/Pubs/TechRpts/2015/EECS-2015-262.pdf
[hammer]:https://github.com/ucb-bar/hammer
[firesim]:https://fires.im
[ucb-bar]: http://bar.eecs.berkeley.edu
|
pbio/drivebase: Fix zero radius turns.
pbio_math_sign gave 0 for 0 radius, so the turn angle was also zero, which is not what we want. | @@ -301,7 +301,7 @@ pbio_error_t pbio_drivebase_curve(pbio_drivebase_t *db, int32_t radius, int32_t
}
// Dif controller drives by given angle
- int32_t relative_dif_target = pbio_control_user_to_counts(&db->control_heading.settings, angle * pbio_math_sign(radius));
+ int32_t relative_dif_target = pbio_control_user_to_counts(&db->control_heading.settings, radius > 0 ? angle : -angle);
int32_t target_dif_rate = pbio_control_user_to_counts(&db->control_heading.settings, turn_rate);
err = pbio_control_start_relative_angle_control(&db->control_heading, time_now, &state_heading, relative_dif_target, target_dif_rate, after_stop);
|
[SA] Bug fixes.
Locked subtitles size while script stuff is displayed.
Fixed menu area name value. | @@ -90,7 +90,7 @@ void UpdateFrontendFixes() {
fFrontendWidth[19] = 0.0015625f * fWideScreenWidthScale;
fFrontendWidth[20] = 0.0015625f * fWideScreenWidthScale;
fFrontendWidth[21] = 0.00046875002f * fWideScreenWidthScale;
- fFrontendWidth[22] = 0.78125f * fWideScreenWidthScale;
+ fFrontendWidth[22] = 0.00125f * fWideScreenWidthScale;
fFrontendWidth[23] = 0.78125f * fWideScreenWidthScale;
fFrontendWidth[24] = 0.78125f * fWideScreenWidthScale;
fFrontendWidth[25] = 0.78125f * fWideScreenWidthScale;
@@ -721,6 +721,17 @@ void __cdecl DrawBarChartHook(float posX, float posY, unsigned short width, unsi
hbDrawBarChart.fun(fWideScreenWidthProperScale * (-50.0f) + (float)RsGlobal->MaximumWidth * 0.703125f, posY, width, height, progress, progressAdded, drawPercentage, drawBlackBorder, color, progressAddedColor);
}
+injector::hook_back<void(__cdecl*)(float)> hbSetCentreSize;
+void __cdecl SetCentreSizeHook(float a1)
+{
+ if (*(bool*)0xA92D68) // CTheScripts::IntroRectangles[80]
+ {
+ hbSetCentreSize.fun(a1 * fDefaultWidth / *CDraw::pfScreenAspectRatio);
+ }
+ else
+ hbSetCentreSize.fun(a1);
+}
+
void InstallFrontendFixes()
{
// Font Scales
@@ -1288,6 +1299,10 @@ void InstallHUDFixes() {
static float fSubtitlesMult = 1.0f;
injector::WriteMemory<const void*>(0x58C4E8 + 0x2, &fSubtitlesMult);
+ // Check subs size for script stuff
+ hbSetCentreSize.fun = injector::MakeCALL(0x58C603, SetCentreSizeHook).get();
+ injector::MakeCALL(0x58C603, &SetCentreSizeHook);
+
// Second player fix.
injector::WriteMemory<const void*>(0x58F9A0 + 0x2, &fHUDWidth[110]); // Weapon icon X
injector::WriteMemory<const void*>(0x58F993 + 0x2, &fHUDWidth[16]); // Weapon icon X
|
Tweak disasm doc | @@ -988,7 +988,7 @@ static const JanetReg asm_cfuns[] = {
{
"disasm", cfun_disasm,
JDOC("(disasm func &opt field)\n\n"
- "Returns assembly that could be used be compile the given function.\n"
+ "Returns assembly that could be used to compile the given function.\n"
"func must be a function, not a c function. Will throw on error on a badly\n"
"typed argument. If given a field name, will only return that part of the function assembly.\n"
"Possible fields are:\n\n"
|
core/pci: Check PCIe cap version in pci_disable_completion_timeout()
When the PCIe capability version is less than 2, the completion
timeout isn't supported and no need to disable it at all. | @@ -927,15 +927,21 @@ static int pci_configure_mps(struct phb *phb,
static void pci_disable_completion_timeout(struct phb *phb, struct pci_device *pd)
{
- uint32_t ecap;
- uint32_t val;
+ uint32_t ecap, val;
+ uint16_t pcie_cap;
/* PCIE capability required */
if (!pci_has_cap(pd, PCI_CFG_CAP_ID_EXP, false))
return;
- /* Check if it has capability to disable completion timeout */
+ /* Check PCIe capability version */
ecap = pci_cap(pd, PCI_CFG_CAP_ID_EXP, false);
+ pci_cfg_read16(phb, pd->bdfn,
+ ecap + PCICAP_EXP_CAPABILITY_REG, &pcie_cap);
+ if ((pcie_cap & PCICAP_EXP_CAP_VERSION) <= 1)
+ return;
+
+ /* Check if it has capability to disable completion timeout */
pci_cfg_read32(phb, pd->bdfn, ecap + PCIECAP_EXP_DCAP2, &val);
if (!(val & PCICAP_EXP_DCAP2_CMPTOUT_DIS))
return;
|
VERSION bump to version 1.3.41 | @@ -31,7 +31,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 1)
set(SYSREPO_MINOR_VERSION 3)
-set(SYSREPO_MICRO_VERSION 40)
+set(SYSREPO_MICRO_VERSION 41)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
pg_dumpall: fix uninitialized variable warning
A bad 8.4 merge resolution on my part. We may not support older
server_versions in GPDB's pg_dump, but that doesn't mean we should use
uninitialized memory if we come across one.
error_unsupported_server_version() comes from pg_dump.c; this commit is
a companion to | @@ -62,6 +62,8 @@ static PGconn *connectDatabase(const char *dbname, const char *pghost, const cha
static PGresult *executeQuery(PGconn *conn, const char *query);
static void executeCommand(PGconn *conn, const char *query);
+static void error_unsupported_server_version(PGconn *conn) pg_attribute_noreturn();
+
static char pg_dump_bin[MAXPGPATH];
static PQExpBuffer pgdumpopts;
static bool output_clean = false;
@@ -1463,6 +1465,8 @@ dumpCreateDB(PGconn *conn)
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace "
"FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) "
"WHERE datallowconn ORDER BY 1");
+ else
+ error_unsupported_server_version(conn);
for (i = 0; i < PQntuples(res); i++)
{
@@ -2018,3 +2022,28 @@ doShellQuoting(PQExpBuffer buf, const char *str)
appendPQExpBufferChar(buf, '"');
#endif /* WIN32 */
}
+
+
+/*
+ * This GPDB-specific function is copied (in spirit) from pg_dump.c.
+ *
+ * PostgreSQL's pg_dumpall supports very old server versions, but in GPDB, we
+ * only need to go back to 8.2-derived GPDB versions (4.something?). A lot of
+ * that code to deal with old versions has been removed. But in order to not
+ * change the formatting of the surrounding code, and to make it more clear
+ * when reading a diff against the corresponding PostgreSQL version of
+ * pg_dumpall, calls to this function has been left in place of the removed
+ * code.
+ *
+ * This function should never actually be used, because check that the server
+ * version is new enough at the beginning of pg_dumpall. This is just for
+ * documentation purposes, to show were upstream code has been removed, and
+ * to avoid those diffs or merge conflicts with upstream.
+ */
+static void
+error_unsupported_server_version(PGconn *conn)
+{
+ fprintf(stderr, _("unexpected server version %d\n"), server_version);
+ PQfinish(conn);
+ exit(1);
+}
|
Add mock module to CentOS6/7 Travis CI testing.
This was dropped at some point but is important for integration coverage. | @@ -15,10 +15,10 @@ matrix:
include:
- env: PGB_CI="test --vm=u12"
- env: PGB_CI="test --vm=f30 --param=no-package --param=c-only"
- - env: PGB_CI="test --vm=co6 --param=module=real"
+ - env: PGB_CI="test --vm=co6 --param=module=mock --param=module=real"
- env: PGB_CI="test --vm=u18 --param=container-only"
- env: PGB_CI=" doc --vm=u18"
- - env: PGB_CI="test --vm=co7 --param=module=real"
+ - env: PGB_CI="test --vm=co7 --param=module=mock --param=module=real"
- dist: bionic
env:
- PGB_CI="test --vm=none"
|
Use 'develop' branches in submodules | [submodule "libs-carto"]
path = libs-carto
url = https://github.com/cartodb/mobile-carto-libs
- branch = master
+ branch = develop
[submodule "libs-external"]
path = libs-external
url = https://github.com/cartodb/mobile-external-libs
- branch = master
+ branch = develop
|
Change member initializer to prevent gcc 4.6 bug that the list-initialization does not work for ref members (50025) | using namespace celix::dm;
-DmActivator::DmActivator(DependencyManager& m) : ctx{m.bundleContext()}, mng{m} {}
+DmActivator::DmActivator(DependencyManager& m) : ctx{m.bundleContext()}, mng(m) {}
DmActivator::~DmActivator() = default;
|
Fix outdated comment.
This check was moved from within the path checks at some point but the comment did not get updated. | @@ -2295,7 +2295,7 @@ configParse(const Storage *storage, unsigned int argListSize, const char *argLis
// Else if string make sure it is valid
else
{
- // Make sure it is long enough to be a path
+ // Empty strings are not valid
if (strSize(value) == 0)
{
THROW_FMT(
|
Do the error handling in pkey_rsa_decrypt in constant time | /*
- * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2006-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* https://www.openssl.org/source/license.html
*/
+#include "internal/constant_time_locl.h"
+
#include <stdio.h>
#include "internal/cryptlib.h"
#include <openssl/asn1t.h>
@@ -340,10 +342,9 @@ static int pkey_rsa_decrypt(EVP_PKEY_CTX *ctx,
ret = RSA_private_decrypt(inlen, in, out, ctx->pkey->pkey.rsa,
rctx->pad_mode);
}
- if (ret < 0)
+ *outlen = constant_time_select_s(constant_time_msb_s(ret), *outlen, ret);
+ ret = constant_time_select_int(constant_time_msb(ret), ret, 1);
return ret;
- *outlen = ret;
- return 1;
}
static int check_padding_md(const EVP_MD *md, int padding)
|
pybricks/util_pb/color_map: remove black
Black is nearly the same as None. In nearly all applications, you need just one one the two,
so we remove one from the default map. | @@ -47,13 +47,12 @@ void color_map_rgb_to_hsv(const pbio_color_rgb_t *rgb, pbio_color_hsv_t *hsv) {
STATIC const mp_rom_obj_tuple_t pb_color_map_default = {
{&mp_type_tuple},
- 7,
+ 6,
{
MP_OBJ_FROM_PTR(&pb_Color_RED_obj),
MP_OBJ_FROM_PTR(&pb_Color_YELLOW_obj),
MP_OBJ_FROM_PTR(&pb_Color_GREEN_obj),
MP_OBJ_FROM_PTR(&pb_Color_BLUE_obj),
- MP_OBJ_FROM_PTR(&pb_Color_BLACK_obj),
MP_OBJ_FROM_PTR(&pb_Color_WHITE_obj),
mp_const_none,
}
|
BugId:17655060:[http2][fix] add multi files case test ability | @@ -65,15 +65,18 @@ static http2_stream_cb_t my_cb = {
void upload_file_result(const char * path,int result, void * user_data)
{
- EXAMPLE_TRACE("===========path = %s,result =%d=========", path,result);
- upload_end =1;
+ upload_end ++;
+ EXAMPLE_TRACE("===========path = %s,result =%d,finish num =%d=========", path,result,upload_end);
+
}
-static int http2_stream_test(char * file_path)
+static int http2_stream_test(char **argv,int argc)
{
int ret;
device_conn_info_t conn_info;
void *handle;
+ int goal_num = 0;
+ int i;
memset(&conn_info, 0, sizeof( device_conn_info_t));
conn_info.product_key = HTTP2_PRODUCT_KEY;
conn_info.device_name = HTTP2_DEVICE_NAME;
@@ -85,13 +88,24 @@ static int http2_stream_test(char * file_path)
if(handle == NULL) {
return -1;
}
+ http2_header header[] = {
+ MAKE_HEADER("test_name", "test_http2_header"),
+ MAKE_HEADER_CS("hello", "world"),
+ };
- ret = IOT_HTTP2_Stream_UploadFile(handle,file_path,"iotx/vision/voice/intercom/live",NULL,
+ header_ext_info_t my_header_info = {
+ header,
+ 2
+ };
+
+ for (i=1;i< argc;i++) {
+ ret = IOT_HTTP2_Stream_UploadFile(handle,argv[i],"iotx/vision/voice/intercom/live",&my_header_info,
upload_file_result, NULL);
- if(ret < 0) {
- return -1;
+ if(ret == 0) {
+ goal_num++;
}
- while(!upload_end) {
+ }
+ while(upload_end != goal_num) {
HAL_SleepMs(200);
}
ret = IOT_HTTP2_Stream_Disconnect(handle);
@@ -104,21 +118,23 @@ int linkkit_main(void *paras)
int ret;
int argc = 0;
char **argv = NULL;
- char * file_name;
+
if (paras != NULL) {
app_main_paras_t *p = (app_main_paras_t *)paras;
argc = p->argc;
argv = p->argv;
}
+
if(argc >1) {
- file_name = argv[1];
+
} else {
printf("no file name input!\n");
return 0;
}
+
IOT_SetLogLevel(IOT_LOG_DEBUG);
- ret = http2_stream_test(file_name);
+ ret = http2_stream_test(argv,argc);
return ret;
}
|
Updated button map | @@ -585,14 +585,16 @@ static const Sensor::ButtonMap rgbgenie5121Map[] = {
// Off button
{ Sensor::ModeScenes, 0x01, 0x0006, 0x00, 0, S_BUTTON_2 + S_BUTTON_ACTION_SHORT_RELEASED, "Off" },
// Dim up
+ { Sensor::ModeScenes, 0x01, 0x0008, 0x06, 0, S_BUTTON_3 + S_BUTTON_ACTION_SHORT_RELEASED, "Step up (with on/off)" },
{ Sensor::ModeScenes, 0x01, 0x0008, 0x05, 0, S_BUTTON_3 + S_BUTTON_ACTION_HOLD, "Move up (with on/off)" },
{ Sensor::ModeScenes, 0x01, 0x0008, 0x07, 0, S_BUTTON_3 + S_BUTTON_ACTION_LONG_RELEASED, "Stop_ (with on/off)" },
// Dim down
+ { Sensor::ModeScenes, 0x01, 0x0008, 0x06, 1, S_BUTTON_4 + S_BUTTON_ACTION_SHORT_RELEASED, "Step down (with on/off)" },
{ Sensor::ModeScenes, 0x01, 0x0008, 0x05, 1, S_BUTTON_4 + S_BUTTON_ACTION_HOLD, "Move down (with on/off)" },
- { Sensor::ModeScenes, 0x01, 0x0008, 0x07, 1, S_BUTTON_4 + S_BUTTON_ACTION_LONG_RELEASED, "Stop_ (with on/off)" },
+ { Sensor::ModeScenes, 0x01, 0x0008, 0x07, 0, S_BUTTON_4 + S_BUTTON_ACTION_LONG_RELEASED, "Stop_ (with on/off)" },
// Scene button
- { Sensor::ModeScenes, 0x01, 0x0005, 0x05, 1, S_BUTTON_5 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 1" },
- { Sensor::ModeScenes, 0x01, 0x0005, 0x04, 1, S_BUTTON_5 + S_BUTTON_ACTION_LONG_RELEASED, "Store scene 1" },
+ { Sensor::ModeScenes, 0x01, 0x0005, 0x05, 0, S_BUTTON_5 + S_BUTTON_ACTION_SHORT_RELEASED, "Recall scene 1" },
+ { Sensor::ModeScenes, 0x01, 0x0005, 0x04, 0, S_BUTTON_5 + S_BUTTON_ACTION_LONG_RELEASED, "Store scene 1" },
// end
{ Sensor::ModeNone, 0x00, 0x0000, 0x00, 0, 0, nullptr }
};
|
Add tag to specify minio version to use for documentation build.
The new minio major release broke the build. We'll need to figure that out but for now use the last major version, which is known to work. | <title>Introduction</title>
<!-- Create S3 server first to allow it time to boot before being used -->
- <host-add if="'{[s3-local]}' eq 'y'" id="{[host-s3-id]}" name="{[host-s3]}" user="root" image="minio/minio" os="{[os-type]}" option="-v {[fake-cert-path]}/s3-server.crt:/root/.minio/certs/public.crt:ro -v {[fake-cert-path]}/s3-server.key:/root/.minio/certs/private.key:ro -e MINIO_REGION={[s3-region]} -e MINIO_DOMAIN={[s3-endpoint]} -e MINIO_BROWSER=off -e MINIO_ACCESS_KEY={[s3-key]} -e MINIO_SECRET_KEY={[s3-key-secret]}" param="server /data --address :443 --compat" update-hosts="n"/>
+ <host-add if="'{[s3-local]}' eq 'y'" id="{[host-s3-id]}" name="{[host-s3]}" user="root" image="minio/minio:RELEASE.2019-06-04T01-15-58Z" os="{[os-type]}" option="-v {[fake-cert-path]}/s3-server.crt:/root/.minio/certs/public.crt:ro -v {[fake-cert-path]}/s3-server.key:/root/.minio/certs/private.key:ro -e MINIO_REGION={[s3-region]} -e MINIO_DOMAIN={[s3-endpoint]} -e MINIO_BROWSER=off -e MINIO_ACCESS_KEY={[s3-key]} -e MINIO_SECRET_KEY={[s3-key-secret]}" param="server /data --address :443 --compat" update-hosts="n"/>
<p>This user guide is intended to be followed sequentially from beginning to end &mdash; each section depends on the last. For example, the <link section="/backup">Backup</link> section relies on setup that is performed in the <link section="/quickstart">Quick Start</link> section. Once <backrest/> is up and running then skipping around is possible but following the user guide in order is recommended the first time through.</p>
|
fix jet crash in fond | if ( 0 == poy ) {
return poy;
}
- else if ( c3y != u3h(poy) ) {
+ else if ( c3n == u3h(poy) ) {
+ if ( c3n == u3h(u3t(poy)) ) {
+ // abnormal
+ u3_noun type = u3h(u3t(u3t(u3t(poy))));
+ if ( 0 == type ) {
+ u3m_p("insane type", 0);
+ c3_assert(0);
+ }
+ }
return poy;
}
else {
tor = u3nc(c3y, u3k(u3t(u3t(fid))));
} else {
wan = u3k(u3h(u3t(u3t(fid))));
- tor = u3nc(c3n, u3k(u3t(u3t(fid))));
+ tor = u3nc(c3n, u3k(u3t(u3t(u3t(fid)))));
}
u3z(fid);
|
[pm] index should be less than PM_MODLUE_MAX_ID | @@ -836,12 +836,10 @@ rt_uint32_t rt_pm_module_get_status(void)
rt_uint32_t req_status = 0x00;
pm = &_pm;
- for (index = 0; index < 32; index ++)
+ for (index = 0; index < PM_MODULE_MAX_ID; index ++)
{
if (pm->module_status[index].req_status == 0x01)
req_status |= 1<<index;
- if (index >= PM_MODULE_MAX_ID)
- break;
}
return req_status;
|
peview: Fix CLR tab layout spacing | @@ -262,8 +262,8 @@ BEGIN
LTEXT "Static",IDC_RUNTIMEVERSION,78,7,215,8
LTEXT "Flags:",IDC_STATIC,7,19,20,8
EDITTEXT IDC_FLAGS,76,19,217,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
- LTEXT "Version String:",IDC_STATIC,7,31,48,8
- LTEXT "Static",IDC_VERSIONSTRING,78,31,215,8
+ LTEXT "Version String:",IDC_STATIC,7,32,48,8
+ LTEXT "Static",IDC_VERSIONSTRING,78,32,215,8
CONTROL "",IDC_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,69,286,204
LTEXT "Sections:",IDC_STATIC,7,58,30,8
LTEXT "MVID:",IDC_STATIC,7,44,21,8
|
Botan: Use Botan 2 if it is available
This commit fixes | if (NOT BOTAN_FOUND)
include (FindPkgConfig)
- pkg_search_module (BOTAN QUIET botan-1.10 botan-1.9 botan-1.8 botan)
+ pkg_search_module (BOTAN QUIET botan-1.10 botan-1.9 botan-1.8 botan-2 botan)
endif ()
if (BOTAN_FOUND)
|
Remove TINYSPLINE_API from tinyspine.c | @@ -295,7 +295,7 @@ tsError ts_bspline_set_knots(tsBSpline *spline, const tsReal *knots,
TS_RETURN_SUCCESS(status)
}
-tsError TINYSPLINE_API ts_bspline_set_knots_varargs(tsBSpline *spline,
+tsError ts_bspline_set_knots_varargs(tsBSpline *spline,
tsStatus *status, tsReal knot0, double knot1, ...)
{
tsReal *values = NULL;
@@ -534,7 +534,7 @@ tsError ts_bspline_new(size_t num_control_points, size_t dimension,
TS_END_TRY_RETURN(err)
}
-tsError TINYSPLINE_API ts_bspline_new_with_control_points(
+tsError ts_bspline_new_with_control_points(
size_t num_control_points, size_t dimension, size_t degree,
tsBSplineType type, tsBSpline *spline, tsStatus *status,
double first, ...)
@@ -2908,7 +2908,7 @@ ts_vec_mag(const tsReal *x,
return (tsReal) sqrt(sum);
}
-void TINYSPLINE_API
+void
ts_vec_mul(const tsReal *x,
size_t dim,
tsReal val,
|
bytes to bytes | @@ -20,8 +20,9 @@ void getEth2PublicKey(uint32_t *bip32Path, uint8_t bip32PathLength, uint8_t *out
#define ETH2_WITHDRAWAL_CREDENTIALS_LENGTH 0x20
#define ETH2_SIGNATURE_LENGTH 0x60
-#define DEPOSIT_CONTRACT_ADDRESS "0x00000000219ab540356cbb839cbe05303d7705fa"
-#define DEPOSIT_CONTRACT_LENGTH sizeof(DEPOSIT_CONTRACT_ADDRESS)
+static const uint8_t deposit_contract_address[] = {0x00, 0x00, 0x00, 0x00, 0x21, 0x9a, 0xb5,
+ 0x40, 0x35, 0x6c, 0xbb, 0x83, 0x9c, 0xbe,
+ 0x05, 0x30, 0x3d, 0x77, 0x05, 0xfa};
// Highest index for withdrawal derivation path.
#define INDEX_MAX 65536 // 2 ^ 16 : arbitrary value to protect from path attacks.
@@ -49,33 +50,7 @@ static int getEthDisplayableAddress(char *out, uint8_t *in, cx_sha3_t *sha3) {
uint8_t destinationLen = strlen(out) + 1; // Adding one to account for \0.
- // Ensure address is in lowercase, to match DEPOSIT_CONTRACT_ADDRESS' case.
- to_lowercase(out, destinationLen);
-
- return (destinationLen);
-}
-
-static int check_deposit_contract(ethPluginInitContract_t *msg) {
- txContent_t *content = msg->pluginSharedRO->txContent;
- char destinationAddress[DEPOSIT_CONTRACT_LENGTH];
-
- uint8_t destinationLen = getEthDisplayableAddress(destinationAddress,
- content->destination,
- msg->pluginSharedRW->sha3);
-
- if (destinationLen != DEPOSIT_CONTRACT_LENGTH) {
- PRINTF("eth2plugin: destination lengths differ. Expected %u got %u\n",
- DEPOSIT_CONTRACT_LENGTH,
- destinationLen);
- return 0;
- } else if (memcmp(destinationAddress, DEPOSIT_CONTRACT_ADDRESS, DEPOSIT_CONTRACT_LENGTH) != 0) {
- PRINTF("eth2plugin: destination addresses differ. Expected %s got %s\n",
- DEPOSIT_CONTRACT_ADDRESS,
- destinationAddress);
- return 0;
- } else {
- return 1;
- }
+ return destinationLen;
}
void eth2_plugin_call(int message, void *parameters) {
@@ -83,7 +58,9 @@ void eth2_plugin_call(int message, void *parameters) {
case ETH_PLUGIN_INIT_CONTRACT: {
ethPluginInitContract_t *msg = (ethPluginInitContract_t *) parameters;
eth2_deposit_parameters_t *context = (eth2_deposit_parameters_t *) msg->pluginContext;
- if (check_deposit_contract(msg) == 0) {
+ if (memcmp(deposit_contract_address,
+ msg->pluginSharedRO->txContent->destination,
+ sizeof(deposit_contract_address)) != 0) {
PRINTF("eth2plugin: failed to check deposit contract\n");
context->valid = 0;
msg->result = ETH_PLUGIN_RESULT_ERROR;
|
add verbose back + fix change in input parameters | @@ -466,6 +466,7 @@ class CatBoost(_CatBoostBase):
model_file : string, optional (default=None)
If string, giving the path to the file with input model.
"""
+ params = deepcopy(params)
if params is None:
params = {}
@@ -481,7 +482,12 @@ class CatBoost(_CatBoostBase):
params['kwargs'] = kwargs
if 'verbose' in params:
- warnings.warn("The 'verbose' parameter is deprecated, use 'logging_level' parameter instead (posible values: 'Silent', 'Verbose', 'Info', 'Debug').", FutureWarning, 2)
+ if 'logging_level' in params:
+ raise CatboostError('only one of parameters logging_level, verbose should be set.')
+ if params['verbose'] is True:
+ params['logging_level'] = 'Verbose'
+ else:
+ params['logging_level'] = 'Silent'
del params['verbose']
self._check_params(params)
@@ -569,7 +575,17 @@ class CatBoost(_CatBoostBase):
if 'calc_feature_importance' in init_params:
calc_feature_importance = init_params["calc_feature_importance"]
if verbose is not None:
- warnings.warn("The 'verbose' parameter is deprecated, use 'logging_level' parameter instead (possible values: 'Silent', 'Verbose', 'Info', 'Debug').", FutureWarning)
+ if not isinstance(verbose, bool):
+ raise CatboostError('verbose should be bool.')
+ if logging_level is not None:
+ raise CatboostError('only one of parameters logging_level, verbose should be set.')
+ if logging_level is not None:
+ raise CatboostError('only one of parameters logging_level, verbose should be set.')
+ if verbose:
+ logging_level = 'Verbose'
+ else:
+ logging_level = 'Silent'
+
if logging_level is not None:
params['logging_level'] = logging_level
if use_best_model is not None:
@@ -669,6 +685,9 @@ class CatBoost(_CatBoostBase):
- 'Info'
- 'Debug'
+ verbose : bool, if set to True, logging_level is set to Verbose. If set
+ to False, logging_level is set to Silent.
+
plot : bool, optional (default=False)
If True, drow train and eval error in Jupyter notebook
@@ -1800,7 +1819,7 @@ def train(pool=None, params=None, dtrain=None, logging_level=None, verbose=None,
- 'Info'
- 'Debug'
- verbose : boolean
+ verbose : bool
If set to True, then logging_level is set to Verbose, otherwise
logging_level is set to Silent.
|
conditionnaly add c++17 flag on qt rules | @@ -102,6 +102,17 @@ function _add_includedirs(target, includedirs)
end
end
+-- get target c++ version
+function _get_target_cppversion(target)
+ local languages = target:get("languages")
+ for _, language in ipairs(languages) do
+ if language:startswith("c++") or language:startswith("cxx") then
+ local v = language:match("%d+") or language:match("latest")
+ if v then return v end
+ end
+ end
+end
+
-- the main entry
function main(target, opt)
@@ -138,14 +149,22 @@ function main(target, opt)
if not cxxlang then
-- Qt6 require at least '/std:c++17'
-- @see https://github.com/xmake-io/xmake/issues/1183
+ local cppversion = _get_target_cppversion(target)
if qt_sdkver:ge("6.0") then
+ -- add conditionnaly c++17 to avoid for example "cl : Command line warning D9025 : overriding '/std:c++latest' with '/std:c++17'" warning
+ if (not cppversion) or (not cppversion == "latest") or (tonumber(cppversion) and tonumber(cppversion) < 17) then
target:add("languages", "c++17")
+ end
-- @see https://github.com/xmake-io/xmake/issues/2071
if target:is_plat("windows") then
target:add("cxxflags", "/Zc:__cplusplus")
target:add("cxxflags", "/permissive-")
end
else
+ -- add conditionnaly c++11 to avoid for example "cl : Command line warning D9025 : overriding '/std:c++latest' with '/std:c++11'" warning
+ if (not cppversion) or (not cppversion == "latest") or (tonumber(cppversion) and tonumber(cppversion) < 11) then
+ target:add("languages", "c++17")
+ end
target:add("languages", "c++11")
end
end
|
HV: Fix split-locked access detection is disabled by default
The commit 'HV: Config Splitlock Detection to be disable' allows
using CONFIG_ENFORCE_TURNOFF_AC to turn off splitlock #AC. If
CONFIG_ENFORCE_TURNOFF_AC is not set, splitlock #AC should be turn on | @@ -100,7 +100,7 @@ uint64_t get_active_pcpu_bitmap(void)
static void enable_ac_for_splitlock(void)
{
-#ifdef CONFIG_ENFORCE_TURNOFF_AC
+#ifndef CONFIG_ENFORCE_TURNOFF_AC
uint64_t test_ctl;
if (has_core_cap(1U << 5U)) {
|
Mdified to avoid reporting lock state without the lock itself reporting it (after doing a lock/unlock command) | @@ -943,7 +943,7 @@ int DeRestPluginPrivate::setLightState(const ApiRequest &req, ApiResponse &rsp)
rspItemState[QString("/lights/%1/state/on").arg(id)] = true;
rspItem["success"] = rspItemState;
rsp.list.append(rspItem);
-
+ if (!isDoorLockDevice)
taskRef.lightNode->setValue(RStateOn, targetOn);
}
else
@@ -1490,7 +1490,7 @@ int DeRestPluginPrivate::setLightState(const ApiRequest &req, ApiResponse &rsp)
rspItemState[QString("/lights/%1/state/on").arg(id)] = targetOn;
rspItem["success"] = rspItemState;
rsp.list.append(rspItem);
-
+ if (!isDoorLockDevice)
taskRef.lightNode->setValue(RStateOn, targetOn);
}
else
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.