message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
libtool: update %files | @@ -94,10 +94,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-%dir %{OHPC_UTILS}
-%dir %{OHPC_MODULES}
-%{OHPC_UTILS}
-%{OHPC_MODULES}/autotools
+%{OHPC_PUB}
%doc AUTHORS
%doc ChangeLog
%doc COPYING
|
Turns out that EOF indicates a connection has been closed. Handle both EOF and POLLHUP. | @@ -36,7 +36,7 @@ int main(int argc, char **argv) {
char *hostaddrp; /* dotted decimal host addr string */
int optval; /* flag value for setsockopt */
int rc, i, j, fd;
- int numfds, lerr;
+ int numfds;
#if 0
fd_set workfds, masterfds, exceptfds;
struct timeval tv;
@@ -227,16 +227,27 @@ int main(int argc, char **argv) {
if (rc <= 0) continue;
for (i = 0; i < numfds; ++i) {
- printf("%s:%d fds[%d].fd = %d\n", __FUNCTION__, __LINE__, i, fds[i].fd);
- if (fds[i].revents == 0) continue;
- if ((fds[i].revents & POLLIN) != POLLIN) {
- printf("%s:%d fd %d\n", __FUNCTION__, __LINE__, fd);
+ //printf("%s:%d fds[%d].fd = %d\n", __FUNCTION__, __LINE__, i, fds[i].fd);
+ if (fds[i].revents == 0) {
+ //printf("%s:%d No event\n", __FUNCTION__, __LINE__);
continue;
}
- if (((fds[i].revents & POLLHUP) == POLLHUP) ||
- ((fds[i].revents & POLLERR) == POLLERR) ||
- ((fds[i].revents & POLLNVAL) == POLLNVAL)) {
- printf("%s:%d fd %d\n", __FUNCTION__, __LINE__, fd);
+
+ if (fds[i].revents & POLLHUP) {
+ printf("%s:%d Disconnect on fd %d\n", __FUNCTION__, __LINE__, fd);
+ close(fds[1].fd);
+ fds[i].fd = -1;
+ fds[i].events = 0;
+ continue;
+ }
+
+ if (fds[i].revents & POLLERR) {
+ printf("%s:%d Error on fd %d\n", __FUNCTION__, __LINE__, fd);
+ continue;
+ }
+
+ if (fds[i].revents & POLLNVAL) {
+ printf("%s:%d Invalid on fd %d\n", __FUNCTION__, __LINE__, fd);
continue;
}
@@ -294,7 +305,6 @@ int main(int argc, char **argv) {
continue;
}
- //printf("%s:%d numfds %d\n%s\n", __FUNCTION__, __LINE__, numfds, cmd);
for (j = 2; j < numfds; j++) {
printf("%s:%d fds[%d].fd=%d rc %d\n%s\n", __FUNCTION__, __LINE__,
j, fds[j].fd, rc, cmd);
@@ -307,17 +317,20 @@ int main(int argc, char **argv) {
free(cmd);
}
} else {
- //printf("%s:%d fd %d\n", __FUNCTION__, __LINE__, fds[i].fd);
do {
bzero(buf, BUFSIZE);
rc = recv(fds[i].fd, buf, (size_t)BUFSIZE, MSG_DONTWAIT);
- if (rc <= 0) break;
- lerr = errno;
-
+ if (rc < 0) {
+ break;
+ } else if (rc == 0) {
+ // EOF
+ close(fds[i].fd);
+ fds[i].fd = -1;
+ fds[i].events = 0;
+ }
// echo input to stdout
write(1, buf, rc);
- } while ((lerr != EAGAIN) && (lerr != EWOULDBLOCK));
- //continue;
+ } while (1);
}
}
}
|
[core] fix (startup) mem leaks in configparser.y
(thx stbuehler) | @@ -323,7 +323,10 @@ value(A) ::= key(B). {
value(A) ::= STRING(B). {
A = (data_unset *)data_string_init();
- buffer_copy_buffer(&((data_string *)A)->value, B);
+ /* assumes data_string_init() result does not require swap and buffer_free()*/
+ memcpy(&((data_string *)A)->value, B, sizeof(*B));
+ free(B);
+ B = NULL;
}
value(A) ::= INTEGER(B). {
@@ -342,7 +345,9 @@ value(A) ::= INTEGER(B). {
}
value(A) ::= array(B). {
A = (data_unset *)data_array_init();
- array_copy_array(&((data_array *)(A))->value, B);
+ /* assumes data_array_init() result does not require swap and array_free() */
+ memcpy(&((data_array *)(A))->value, B, sizeof(*B));
+ free(B);
B = NULL;
}
array(A) ::= LPARAN RPARAN. {
|
[io] compile with and wihout bullet | #include <Bullet5DR.hpp>
#include <Bullet2dR.hpp>
#else
-#include <NewtonEulerDS.hpp>
#include <NewtonEuler3DR.hpp>
#include <NewtonEuler5DR.hpp>
-#include <RigidBody2dDS.hpp>
#include <SpaceFilter.hpp>
-DUMMY(RigidBody2dDS, LagrangianDS)
DUMMY(BulletR, NewtonEuler3DR);
DUMMY(Bullet5DR, NewtonEuler5DR);
-toot
+#include <Lagrangian2d2DR.cpp>
+DUMMY(Bullet2dR, Lagrangian2d2DR);
#endif
#define OCC_CLASSES() \
@@ -66,11 +64,11 @@ DUMMY(MBTB_ContactRelation, NewtonEuler1DR);
REGISTER(LagrangianR) \
REGISTER(Disk) \
REGISTER(Circle) \
+ REGISTER(Lagrangian2d2DR) \
REGISTER(NewtonEulerR) \
REGISTER(NewtonEuler1DR) \
REGISTER(NewtonEuler3DR) \
REGISTER(NewtonEuler5DR) \
- REGISTER(Lagrangian2d2DR) \
REGISTER(PivotJointR) \
REGISTER(KneeJointR) \
REGISTER(PrismaticJointR) \
|
sysdeps/managarm: Handle EINVAL in sigaction | #include <stddef.h>
#include <stdint.h>
#include <string.h>
+#include <errno.h>
#include <hel.h>
#include <hel-syscalls.h>
@@ -78,6 +79,8 @@ int sys_sigaction(int number, const struct sigaction *__restrict action,
managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
resp.ParseFromArray(recv_resp->data, recv_resp->length);
+ if(resp.error() == managarm::posix::Errors::ILLEGAL_ARGUMENTS)
+ return EINVAL;
__ensure(resp.error() == managarm::posix::Errors::SUCCESS);
if(saved_action) {
|
brya: Set BC12 interrupt trigger to FALLING
The EC GPIO review recommends setting the BC12 interrupts to trigger on
the FALLING edge instead of BOTH.
BRANCH=none
TEST=boots on board ID 1 | @@ -20,15 +20,15 @@ GPIO_INT(SLP_S3_L, PIN(A, 5), GPIO_INT_BOTH, power_signal_
GPIO_INT(SLP_SUS_L, PIN(F, 1), GPIO_INT_BOTH, power_signal_interrupt)
GPIO_INT(SYS_SLP_S0IX_L, PIN(D, 5), GPIO_INT_BOTH, power_signal_interrupt)
GPIO_INT(TABLET_MODE_L, PIN(9, 5), GPIO_INT_BOTH, gmr_tablet_switch_isr)
-GPIO_INT(USB_C0_BC12_INT_ODL, PIN(C, 6), GPIO_INT_BOTH, bc12_interrupt)
+GPIO_INT(USB_C0_BC12_INT_ODL, PIN(C, 6), GPIO_INT_FALLING, bc12_interrupt)
GPIO_INT(USB_C0_C2_TCPC_INT_ODL, PIN(E, 0), GPIO_INT_FALLING, tcpc_alert_event)
GPIO_INT(USB_C0_PPC_INT_ODL, PIN(6, 2), GPIO_INT_FALLING, ppc_interrupt)
GPIO_INT(USB_C0_RT_INT_ODL, PIN(B, 1), GPIO_INT_BOTH, retimer_interrupt)
-GPIO_INT(USB_C1_BC12_INT_ODL, PIN(5, 0), GPIO_INT_BOTH, bc12_interrupt)
+GPIO_INT(USB_C1_BC12_INT_ODL, PIN(5, 0), GPIO_INT_FALLING, bc12_interrupt)
GPIO_INT(USB_C1_PPC_INT_ODL, PIN(F, 5), GPIO_INT_FALLING, ppc_interrupt)
GPIO_INT(USB_C1_RT_INT_ODL, PIN(A, 0), GPIO_INT_BOTH, retimer_interrupt)
GPIO_INT(USB_C1_TCPC_INT_ODL, PIN(A, 2), GPIO_INT_FALLING, tcpc_alert_event)
-GPIO_INT(USB_C2_BC12_INT_ODL, PIN(8, 3), GPIO_INT_BOTH, bc12_interrupt)
+GPIO_INT(USB_C2_BC12_INT_ODL, PIN(8, 3), GPIO_INT_FALLING, bc12_interrupt)
GPIO_INT(USB_C2_PPC_INT_ODL, PIN(7, 0), GPIO_INT_FALLING, ppc_interrupt)
GPIO_INT(USB_C2_RT_INT_ODL, PIN(4, 1), GPIO_INT_BOTH, retimer_interrupt)
|
Document why we don't use a calibrated colorspace... | @@ -2184,9 +2184,9 @@ xform_document(
{
fz_set_cmm_engine(context, &fz_cmm_engine_lcms);
-# if 0
+# if 0 /* MuPDF crashes - known bug */
/*
- * Create a calibrated colorspace using the AdobeRGB values.
+ * Create a calibrated colorspace using the AdobeRGB (1998) values.
*/
static float wp_val[] = { 0.9505f, 1.0f, 1.0891f };
@@ -2197,7 +2197,6 @@ xform_document(
0.01344f, -0.11836f, 1.01517f };
cs = fz_new_cal_colorspace(context, "AdobeRGB", wp_val, bp_val, gamma_val, matrix_val);
-
# endif // 0
# ifdef __APPLE__
|
Add a generic way to request a plugin restart to the host | @@ -110,6 +110,11 @@ typedef struct clap_host {
// Query an extension.
// [thread-safe]
const void *(*extension)(const struct clap_host *host, const char *extension_id);
+
+ // Ask the host to deactivate and then reactivate the plugin.
+ // The operation may be delayed by the host.
+ // [thread-safe]
+ void (*restart_plugin)(const struct clap_host *host);
} clap_host;
////////////
|
List regular files with ls(.. LS_FILES)
Currently it can give you a regular file, block/char device, fifo or a
socket. | @@ -89,7 +89,7 @@ std::vector<std::string> ls(const char* root, const char* prefix, LS_FLAGS flags
continue;
if (((flags & LS_DIRS) && S_ISDIR(s.st_mode))
- || ((flags & LS_FILES) && !S_ISDIR(s.st_mode))) {
+ || ((flags & LS_FILES) && S_ISREG(s.st_mode))) {
list.push_back(dp->d_name);
}
} else if (((flags & LS_DIRS) && dp->d_type == DT_DIR)
|
Restores 'md' variable name in hmac_handler | @@ -1542,7 +1542,7 @@ static ACVP_RESULT app_sha_handler(ACVP_TEST_CASE *test_case)
static ACVP_RESULT app_hmac_handler(ACVP_TEST_CASE *test_case)
{
ACVP_HMAC_TC *tc;
- const EVP_MD *mac;
+ const EVP_MD *md;
HMAC_CTX hmac_ctx;
int msg_len;
@@ -1554,19 +1554,19 @@ static ACVP_RESULT app_hmac_handler(ACVP_TEST_CASE *test_case)
switch (tc->cipher) {
case ACVP_HMAC_SHA1:
- mac = EVP_sha1();
+ md = EVP_sha1();
break;
case ACVP_HMAC_SHA2_224:
- mac = EVP_sha224();
+ md = EVP_sha224();
break;
case ACVP_HMAC_SHA2_256:
- mac = EVP_sha256();
+ md = EVP_sha256();
break;
case ACVP_HMAC_SHA2_384:
- mac = EVP_sha384();
+ md = EVP_sha384();
break;
case ACVP_HMAC_SHA2_512:
- mac = EVP_sha512();
+ md = EVP_sha512();
break;
default:
printf("Error: Unsupported hash algorithm requested by ACVP server\n");
@@ -1577,7 +1577,7 @@ static ACVP_RESULT app_hmac_handler(ACVP_TEST_CASE *test_case)
HMAC_CTX_init(&hmac_ctx);
msg_len = tc->msg_len;
- if (!HMAC_Init_ex(&hmac_ctx, tc->key, tc->key_len, mac, NULL)) {
+ if (!HMAC_Init_ex(&hmac_ctx, tc->key, tc->key_len, md, NULL)) {
printf("\nCrypto module error, HMAC_Init_ex failed\n");
return ACVP_CRYPTO_MODULE_FAIL;
}
|
parse orig_img to img instead of copying, faster this way | @@ -170,7 +170,9 @@ def create_frame(filename, beatmap, skin, skin_path, replay_event, resultinfo, s
timer2 = 0
while osr_index < end_index: # len(replay_event) - 3:
if osr_index >= start_index:
+ if img.size[0] == 1:
img = orig_img.copy() # reset background
+ img.paste(orig_img, (0, 0))
k1, k2, m1, m2 = keys(cursor_event[KEYS_PRESSED])
if k1:
|
extmod/machine_signal: Change VLA to use new scoped allocation API. | @@ -58,7 +58,7 @@ STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t
// If first argument isn't a Pin-like object, we filter out "invert"
// from keyword arguments and pass them all to the exported Pin
// constructor to create one.
- mp_obj_t pin_args[n_args + n_kw * 2];
+ mp_obj_t *pin_args = mp_local_alloc((n_args + n_kw * 2) * sizeof(mp_obj_t));
memcpy(pin_args, args, n_args * sizeof(mp_obj_t));
const mp_obj_t *src = args + n_args;
mp_obj_t *dst = pin_args + n_args;
@@ -88,6 +88,8 @@ STATIC mp_obj_t signal_make_new(const mp_obj_type_t *type, size_t n_args, size_t
// will just ignore it as set a concrete type. If not, we'd need
// to expose port's "default" pin type too.
pin = MICROPY_PY_MACHINE_PIN_MAKE_NEW(NULL, n_args, n_kw, pin_args);
+
+ mp_local_free(pin_args);
}
else
#endif
|
Added undocumeted kernel debug flag set | @@ -5203,6 +5203,8 @@ modules:
nid: 0x88758561
functions:
printf: 0x391B74B7
+ ksceDebugDisableInfoDump: 0xF857CDD6
+ ksceDebugSetHandlers: 0x10067B7B
SceSblSsMgr:
nid: 0xFDDD93FA
libraries:
|
dm: fix memory leakage issue in acrn_parse_cpu_affinity
fix memory leakage issue in function 'acrn_parse_cpu_affinity()',
memory pointed by 'cp' is not released before function return. | @@ -99,11 +99,11 @@ static void add_one_pcpu(int pcpu_id)
*/
int acrn_parse_cpu_affinity(char *opt)
{
- char *str, *cp;
+ char *str, *cp, *cp_opt;
int pcpu_id;
int pcpu_start, pcpu_end;
- cp = strdup(opt);
+ cp_opt = cp = strdup(opt);
if (!cp) {
pr_err("%s: strdup returns NULL\n", __func__);
return -1;
@@ -126,7 +126,7 @@ int acrn_parse_cpu_affinity(char *opt)
/* parse the entry before ',' */
if (dm_strtoi(str, NULL, 10, &pcpu_id)) {
- return -1;
+ goto err;
}
add_one_pcpu(pcpu_id);
}
@@ -136,11 +136,11 @@ int acrn_parse_cpu_affinity(char *opt)
/* parse the entry before and after '-' respectively */
if (dm_strtoi(str, NULL, 10, &pcpu_start) || dm_strtoi(cp, NULL, 10, &pcpu_end)) {
- return -1;
+ goto err;
}
if (pcpu_end <= pcpu_start) {
- return -1;
+ goto err;
}
for (; pcpu_start <= pcpu_end; pcpu_start++) {
@@ -153,7 +153,12 @@ int acrn_parse_cpu_affinity(char *opt)
}
}
+ free(cp_opt);
return 0;
+
+err:
+ free(cp_opt);
+ return -1;
}
uint64_t vm_get_cpu_affinity_dm(void)
|
Add fsync=off for all gpdemo deployments. | @@ -386,6 +386,10 @@ if [ "${BLDWRAP_POSTGRES_CONF_ADDONS}" != "__none__" ] && \
[ -f ${CLUSTER_CONFIG_POSTGRES_ADDONS} ] && chmod a+w ${CLUSTER_CONFIG_POSTGRES_ADDONS}
echo ${BLDWRAP_POSTGRES_CONF_ADDONS} | sed -e 's/\[//g' -e 's/\]//g' | tr "," "\n" | sed -e 's/^\"//g' -e 's/\"$//g' >> ${CLUSTER_CONFIG_POSTGRES_ADDONS}
+fi
+
+# Add fsync-off for all gpdemo deployments
+grep -q 'fsync=off' ${CLUSTER_CONFIG_POSTGRES_ADDONS} && echo "fsync=off already exists in ${CLUSTER_CONFIG_POSTGRES_ADDONS}." || echo "fsync=off" >> ${CLUSTER_CONFIG_POSTGRES_ADDONS}
echo ""
echo "======================================================================"
@@ -394,23 +398,13 @@ if [ "${BLDWRAP_POSTGRES_CONF_ADDONS}" != "__none__" ] && \
cat ${CLUSTER_CONFIG_POSTGRES_ADDONS}
echo "======================================================================"
echo ""
-fi
-if [ -f "${CLUSTER_CONFIG_POSTGRES_ADDONS}" ]; then
echo "=========================================================================================="
echo "executing:"
echo " $GPPATH/gpinitsystem -a -c $CLUSTER_CONFIG -l $DATADIRS/gpAdminLogs -p ${CLUSTER_CONFIG_POSTGRES_ADDONS} ${STANDBY_INIT_OPTS} \"$@\""
echo "=========================================================================================="
echo ""
$GPPATH/gpinitsystem -a -c $CLUSTER_CONFIG -l $DATADIRS/gpAdminLogs -p ${CLUSTER_CONFIG_POSTGRES_ADDONS} ${STANDBY_INIT_OPTS} "$@"
-else
- echo "=========================================================================================="
- echo "executing:"
- echo " $GPPATH/gpinitsystem -a -c $CLUSTER_CONFIG -l $DATADIRS/gpAdminLogs ${STANDBY_INIT_OPTS} \"$@\""
- echo "=========================================================================================="
- echo ""
- $GPPATH/gpinitsystem -a -c $CLUSTER_CONFIG -l $DATADIRS/gpAdminLogs ${STANDBY_INIT_OPTS} "$@"
-fi
RETURN=$?
echo "========================================"
|
Modify audio utc of negative case
change file premission of utc_aduio_main | @@ -88,7 +88,7 @@ static void utc_audio_pcm_open_tc_p(void)
static void utc_audio_pcm_open_tc_n(void)
{
struct pcm *pcm;
- pcm = pcm_open(-1, -1, PCM_IN, NULL);
+ pcm = pcm_open(999, 999, PCM_IN, NULL);
TC_ASSERT_LEQ("pcm_open", pcm_get_file_descriptor(pcm), 0)
pcm_close(pcm);
TC_SUCCESS_RESULT();
@@ -218,7 +218,7 @@ static void utc_audio_pcm_get_channels_tc_p(void)
static void utc_audio_pcm_get_channels_tc_n(void)
{
int ch;
- ch = pcm_get_channels(g_pcm);
+ ch = pcm_get_channels(NULL);
TC_ASSERT_EQ("pcm_get_channels", ch, 0);
TC_SUCCESS_RESULT();
}
@@ -250,7 +250,7 @@ static void utc_audio_pcm_get_rate_tc_p(void)
static void utc_audio_pcm_get_rate_tc_n(void)
{
int rate;
- rate = pcm_get_rate(g_pcm);
+ rate = pcm_get_rate(NULL);
TC_ASSERT_EQ("pcm_get_channels", rate, 0);
TC_SUCCESS_RESULT();
}
@@ -281,9 +281,9 @@ static void utc_audio_pcm_get_format_tc_p(void)
*/
static void utc_audio_pcm_get_format_tc_n(void)
{
- int format;
- format = pcm_get_format(g_pcm);
- TC_ASSERT_EQ("pcm_get_format", format, -1);
+ int pcm_format;
+ pcm_format = pcm_get_format(NULL);
+ TC_ASSERT_EQ("pcm_get_format", pcm_format, -1);
TC_SUCCESS_RESULT();
}
@@ -350,7 +350,7 @@ static void utc_audio_pcm_get_error_tc_p(void)
*/
static void utc_audio_pcm_get_error_tc_n(void)
{
- TC_ASSERT_NEQ("pcm_get_error", pcm_get_error(NULL), NULL);
+ TC_ASSERT_EQ("pcm_get_error", pcm_get_error(NULL), NULL);
TC_SUCCESS_RESULT();
}
@@ -485,7 +485,7 @@ static void utc_audio_pcm_frames_to_bytes_n(void)
{
unsigned int bytes;
bytes = pcm_frames_to_bytes(NULL, pcm_get_buffer_size(g_pcm));
- TC_ASSERT_LEQ("pcm_frames_to_bytes", bytes, 0);
+ TC_ASSERT_EQ("pcm_frames_to_bytes", bytes, 0);
TC_SUCCESS_RESULT();
}
@@ -709,8 +709,7 @@ static int audio_tc_launcher(int argc, char **args)
utc_audio_pcm_get_config_tc_n();
utc_audio_pcm_get_channels_tc_p();
utc_audio_pcm_get_channels_tc_n();
- utc_audio_pcm_get_file_descriptor_tc_p();
- utc_audio_pcm_get_file_descriptor_tc_n();
+ utc_audio_pcm_get_rate_tc_p();
utc_audio_pcm_get_rate_tc_n();
utc_audio_pcm_get_format_tc_p();
utc_audio_pcm_get_format_tc_n();
|
netutils: Check lo by CONFIG_NET_LOOPBACK not CONFIG_NET_LOCAL
CONFIG_NET_LOCAL is used to enable Unix Domain Socket | #elif defined(CONFIG_NET_TUN)
# define NET_DEVNAME "tun0"
# define NETINIT_HAVE_NETDEV
-#elif defined(CONFIG_NET_LOCAL)
+#elif defined(CONFIG_NET_LOOPBACK)
# define NET_DEVNAME "lo"
# define NETINIT_HAVE_NETDEV
#elif defined(CONFIG_NET_CAN)
|
fix http_code_print() now properly addressed server erros (5xx) | @@ -27,6 +27,9 @@ http_code_print(enum http_code code)
CASE_RETURN_STR(HTTP_TOO_MANY_REQUESTS);
CASE_RETURN_STR(HTTP_GATEWAY_UNAVAILABLE);
default:
+ if (code >= 500) {
+ return "5xx SERVER ERROR";
+ }
ERROR("Invalid HTTP response code (code: %d)", code);
}
}
|
Updated button_maps.json | "Tuya3gangMap": {
"vendor": "Tuya",
"doc": "3-gang remote",
- "modelids": ["_TZ3000_bi6lpsew", "_TZ3400_keyjhapk", "_TYZB02_key8kk7r", "_TZ3400_keyjqthh", "_TZ3400_key8kk7r", "_TZ3000_vp6clf9d", "_TYZB02_keyjqthh", "_TZ3000_peszejy7", "_TZ3000_qzjcsmar", "_TZ3000_owgcnkrh", "_TZ3000_adkvzooy", "_TZ3000_arfwfgoa", "_TZ3000_a7ouggvs", "_TZ3000_rrjr1q0u", "_TZ3000_abci1hiu", "_TZ3000_dfgbtub0"],
+ "modelids": ["_TZ3000_wkai4ga5", "_TZ3000_bi6lpsew", "_TZ3400_keyjhapk", "_TYZB02_key8kk7r", "_TZ3400_keyjqthh", "_TZ3400_key8kk7r", "_TZ3000_vp6clf9d", "_TYZB02_keyjqthh", "_TZ3000_peszejy7", "_TZ3000_qzjcsmar", "_TZ3000_owgcnkrh", "_TZ3000_adkvzooy", "_TZ3000_arfwfgoa", "_TZ3000_a7ouggvs", "_TZ3000_rrjr1q0u", "_TZ3000_abci1hiu", "_TZ3000_dfgbtub0"],
"map": [
[1, "0x01", "ONOFF", "0xfd", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "B1 short"],
[1, "0x01", "ONOFF", "0xfd", "1", "S_BUTTON_1", "S_BUTTON_ACTION_DOUBLE_PRESS", "B1 double"],
|
hoon: updates +fil to bloq-truncate the repeated atom | ++ fil :: fill bloqstream
~/ %fil
|= [a=bloq b=step c=@]
- =+ n=0
- =+ d=c
+ =| n=@ud
+ =. c (end a c)
+ =/ d c
|- ^- @
?: =(n b)
(rsh a d)
|
fix OS_ID test in root Makefile
fixup for
redhat, centos -> rpm
debian, ubuntu -> deb | @@ -30,9 +30,9 @@ OS_ID = $(shell grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"
OS_VERSION_ID= $(shell grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
endif
-ifeq ($(OS_ID),ubuntu)
+ifeq ($(filter ubuntu debian,$(OS_ID)),$(OS_ID))
PKG=deb
-else ifeq ($(OS_ID),centos)
+else ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID))
PKG=rpm
endif
|
WindowExplorer: Hide window tab for system processes | * main program
*
* Copyright (C) 2011 wj32
+ * Copyright (C) 2017 dmex
*
* This file is part of Process Hacker.
*
@@ -168,11 +169,11 @@ VOID NTAPI ProcessPropertiesInitializingCallback(
)
{
PPH_PLUGIN_PROCESS_PROPCONTEXT propContext = Parameter;
- BOOLEAN isGuiProcess = TRUE;
- // enum threads, IsGuiThread, isGuiProcess=TRUE
-
- if (isGuiProcess)
+ if (
+ propContext->ProcessItem->ProcessId != SYSTEM_IDLE_PROCESS_ID &&
+ propContext->ProcessItem->ProcessId != SYSTEM_PROCESS_ID
+ )
{
WE_WINDOW_SELECTOR selector;
|
graph-store: subscribers always keep minimal logs
Transposes the change in so
that subscribers always keep the minimum possible logs. | %tags ~|('cannot send %tags as poke' !!)
%tag-queries ~|('cannot send %tag-queries as poke' !!)
==
+ ++ put-update-log
+ |= [=resource:store =update-log:store =time =logged-update:store]
+ ^- update-log:store
+ ?: =(our.bowl entity.resource)
+ (put:orm-log update-log time logged-update)
+ %+ gas:orm-log *update-log:store
+ :~ (need (pry:orm-log update-log))
+ [time logged-update]
+ ==
::
++ add-graph
|= $: =time
?> is-valid
=/ =update-log:store (~(got by update-logs) resource)
=. update-log
- (put:orm-log update-log time [time [%add-nodes resource nodes]])
+ (put-update-log resource update-log time [time %add-nodes resource nodes])
::
:- (give [/updates]~ [%add-nodes resource nodes])
%_ state
(~(got by graphs) resource)
=/ =update-log:store (~(got by update-logs) resource)
=. update-log
- (put:orm-log update-log time [time [%remove-posts resource indices]])
+ %^ put-update-log resource
+ update-log
+ [time time %remove-posts resource indices]
:- (give [/updates]~ [%remove-posts resource indices])
%_ state
update-logs (~(put by update-logs) resource update-log)
(~(got by graphs) resource)
=/ =update-log:store (~(got by update-logs) resource)
=. update-log
- (put:orm-log update-log time [time [%add-signatures uid signatures]])
- ::
+ %^ put-update-log resource
+ update-log
+ [time time %add-signatures uid signatures]
:- (give [/updates]~ [%add-signatures uid signatures])
%_ state
update-logs (~(put by update-logs) resource update-log)
(~(got by graphs) resource)
=/ =update-log:store (~(got by update-logs) resource)
=. update-log
- %^ put:orm-log update-log
- time
- [time [%remove-signatures uid signatures]]
+ %^ put-update-log resource
+ update-log
+ [time time %remove-signatures uid signatures]
::
:- (give [/updates]~ [%remove-signatures uid signatures])
%_ state
|
Fix memory leak in pluto_mark_vector | @@ -177,6 +177,9 @@ void pluto_mark_vector(struct clast_stmt *root, const PlutoProg *prog,
* trans matrix */
printf("[pluto] pluto_mark_vector: WARNING: vectorizable poly loop not "
"found in AST\n");
+ free(stmtids);
+ free(loops);
+ free(stmts);
continue;
}
for (j = 0; j < nloops; j++) {
|
board: arcada: Fix magnetometer axis rotation
Fix the rotation of the magnetometer measurements.
BRANCH=None
TEST=Compare raw magnetometer data with pixel 3 | @@ -136,7 +136,7 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.addr = LIS2MDL_ADDR,
.default_range = 1 << 11, /* 16LSB / uT, fixed */
- .rot_standard_ref = NULL, /* TODO rotate correctly */
+ .rot_standard_ref = &lid_rot_ref,
.min_frequency = LIS2MDL_ODR_MIN_VAL,
.max_frequency = LIS2MDL_ODR_MAX_VAL,
},
|
stm32/boards/NUCLEO_L073RZ: Fix typo in MCU name. | */
#define MICROPY_HW_BOARD_NAME "NUCLEO-L073RZ"
-#define MICROPY_HW_MCU_NAME "STM32F073RZT6"
+#define MICROPY_HW_MCU_NAME "STM32L073RZT6"
#define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0)
|
sdl/system_android: Add SDL_IsAndroidTV() for SDL2 2.0.8 | package sdl
-// #include "sdl_wrapper.h"
+/*
+#include "sdl_wrapper.h"
+
+#if !(SDL_VERSION_ATLEAST(2,0,8))
+#pragma message("SDL_IsAndroidTV is not supported before SDL 2.0.8")
+static int SDL_IsAndroidTV(void)
+{
+ return -1;
+}
+#endif
+*/
import "C"
import "unsafe"
@@ -42,3 +52,9 @@ func AndroidGetJNIEnv() unsafe.Pointer {
func AndroidGetActivity() unsafe.Pointer {
return unsafe.Pointer(C.SDL_AndroidGetActivity())
}
+
+// IsAndroidTV returns true if the application is running on Android TV
+// (https://wiki.libsdl.org/SDL_IsAndroidTV)
+func IsAndroidTV() bool {
+ return C.SDL_IsAndroidTV() >= 0
+}
|
cirrus: fix non-default library path on Fedora | @@ -236,6 +236,7 @@ task:
tests_script:
- export PATH=$PATH:"$CIRRUS_WORKING_DIR/install/bin"
- export LUA_CPATH="${CIRRUS_WORKING_DIR}/install/lib/lua/5.2/?.so;"
+ - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$CIRRUS_WORKING_DIR/install/lib"
- *run_tests
task:
|
SOVERSION bump to version 2.23.0 | @@ -65,8 +65,8 @@ set(LIBYANG_MICRO_VERSION 234)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
-set(LIBYANG_MINOR_SOVERSION 22)
-set(LIBYANG_MICRO_SOVERSION 7)
+set(LIBYANG_MINOR_SOVERSION 23)
+set(LIBYANG_MICRO_SOVERSION 0)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
dpdk: display rx/tx burst function name in "show hardware detail" | #include <vlib/unix/cj.h>
#include <assert.h>
+#define __USE_GNU
+#include <dlfcn.h>
+
#include <vnet/ethernet/ethernet.h>
#include <dpdk/device/dpdk.h>
@@ -478,6 +481,17 @@ format_dpdk_device_errors (u8 * s, va_list * args)
return s;
}
+static const char *
+ptr2sname (void *p)
+{
+ Dl_info info = { 0 };
+
+ if (dladdr (p, &info) == 0)
+ return 0;
+
+ return info.dli_sname;
+}
+
u8 *
format_dpdk_device (u8 * s, va_list * args)
{
@@ -557,6 +571,12 @@ format_dpdk_device (u8 * s, va_list * args)
format_dpdk_rss_hf_name, rss_conf.rss_hf,
format_white_space, indent + 2,
format_dpdk_rss_hf_name, di.flow_type_rss_offloads);
+ s = format (s, "%Utx burst function: %s\n",
+ format_white_space, indent + 2,
+ ptr2sname (rte_eth_devices[xd->port_id].tx_pkt_burst));
+ s = format (s, "%Urx burst function: %s\n",
+ format_white_space, indent + 2,
+ ptr2sname (rte_eth_devices[xd->port_id].rx_pkt_burst));
}
s = format (s, "%Urx queues %d, rx desc %d, tx queues %d, tx desc %d\n",
|
session client tls UPDATE use directly provided peername | @@ -620,17 +620,9 @@ cleanup:
}
static int
-nc_client_tls_connect_check(int connect_ret, SSL *tls)
+nc_client_tls_connect_check(int connect_ret, SSL *tls, const char *peername)
{
int verify;
- const char *peername = "<unknown>";
-
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L // >= 1.1.0
- /* get peer name (hostname of the server end) */
- if (SSL_get0_peername(tls)) {
- peername = SSL_get0_peername(tls);
- }
-#endif
/* check certificate verification result */
verify = SSL_get_verify_result(tls);
@@ -727,7 +719,7 @@ nc_connect_tls(const char *host, unsigned short port, struct ly_ctx *ctx)
}
/* check for errors */
- if (nc_client_tls_connect_check(ret, session->ti.tls) != 1) {
+ if (nc_client_tls_connect_check(ret, session->ti.tls, host) != 1) {
goto fail;
}
@@ -843,7 +835,7 @@ nc_accept_callhome_tls_sock(int sock, const char *host, uint16_t port, struct ly
}
/* check for errors */
- if (nc_client_tls_connect_check(ret, tls) != 1) {
+ if (nc_client_tls_connect_check(ret, tls, peername ? peername : host) != 1) {
goto cleanup;
}
|
kubect-gadget: Update seccomp to use the new profile name approach | @@ -52,7 +52,7 @@ var seccompAdvisorListCmd = &cobra.Command{
var (
outputMode string
- seccompProfileName string
+ profilePrefix string
)
func init() {
@@ -65,9 +65,9 @@ func init() {
"output-mode", "m",
"terminal",
"The trace output mode, possibles values are terminal and seccomp-profile.")
- seccompAdvisorStartCmd.PersistentFlags().StringVar(&seccompProfileName,
- "seccomp-profile-name", "",
- "Name of the seccomp profile to be created when using --output-mode=seccomp-profile.\nNamespace can be specified by using namespace/profile-name.")
+ seccompAdvisorStartCmd.PersistentFlags().StringVar(&profilePrefix,
+ "profile-prefix", "",
+ "Name prefix of the seccomp profile to be created when using --output-mode=seccomp-profile.\nNamespace can be specified by using namespace/profile-prefix.")
seccompAdvisorCmd.AddCommand(seccompAdvisorStopCmd)
seccompAdvisorCmd.AddCommand(seccompAdvisorListCmd)
@@ -88,7 +88,7 @@ func outputModeToTraceOutputMode(outputMode string) (string, error) {
// parameters.
func runSeccompAdvisorStart(cmd *cobra.Command, args []string) error {
if params.Podname == "" {
- return errors.New("Usage: kubectl gadget seccompadvisor start -p podname")
+ return errors.New("usage: kubectl gadget seccompadvisor start -p podname")
}
traceOutputMode, err := outputModeToTraceOutputMode(outputMode)
@@ -96,19 +96,15 @@ func runSeccompAdvisorStart(cmd *cobra.Command, args []string) error {
return err
}
- if traceOutputMode != "ExternalResource" && seccompProfileName != "" {
- return errors.New("You can only use --seccomp-profile-name with --output seccomp-profile.")
- }
-
- if traceOutputMode == "ExternalResource" && seccompProfileName == "" {
- return errors.New("You must specify --seccomp-profile-name when using --output seccomp-profile.")
+ if traceOutputMode != "ExternalResource" && profilePrefix != "" {
+ return errors.New("you can only use --profile-prefix with --output seccomp-profile")
}
config := &utils.TraceConfig{
GadgetName: "seccomp",
Operation: "start",
TraceOutputMode: traceOutputMode,
- TraceOutput: seccompProfileName,
+ TraceOutput: profilePrefix,
TraceInitialState: "Started",
CommonFlags: ¶ms,
}
@@ -127,13 +123,13 @@ func runSeccompAdvisorStart(cmd *cobra.Command, args []string) error {
// as parameter.
func runSeccompAdvisorStop(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
- return errors.New("Usage: kubectl gadget seccomp-advisor stop global-trace-id\n")
+ return errors.New("usage: kubectl gadget seccomp-advisor stop global-trace-id")
}
callback := func(results []gadgetv1alpha1.Trace) error {
for _, i := range results {
if i.Spec.OutputMode == "ExternalResource" {
- fmt.Printf("Successfully created seccomp profile %q!\n", i.Spec.Output)
+ fmt.Printf("Successfully created seccomp profile\n")
return nil
}
|
Un-backtick 'The scope Executable' heading | @@ -119,7 +119,7 @@ export LD_PRELOAD=./libscope.so
This will set the `LD_PRELOAD` environment variable for all commands that execute in the current shell. The result is that all commands executed from the shell will cause `libscope.so` to be loaded and details of those applications emitted.
-# The `scope` Executable
+# The scope Executable
`scope` provides a rich set of features for exploring data from applications that have been "scoped". `scope` supports several distinct modes:
|
[Y_FORCE_INLINE] Don't force inling for coverage build | @@ -385,7 +385,7 @@ module BASE_UNIT {
}
when ($CLANG_COVERAGE && $CLANG_COVERAGE != "no") {
- CFLAGS+=-fprofile-instr-generate -fcoverage-mapping
+ CFLAGS+=-fprofile-instr-generate -fcoverage-mapping -DCLANG_COVERAGE
LDFLAGS+=-fprofile-instr-generate -fcoverage-mapping
}
|
DPDK: disabling DPAA since broken for 18.02 | @@ -209,6 +209,12 @@ $(B)/custom-config: $(B)/.patch.ok Makefile
$(call set,RTE_LIBRTE_FLOW_CLASSIFY,n)
$(call set,RTE_KNI_KMOD,n)
$(call set,RTE_EAL_IGB_UIO,n)
+ @# currently broken in 18.02
+ $(call set,RTE_LIBRTE_DPAA_BUS,n)
+ $(call set,RTE_LIBRTE_DPAA_MEMPOOL,n)
+ $(call set,RTE_LIBRTE_DPAA_PMD,n)
+ $(call set,RTE_LIBRTE_PMD_DPAA_SEC,n)
+ $(call set,RTE_LIBRTE_PMD_DPAA_EVENTDEV,n)
@rm -f .config.ok
$(CURDIR)/$(DPDK_TARBALL):
|
board/coffeecake/usb_pd_policy.c: Format with clang-format
BRANCH=none
TEST=none
Tricium: disable | @@ -192,7 +192,8 @@ static int dp_status(int port, uint32_t *payload)
0, /* request exit DP */
0, /* request exit USB */
0, /* MF pref */
- gpio_get_level(GPIO_PD_SBU_ENABLE), 0, /* power
+ gpio_get_level(GPIO_PD_SBU_ENABLE),
+ 0, /* power
low
*/
0x2);
|
BugID:18679699: fix exp8266 flash write bug | @@ -74,7 +74,7 @@ static void flash_write_data(UINT8 *buffer, unsigned int address, unsigned int l
memset(buf, 0xff, size);
memcpy(buf + left_off, buffer, len);
vPortETSIntrLock();
- ret = spi_flash_write(start_addr - left_off, (unsigned int *)buf, len);
+ ret = spi_flash_write(start_addr - left_off, (unsigned int *)buf, size);
vPortETSIntrUnlock();
if(ret != 0)
{
|
lldp: protection code to check a valid interface index
When lldp interface is set, it's better to check valid interface index. | @@ -49,9 +49,16 @@ lldp_cfg_intf_set (u32 hw_if_index, u8 ** port_desc, u8 ** mgmt_ip4,
lldp_main_t *lm = &lldp_main;
vnet_main_t *vnm = lm->vnet_main;
ethernet_main_t *em = ðernet_main;
- const vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, hw_if_index);
- const ethernet_interface_t *eif = ethernet_get_interface (em, hw_if_index);
+ const vnet_hw_interface_t *hi;
+ const ethernet_interface_t *eif;
+ if (pool_is_free_index (vnm->interface_main.hw_interfaces, hw_if_index))
+ {
+ return lldp_invalid_arg;
+ }
+
+ hi = vnet_get_hw_interface (vnm, hw_if_index);
+ eif = ethernet_get_interface (em, hw_if_index);
if (!eif)
{
return lldp_not_supported;
|
HLS memcopy : corrected Action_Config init values | #include "ap_int.h"
#include "action_memcopy_hls.h"
-#define MEMCOPY_ACTION_TYPE 0x0004
+#define MEMCOPY_ACTION_TYPE 0x14101000
-#define RELEASE_VERSION 0xFEEDA00400000020
+#define RELEASE_VERSION 0x00000020
// ----------------------------------------------------------------------------
// Known Limitations => Issue #39 & #45
// => Transfers must be 64 byte aligned and a size of multiples of 64 bytes
|
cr50: prepare to release 0.4.9
BRANCH=cr50, cr50-mp
TEST=none | "timestamp": 0,
"epoch": 0, // FWR diversification contributor, 32 bits.
"major": 4, // FW2_HIK_CHAIN counter.
- "minor": 8, // Mostly harmless version field.
+ "minor": 9, // Mostly harmless version field.
"applysec": -1, // Mask to and with fuse BROM_APPLYSEC.
"config1": 13, // Which BROM_CONFIG1 actions to take before launching.
"err_response": 0, // Mask to or with fuse BROM_ERR_RESPONSE.
|
Add build instructions for ESP32-C3 | ## Build for ESP-IDF
-Download and install ESP-IDF v4.0
+Download and install ESP-IDF v4.3-beta1
```sh
export IDF_PATH=/opt/esp32/esp-idf
@@ -13,7 +13,9 @@ source $IDF_PATH/export.sh
idf.py menuconfig
# Select target:
-idf.py set-target esp32s2beta # or esp32
+idf.py set-target esp32
+#idf.py set-target esp32s2
+#idf.py --preview set-target esp32c3
idf.py build
|
perfmon: fix order in cmakelists.txt
Fix ordering in CMakeLists.txt
Type: refactor | @@ -23,21 +23,21 @@ add_vpp_plugin(perfmon
perfmon.c
intel/core.c
intel/uncore.c
- intel/bundle/backend_bound_mem.c
intel/bundle/backend_bound_core.c
+ intel/bundle/backend_bound_mem.c
+ intel/bundle/branch_mispred.c
+ intel/bundle/cache_hit_miss.c
+ intel/bundle/frontend_bound_bw_src.c
+ intel/bundle/frontend_bound_bw_uops.c
+ intel/bundle/frontend_bound_lat.c
+ intel/bundle/iio_bw.c
intel/bundle/inst_and_clock.c
intel/bundle/load_blocks.c
intel/bundle/mem_bw.c
- intel/bundle/cache_hit_miss.c
- intel/bundle/branch_mispred.c
intel/bundle/power_license.c
- intel/bundle/topdown_metrics.c
intel/bundle/topdown_icelake.c
+ intel/bundle/topdown_metrics.c
intel/bundle/topdown_tremont.c
- intel/bundle/frontend_bound_bw_src.c
- intel/bundle/frontend_bound_bw_uops.c
- intel/bundle/frontend_bound_lat.c
- intel/bundle/iio_bw.c
COMPONENT
vpp-plugin-devtools
|
nimble/ll: Ignore SCAN_RSP not addresses to us
We shoould not send reports for SCAN_RSP that has AdvA which is not
ours.
This fixes LL/DDI/SCN/BI-03. | @@ -3180,33 +3180,16 @@ ble_ll_scan_rx_pkt_in(uint8_t ptype, struct os_mbuf *om, struct ble_mbuf_hdr *hd
goto scan_continue;
}
- /*
- * XXX: The BLE spec is a bit unclear here. What if we get a scan
- * response from an advertiser that we did not send a request to?
- * Do we send an advertising report? Do we add it to list of devices
- * that we have heard a scan response from?
- */
if (ptype == BLE_ADV_PDU_TYPE_SCAN_RSP) {
- /*
- * If this is a scan response in reply to a request we sent we need
- * to store this advertiser's address so we dont send a request to it.
- */
- if (scan_rsp_rxd) {
- /*
- * We could also check the timing of the scan reponse; make sure
- * that it is relatively close to the end of the scan request but
- * we wont for now.
- */
rxadd = scansm->pdu_data.hdr_byte & BLE_ADV_PDU_HDR_RXADD_MASK;
adva = scansm->pdu_data.adva;
- if (((txadd && rxadd) || ((txadd + rxadd) == 0)) &&
+ if (scan_rsp_rxd && ((txadd && rxadd) || ((txadd + rxadd) == 0)) &&
!memcmp(adv_addr, adva, BLE_DEV_ADDR_LEN)) {
/* We have received a scan response. Add to list */
ble_ll_scan_add_scan_rsp_adv(ident_addr, ident_addr_type, 0, 0);
backoff_success = 1;
- }
} else {
- /* Ignore if this is not ours */
+ /* This is not addressed for us, ignore */
goto scan_continue;
}
}
|
base: improve the robustness of CPU topology scanning | @@ -27,8 +27,9 @@ static int cpu_scan_topology(void)
{
char path[PATH_MAX];
DEFINE_BITMAP(numa_mask, NNUMA);
- int i;
+ DEFINE_BITMAP(cpu_mask, NCPU);
uint64_t tmp;
+ int i;
/* How many NUMA nodes? */
if (sysfs_parse_bitlist("/sys/devices/system/node/online",
@@ -42,10 +43,29 @@ static int cpu_scan_topology(void)
}
}
+ if (numa_count <= 0 || numa_count > NNUMA) {
+ log_err("cpu: detected %d NUMA nodes, unsupported count.",
+ numa_count);
+ return -EINVAL;
+ }
+
/* How many CPUs? */
- cpu_count = sysconf(_SC_NPROCESSORS_CONF);
- if (cpu_count <= 0 || cpu_count > NCPU)
+ if (sysfs_parse_bitlist("/sys/devices/system/cpu/online",
+ cpu_mask, NCPU))
+ return -EIO;
+ bitmap_for_each_set(cpu_mask, NCPU, i) {
+ cpu_count++;
+ if (cpu_count <= i) {
+ log_err("cpu: can't support non-contiguous CPU mask.");
return -EINVAL;
+ }
+ }
+
+ if (cpu_count <= 0 || cpu_count > NCPU) {
+ log_err("cpu: detected %d CPUs, unsupported count.",
+ cpu_count);
+ return -EINVAL;
+ }
/* Scan the CPU topology. */
for (i = 0; i < cpu_count; i++) {
|
process: cleanup after the test | @@ -197,6 +197,7 @@ kdb set user:/tests/process/key not_allowed
# STDERR:.*Validation Semantic: .*'not_allowed' does not adhere to whitelist.*
# cleanup
+kdb rm -r user:/tests/process
sudo kdb umount user:/tests/process
```
|
Fix bug with invalid data types for netconn | @@ -49,8 +49,8 @@ typedef struct esp_netconn_t {
size_t rcv_packets; /*!< Number of received packets so far on this connection */
esp_conn_p conn; /*!< Pointer to actual connection */
- esp_sys_sem_t mbox_accept; /*!< List of active connections waiting to be processed */
- esp_sys_sem_t mbox_receive; /*!< Message queue for receive mbox */
+ esp_sys_mbox_t mbox_accept; /*!< List of active connections waiting to be processed */
+ esp_sys_mbox_t mbox_receive; /*!< Message queue for receive mbox */
uint8_t* buff; /*!< Pointer to buffer for \ref esp_netconn_write function. used only on TCP connection */
size_t buff_len; /*!< Total length of buffer */
@@ -74,23 +74,23 @@ flush_mboxes(esp_netconn_t* nc) {
esp_pbuf_p pbuf;
esp_netconn_t* new_nc;
esp_core_lock(); /* Protect ESP core */
- if (esp_sys_sem_isvalid(&nc->mbox_receive)) {
+ if (esp_sys_mbox_isvalid(&nc->mbox_receive)) {
while (esp_sys_mbox_getnow(&nc->mbox_receive, (void **)&pbuf)) {
if (pbuf != NULL && (uint8_t *)pbuf != (uint8_t *)&recv_closed) {
esp_pbuf_free(pbuf); /* Free received data buffers */
}
}
- esp_sys_sem_delete(&nc->mbox_receive); /* Delete message queue */
- esp_sys_sem_invalid(&nc->mbox_receive); /* Invalid handle */
+ esp_sys_mbox_delete(&nc->mbox_receive); /* Delete message queue */
+ esp_sys_mbox_invalid(&nc->mbox_receive);/* Invalid handle */
}
- if (esp_sys_sem_isvalid(&nc->mbox_accept)) {
+ if (esp_sys_mbox_isvalid(&nc->mbox_accept)) {
while (esp_sys_mbox_getnow(&nc->mbox_accept, (void **)&new_nc)) {
if (new_nc != NULL && (uint8_t *)new_nc != (uint8_t *)&recv_closed) {
esp_netconn_close(new_nc); /* Close netconn connection */
}
}
- esp_sys_sem_delete(&nc->mbox_accept); /* Delete message queue */
- esp_sys_sem_invalid(&nc->mbox_accept); /* Invalid handle */
+ esp_sys_mbox_delete(&nc->mbox_accept); /* Delete message queue */
+ esp_sys_mbox_invalid(&nc->mbox_accept); /* Invalid handle */
}
esp_core_unlock(); /* Release protection */
}
|
Add button map for Linkind 1 key remote control | @@ -908,6 +908,16 @@ static const Sensor::ButtonMap sonoffOnOffMap[] = {
{ Sensor::ModeNone, 0x00, 0x0000, 0x00, 0, 0, nullptr }
};
+static const Sensor::ButtonMap linkind1keyMap[] = {
+// mode ep cluster cmd param button name
+ { Sensor::ModeScenes, 0x01, 0x0006, 0x01, 0, S_BUTTON_1 + S_BUTTON_ACTION_SHORT_RELEASED, "On" },
+ { Sensor::ModeScenes, 0x01, 0x0006, 0x00, 0, S_BUTTON_1 + S_BUTTON_ACTION_DOUBLE_PRESS, "Off" },
+ { Sensor::ModeScenes, 0x01, 0x0008, 0x01, 0, S_BUTTON_1 + S_BUTTON_ACTION_HOLD, "Move up" },
+ { Sensor::ModeScenes, 0x01, 0x0008, 0x03, 0, S_BUTTON_1 + S_BUTTON_ACTION_LONG_RELEASED, "Stop" },
+ // end
+ { Sensor::ModeNone, 0x00, 0x0000, 0x00, 0, 0, nullptr }
+};
+
/*! Returns a fingerprint as JSON string. */
QString SensorFingerprint::toString() const
{
@@ -1559,7 +1569,7 @@ const Sensor::ButtonMap *Sensor::buttonMap()
}
else if (manufacturer == QLatin1String("lk"))
{
- if (modelid == QLatin1String("ZBT-DIMSwitch")) { m_buttonMap = ikeaOnOffMap; }
+ if (modelid == QLatin1String("ZBT-DIMSwitch-D0001")) { m_buttonMap = linkind1keyMap; }
}
else if (manufacturer == QLatin1String("eWeLink"))
{
|
examples: encorder_ctrl: GUI update | @@ -68,22 +68,21 @@ void encoder_ctrl_init(void)
style_mbox_bg.opa = OPA_50;
lv_obj_t * title = lv_label_create(scr, NULL);
- lv_label_set_text(title, "adasds");
+ lv_label_set_text(title, "Encoder control");
lv_obj_set_protect(title, LV_PROTECT_FOLLOW); /*Make a line break in the layout*/
/*Create a holder, a subtitle and a drop down list*/
+ lv_obj_t * ddlist = lv_ddlist_create(scr, NULL);
+ lv_ddlist_set_options_str(ddlist, "Low\nMedium\nHigh");
+ lv_group_add_obj(g, ddlist); /*Add the object to the first group*/
+
+ /*Copy the previous holder and subtitle and add check boxes*/
lv_obj_t * holder = lv_cont_create(scr, NULL); /*Create a transparent holder to group some objects*/
lv_cont_set_fit(holder, true, true);
lv_cont_set_layout(holder, LV_CONT_LAYOUT_COL_L);
lv_obj_set_style(holder, lv_style_get(LV_STYLE_TRANSP, NULL));
- lv_obj_t * ddlist = lv_ddlist_create(holder, NULL);
- lv_ddlist_set_options_str(ddlist, "Low\nMedium\nHigh");
- lv_group_add_obj(g, ddlist); /*Add the object to the first group*/
-
- /*Copy the previous holder and subtitle and add check boxes*/
- holder = lv_cont_create(scr, holder);
lv_obj_t * cb = lv_cb_create(holder, NULL);
lv_cb_set_text(cb, "Red");
lv_group_add_obj(g, cb);
@@ -95,8 +94,7 @@ void encoder_ctrl_init(void)
lv_cb_set_text(cb, "Blue");
/*Copy the previous holder and subtitle and add sliders*/
- holder = lv_cont_create(scr, holder);
- lv_obj_t * slider = lv_slider_create(holder, NULL);
+ lv_obj_t * slider = lv_slider_create(scr, NULL);
lv_obj_set_size_us(slider, 180, 30);
lv_group_add_obj(g, slider);
@@ -160,6 +158,7 @@ static lv_action_res_t enable_action(lv_obj_t * btn, lv_dispi_t * dispi)
lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, - LV_DPI / 2);
lv_group_focus_obj(mbox);
+ lv_group_focus_freeze(g, true);
}
return LV_ACTION_RES_OK;
}
@@ -167,12 +166,14 @@ static lv_action_res_t enable_action(lv_obj_t * btn, lv_dispi_t * dispi)
static lv_action_res_t mbox_yes_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_obj_t * mbox = lv_mbox_get_from_btn(btn);
+ lv_group_focus_freeze(g, false);
lv_obj_del(lv_obj_get_parent(mbox));
}
static lv_action_res_t mbox_no_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_obj_t * mbox = lv_mbox_get_from_btn(btn);
+ lv_group_focus_freeze(g, false);
lv_obj_del(lv_obj_get_parent(mbox));
}
|
gppkg: Add concourse job | @@ -648,6 +648,26 @@ jobs:
BLDWRAP_POSTGRES_CONF_ADDONS: ""
GPCHECK_SETUP: true
+- name: MM_gppkg
+ plan:
+ - aggregate:
+ - get: gpdb_src
+ params:
+ submodules:
+ - gpMgmt/bin/pythonSrc/ext
+ passed: [compile_gpdb_centos6]
+ - get: bin_gpdb
+ resource: bin_gpdb_centos6
+ passed: [compile_gpdb_centos6]
+ trigger: true
+ - get: centos-gpdb-dev-6
+ - task: gppkg
+ file: gpdb_src/concourse/tasks/behave_gpdb.yml
+ image: centos-gpdb-dev-6
+ params:
+ BEHAVE_TAGS: gppkg
+ BLDWRAP_POSTGRES_CONF_ADDONS: ""
+
- name: MM_pt-rebuild
plan:
- aggregate:
|
VERSION bump to version 1.3.32 | @@ -30,7 +30,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 31)
+set(SYSREPO_MICRO_VERSION 32)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
fuzz: missing semi-colon after defer | @@ -438,7 +438,7 @@ static bool fuzz_runVerifier(run_t* run) {
PLOG_E("Couldn't create '%s'", verFile);
return true;
}
- defer { close(fd); }
+ defer { close(fd); };
if (!files_writeToFd(fd, run->dynamicFile, run->dynamicFileSz)) {
LOG_E("Couldn't save verified file as '%s'", verFile);
unlink(verFile);
|
sem: Modify default sem flag value in SEM_INITIALIZER
When semaphore is initialized, sem flag should be set FLAGS_INITIALIZED | @@ -136,9 +136,9 @@ typedef struct sem_s sem_t;
*/
#ifdef CONFIG_PRIORITY_INHERITANCE
#if CONFIG_SEM_PREALLOCHOLDERS > 0
-#define SEM_INITIALIZER(c) {(c), 0, NULL} /* semcount, flags, hhead */
+#define SEM_INITIALIZER(c) {(c), FLAGS_INITIALIZED, NULL} /* semcount, flags, hhead */
#else
-#define SEM_INITIALIZER(c) {(c), 0, SEMHOLDER_INITIALIZER} /* semcount, flags, holder */
+#define SEM_INITIALIZER(c) {(c), FLAGS_INITIALIZED, SEMHOLDER_INITIALIZER} /* semcount, flags, holder */
#endif
#else
#define SEM_INITIALIZER(c) {(c)} /* semcount */
|
Tools: dump: do not print metadata if the `-t` option is provided
Filesystem metadata are now dumped only when the user does not set
the `-t` command line option (which is used to dump filesystem
contents in tree format), in order to avoid polluting the dump
output with redundant information. | @@ -140,6 +140,7 @@ closure_function(3, 2, void, fsc,
exit(EXIT_FAILURE);
}
+ unsigned int options = bound(options);
u8 uuid[UUID_LEN];
filesystem_get_uuid(fs, uuid);
tuple root = filesystem_getroot(fs);
@@ -147,8 +148,10 @@ closure_function(3, 2, void, fsc,
bprintf(rb, "Label: %s\n", filesystem_get_label(fs));
bprintf(rb, "UUID: ");
print_uuid(rb, uuid);
+ if (!(options & DUMP_OPT_TREE)) {
bprintf(rb, "\nmetadata\n");
print_value(rb, root, timm("indent", "0"));
+ }
buffer_print(rb);
rprintf("\n");
deallocate_buffer(rb);
@@ -157,7 +160,6 @@ closure_function(3, 2, void, fsc,
if (b)
readdir(fs, h, root, b);
- unsigned int options = bound(options);
if (options & DUMP_OPT_TREE)
dump_fsentry(0, sym_this("/"), root);
|
Updated make clean target to do a deeper clean | @@ -117,7 +117,7 @@ calibrate_tcc : $(LIBSURVIVE_C)
tcc -DRUNTIME_SYMNUM $(CFLAGS) -o $@ $^ $(LDFLAGS) calibrate.c redist/os_generic.c $(DRAWFUNCTIONS) redist/symbol_enumerator.c
clean :
- rm -rf *.o src/*.o *~ src/*~ test simple_pose_test data_recorder calibrate testCocoa lib/libsurvive.so test_minimal_cv test_epnp test_epnp_ocv calibrate_client redist/*.o redist/*~ tools/data_server/data_server tools/lighthousefind/lighthousefind tools/lighthousefind_tori/lighthousefind-tori tools/plot_lighthouse/plot_lighthouse tools/process_rawcap/process_to_points redist/jsmntest redist/lintest
+ rm -rf */*/*.o *.o src/*.o *~ src/*~ test simple_pose_test data_recorder calibrate testCocoa lib/libsurvive.so test_minimal_cv test_epnp test_epnp_ocv calibrate_client redist/*.o redist/*~ tools/data_server/data_server tools/lighthousefind/lighthousefind tools/lighthousefind_tori/lighthousefind-tori tools/plot_lighthouse/plot_lighthouse tools/process_rawcap/process_to_points redist/jsmntest redist/lintest
|
apps/speed.c: skip binary curves when compiling with OPENSSL_NO_EC2M
openssl speed doesn't take into account that the library could be
compiled without the support for the binary curves and happily uses
them, which results in EC_GROUP_new_by_curve_name() errors. | @@ -524,6 +524,7 @@ static OPT_PAIR ecdsa_choices[] = {
{"ecdsap256", R_EC_P256},
{"ecdsap384", R_EC_P384},
{"ecdsap521", R_EC_P521},
+#ifndef OPENSSL_NO_EC2M
{"ecdsak163", R_EC_K163},
{"ecdsak233", R_EC_K233},
{"ecdsak283", R_EC_K283},
@@ -534,6 +535,7 @@ static OPT_PAIR ecdsa_choices[] = {
{"ecdsab283", R_EC_B283},
{"ecdsab409", R_EC_B409},
{"ecdsab571", R_EC_B571},
+#endif
{"ecdsabrp256r1", R_EC_BRP256R1},
{"ecdsabrp256t1", R_EC_BRP256T1},
{"ecdsabrp384r1", R_EC_BRP384R1},
@@ -552,6 +554,7 @@ static const OPT_PAIR ecdh_choices[] = {
{"ecdhp256", R_EC_P256},
{"ecdhp384", R_EC_P384},
{"ecdhp521", R_EC_P521},
+#ifndef OPENSSL_NO_EC2M
{"ecdhk163", R_EC_K163},
{"ecdhk233", R_EC_K233},
{"ecdhk283", R_EC_K283},
@@ -562,6 +565,7 @@ static const OPT_PAIR ecdh_choices[] = {
{"ecdhb283", R_EC_B283},
{"ecdhb409", R_EC_B409},
{"ecdhb571", R_EC_B571},
+#endif
{"ecdhbrp256r1", R_EC_BRP256R1},
{"ecdhbrp256t1", R_EC_BRP256T1},
{"ecdhbrp384r1", R_EC_BRP384R1},
@@ -1524,6 +1528,7 @@ int speed_main(int argc, char **argv)
{"nistp256", NID_X9_62_prime256v1, 256},
{"nistp384", NID_secp384r1, 384},
{"nistp521", NID_secp521r1, 521},
+#ifndef OPENSSL_NO_EC2M
/* Binary Curves */
{"nistk163", NID_sect163k1, 163},
{"nistk233", NID_sect233k1, 233},
@@ -1535,6 +1540,7 @@ int speed_main(int argc, char **argv)
{"nistb283", NID_sect283r1, 283},
{"nistb409", NID_sect409r1, 409},
{"nistb571", NID_sect571r1, 571},
+#endif
{"brainpoolP256r1", NID_brainpoolP256r1, 256},
{"brainpoolP256t1", NID_brainpoolP256t1, 256},
{"brainpoolP384r1", NID_brainpoolP384r1, 384},
|
Corrected reference to clap_plugin_audio_ports members to use the correct names. | @@ -45,8 +45,8 @@ typedef struct clap_process {
const clap_event_transport_t *transport;
// Audio buffers, they must have the same count as specified
- // by clap_plugin_audio_ports->get_count().
- // The index maps to clap_plugin_audio_ports->get_info().
+ // by clap_plugin_audio_ports->count().
+ // The index maps to clap_plugin_audio_ports->get().
const clap_audio_buffer_t *audio_inputs;
clap_audio_buffer_t *audio_outputs;
uint32_t audio_inputs_count;
|
OcAppleKernelLib: Fix uninitialised data access caused by improper vtable construction | @@ -469,9 +469,7 @@ InternalInitializeVtableByEntriesAndRelocations64 (
if (OcSymbol != NULL) {
VtableEntries[Index].Name = OcSymbol->Name;
VtableEntries[Index].Address = OcSymbol->Value;
- } else {
- VtableEntries[Index].Name = NULL;
- VtableEntries[Index].Address = 0;
+ continue;
}
} else {
if (SolveSymbolIndex >= NumSolveSymbols) {
@@ -501,8 +499,12 @@ InternalInitializeVtableByEntriesAndRelocations64 (
VtableEntries[Index].Name = MachoGetSymbolName64 (MachoContext, Symbol);
VtableEntries[Index].Address = Symbol->Value;
+ continue;
}
}
+
+ VtableEntries[Index].Name = NULL;
+ VtableEntries[Index].Address = 0;
}
Vtable->Name = VtableName;
|
fix loop limits in mcpha-server.c | @@ -514,7 +514,7 @@ int main(int argc, char *argv[])
*rst[3] |= 128;
/* start pulser */
total = 0;
- for(i = 0; i < 4095; ++i)
+ for(i = 0; i < 4096; ++i)
{
total += spectrum[i];
}
@@ -522,7 +522,7 @@ int main(int argc, char *argv[])
if(total < 2) continue;
value = 0;
- for(i = 0; i < 4095; ++i)
+ for(i = 0; i < 4096; ++i)
{
value += spectrum[i];
hist[i] = value * RAND_MAX / (total - 1) - 1;
|
sdl: haptic.go: Fix HapticOpened() returning error on success | @@ -225,7 +225,10 @@ func HapticOpen(index int) (*Haptic, error) {
// (https://wiki.libsdl.org/SDL_HapticOpened)
func HapticOpened(index int) (bool, error) {
ret := int(C.SDL_HapticOpened(C.int(index)))
- return ret == C.SDL_TRUE, errorFromInt(ret)
+ if ret == 0 {
+ return false, GetError()
+ }
+ return ret == 1, nil
}
// HapticIndex returns the index of a haptic device.
|
Added error message in dynlink_impl_interface_load_win32 when unable to load library | #include <dynlink/dynlink_impl.h>
+#include <log/log.h>
+
#include <string.h>
#define WIN32_LEAN_AND_MEAN
@@ -44,6 +46,8 @@ dynlink_impl dynlink_impl_interface_load_win32(dynlink handle)
return (dynlink_impl)impl;
}
+ log_write("metacall", LOG_LEVEL_ERROR, "Failed to load: %s with error code: %d", dynlink_get_name_impl(handle), GetLastError());
+
return NULL;
}
|
HARD_CODED option wor wasienv | @@ -35,9 +35,12 @@ if(WASIENV)
set(CMAKE_C_COMPILER "wasicc")
set(CMAKE_CXX_COMPILER "wasic++")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto -Wl,--lto-O3 -Wl,-z,stack-size=8388608")
+
+ if(HARD_CODED) # Bundle a wasm binary and run a hard-coded func
set(APP_DIR "platforms/emscripten")
- #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dd_m3LogOutput=0")
- #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto -Wl,--lto-O3 -Wl,-z,stack-size=8388608")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Dd_m3LogOutput=0")
+ endif()
endif()
if(BUILD_32BIT)
|
OcAppleKernelLib: Try to match more values against xcpm_msr_applicable_cpus
0x33DC is just one of them... | @@ -278,7 +278,7 @@ PatchAppleXcpmExtraMsrs (
Status = PatcherGetSymbolAddress (Patcher, "_xcpm_pkg_scope_msrs", (UINT8 **) &Record);
if (!RETURN_ERROR (Status)) {
while (Record < Last) {
- if (Record->xcpm_msr_applicable_cpus == 0x33DC) {
+ if ((Record->xcpm_msr_applicable_cpus & 0xFF0000FDU) == 0xDC) {
DEBUG ((
DEBUG_INFO,
"Replacing _xcpm_pkg_scope_msrs data %u %u\n",
|
clay: delete /app/publish from subscription state on migration | ++ migrate-dist
~> %slog.0^'clay: migrating for third-party software distribution'
|^ ^+ ..park
+ =. ..park purge
:: first make sure gall has molted and has :hood running
::
=. ..park (emit hen %pass /dist/hood %g %jolt %home %hood)
=. ..park (install-from-tmp %base)
..park(dist-upgraded.ruf &)
::
+ ++ purge
+ ^+ ..park
+ =/ wux=(list [=wove =duct]) ~(tap by qyx)
+ |- ^+ ..park
+ ?~ wux ..park
+ =/ rov rove.wove.i.wux
+ ?. ?=(%sing -.rov)
+ $(wux t.wux)
+ ?. ?=([%a * %app %publish %hoon ~] mood.rov)
+ $(wux t.wux)
+ =. qyx (~(del by qyx) wove.i.wux)
+ $(wux t.wux)
+ ::
++ install-from-tmp
|= =desk
^+ ..park
|
codegen: remove broken line wrapping | @@ -189,70 +189,6 @@ static std::string camelCaseToMacroCase (const std::string & s)
return ss.str ();
}
-static void printWrapped (std::ostream & out, std::string line, size_t maxChars)
-{
- // find indent
- std::stringstream indent;
- for (auto cur = line.begin (); cur != line.end () && isspace (*cur); ++cur)
- {
- indent << *cur;
- }
-
- if (indent.str ().length () == line.length ())
- {
- // only whitespace -> skip
- out << std::endl;
- return;
- }
-
- auto indentSize = 0;
-
- // wrap at about 'maxChars' chars, keeping indent
- while (line.length () > maxChars)
- {
- // find last space in chunk (outside of quotes)
- size_t lastSpace = 0;
- char quote = '\0';
- for (size_t i = 0; i < maxChars - indentSize; ++i)
- {
- if (quote != '\0')
- {
- // inside quotes -> look for end
- if (line[i - 1] != '\\' && line[i] == quote)
- {
- quote = '\0';
- }
- }
- else if (isspace (line[i]))
- {
- // space outside quotes
- lastSpace = i;
- }
- else if (line[i] == '\'' || line[i] == '"')
- {
- // start of quote
- quote = line[i];
- }
- }
-
- if (lastSpace > 0)
- {
- // replace space with newline
- out << line.substr (0, lastSpace) << std::endl << indent.str ();
- line.erase (0, lastSpace + 1);
- indentSize = indent.str ().length ();
- }
- else
- {
- // force wrap
- out << line.substr (0, maxChars) << "\\" << std::endl;
- line.erase (0, maxChars);
- indentSize = 0;
- }
- }
- out << line << std::endl;
-}
-
static std::string keySetToCCode (kdb::KeySet set)
{
using namespace kdb;
@@ -271,7 +207,7 @@ static std::string keySetToCCode (kdb::KeySet set)
std::stringstream ss;
while (std::getline (is, line))
{
- printWrapped (ss, line, 120);
+ ss << line << std::endl;
}
return ss.str ();
|
pbio/motor_process: restart timer instead of reset
This ensures we (re)start counting from this point. This ensures a slightly more constant (if slower) loop time on ev3dev, which takes a long time to run the control update.
While technically less acurate on stm32, the difference is negligible. | @@ -76,7 +76,7 @@ PROCESS_THREAD(pbio_motor_process, ev, data) {
}
// Reset timer to wait for next update
- etimer_reset(&timer);
+ etimer_restart(&timer);
}
PROCESS_END();
|
sim: fix signal crash in SMP mode
reproduce:
sim:smp
ostest
reason:
shouldn't do sim_sigdeliver() in irq handler | @@ -89,10 +89,6 @@ void *up_doirq(int irq, void *context)
CURRENT_REGS = NULL;
#ifdef CONFIG_SMP
- /* Handle signal */
-
- sim_sigdeliver();
-
/* Then switch contexts */
longjmp(regs, 1);
|
tests: add rms check for slurm to confirm x11 support included | @@ -17,3 +17,8 @@ fi
run ls /usr/lib64/slurm/job_submit_lua.so
assert_success
}
+
+@test "[slurm] check for --x11 option" {
+ run srun --x11 --pty /bin/bash
+ assert_output "srun: error: No DISPLAY variable set, cannot setup x11 forwarding."
+}
|
Format jpm with spork. | @@ -560,7 +560,6 @@ int main(int argc, const char **argv) {
(meta :static-entry)
"(JanetTable *);\n"))
-
# Build image
(def image (marshal main mdict))
# Make image byte buffer
|
[build] Enable DCE for bare-metal platforms
ISSUE: | @@ -38,7 +38,7 @@ _LD_DCE_FLAG_PRINT_SECTIONS=
when ($OS_DARWIN == "yes") {
_LD_DCE_FLAG_GC_SECTIONS=-Wl,-dead_strip
}
-elsewhen ($OS_LINUX == "yes" || $OS_ANDROID == "yes") {
+elsewhen ($OS_LINUX == "yes" || $OS_ANDROID == "yes" || $OS_NONE == "yes") {
_LD_DCE_FLAG_GC_SECTIONS=-Wl,--gc-sections
when ($LINKER_DCE_PRINT_SECTIONS == "yes") {
_LD_DCE_FLAG_PRINT_SECTIONS=-Wl,--print-gc-sections
|
improve reading of samples in scanner.c | @@ -14,7 +14,7 @@ int main()
{
int fd, sock_server, sock_client;
struct sockaddr_in addr;
- int i, j, counter, position, size, yes = 1;
+ int i, j, n, counter, position, size, yes = 1;
uint32_t command, code, data, period, pulses, shdelay, shtime;
uint32_t *coordinates;
uint64_t buffer[1024], tmp;
@@ -191,22 +191,24 @@ int main()
/* start scanning */
counter = 0;
position = 0;
+ n = 1024;
/* stop pulse generators */
*rst &= ~1;
/* reset DAC and ADC FIFO */
- *rst |= 2;
- *rst &= ~2;
+ *rst |= 2; *rst &= ~2;
- for(i = 0; i < size; ++i)
+ while(counter < size)
{
/* read IN1 and IN2 samples from ADC FIFO */
- if(*rd_cntr >= 2048 && counter < size)
+ if(n > size - counter) n = size - counter;
+ if(*rd_cntr < n * 2) usleep(500);
+ if(*rd_cntr >= n * 2 && counter < size)
{
- for(j = 0; j < 1024; ++j) buffer[j] = *adc;
- if(send(sock_client, buffer, 8192, MSG_NOSIGNAL) < 0) break;
- counter += 1024;
+ for(j = 0; j < n; ++j) buffer[j] = *adc;
+ if(send(sock_client, buffer, n * 8, MSG_NOSIGNAL) < 0) break;
+ counter += n;
}
/* write OUT1 and OUT2 samples to DAC FIFO */
@@ -218,20 +220,6 @@ int main()
/* start pulse generators */
*rst |= 1;
-
- if(*rd_cntr < 2048) usleep(500);
- }
-
- /* read remaining IN1 and IN2 samples from ADC FIFO */
- while(counter < size)
- {
- if(*(uint16_t *)(sts + 2) >= 2048)
- {
- for(j = 0; j < 1024; ++j) buffer[j] = *adc;
- if(send(sock_client, buffer, 8192, MSG_NOSIGNAL) < 0) break;
- counter += 1024;
- }
- if(*rd_cntr < 2048) usleep(500);
}
break;
|
Fixed payment processing | @@ -64,12 +64,14 @@ namespace MiningForce.Blockchain.Bitcoin
var pageCount = (int) Math.Ceiling(blocks.Length / (double) pageSize);
var result = new List<Block>();
+ var immatureCount = 0;
+
for (int i = 0; i < pageCount; i++)
{
// get a page full of blocks
var page = blocks
.Skip(i * pageSize)
- .Take(pageCount)
+ .Take(pageSize)
.ToArray();
// build command batch (block.TransactionConfirmationData is the hash of the blocks coinbase transaction)
@@ -116,6 +118,7 @@ namespace MiningForce.Blockchain.Bitcoin
{
case "immature":
// coinbase transaction that is not spendable yet, do nothing and let it mature
+ immatureCount++;
break;
case "generate":
|
chat-cli: Update ;help link
The link used here resolves with a 301 to the proper page for messaging usage, but not actually the 'messaging' section of that page. This commit provides a more direct link to the exact instructions. | ++ help
^- (quip move _this)
=- [[- ~] this]
- (print:sh-out "see https://urbit.org/docs/using/messaging/")
+ (print:sh-out "see https://urbit.org/using/operations/using-your-ship/#messaging")
--
--
::
|
workflows: fix ordering issue | @@ -337,7 +337,9 @@ jobs:
id-token: write
runs-on: [ ubuntu-latest ]
environment: ${{ inputs.environment }}
- needs: call-build-images-push-manifests
+ needs:
+ - call-build-images-push-manifests
+ - call-build-images-multiarch
steps:
- name: Install cosign
uses: sigstore/cosign-installer@main
|
Fix no gop functionality | @@ -471,7 +471,7 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
return 0;
}
- int gop_layer = ctrl->cfg.gop_len != 1 ? ctrl->cfg.gop[state->frame->gop_offset].layer - 1 : 0;
+ int gop_layer = ctrl->cfg.gop_len != 0 ? ctrl->cfg.gop[state->frame->gop_offset].layer - 1 : 0;
// Assign correct depth limit
constraint_t* constr = state->constraint;
|
client session MAINTENANCE remove useless cast | @@ -1558,7 +1558,7 @@ _nc_connect_libssh(ssh_session ssh_session, struct ly_ctx *ctx, struct nc_keepal
session->ti.libssh.session = ssh_session;
/* was port set? */
- ssh_options_get_port(ssh_session, (unsigned int *)&port);
+ ssh_options_get_port(ssh_session, &port);
if (ssh_options_get(ssh_session, SSH_OPTIONS_HOST, &host) != SSH_OK) {
/*
|
drm.c: Initialize surface to NULL | @@ -580,7 +580,7 @@ update_outputs(struct chck_pool *outputs)
if (drm.use_egldevice && !set_crtc_default_mode(info))
continue;
- struct gbm_surface *surface;
+ struct gbm_surface *surface = NULL;
if (!drm.use_egldevice && !(surface = gbm_surface_create(drm.device, info->width, info->height, GBM_BO_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING)))
continue;
|
options/ansi: Add localeconv() for C locale | +#include <limits.h>
#include <locale.h>
#include <string.h>
#include <mlibc/debug.hpp>
#include <frg/optional.hpp>
+namespace {
+ // Values of the C locale are defined by the C standard.
+ lconv c_locale_lconv = {
+ const_cast<char *>("."), // decimal_point
+ const_cast<char *>(""), // thousands_sep
+ const_cast<char *>(""), // grouping
+ const_cast<char *>(""), // mon_decimal_point
+ const_cast<char *>(""), // mon_thousands_sep
+ const_cast<char *>(""), // mon_grouping
+ const_cast<char *>(""), // positive_sign
+ const_cast<char *>(""), // negative_sign
+ const_cast<char *>(""), // currency_symbol
+ CHAR_MAX, // frac_digits
+ CHAR_MAX, // p_cs_precedes
+ CHAR_MAX, // n_cs_precedes
+ CHAR_MAX, // p_sep_by_space
+ CHAR_MAX, // n_sep_by_space
+ CHAR_MAX, // p_sign_posn
+ CHAR_MAX, // n_sign_posn
+ const_cast<char *>(""), // int_curr_symbol
+ CHAR_MAX, // int_frac_digits
+ CHAR_MAX, // int_p_cs_precedes
+ CHAR_MAX, // int_n_cs_precedes
+ CHAR_MAX, // int_p_sep_by_space
+ CHAR_MAX, // int_n_sep_by_space
+ CHAR_MAX, // int_p_sign_posn
+ CHAR_MAX // int_n_sign_posn
+ };
+}
+
struct __Mlibc_LocaleDesc {
// identifier of this locale. used in setlocale()
const char *locale;
@@ -93,8 +124,7 @@ char *setlocale(int category, const char *locale) {
}
struct lconv *localeconv(void) {
- __ensure(!"Not implemented");
- __builtin_unreachable();
+ return &c_locale_lconv;
}
locale_t newlocale(int category_mask, const char *locale, locale_t base) {
|
GetNanMode should work with any feature
for ctrs it just forbidden always | @@ -52,14 +52,15 @@ namespace NCatboostCuda {
}
ENanMode GetNanMode(const ui32 featureId) const {
+ ENanMode nanMode = ENanMode::Forbidden;
+ if (FeatureManagerIdToDataProviderId.has(featureId)) {
CB_ENSURE(IsFloat(featureId));
const ui32 dataProviderId = FeatureManagerIdToDataProviderId[featureId];
if (NanModes.has(dataProviderId)) {
- return NanModes.at(dataProviderId);
- } else {
- MATRIXNET_WARNING_LOG << "NanMode called for feature without binarization" << Endl;
- return ENanMode::Forbidden;
+ nanMode = NanModes.at(dataProviderId);
+ }
}
+ return nanMode;
}
const TVector<float>& GetFloatFeatureBorders(const TFloatValuesHolder& feature) const {
|
[software] Do not strip debug symbols from Halide | @@ -30,7 +30,6 @@ $(BINARIES): $(BIN_DIR)/$(APP_PREFIX)%: %/$(PIPELINE) %/main.c.o $(RUNTIME) $(L
mkdir -p $(dir $@)
$(RISCV_CC) -I$(HALIDE_INCLUDE) $(RISCV_LDFLAGS) -o $@ $(filter-out $(LINKER_SCRIPT),$^) -T$(RUNTIME_DIR)/link.ld
$(RISCV_OBJDUMP) $(RISCV_OBJDUMP_FLAGS) -D $@ > [email protected]
- $(RISCV_STRIP) $@ -S --strip-unneeded
# Build Halide application
%.bin: %.cpp
|
Formatter: Fixed padding of immediate values | @@ -517,19 +517,20 @@ static ZydisStatus ZydisPrintImmIntel(const ZydisFormatter* formatter, ZydisStri
{
case 8:
return ZydisStringAppendHexS(string, (ZydisI8)operand->imm.value.s,
- formatter->formatImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
formatter->hexSuffix);
case 16:
return ZydisStringAppendHexS(string, (ZydisI16)operand->imm.value.s,
- formatter->formatImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
formatter->hexSuffix);
case 32:
return ZydisStringAppendHexS(string, (ZydisI32)operand->imm.value.s,
- formatter->formatImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
formatter->hexSuffix);
case 64:
- return ZydisStringAppendHexS(string, operand->imm.value.s, formatter->formatImm,
- formatter->hexUppercase, formatter->hexPrefix, formatter->hexSuffix);
+ return ZydisStringAppendHexS(string, operand->imm.value.s,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexSuffix);
default:
return ZYDIS_STATUS_INVALID_PARAMETER;
}
@@ -537,17 +538,21 @@ static ZydisStatus ZydisPrintImmIntel(const ZydisFormatter* formatter, ZydisStri
switch (instruction->operandWidth)
{
case 8:
- return ZydisStringAppendHexU(string, (ZydisU8)operand->imm.value.u, formatter->formatImm,
- formatter->hexUppercase, formatter->hexPrefix, formatter->hexSuffix);
+ return ZydisStringAppendHexU(string, (ZydisU8)operand->imm.value.u,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexSuffix);
case 16:
- return ZydisStringAppendHexU(string, (ZydisU16)operand->imm.value.u, formatter->formatImm,
- formatter->hexUppercase, formatter->hexPrefix, formatter->hexSuffix);
+ return ZydisStringAppendHexU(string, (ZydisU16)operand->imm.value.u,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexSuffix);
case 32:
- return ZydisStringAppendHexU(string, (ZydisU32)operand->imm.value.u, formatter->formatImm,
- formatter->hexUppercase, formatter->hexPrefix, formatter->hexSuffix);
+ return ZydisStringAppendHexU(string, (ZydisU32)operand->imm.value.u,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexSuffix);
case 64:
- return ZydisStringAppendHexU(string, operand->imm.value.u, formatter->formatImm,
- formatter->hexUppercase, formatter->hexPrefix, formatter->hexSuffix);
+ return ZydisStringAppendHexU(string, operand->imm.value.u,
+ formatter->hexPaddingImm, formatter->hexUppercase, formatter->hexPrefix,
+ formatter->hexSuffix);
default:
return ZYDIS_STATUS_INVALID_PARAMETER;
}
|
Handle AFU JSON that describes multiple VFs | @@ -118,9 +118,12 @@ def flatten_json(subargs):
entries['afu_image_' + tag] = v
# Some special names, taken from other levels
- accel = image['accelerator-clusters'][0]
- entries['afu_accel_name'] = '"' + accel['name'] + '"'
- entries['afu_accel_uuid'] = accel['accelerator-type-uuid']
+ entries['afu_accel_name'] = []
+ entries['afu_accel_uuid'] = []
+ for accel in image['accelerator-clusters']:
+ entries['afu_accel_name'].append('"' + accel['name'] + '"')
+ entries['afu_accel_uuid'].append(accel['accelerator-type-uuid'])
+
try:
# May not be present. (Will become required eventually.)
entries['afu_top_ifc'] = '"' + \
@@ -143,10 +146,20 @@ def json_info(entries, subargs):
p.write('#ifndef __AFU_JSON_INFO__\n')
p.write('#define __AFU_JSON_INFO__\n\n')
for k in sorted(entries.keys()):
- v = entries[k]
+ e = entries[k]
+ if (not isinstance(e, list)):
+ p.write('#define {0} {1}\n'.format(k.upper(), e))
+ else:
+ # Vector type -- emit separate #defines for each entry
+ for i in range(len(e)):
+ v = e[i]
if (k == 'afu_accel_uuid'):
v = '"' + v.upper() + '"'
+ if (i == 0):
+ # Backward compatibility -- always emit index 0 of
+ # vectors without the trailing 0 in the key
p.write('#define {0} {1}\n'.format(k.upper(), v))
+ p.write('#define {0}{1} {2}\n'.format(k.upper(), i, v))
p.write('\n#endif // __AFU_JSON_INFO__\n')
# Verilog header
@@ -157,10 +170,20 @@ def json_info(entries, subargs):
p.write('`ifndef __AFU_JSON_INFO__\n')
p.write('`define __AFU_JSON_INFO__\n\n')
for k in sorted(entries.keys()):
- v = entries[k]
+ e = entries[k]
+ if (not isinstance(e, list)):
+ p.write('`define {0} {1}\n'.format(k.upper(), e))
+ else:
+ # Vector type -- emit separate #defines for each entry
+ for i in range(len(e)):
+ v = e[i]
if (k == 'afu_accel_uuid'):
- v = "128'h" + entries[k].replace('-', '_')
+ v = "128'h" + v.replace('-', '_')
+ if (i == 0):
+ # Backward compatibility -- always emit index 0 of
+ # vectors without the trailing 0 in the key
p.write('`define {0} {1}\n'.format(k.upper(), v))
+ p.write('`define {0}{1} {2}\n'.format(k.upper(), i, v))
p.write('\n`endif // __AFU_JSON_INFO__\n')
|
scripts: cp instead of mv
see | @@ -16,7 +16,7 @@ ctest --output-on-failure -LE external
# rotate backup of previous website
rm -rf /usr/local/share/elektra/tool_data_backup
-mv /usr/local/share/elektra/tool_data /usr/local/share/elektra/tool_data_backup || /bin/true
+cp -ra /usr/local/share/elektra/tool_data /usr/local/share/elektra/tool_data_backup
# if tests were ok, we can install
make install
|
Add backlight to hardware-test | using namespace blit;
void init() {
- set_screen_mode(screen_mode::hires);
+ set_screen_mode(screen_mode::lores);
}
void render(uint32_t time) {
@@ -80,9 +80,9 @@ void render(uint32_t time) {
fb.text(buf_joystick_x, &minimal_font[0][0], point(5, 80+7));
fb.text(buf_joystick_y, &minimal_font[0][0], point(5, 80+14));
- char buf_tilt_x[60] = "";
- char buf_tilt_y[60] = "";
- char buf_tilt_z[60] = "";
+ char buf_tilt_x[10] = "";
+ char buf_tilt_y[10] = "";
+ char buf_tilt_z[10] = "";
sprintf(buf_tilt_x, "X: %d", (int)(blit::tilt.x * 1024));
sprintf(buf_tilt_y, "Y: %d", (int)(blit::tilt.y * 1024));
@@ -103,11 +103,26 @@ void render(uint32_t time) {
fb.text(buf_tilt_z, &minimal_font[0][0], point(80, 80+21));
blit::LED = rgb(
- (float)((sin(blit::now()) + 1) / 2.0f),
- (float)((cos(blit::now()) + 1) / 2.0f),
- (float)((sin(blit::now()) + 1) / 2.0f)
+ (float)((sin(blit::now() / 100.0f) + 1) / 2.0f),
+ (float)((cos(blit::now() / 100.0f) + 1) / 2.0f),
+ (float)((sin(blit::now() / 100.0f) + 1) / 2.0f)
);
+ if (dpad_u) {
+ blit::backlight += 1.0f / 256.0f;
+ }
+ if (dpad_d) {
+ blit::backlight -= 1.0f / 256.0f;
+ }
+ blit::backlight = std::fmin(1.0f, std::fmax(0.0f, blit::backlight));
+
+ char buf_backlight[10] = "";
+ sprintf(buf_backlight, "%d", (int)(blit::backlight * 1024));
+
+ fb.pen(rgba(255, 255, 255));
+ fb.text("Backlight:", &minimal_font[0][0], point(5, 80+21));
+ fb.text(buf_backlight, &minimal_font[0][0], point(5, 80+28));
+
}
void update(uint32_t time) {
|
apps: Fix bug by calling getrandom | #include <unistd.h>
#include <string.h>
+#include <sys/random.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
@@ -128,12 +129,12 @@ static const uint8_t g_partition_type_swap[16] =
static void get_uuid(FAR uint8_t *uuid)
{
- int fd;
- fd = open("/dev/urandom", O_RDONLY);
- if (fd > 0)
+ /* call getrandom to read /dev/urandom */
+
+ if (getrandom(uuid, 16, 0) < 0)
{
- read(fd, uuid, 16);
- close(fd);
+ fprintf(stderr, "error read primary partition table\n");
+ return;
}
}
|
GFIR: assume max filter length when coef count > auto length | @@ -835,6 +835,12 @@ int LMS7_Device::SetGFIRCoef(bool tx, unsigned chan, lms_gfir_t filt, const doub
else
L = div;
+ if ((filt==LMS_GFIR3 ? 15 : 5)*L < count)
+ {
+ lime::warning("GFIR: disabling auto coef ordering (auto length < coef count)");
+ L = 8;
+ }
+
double max=0;
for (unsigned i=0; i< count; i++)
if (fabs(coef[i])>max)
@@ -925,7 +931,7 @@ int LMS7_Device::GetGFIRCoef(bool tx, unsigned chan, lms_gfir_t filt, double* co
for (int i = 0; i < (filt==LMS_GFIR3 ? 120 : 40) ; i++)
{
coef[i] = coef16[i];
- coef[i] /= (1<<15);
+ coef[i] /= 32767.0;
}
}
return (filt==LMS_GFIR3) ? 120 : 40;
|
tests/python_bart: remove superfluous test
this is already tested in tests/pythoncfl.mk | @@ -4,15 +4,6 @@ tests/test-python-bart: $(TOOLDIR)/python/bart.py bart
PYTHONPATH=$(TOOLDIR)/python python3 -c "import bart; bart.bart(0,'version -V')"
touch $@
-tests/test-python-cfl: $(TOOLDIR)/python/bart.py $(TESTS_OUT)/shepplogan.ra nrmse
- set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
- PYTHONPATH=$(TOOLDIR)/python python3 -c "import cfl; \
- ph=cfl.readcfl('$(TESTS_OUT)/shepplogan.ra'); \
- cfl.writecfl('shepplogan_cfl', ph)" ;\
- $(TOOLDIR)/nrmse -t 0. $(TESTS_OUT)/shepplogan.ra shepplogan_cfl ;\
- rm *.cfl *.hdr ; cd .. ; rmdir $(TESTS_TMP)
- touch $@
-
tests/test-python-bart-io: $(TOOLDIR)/python/bart.py $(TESTS_OUT)/shepplogan.ra bart nrmse
set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
PYTHONPATH=$(TOOLDIR)/python python3 -c "import bart; import cfl; \
@@ -32,6 +23,6 @@ tests/test-python-bart-io-kwargs: $(TOOLDIR)/python/bart.py $(TESTS_OUT)/shepplo
rm *.cfl *.hdr ; cd .. ; rmdir $(TESTS_TMP)
touch $@
-TESTS_PYTHON += tests/test-python-bart tests/test-python-cfl
+TESTS_PYTHON += tests/test-python-bart
TESTS_PYTHON += tests/test-python-bart-io tests/test-python-bart-io-kwargs
|
Rdoc Markup link format and add links where helpful. | @@ -21,8 +21,8 @@ function properly. libxml2, in turn, depends on:
If you are running Linux or Unix you'll need a C compiler so the
extension can be compiled when it is installed. If you are running
Windows, then install the x64-mingw32 gem or build it yourself using
-Devkit (http://rubyinstaller.org/add-ons/devkit/) or
-msys2 (https://msys2.github.io/).
+Devkit[http://rubyinstaller.org/add-ons/devkit/] or
+msys2[https://msys2.github.io/].
== Installation
The easiest way to install libxml-ruby is via RubyGems. To install:
@@ -39,7 +39,7 @@ on your <tt>PATH</tt>.
The gem also includes a Microsoft VC++ 2012 solution and XCode 5 project - these
are very useful for debugging.
-libxml-ruby's source codes lives on Github at https://github.com/xml4r/libxml-ruby.
+libxml-ruby's source codes lives on GitHub[https://github.com/xml4r/libxml-ruby].
== Getting Started
Using libxml is easy. First decide what parser you want to use:
@@ -72,14 +72,13 @@ This can be done using libxml's powerful set of validators:
* Relax Schemas (LibXML::XML::RelaxNG)
* XML Schema (LibXML::XML::Schema)
-Finally, if you'd like to use XSL Transformations to process data,
-then install the libxslt gem which is available at
-https://github.com/xml4r/libxslt-ruby.
+Finally, if you'd like to use XSL Transformations to process data, then install
+the {libxslt gem}[https://github.com/xml4r/libxslt-rubygem].
== Usage
-For information about using libxml-ruby please refer to its documentation at
-http://xml4r.github.com/libxml-ruby/rdoc/index.html. Some tutorials are also
-available at https://github.com/xml4r/libxml-ruby/wiki.
+For information about using libxml-ruby please refer to its
+documentation[http://xml4r.github.com/libxml-ruby/rdoc/index.html]. Some tutorials are also
+available[https://github.com/xml4r/libxml-ruby/wiki].
All libxml classes are in the LibXML::XML module. The easiest
way to use libxml is to <tt>require 'xml'</tt>. This will mixin
@@ -157,8 +156,9 @@ From https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
Documentation is available via rdoc, and is installed automatically with the
gem.
-libxml-ruby's online documentation is generated using Hanna, which is a
-development gem dependency.
+libxml-ruby's {online
+documentation}[https://xml4r.github.io/libxml-ruby/rdoc/index.html] is generated
+using Hanna, which is a development gem dependency.
Note that older versions of Rdoc, which ship with Ruby 1.8.x, will report
a number of errors. To avoid them, install Rdoc 2.1 or higher. Once you have
@@ -168,8 +168,8 @@ includes. An easy way to do that is rename the directory
<tt>ruby/lib/ruby/1.8/rdoc_old</tt>.
== Support
-If you have any questions about using libxml-ruby, please report them to
-Git Hub at https://github.com/xml4r/libxml-ruby/issues
+If you have any questions about using libxml-ruby, please report an issue
+on GitHub[https://github.com/xml4r/libxml-ruby/issues].
== Memory Management
libxml-ruby automatically manages memory associated with the
|
Fix build if only python3 is available | @@ -117,14 +117,14 @@ add_custom_command(
OUTPUT create_zero_base_enclave.conf
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make-oesign-config.py
COMMAND
- python ${CMAKE_CURRENT_SOURCE_DIR}/make-oesign-config.py --config_file
+ ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/make-oesign-config.py --config_file
create_zero_base_enclave.conf --create_zero_base_enclave 1)
add_custom_command(
OUTPUT create_zero_base_enclave_w_start_address.conf
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make-oesign-config.py
COMMAND
- python ${CMAKE_CURRENT_SOURCE_DIR}/make-oesign-config.py --config_file
+ ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/make-oesign-config.py --config_file
create_zero_base_enclave_w_start_address.conf --create_zero_base_enclave 1
--start_address 196608)
|
options/posix: Change realpath to use strrchr instead of strchr when
removing .. segments from paths | @@ -267,7 +267,7 @@ char *realpath(const char *path, char *out) {
}else if(s_view == "..") {
// Remove a single segment from resolv.
if(resolv.size() > 1) {
- auto slash = strchr(resolv.data(), '/');
+ auto slash = strrchr(resolv.data(), '/');
__ensure(slash); // We never remove the leading sla.
resolv.resize((slash - resolv.data()) + 1);
*slash = 0; // Replace the slash by a null-terminator.
|
decision: apply reformat | @@ -123,7 +123,6 @@ We remove the parent key of `kdbGet` and `kdbSet` and always return the keyset o
> However, in an application that used `system:/foo` as the parent, the `meta:/override` would work with your proposal.
> To me that seems like very confusing behavior, because both the application and the plugin seemingly use the same parent key.
-
### Data restrictions
@kodebach wrote:
@@ -488,7 +487,7 @@ We want to measure the following properties:
- Example Key + 2 Duplicates: three instances of the key defined above, two of them are duplications of the first
| Approach | Empty KeySet | Empty Key | Empty Key (with name) | Empty Key (with name + data) | Single Example Key | Example Key + 1 Duplicate | Example Key + 2 Duplicates |
-|:--------------------------------------------------|-------------:|----------:|----------------------:|-----------------------------:|-------------------:|--------------------------:|---------------------------:|
+| :------------------------------------------------ | -----------: | --------: | --------------------: | ---------------------------: | -----------------: | ------------------------: | -------------------------: |
| Current Implementation | 64 | 64 | 64 | 64 | 153 | 306 | 459 |
| In-Memory COW cache (without additional pointers) | 64 | 64 | 64 | 64 | 153 | 217 | 281 |
| In-Memory COW cache (with additional pointers) | 64 | 80 | 80 | 80 | 169 | 249 | 329 |
@@ -554,13 +553,12 @@ For allocations want to measure the following properties:
- Key + 2 Duplications: how many objects to allocate for a full key + 2 duplications
| Approach | Empty Key | Empty Key (with name) | Empty Key (with name + data) | Duplication | Key + 1 Duplication | Key + 2 Duplications |
-|:--------------------------------------------------|----------:|----------------------:|-----------------------------:|------------:|--------------------:|---------------------:|
+| :------------------------------------------------ | --------: | --------------------: | ---------------------------: | ----------: | ------------------: | -------------------: |
| Current Implementation | 1 | 1 | 1 | 1 | 2 | 3 |
| In-Memory COW cache (without additional pointers) | 1 | 1 | 1 | 1 | 2 | 3 |
| In-Memory COW cache (with additional pointers) | 1 | 1 | 1 | 1 | 2 | 3 |
| Full-blown COW implementation | 1 | 2 | 3 | 1 | 4 | 5 |
-
## Decision
## Rationale
|
add format string | @@ -208,10 +208,10 @@ static void cmd_exec(FILE *fp, const char request[], int allow_debug)
}
} else {
// Print usage
- fprintf(fp, g_server_usage);
+ fprintf(fp, "%s", g_server_usage);
if (allow_debug) {
- fprintf(fp, g_server_usage_debug);
+ fprintf(fp, "%s", g_server_usage_debug);
}
}
}
|
Use memcpy for load operations | @@ -700,6 +700,9 @@ d_m3SetRegisterSetSlot (f64, _fp0)
#endif
+// memcpy here is to support non-aligned access on some platforms.
+// TODO: check if this is optimized-out on x86/x64, and performance impact
+
#define d_m3Load(REG,DEST_TYPE,SRC_TYPE) \
d_m3Op(DEST_TYPE##_Load_##SRC_TYPE##_r) \
{ \
@@ -711,7 +714,9 @@ d_m3Op(DEST_TYPE##_Load_##SRC_TYPE##_r) \
\
if (src8 + sizeof (SRC_TYPE) <= end) \
{ \
- REG = (DEST_TYPE) (* (SRC_TYPE *) src8); \
+ SRC_TYPE value; \
+ memcpy(&value, src8, sizeof(value)); \
+ REG = (DEST_TYPE)value; \
return nextOp (); \
} \
else d_outOfBounds; \
@@ -726,7 +731,9 @@ d_m3Op(DEST_TYPE##_Load_##SRC_TYPE##_s) \
\
if (src8 + sizeof (SRC_TYPE) <= end) \
{ \
- REG = (DEST_TYPE) (* (SRC_TYPE *) src8); \
+ SRC_TYPE value; \
+ memcpy(&value, src8, sizeof(value)); \
+ REG = (DEST_TYPE)value; \
return nextOp (); \
} \
else d_outOfBounds; \
|
HV: trusty: refine version checking when initializing trusty
Replace if--else logic with switch--case when checking interface
version.
Acked-by: Zhu Bing | @@ -417,28 +417,30 @@ bool initialize_trusty(struct vcpu *vcpu, uint64_t param)
return false;
}
- if (boot_param.version > TRUSTY_VERSION_2) {
- dev_dbg(ACRN_DBG_TRUSTY, "%s: Version(%u) not supported!\n",
- __func__, boot_param.version);
- return false;
- }
-
- trusty_entry_gpa = (uint64_t)boot_param.entry_point;
- trusty_base_gpa = (uint64_t)boot_param.base_addr;
- trusty_mem_size = boot_param.mem_size;
-
- if (boot_param.version >= TRUSTY_VERSION_2) {
- trusty_entry_gpa |=
+ switch (boot_param.version) {
+ case TRUSTY_VERSION_2:
+ trusty_entry_gpa = ((uint64_t)boot_param.entry_point) |
(((uint64_t)boot_param.entry_point_high) << 32);
- trusty_base_gpa |=
+ trusty_base_gpa = ((uint64_t)boot_param.base_addr) |
(((uint64_t)boot_param.base_addr_high) << 32);
/* copy rpmb_key from OSloader */
(void)memcpy_s(&g_key_info.rpmb_key[0][0], 64U,
&boot_param.rpmb_key[0], 64U);
(void)memset(&boot_param.rpmb_key[0], 0U, 64U);
+ break;
+ case TRUSTY_VERSION:
+ trusty_entry_gpa = (uint64_t)boot_param.entry_point;
+ trusty_base_gpa = (uint64_t)boot_param.base_addr;
+ break;
+ default:
+ dev_dbg(ACRN_DBG_TRUSTY, "%s: Version(%u) not supported!\n",
+ __func__, boot_param.version);
+ return false;
}
+ trusty_mem_size = boot_param.mem_size;
+
create_secure_world_ept(vm, trusty_base_gpa, trusty_mem_size,
TRUSTY_EPT_REBASE_GPA);
trusty_base_hpa = vm->sworld_control.sworld_memory.base_hpa;
|
Fix Init Crash | #include "smessage.h"
#include "ringsig.h"
-#ifdef USE_IPFS
-#include <ipfs/client.h>
-#include <ipfs/http/transport.h>
-#endif
-
#ifdef USE_NATIVETOR
#include "tor/anonymize.h" //Tor native optional integration (Flag -nativetor=1)
#endif
@@ -1381,29 +1376,6 @@ bool AppInit2()
pblockAddrIndex->nHeight, GetTimeMillis() - nStart);
}
- //Init IPFS
-#ifdef USE_IPFS
- uiInterface.InitMessage(_("Connecting to IPFS..."));
-
- try {
- std::stringstream contents;
- ipfs::Json version;
-
- ipfs::Client client("ipfs.infura.io:5001");
- uiInterface.InitMessage(_("Connected to IPFS"));
- printf("Jupiter: IPFS Peer Connected: ipfs.infura.io\n");
-
- client.Version(&version);
- std::string v = version.dump();
-
- const std::string& vv = version["Version"].dump();
- printf("Jupiter: IPFS Peer Version: %s\n", vv.c_str());
-
- } catch (const std::exception& e) {
- std::cerr << e.what() << std::endl;
- }
-#endif
-
//// debug print
printf("mapBlockIndex.size() = %" PRIszu"\n", mapBlockIndex.size());
printf("mapBlockThinIndex.size() = %u\n", mapBlockThinIndex.size());
|
Removed duplicate jobs | @@ -514,25 +514,6 @@ jobs:
BLDWRAP_POSTGRES_CONF_ADDONS: ""
TEST_OS: "centos"
-- name: QP_runaway-query
- plan:
- - aggregate:
- - get: gpdb_src
- passed: [compile_gpdb_centos6]
- trigger: true
- - get: bin_gpdb
- passed: [compile_gpdb_centos6]
- resource: bin_gpdb_centos6
- - get: centos-gpdb-dev-6
- - task: runaway-query
- timeout: 3h
- file: gpdb_src/concourse/tasks/tinc_gpdb.yml
- image: centos-gpdb-dev-6
- params:
- MAKE_TEST_COMMAND: runaway_query
- BLDWRAP_POSTGRES_CONF_ADDONS: ""
- TEST_OS: "centos"
-
- name: regression_tests_gphdfs_centos
plan:
- aggregate:
@@ -980,25 +961,6 @@ jobs:
<<: *pulse_properties
PULSE_PROJECT_NAME: "GPDB-5-CCLE"
-- name: QP_memory-accounting
- plan:
- - aggregate:
- - get: gpdb_src
- passed: [compile_gpdb_centos6]
- trigger: true
- - get: bin_gpdb
- passed: [compile_gpdb_centos6]
- resource: bin_gpdb_centos6
- - get: centos-gpdb-dev-6
- - task: memory-accounting
- timeout: 3h
- file: gpdb_src/concourse/tasks/tinc_gpdb.yml
- image: centos-gpdb-dev-6
- params:
- MAKE_TEST_COMMAND: memory_accounting
- BLDWRAP_POSTGRES_CONF_ADDONS: ""
- TEST_OS: "centos"
-
- name: QP_runaway-query
plan:
- aggregate:
@@ -1018,23 +980,6 @@ jobs:
BLDWRAP_POSTGRES_CONF_ADDONS: ""
TEST_OS: "centos"
-- name: regression_tests_gphdfs_centos
- plan:
- - aggregate:
- - get: gpdb_src
- passed: [gpdb_rc_packaging_centos]
- trigger: true
- - get: bin_gpdb
- passed: [gpdb_rc_packaging_centos]
- resource: bin_gpdb_centos6
- - get: centos-gpdb-dev-6
- - task: regression_tests_gphdfs
- file: gpdb_src/concourse/tasks/regression_tests_gphdfs.yml
- image: centos-gpdb-dev-6
- params:
- TARGET_OS: centos
- TARGET_OS_VERSION: 6
-
- name: QP_optimizer-functional
plan:
- aggregate:
|
gpcloud: fix broken gps3ext symbolic link | @@ -46,7 +46,7 @@ mkgphdfs:
mkgpcloud:
PATH=$(INSTLOC)/bin:$(PATH) $(MAKE) -C gpcloud USE_PGXS=1 install
PATH=$(INSTLOC)/bin:$(PATH) $(MAKE) -C gpcloud/bin/gpcheckcloud USE_PGXS=1 install
- ln -sf $(pkglibdir)/gpcloud.so $(pkglibdir)/gps3ext.so
+ ln -sf gpcloud.so $(pkglibdir)/gps3ext.so
# Only include include these files when running enterprise build
ENTERPRISE_TARGETS="mkgphdfs mkorafce mkplr"
|
benchmarks: fix plugingetset | @@ -25,11 +25,10 @@ int main (int argc, char ** argv)
typedef enum
{
BOTH,
- GET,
- Default = BOTH
+ GET
} Direction;
- Direction direction;
+ Direction direction = BOTH;
if (argc == 5) direction = GET;
const char * path = argv[1];
|
hw/drivers/lps33thw: Restore read error stats | @@ -375,6 +375,12 @@ lps33thw_i2c_get_regs(struct sensor_itf *itf, uint8_t reg, uint8_t size,
rc = i2cn_master_write_read_transact(itf->si_num, &wdata, &rdata,
MYNEWT_VAL(LPS33THW_I2C_TIMEOUT_TICKS) * (size + 1),
1, MYNEWT_VAL(LPS33THW_I2C_RETRIES));
+ if (rc) {
+ LPS33THW_LOG(ERROR, "I2C access failed at address 0x%02X\n",
+ itf->si_addr);
+ STATS_INC(g_lps33thwstats, read_errors);
+ return rc;
+ }
#endif
return rc;
|
run_babelstream.sh - add additional error checking. | @@ -41,8 +41,13 @@ omp_src="main.cpp OMPStream.cpp"
hip_src="main.cpp HIPStream.cpp"
std="-std=c++11"
+if [ -d $AOMP_REPOS_TEST/BabelStream ]; then
cd $AOMP_REPOS_TEST/BabelStream
rm -f results.txt
+else
+ echo "ERROR: BabelStream not found in $AOMP_REPOS_TEST."
+ exit 1
+fi
echo RUN_OPTIONS: $RUN_OPTIONS
for option in $RUN_OPTIONS; do
|
Add status text for unknown sids | @@ -485,6 +485,10 @@ static NTSTATUS NTAPI PhpTokenGroupResolveWorker(
PhSetListViewSubItem(context->ListViewHandle, lvItemIndex, PH_PROCESS_TOKEN_INDEX_NAME, PhGetString(fullUserName));
PhDereferenceObject(fullUserName);
}
+ else
+ {
+ PhSetListViewSubItem(context->ListViewHandle, lvItemIndex, PH_PROCESS_TOKEN_INDEX_NAME, L"[Unknown SID]");
+ }
}
PhFree(context->TokenGroupSid);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.