message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Fix PileupColumn.get_query_sequences documentation
Fix mark_matches ./, documentation to match pileup documentation.
Fixes | @@ -2939,7 +2939,7 @@ cdef class PileupColumn:
mark_matches: bool
- If True, output bases matching the reference as "," or "."
+ If True, output bases matching the reference as "." or ","
for forward and reverse strand, respectively. This mark
requires the reference sequence. If no reference is
present, this option is ignored.
|
decisions: small clarification | @@ -98,7 +98,8 @@ We remove the parent key of `kdbGet` and `kdbSet` and always return the keyset o
We keep a duplicated keyset in-memory and tag the keys as copy-on-write (COW).
From this keyset, we use `ksBelow` to return the correct keyset.
-If the user tries to change the keys, the value or metadata gets duplicated, so that the original keyset is not changed.
+If the user tries to change the value or metadata of these keys, the data gets duplicated.
+I.e. the original keyset is not changed.
The name is not relevant.
It is always read-only, because the key is in at least one keyset (the internal one).
Pseudo code example:
|
pack: do not add empty space on JSON formatting map keys | @@ -509,7 +509,7 @@ static int msgpack2json(char *buf, int *off, size_t left, const msgpack_object *
goto msg2json_end;
}
for (i=1; i<loop; i++) {
- if (!try_to_write(buf, off, left, ", ", 2) ||
+ if (!try_to_write(buf, off, left, ",", 1) ||
!msgpack2json(buf, off, left, p+i)) {
goto msg2json_end;
}
@@ -533,7 +533,7 @@ static int msgpack2json(char *buf, int *off, size_t left, const msgpack_object *
}
for (i = 1; i < loop; i++) {
if (
- !try_to_write(buf, off, left, ", ", 2) ||
+ !try_to_write(buf, off, left, ",", 1) ||
!msgpack2json(buf, off, left, &(p+i)->key) ||
!try_to_write(buf, off, left, ":", 1) ||
!msgpack2json(buf, off, left, &(p+i)->val) ) {
|
Update enc_flash to use erased val | @@ -162,7 +162,7 @@ enc_flash_is_empty(const struct hal_flash *h_dev, uint32_t addr, uint32_t len)
if (h_dev->hf_itf->hff_is_empty) {
return h_dev->hf_itf->hff_is_empty(h_dev, addr, len);
} else {
- return hal_flash_is_ones(h_dev, addr, len);
+ return hal_flash_is_erased(h_dev, addr, len);
}
}
@@ -183,6 +183,7 @@ enc_flash_init(const struct hal_flash *h_dev)
dev->efd_hal.hf_size = h_dev->hf_size;
dev->efd_hal.hf_sector_cnt = h_dev->hf_sector_cnt;
dev->efd_hal.hf_align = h_dev->hf_align;
+ dev->efd_hal.hf_erased_val = h_dev->hf_erased_val;
enc_flash_init_arch(dev);
|
rejects automatic %peer /sole from lib/drum | %- create-tapp-poke-peer
|_ [=bowl:gall state=state-type]
++ handle-poke ~(handle-poke handler bowl state)
- ++ handle-peer |=(* (async-fail:async-lib %no-peer-handler >path< ~))
+ ++ handle-peer
+ |= *
+ ~| %default-tapp-no-sole
+ ?< ?=([%sole *] +<)
+ (async-fail:async-lib %no-peer-handler >path< ~)
--
::
:: The form of a tapp that only handles pokes and peers
|
VM: init thread context ( required by JNI ) | @@ -548,6 +548,11 @@ ruby_thread_init_stack(rb_thread_t *th)
native_thread_init_stack(th);
}
+//RHO
+void *rho_nativethread_start();
+void rho_nativethread_end(void *);
+//RHO
+
static int
thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start)
{
@@ -568,6 +573,9 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
ruby_thread_set_native(th);
+ //RHO
+ void* rho_thread = rho_nativethread_start();
+ //RHO
th->machine.stack_start = stack_start;
#ifdef __ia64
th->machine.register_stack_start = register_stack_start;
@@ -668,6 +676,10 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
thread_cleanup_func(th, FALSE);
gvl_release(th->vm);
+ //RHO
+ rho_nativethread_end(rho_thread);
+ //RHO
+
return 0;
}
|
Coding style changes per feedback on PR. | @@ -189,9 +189,9 @@ log_reboot_write(const struct log_reboot_info *info)
return rc;
}
- memset(cbor_enc_buf, 0, sizeof(cbor_enc_buf));
+ memset(cbor_enc_buf, 0, sizeof cbor_enc_buf);
- cbor_buf_writer_init(&writer, cbor_enc_buf, sizeof(cbor_enc_buf));
+ cbor_buf_writer_init(&writer, cbor_enc_buf, sizeof cbor_enc_buf);
cbor_encoder_init(&enc, &writer.enc, 0);
rc = cbor_encoder_create_map(&enc, &map, CborIndefiniteLength);
if (rc != 0) {
@@ -205,7 +205,7 @@ log_reboot_write(const struct log_reboot_info *info)
cbor_encode_int(&map, reboot_cnt);
cbor_encode_text_stringz(&map, "img");
- snprintf(buf, sizeof(buf), "%u.%u.%u.%u",
+ snprintf(buf, sizeof buf, "%u.%u.%u.%u",
ver.iv_major, ver.iv_minor, ver.iv_revision,
(unsigned int)ver.iv_build_num);
cbor_encode_text_stringz(&map, buf);
@@ -224,11 +224,10 @@ log_reboot_write(const struct log_reboot_info *info)
/* If die filename is longer than 1/3 of total allocated
* buffer, then trim the filename from left. */
- if (strlen(info->file) > (sizeof(buf) / 3))
- {
- off = strlen(info->file) - (sizeof(buf)/3);
+ if (strlen(info->file) > ((sizeof buf) / 3)) {
+ off = strlen(info->file) - ((sizeof buf) / 3);
}
- snprintf(buf, sizeof(buf), "%s:%d",
+ snprintf(buf, sizeof buf, "%s:%d",
&info->file[off], info->line);
cbor_encode_text_stringz(&map, buf);
}
@@ -253,7 +252,9 @@ log_reboot_write(const struct log_reboot_info *info)
if (state_flags & IMGMGR_STATE_F_PENDING) {
off += snprintf(buf + off, sizeof buf - off, "%s ", "pending");
}
+ if (off > 1) {
buf[off - 1] = '\0';
+ }
cbor_encode_text_stringz(&map, buf);
/* Find length of the CBOR encoded log entry. */
|
fix missing t in xgemmt rule | @@ -1337,7 +1337,7 @@ cgemmt.$(SUFFIX) cgemmt.$(PSUFFIX) : gemmt.c ../param.h
zgemmt.$(SUFFIX) zgemmt.$(PSUFFIX) : gemmt.c ../param.h
$(CC) -c $(CFLAGS) $< -o $(@F)
-xgemmt.$(SUFFIX) xgemm.$(PSUFFIX) : gemmt.c ../param.h
+xgemmt.$(SUFFIX) xgemmt.$(PSUFFIX) : gemmt.c ../param.h
$(CC) -c $(CFLAGS) $< -o $(@F)
ssymm.$(SUFFIX) ssymm.$(PSUFFIX) : symm.c
|
dm: virtio-block: extend the max iov number of virtio block
It is found that windows will issue blkio operation with amount of
sectors in one request. This patch extends the max iov number of
virtio block to 256.
Acked-by: Yin Fengwei | #include <sys/uio.h>
#include <sys/unistd.h>
-#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */
+#define BLOCKIF_IOV_MAX 256 /* not practical to be IOV_MAX */
struct blockif_req {
struct iovec iov[BLOCKIF_IOV_MAX];
|
README: switch decoder example to simplified version | - Should compile on any platform with a working C11 compiler
- Tested on Windows, macOS, FreeBSD, Linux and UEFI, both user and kernel mode
-## Decoder Example
+## Examples
-The following example program uses Zydis to disassemble a given memory buffer and prints the output to the console ([more examples here](./examples/)).
+### Disassembler
-https://github.com/zyantific/zydis/blob/9cb54996c215422a398d7d2a287a08a185344200/examples/Disassemble.c#L27-L75
+The following example program uses Zydis to disassemble a given memory buffer and prints the output to the console.
+
+https://github.com/zyantific/zydis/blob/214536a814ba20d2e33d2a907198d1a329aac45c/examples/DisassembleSimple.c#L38-L63
The above example program generates the following output:
@@ -43,9 +45,9 @@ The above example program generates the following output:
007FFFFFFF400013 js 0x007FFFFFFF42DB15
```
-## Encoder Example
+### Encoder
-https://github.com/zyantific/zydis/blob/b37076e69f5aa149fde540cae43c50f15a380dfc/examples/EncodeMov.c#L32-L66
+https://github.com/zyantific/zydis/blob/b37076e69f5aa149fde540cae43c50f15a380dfc/examples/EncodeMov.c#L39-L62
The above example program generates the following output:
@@ -53,6 +55,10 @@ The above example program generates the following output:
48 C7 C0 37 13 00 00
```
+### More Examples
+
+More examples can be found in the [examples](./examples/) directory of this repository.
+
## Build
### Unix
|
Use both getrandom() and /dev/urandom by default on Linux.
getrandom() is now used on Linux by default when using Linux >= 3.17
and glibc >= 2.25
GH: | #include "rand_lcl.h"
#include <stdio.h>
-#ifdef OPENSSL_RAND_SEED_GETRANDOM
-# include <linux/random.h>
-#endif
-
#if (defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI)) && \
!defined(OPENSSL_RAND_SEED_NONE)
# error "UEFI and VXWorks only support seeding NONE"
@@ -123,11 +119,19 @@ size_t RAND_POOL_acquire_entropy(RAND_POOL *pool)
# endif
# if defined(OPENSSL_RAND_SEED_OS)
-# if defined(DEVRANDOM)
-# define OPENSSL_RAND_SEED_DEVRANDOM
-# else
+# if !defined(DEVRANDOM)
# error "OS seeding requires DEVRANDOM to be configured"
# endif
+# define OPENSSL_RAND_SEED_DEVRANDOM
+# if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+# if __GLIBC_PREREQ(2, 25)
+# define OPENSSL_RAND_SEED_GETRANDOM
+# endif
+# endif
+# endif
+
+# ifdef OPENSSL_RAND_SEED_GETRANDOM
+# include <sys/random.h>
# endif
# if defined(OPENSSL_RAND_SEED_LIBRANDOM)
|
baseboard/grunt/baseboard.h: Format with clang-format
BRANCH=none
TEST=none | #ifndef __CROS_EC_BASEBOARD_H
#define __CROS_EC_BASEBOARD_H
-#if (defined(VARIANT_GRUNT_TCPC_0_ANX3429) \
- + defined(VARIANT_GRUNT_TCPC_0_ANX3447)) != 1
+#if (defined(VARIANT_GRUNT_TCPC_0_ANX3429) + \
+ defined(VARIANT_GRUNT_TCPC_0_ANX3447)) != 1
#error Must choose VARIANT_GRUNT_TCPC_0_ANX3429 or VARIANT_GRUNT_TCPC_0_ANX3447
#endif
*/
#define CONFIG_BOARD_RESET_AFTER_POWER_ON
-
#define CONFIG_KEYBOARD_COL2_INVERTED
#define CONFIG_KEYBOARD_PROTOCOL_8042
|
Dockerfile: update to ccache v4.7.2 | @@ -157,8 +157,8 @@ RUN wget -nv https://sourceforge.net/projects/doxygen/files/rel-1.9.4/doxygen-1.
tar zxf doxygen-1.9.4.linux.bin.tar.gz -C ${HOME}/.local && \
rm -rf ${HOME}/.local/doxygen-1.9.4/html ${HOME}/.local/doxygen-1.9.4/*.pdf doxygen-1.9.4.linux.bin.tar.gz && \
(cd ${HOME}/.local/bin && ln -s ../doxygen-1.9.4/bin/doxygen .) && \
- wget -nv https://github.com/ccache/ccache/releases/download/v4.7/ccache-4.7-linux-x86_64.tar.xz && \
- tar xf ccache-4.7-linux-x86_64.tar.xz -C ${HOME}/.local/bin --strip-components=1 ccache-4.7-linux-x86_64/ccache && \
+ wget -nv https://github.com/ccache/ccache/releases/download/v4.7.2/ccache-4.7.2-linux-x86_64.tar.xz && \
+ tar xf ccache-4.7.2-linux-x86_64.tar.xz -C ${HOME}/.local/bin --strip-components=1 ccache-4.7.2-linux-x86_64/ccache && \
rm ccache-*-linux-x86_64.tar.xz
# By default, we use a Docker bind mount to share the repo with the host,
|
SOVERSION bump to version 1.2.9 | @@ -51,7 +51,7 @@ set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION
# with backward compatible change and micro version is connected with any internal change of the library.
set(LIBNETCONF2_MAJOR_SOVERSION 1)
set(LIBNETCONF2_MINOR_SOVERSION 2)
-set(LIBNETCONF2_MICRO_SOVERSION 8)
+set(LIBNETCONF2_MICRO_SOVERSION 9)
set(LIBNETCONF2_SOVERSION_FULL ${LIBNETCONF2_MAJOR_SOVERSION}.${LIBNETCONF2_MINOR_SOVERSION}.${LIBNETCONF2_MICRO_SOVERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_SOVERSION})
|
Add routine to add intra scc edges in FCG | @@ -859,8 +859,10 @@ void update_fcg_between_sccs(Graph *fcg, int scc1, int scc2, PlutoProg *prog)
return;
}
+
if(options->scc_cluster) {
update_scc_cluster_fcg_between_sccs(fcg, scc1, scc2, prog);
+ return;
}
/* Assumes that the DDG has already been cut. */
if (options->fuse == NO_FUSE) {
@@ -901,6 +903,26 @@ void update_fcg_between_sccs(Graph *fcg, int scc1, int scc2, PlutoProg *prog)
prog->fcg_update_time += rtclock() - tstart;
}
+void fcg_add_intra_scc_edges(Graph *fcg, PlutoProg *prog)
+{
+ Graph *ddg;
+ int i, j, k ,num_sccs, scc_offset;
+
+ ddg = prog->ddg;
+ num_sccs = ddg->num_sccs;
+ scc_offset = 0;
+
+ for (i=0; i<num_sccs; i++) {
+ for (j=0;j<ddg->sccs[i].max_dim; j++) {
+ for (k =j+1; k<ddg->sccs[i].max_dim; k++) {
+ fcg->adj->val[scc_offset+j][scc_offset+k] = 1;
+ fcg->adj->val[scc_offset+k][scc_offset+j] = 1;
+ }
+ }
+ scc_offset += ddg->sccs[i].max_dim;
+ }
+ return;
+}
/* Build the fusion conflict graph for a given program. The current colour is
* used to rebuild FCG for the current level. This is need in case we are
@@ -999,6 +1021,9 @@ Graph* build_fusion_conflict_graph(PlutoProg *prog, int *colour, int num_nodes,
pluto_matrix_free(obj);
+ if (options->scc_cluster) {
+ fcg_add_intra_scc_edges(fcg,prog);
+ } else {
/* Add egdes between different dimensions of the same statement */
stmt_offset=0;
for (i=0; i<nstmts;i++) {
@@ -1018,6 +1043,7 @@ Graph* build_fusion_conflict_graph(PlutoProg *prog, int *colour, int num_nodes,
pluto_constraints_free(stmts[i]->intra_stmt_dep_cst);
stmts[i]->intra_stmt_dep_cst = NULL;
}
+ }
pluto_constraints_free(boundcst);
pluto_constraints_free(*conflicts);
|
BugID:25714458:modify cli default to rm ota cmd from default cmds; core | @@ -132,11 +132,6 @@ static void uptime_cmd(char *buf, int32_t len, int32_t argc, char **argv)
cli_printf("UP time %ld ms\r\n", (long)krhino_sys_time_get());
}
-void tftp_ota_thread(void *arg)
-{
- cli_task_exit();
-}
-
#if (CLI_MINIMUM_MODE <= 0)
static void echo_cmd(char *buf, int32_t len, int32_t argc, char **argv)
|
add default NONE flag for bd_flags | @@ -320,6 +320,7 @@ manual_print manual_endian define bridge_domain_details
/** \brief Flags that can be changed on a bridge domain */
enum bd_flags
{
+ BRIDGE_API_FLAG_NONE = 0x0,
BRIDGE_API_FLAG_LEARN = 0x1,
BRIDGE_API_FLAG_FWD = 0x2,
BRIDGE_API_FLAG_FLOOD = 0x4,
|
[chainmaker]modify response init | @@ -458,9 +458,9 @@ BOAT_RESULT BoatChainmakerContractInvoke(BoatChainmakerTx *tx_ptr, char *method,
response_data->contract_result.contract_message = BoatMalloc(strlen(transaction_info_with_rwset->transaction->result->contract_result->message));
strcpy(response_data->contract_result.contract_message , transaction_info_with_rwset->transaction->result->contract_result->message);
}
+ response_data->contract_result.gas_used = transaction_info_with_rwset->transaction->result->contract_result->gas_used;
if (transaction_info_with_rwset->transaction->result->code == BOAT_SUCCESS)
{
- response_data->contract_result.gas_used = transaction_info_with_rwset->transaction->result->contract_result->gas_used;
if (strlen(tx_response->tx_id) < BOAT_TXID_LEN)
{
strcpy(response_data->tx_id, tx_response->tx_id);
@@ -552,17 +552,16 @@ BOAT_RESULT BoatChainmakerContractQuery(BoatChainmakerTx *tx_ptr, char *method,
strcpy(response_data->message, tx_response->message);
}
- if (response_data->code == BOAT_SUCCESS)
- {
response_data->contract_result.contract_code = tx_response->contract_result->code;
if (tx_response->contract_result->message != NULL)
{
response_data->contract_result.contract_message = BoatMalloc(strlen(tx_response->contract_result->message));
strcpy(response_data->contract_result.contract_message , tx_response->contract_result->message);
}
+ response_data->contract_result.gas_used = tx_response->contract_result->gas_used;
if (tx_response->contract_result->code == BOAT_SUCCESS)
{
- if (tx_response->contract_result->result.len != 0)
+ if ((tx_response->contract_result->result.len != 0) || (tx_response->contract_result->result.data != NULL))
{
if (tx_response->contract_result->result.len > BOAT_HLCHAINMAKER_HTTP2_SEND_BUF_MAX_LEN)
{
@@ -578,16 +577,8 @@ BOAT_RESULT BoatChainmakerContractQuery(BoatChainmakerTx *tx_ptr, char *method,
memcpy(response_data->contract_result.payload.field_ptr, tx_response->contract_result->result.data, tx_response->contract_result->result.len);
response_data->contract_result.payload.field_len =tx_response->contract_result->result.len;
}
-
-
- if (tx_response->contract_result->gas_used != 0)
- {
- response_data->contract_result.gas_used = tx_response->contract_result->gas_used;
- }
- }
}
-
#ifdef CHAINMAKER_V2
if (strlen(tx_response->tx_id) < BOAT_TXID_LEN)
{
@@ -621,6 +612,7 @@ BOAT_RESULT BoatChainmakerResponseInit(BoatResponseData *response_data)
response_data->message = NULL;
response_data->contract_result.contract_message = NULL;
response_data->contract_result.payload.field_ptr = NULL;
+ response_data->contract_result.payload.field_len = 0;
return result;
}
@@ -650,5 +642,6 @@ void BoatChainmakerResponseFree(BoatResponseData *response_data)
{
BoatFree(response_data->contract_result.payload.field_ptr);
response_data->contract_result.payload.field_ptr = NULL;
+ response_data->contract_result.payload.field_len = 0;
}
}
\ No newline at end of file
|
hoon: updates +muk to truncate seed and removes spurious assertion | ++ muk :: standard murmur3
~% %muk ..muk ~
=+ ~(. fe 5)
- |= {syd/@ len/@ key/@}
- ?> &((lte (met 5 syd) 1) (lte (met 0 len) 31))
+ |= [syd=@ len=@ key=@]
+ =. syd (end 5 1 syd)
=/ pad (sub len (met 3 key))
=/ data (weld (rip 3 key) (reap pad 0))
=/ nblocks (div len 4) :: intentionally off-by-one
|
Makefile -DCPU_INTEL | @@ -2,8 +2,8 @@ CC = gcc
INC_DIRS = -I. -I./3rdparty
# Temporarily disable optimizations to debug crashes
-CFLAGS = -g -Wall -c -fPIC -maes -O2 -fpermissive -Wno-fpermissive -Wno-strict-aliasing -Wno-sign-compare $(INC_DIRS)
-CXXFLAGS = -g -Wall -maes -O2 -Wno-unused-function -fPIC -fpermissive -Wno-strict-aliasing -Wno-sign-compare -std=c++0x -fexceptions -frtti $(INC_DIRS)
+CFLAGS = -g -Wall -c -fPIC -maes -O2 -fpermissive -Wno-fpermissive -Wno-strict-aliasing -Wno-sign-compare $(INC_DIRS) -DCPU_INTEL
+CXXFLAGS = -g -Wall -maes -O2 -Wno-unused-function -fPIC -fpermissive -Wno-strict-aliasing -Wno-sign-compare -std=c++0x -fexceptions -frtti $(INC_DIRS) -DCPU_INTEL
LDFLAGS = -shared
TARGET = libcryptonight.so
|
config_tools: update scenario xml file on ehl-crb-b platform
for ehl-crb-b platform, update sos rootfs from "dev/sda3"
to "/dev/nvme0n1p3" in hybrid.xml file. | <pci_dev/>
</pci_devs>
<board_private>
- <rootfs>/dev/sda3</rootfs>
+ <rootfs>/dev/nvme0n1p3</rootfs>
<bootargs>
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3
i915.nuclear_pageflip=1 swiotlb=131072
|
metadata-push-hook: stop syncing dms | ::
/- *group, *invite-store, store=metadata-store
/+ default-agent, verb, dbug, grpl=group, push-hook,
- resource, mdl=metadata, gral=graph
+ resource, mdl=metadata, gral=graph, agentio
~% %group-hook-top ..part ~
|%
+$ card card:agent:gall
==
::
+$ agent (push-hook:push-hook config)
+::
++$ state-null ~
++$ state-zero [%0 ~]
+::
++$ versioned-state
+ $% state-null
+ state-zero
+ ==
--
::
::
+=| state-zero
+=* state -
%- agent:dbug
%+ verb |
^- agent:gall
grp ~(. grpl bowl)
met ~(. mdl bowl)
gra ~(. gral bowl)
+ io ~(. agentio bowl)
+ pass pass:io
::
++ on-init on-init:def
-++ on-save !>(~)
-++ on-load on-load:def
+++ on-save !>(state)
+++ on-load
+ |= old=vase
+ ^- (quip card _this)
+ =+ !<(sta=versioned-state old)
+ ?^ sta `this(state sta)
+ :_ this(state *state-zero)
+ (poke-self:pass noun+!>(%clean-dm))^~
+::
++ on-poke
|= [=mark =vase]
- ?. ?=(%metadata-hook-update mark)
- (on-poke:def mark vase)
+ |^ ^- (quip card _this)
+ ?+ mark (on-poke:def mark vase)
+ %metadata-hook-update metadata-hook-update
+ %noun noun
+ ==
+ ::
+ ++ metadata-hook-update
=+ !<(=hook-update:store vase)
?. ?=(%req-preview -.hook-update)
(on-poke:def mark vase)
=- [%pass / %agent [src.bowl %metadata-pull-hook] %poke -]~
metadata-hook-update+!>(`hook-update:store`[%preview group-preview])
::
+ ++ noun
+ ?+ q.vase ~|("unknown noun poke" !!)
+ ::
+ %clean-dm
+ =+ .^(sharing=(set resource) (scry:io %gx dap.bowl /sharing/noun))
+ :_ this
+ %+ murn ~(tap in sharing)
+ |= rid=resource
+ ^- (unit card)
+ ?@ (rush name.rid ;~(pfix (jest 'dm--') fed:ag)) ~
+ `(poke-self:pass push-hook-action+!>([%remove rid]))
+ ==
+ --
+::
++ on-agent on-agent:def
++ on-watch on-watch:def
++ on-leave on-leave:def
|
UserNotes: Add check for image type when configuring IFEO priority | #include "usernotes.h"
#include <toolstatusintf.h>
#include <commdlg.h>
+#include <mapimg.h>
VOID SearchChangedHandler(
_In_opt_ PVOID Parameter,
@@ -417,7 +418,7 @@ VOID NTAPI MainMenuInitializingCallback(
}
PPH_STRING ShowFileDialog(
- _In_ HWND ParentHandle
+ _In_ HWND ParentWindowHandle
)
{
static PH_FILETYPE_FILTER filters[] =
@@ -430,12 +431,47 @@ PPH_STRING ShowFileDialog(
fileDialog = PhCreateOpenFileDialog();
PhSetFileDialogFilter(fileDialog, filters, RTL_NUMBER_OF(filters));
- if (PhShowFileDialog(ParentHandle, fileDialog))
+ if (PhShowFileDialog(ParentWindowHandle, fileDialog))
{
fileName = PhGetFileDialogFileName(fileDialog);
}
PhFreeFileDialog(fileDialog);
+
+ if (fileName)
+ {
+ NTSTATUS status;
+ PH_MAPPED_IMAGE mappedImage;
+
+ status = PhLoadMappedImage(
+ PhGetString(fileName),
+ NULL,
+ &mappedImage
+ );
+
+ if (NT_SUCCESS(status))
+ {
+ if (mappedImage.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC)
+ {
+ if (!(mappedImage.NtHeaders32->FileHeader.Characteristics & IMAGE_FILE_EXECUTABLE_IMAGE) || mappedImage.NtHeaders32->FileHeader.Characteristics & IMAGE_FILE_DLL)
+ status = STATUS_INVALID_IMAGE_NOT_MZ;
+ }
+ else if (mappedImage.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
+ {
+ if (!(mappedImage.NtHeaders32->FileHeader.Characteristics & IMAGE_FILE_EXECUTABLE_IMAGE) || mappedImage.NtHeaders32->FileHeader.Characteristics & IMAGE_FILE_DLL)
+ status = STATUS_INVALID_IMAGE_NOT_MZ;
+ }
+
+ PhUnloadMappedImage(&mappedImage);
+ }
+
+ if (!NT_SUCCESS(status))
+ {
+ PhClearReference(&fileName);
+ PhShowStatus(ParentWindowHandle, L"Unable to configure IFEO priority for this image.", status, 0);
+ }
+ }
+
return fileName;
}
|
parser json BUGFIX assert should be an if | @@ -364,7 +364,6 @@ lydjson_check_list(struct lyjson_ctx *jsonctx, const struct lysc_node *list)
uint32_t i, status_count;
assert(list && (list->nodetype == LYS_LIST));
- assert(status == LYJSON_OBJECT);
/* get all keys into a set (keys do not have if-features or anything) */
snode = NULL;
@@ -373,10 +372,10 @@ lydjson_check_list(struct lyjson_ctx *jsonctx, const struct lysc_node *list)
LY_CHECK_GOTO(ret, cleanup);
}
- if (status != LYJSON_OBJECT_EMPTY) {
+ if (status == LYJSON_OBJECT) {
status_count = jsonctx->status.count;
- while (key_set.count && status != LYJSON_OBJECT_CLOSED) {
+ while (key_set.count && (status != LYJSON_OBJECT_CLOSED)) {
const char *name, *prefix;
size_t name_len, prefix_len;
ly_bool is_attr;
@@ -534,7 +533,7 @@ lydjson_data_check_opaq(struct lyd_json_ctx *lydctx, const struct lysc_node *sno
case LYS_LIST:
/* lists may not have all its keys */
if (lydjson_check_list(jsonctx, snode)) {
- /* invalid list, parse as opaque if it missing/has invalid some keys */
+ /* invalid list, parse as opaque if it misses/has invalid some keys */
ret = LY_ENOT;
}
break;
|
highlevel: Add documentation for specProperlyMounted() | @@ -189,7 +189,27 @@ void elektraFatalError (Elektra * elektra, ElektraError * fatalError)
elektra->fatalErrorHandler (fatalError);
}
-
+/**
+ *
+ * Check whether the specification for @p application was properly mounted using "kdb mount" and "kdb spec-mount".
+ *
+ * There is currently no way to check this with full certainty.
+ * Therefore, the following best-effort heuristic is used:
+ * (for details see https://github.com/ElektraInitiative/libelektra/issues/3998)
+ *
+ * "kdb mount" was properly executed if:
+ * 1. Key "system:/elektra/mountpoints/spec:ESCAPED_APPLICATION_NAME/mountpoint" exists
+ * 2. its value matches "spec:/APPLICATION_NAME"
+ *
+ * "kdb spec-mount" was properly executed if:
+ * 1. Key "system:/elektra/mountpoints/ESCAPED_APPLICATION_NAME/mountpoint" exists
+ * 2. its value matches "APPLICATION_NAME"
+ *
+ * @param kdb The KDB instance used for checking.
+ * @param application The application's base name.
+ * @param error Pointer used to report errors.
+ * @return True if the specification file was properly mounted, false otherwise.
+ */
static kdb_boolean_t specProperlyMounted (KDB * const kdb, const char * application, ElektraError ** error) {
KeySet * const mountPoints = ksNew (0, KS_END);
Key * const parentKey = keyNew ("system:/elektra/mountpoints", KEY_END);
|
Fix CID Integer handling issues (evp_extra_test.c) | @@ -802,7 +802,7 @@ static int test_privatekey_to_pkcs8(void)
EVP_PKEY *pkey = NULL;
BIO *membio = NULL;
char *membuf = NULL;
- size_t membuf_len = 0;
+ long membuf_len = 0;
int ok = 0;
if (!TEST_ptr(membio = BIO_new(BIO_s_mem()))
@@ -810,9 +810,9 @@ static int test_privatekey_to_pkcs8(void)
|| !TEST_int_gt(i2d_PKCS8PrivateKey_bio(membio, pkey, NULL,
NULL, 0, NULL, NULL),
0)
- || !TEST_ptr((membuf_len = (size_t)BIO_get_mem_data(membio, &membuf),
- membuf))
- || !TEST_mem_eq(membuf, membuf_len,
+ || !TEST_int_gt(membuf_len = BIO_get_mem_data(membio, &membuf), 0)
+ || !TEST_ptr(membuf)
+ || !TEST_mem_eq(membuf, (size_t)membuf_len,
kExampleRSAKeyPKCS8, sizeof(kExampleRSAKeyPKCS8))
/*
* We try to write PEM as well, just to see that it doesn't err, but
|
YAML: Fix minor spelling mistake in ReadMe | @@ -18,7 +18,7 @@ This plugin reads configuration data specified in a **very limited** subset of
### Basic Usage
```sh
-# Mount mini plugin to cascading namespace `/examples/yaml`
+# Mount yaml plugin to cascading namespace `/examples/yaml`
kdb mount config.yaml /examples/yaml yaml
kdb set /examples/yaml/key value
|
Preparation for decode support | @@ -182,6 +182,20 @@ espi_tcpip_process_send_data(void) {
esp.msg->msg.conn_send.sent = esp.msg->msg.conn_send.btw > 2048 ? 2048 : esp.msg->msg.conn_send.btw;
number_to_str(esp.msg->msg.conn_send.sent, str);
ESP_AT_PORT_SEND_STR(str);
+
+ if (esp.msg->msg.conn_send.conn->type == ESP_CONN_TYPE_UDP) {
+ const uint8_t* ip = esp.msg->msg.conn_send.remote_ip; /* Get remote IP */
+ uint16_t port = esp.msg->msg.conn_send.remote_port;
+
+ if (ip && port) {
+ ESP_AT_PORT_SEND_STR(",");
+ send_ip_mac(ip, 1, 1); /* Send IP address including quotes */
+ ESP_AT_PORT_SEND_STR(",");
+
+ number_to_str(port, str);
+ ESP_AT_PORT_SEND_STR(str);
+ }
+ }
ESP_AT_PORT_SEND_STR("\r\n");
return espOK;
}
@@ -389,10 +403,12 @@ espi_parse_received(esp_recv_t* rcv) {
conn->status.f.client = 1; /* Go to client mode */
conn->cb_func = esp.msg->msg.conn_start.cb_func; /* Set callback function */
conn->arg = esp.msg->msg.conn_start.arg; /* Set argument for function */
+ conn->type = esp.msg->msg.conn_start.type; /* Set connection type */
} else { /* Server connection start */
conn->status.f.client = 0;
conn->cb_func = esp.cb_server; /* Set server default callback */
conn->arg = NULL;
+ conn->type = ESP_CONN_TYPE_TCP; /* Set connection type to TCP */
}
esp.cb.type = ESP_CB_CONN_ACTIVE; /* Connection just active */
@@ -469,7 +485,7 @@ espr_t
espi_process(void) {
uint8_t ch;
size_t len;
- static uint8_t ch_prev1, ch_prev2;
+ static uint8_t ch_prev1, ch_prev2, utf8_ch[4], utf8_len;
while (esp_buff_read(&esp.buff, &ch, 1)) { /* Read entire set of characters from buffer */
if (esp.ipd.read) { /* Do we have to read incoming IPD data? */
@@ -532,7 +548,16 @@ espi_process(void) {
}
esp.ipd.buff_ptr = 0; /* Reset input buffer pointer */
}
- } else if (ESP_ISVALIDASCII(ch)) { /* Check for ASCII characters only */
+ } else {
+ uint8_t process = 0, len = 0;
+ if (ESP_ISVALIDASCII(ch)) { /* Check for valid character */
+ process = 1;
+ len = 1;
+ } else if (1) { /* Add support for UTF-8 valid characters */
+ RECV_RESET(); /* Reset received string */
+ }
+ if (process) { /* Can we process the character(s) */
+ if (len == 1) {
switch (ch) {
case '\n':
RECV_ADD(ch); /* Add character to input buffer */
@@ -577,8 +602,10 @@ espi_process(void) {
esp.ipd.buff_ptr = 0;
RECV_RESET(); /* Reset received buffer */
}
- } else {
- RECV_RESET(); /* Invalidate received data */
+ } else { /* In case of UTF-8 sequence, you can only add them to receive */
+
+ }
+ }
}
ch_prev2 = ch_prev1; /* Save previous character to previous previous */
|
Added S2N_DEBUG env var which enables DEBUG_CFLAGS | @@ -56,6 +56,10 @@ CFLAGS += ${DEFAULT_CFLAGS}
DEBUG_CFLAGS = -g3 -ggdb -fno-omit-frame-pointer -fno-optimize-sibling-calls
+ifdef S2N_DEBUG
+ CFLAGS += ${DEBUG_CFLAGS}
+endif
+
FUZZ_CFLAGS = -fsanitize-coverage=trace-pc-guard -fsanitize=address,undefined,leak
ifeq ($(S2N_UNSAFE_FUZZING_MODE),1)
|
faq: improvements | @@ -40,20 +40,29 @@ to see how useful it can be.
Longer answer:
-Elektra abstracts [configuration settings](elektra-glossary.md), something
-desperately needed within configuration management. Instead of rewriting
-complete configuration files, which might create security problems,
-Elektra operates precisely on the configuration setting you want to
-change: leaving others as chosen by the application or distribution.
-Furthermore, Elektra also allows us to _specify_ configuration settings,
-which again brings benefits for configuration management tools.
+Elektra abstracts [configuration settings](elektra-glossary.md), something desperately needed within configuration management.
+Instead of rewriting complete configuration files, which might create security problems due to ignoring distributions configuration files;
+Elektra operates precisely on the configuration setting you want to change:
+leaving others as chosen by the application or distribution.
+Furthermore, Elektra also allows us to _specify_ configuration settings, which again brings benefits for configuration management tools.
Elektra is a radical step needed towards better configuration management:
-Let us fix how applications access configuration settings, so that we
-can properly access them, for example, from configuration management tools.
+Let us fix how applications access configuration settings, so that we can properly access them, for example, from configuration management tools.
-As an intermediate step, we can [mount](elektra-mounting.md)
-existing configuration files and operate on them.
+See [our vision](/doc/VISION.md) for an example.
+
+## If Elektra Already Exists so Long, why isn't it more Widespread?
+
+There are two main reasons:
+
+1. Research:
+ First we needed to [explore the design space](/doc/dev/history.md).
+ At that time, Elektra provided little benefit, except for niche applications.
+ Then it was challenging to actually implement the [vision](/doc/VISION.md).
+2. Bootstrapping:
+ Developers would like to have everything smooth and shiny, like packages available as are part of their distributions.
+ But Elektra only gets packaged, if there are already application using Elektra.
+ We solved this problem, by [many intermediate steps](/doc/dev/history.md), e.g., [mounting](elektra-mounting.md) existing configuration files and operate on them.
## Do We Retain the Old Way of Configuring Things, i.e. Manually Editing an INI File in /etc?
|
Work CI-CD
Fix condition in nightly pipeline.
***NO_CI*** | @@ -208,14 +208,7 @@ jobs:
##############################
- job: Check_Code_Style
- condition: >-
- or(
- eq(dependencies.Check_Build_Options.outputs['TargetsToBuild.BUILD_ALL'], true),
- eq(dependencies.Check_Build_Options.outputs['TargetsToBuild.BUILD_CHIBIOS'], true),
- eq(dependencies.Check_Build_Options.outputs['TargetsToBuild.BUILD_ESP32'], true),
- eq(dependencies.Check_Build_Options.outputs['TargetsToBuild.BUILD_TI'], true)
- )
-
+ condition: ne(variables['System.PullRequest.PullRequestId'], '')
dependsOn:
- Check_Build_Options
|
Tinyalsa: Fix apb and wav header setting | @@ -926,7 +926,12 @@ struct pcm *pcm_open(unsigned int card, unsigned int device, unsigned int flags,
oops(pcm, ENOMEM, "Could not allocate buffer %d\n", x);
goto fail_cleanup_buffers;
}
+ pcm->pBuffers[x]->nbytes = 0;
+ pcm->pBuffers[x]->curbyte = 0;
+ pcm->pBuffers[x]->flags = 0;
}
+
+#ifdef CONFIG_AUDIO_FORMAT_PCM
if (pcm->flags & PCM_IN) {
struct ap_buffer_s *apb = (struct ap_buffer_s *)pcm->pBuffers[0];
if (apb->nmaxbytes - apb->nbytes >= sizeof(struct wav_header_s)) {
@@ -957,6 +962,7 @@ struct pcm *pcm_open(unsigned int card, unsigned int device, unsigned int flags,
goto fail_cleanup_buffers;
}
}
+#endif
pcm->underruns = 0;
return pcm;
@@ -1063,7 +1069,6 @@ int pcm_prepare(struct pcm *pcm)
int pcm_start(struct pcm *pcm)
{
struct audio_buf_desc_s bufdesc;
- struct ap_buffer_s *apb;
if (pcm == NULL) {
return -EINVAL;
@@ -1086,11 +1091,7 @@ int pcm_start(struct pcm *pcm)
for (pcm->bufPtr = 0; pcm->bufPtr < CONFIG_AUDIO_NUM_BUFFERS; pcm->bufPtr++)
#endif
{
- apb = pcm->pBuffers[pcm->bufPtr];
- apb->nbytes = 0;
- apb->curbyte = 0;
- apb->flags = 0;
- bufdesc.u.pBuffer = apb;
+ bufdesc.u.pBuffer = pcm->pBuffers[pcm->bufPtr];
if (ioctl(pcm->fd, AUDIOIOC_ENQUEUEBUFFER, (unsigned long)&bufdesc) < 0) {
return oops(pcm, errno, "AUDIOIOC_ENQUEUEBUFFER ioctl failed");
}
|
life_mngr: Makefile: Fix install path creation of CONF_DIR | @@ -82,7 +82,7 @@ endif
.PHONY: install
install:
- [ -d $(CONF_DIR) ] || mkdir -p $(CONF_DIR)
+ install -d $(DESTDIR)$(CONF_DIR)
install -d $(DESTDIR)$(bindir)
install -t $(DESTDIR)$(bindir) $(OUT_DIR)/life_mngr
install -t $(DESTDIR)$(CONF_DIR) $(OUT_DIR)/life_mngr.conf
|
fix PROTO_NAMESPACE for GO_PROTO_CMD | @@ -43,14 +43,10 @@ def main(arcadia_prefix, contrib_prefix, proto_namespace, args):
print >>sys.stderr, e.output
return e.returncode
- if proto_namespace != '.':
- out_dir_src = out_dir_temp
- out_dir_dst = out_dir_orig
- else:
# All Arcadia GO projects should have 'a.yandex-team.ru/' namespace prefix.
# If the namespace doesn't start with 'a.yandex-team.ru/' prefix then this
# project is from vendor directory under the root of Arcadia.
- out_dir_src = os.path.join(out_dir_temp, arcadia_prefix)
+ out_dir_src = os.path.normpath(os.path.join(out_dir_temp, arcadia_prefix, proto_namespace))
out_dir_dst = out_dir_orig
if not os.path.isdir(out_dir_src):
out_dir_src = out_dir_temp
|
py/mkenv.mk: Add GDB variable. | @@ -49,6 +49,7 @@ PYTHON = python3
AS = $(CROSS_COMPILE)as
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
+GDB = $(CROSS_COMPILE)gdb
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size
|
Improved static diff handling | @@ -108,24 +108,29 @@ namespace Miningcore.Blockchain.Cryptonote
context.IsSubscribed = result;
context.IsAuthorized = result;
- // Nicehash support
- double? staticDiff = null;
+ // extract control vars from password
+ var passParts = loginRequest.Password?.Split(PasswordControlVarsSeparator);
+ var staticDiff = GetStaticDiffFromPassparts(passParts);
+ // Nicehash support
if(clusterConfig.Nicehash?.Enable == true &&
context.UserAgent.Contains("nicehash", StringComparison.OrdinalIgnoreCase))
{
// query current diff
- staticDiff = await nicehashService.GetStaticDiff(manager.Coin.Name, manager.Coin.GetAlgorithmName(), CancellationToken.None);
+ var nicehashDiff = await nicehashService.GetStaticDiff(manager.Coin.Name, manager.Coin.GetAlgorithmName(), CancellationToken.None);
+
+ if(nicehashDiff.HasValue)
+ {
+ if((!staticDiff.HasValue || nicehashDiff > staticDiff))
+ {
+ logger.Info(() => $"[{client.ConnectionId}] Nicehash detected. Using API supplied difficulty of {nicehashDiff.Value}");
- if(staticDiff.HasValue)
- logger.Info(()=> $"[{client.ConnectionId}] Nicehash detected. Using static difficulty of {staticDiff.Value}");
+ staticDiff = nicehashDiff;
}
- if(!staticDiff.HasValue)
- {
- // extract control vars from password
- var passParts = loginRequest.Password?.Split(PasswordControlVarsSeparator);
- staticDiff = GetStaticDiffFromPassparts(passParts);
+ else
+ logger.Info(() => $"[{client.ConnectionId}] Nicehash detected. Using custom difficulty of {staticDiff.Value}");
+ }
}
// Static diff
|
gso: fix the metadata for gro packets
Type: fix | @@ -384,6 +384,7 @@ gro_fixup_header (vlib_main_t *vm, vlib_buffer_t *b0, u32 ack_number, u8 is_l2)
1 /* is_ip6 */ );
vnet_buffer2 (b0)->gso_size = b0->current_length - gho0.hdr_sz;
+ vnet_buffer (b0)->l2_hdr_offset = b0->current_data;
if (gho0.gho_flags & GHO_F_IP4)
{
@@ -412,6 +413,7 @@ gro_fixup_header (vlib_main_t *vm, vlib_buffer_t *b0, u32 ack_number, u8 is_l2)
tcp_header_t *tcp0 =
(tcp_header_t *) (vlib_buffer_get_current (b0) + gho0.l4_hdr_offset);
vnet_buffer (b0)->l4_hdr_offset = (u8 *) tcp0 - b0->data;
+ vnet_buffer2 (b0)->gso_l4_hdr_sz = tcp_header_bytes (tcp0);
tcp0->ack_number = ack_number;
b0->flags &= ~VLIB_BUFFER_IS_TRACED;
}
|
fix memcheck don't work | #include <util/thread/pool.h>
void RunGpuProgram(std::function<void()> func) {
- auto queue = CreateThreadPool(1);
+ TThreadPool queue;
+ queue.Start(1);
NThreading::TFuture<void> future = NThreading::Async(
func,
- *queue
+ queue
);
future.Wait();
}
|
rand: include the CPU source in a build. | @@ -41,7 +41,7 @@ jobs:
env: CONFIG_OPTS="" DESTDIR="_install"
- os: linux
compiler: clang
- env: CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
+ env: CONFIG_OPTS="no-asm no-makedepend enable-buildtest-c++ --strict-warnings --with-rand-seed=rdcpu,os -D_DEFAULT_SOURCE" BUILDONLY="yes" CHECKDOCS="yes" CPPFLAGS="-ansi"
- os: osx
compiler: gcc
- os: osx
|
add convertor for TM1650 | @@ -571,25 +571,61 @@ pbc.objectFunctionD.get('show_fill')['monitor'] = function(py2block, func, args,
})];
}
-// function display_tm_stat(mode){
-// function converter(py2block, func, args, keywords, starargs, kwargs, node) {
-// if (args.length !== 0) {
-// throw new Error("Incorrect number of arguments");
-// }
-// var mpublock=py2block.convert(func.value)
-// var ablock = py2block.identifier('tm1650')
-// return block('display_tm1650_power', func.lineno, {
-// "STAT": mode,
-// "TYPE": ablock
-// }, {
-// 'VAR': mpublock
-// }, {
-// "inline": "true"
-// });
-// }
-// return converter;
-// }
-
-// pbc.objectFunctionD.get('disp')['tm1650_on'] = display_tm_stat('_on');
-// pbc.objectFunctionD.get('disp')['tm1650_off'] = display_tm_stat('_off');
-// pbc.objectFunctionD.get('disp')['tm1650_clear'] = display_tm_stat('_clear');
\ No newline at end of file
+function display_tm_stat(mode, type){
+ function converter(py2block, func, args, keywords, starargs, kwargs, node) {
+ if (args.length !== 0) {
+ throw new Error("Incorrect number of arguments");
+ }
+ var varblock = py2block.convert(func.value)
+ return [block('display_tm1650_power', func.lineno, {
+ "TYPE": type,
+ "STAT": mode,
+ }, {
+ "VAR": varblock,
+ }, {
+ "inline": "true"
+ })];
+ }
+ return converter;
+}
+
+pbc.objectFunctionD.get('tm1650_on')['disp'] = display_tm_stat('_on','tm1650');
+pbc.objectFunctionD.get('tm1650_off')['disp'] = display_tm_stat('_off','tm1650');
+pbc.objectFunctionD.get('tm1650_clear')['disp'] = display_tm_stat('_clear','tm1650');
+
+
+pbc.objectFunctionD.get('tm1650_show_num')['disp'] = function (py2block, func, args, keywords, starargs, kwargs, node) {
+ if (args.length !== 1) {
+ throw new Error("Incorrect number of arguments");
+ }
+ var valblock=py2block.convert(args[0]);
+ var varblock=py2block.convert(func.value)
+ return [block("display_tm1650_show_num", func.lineno, {
+ "TYPE":'tm1650'
+ }, {
+ 'VALUE':valblock,
+ 'VAR': varblock
+ }, {
+ "inline": "true"
+ })];
+}
+
+pbc.objectFunctionD.get('tm1650_show_dot')['disp'] = function (py2block, func, args, keywords, starargs, kwargs, node) {
+ if (args.length !== 2) {
+ throw new Error("Incorrect number of arguments");
+ }
+ var valblock=py2block.convert(args[0]);
+ pbc.inScope="switch";
+ var statblock=py2block.convert(args[1]);
+ pbc.inScope=null;
+ var varblock=py2block.convert(func.value)
+ return [block("display_tm1650_show_dot", func.lineno, {
+ "TYPE":'tm1650'
+ }, {
+ 'NO':valblock,
+ 'STAT':statblock,
+ 'VAR': varblock
+ }, {
+ "inline": "true"
+ })];
+}
\ No newline at end of file
|
doc: clarify sample app instructions
Clarify commands that needed to be run on the target and not the dev
system | @@ -457,7 +457,9 @@ Copy files from the development system to your target system
acpica-unix-20210105/generate/unix/bin/iasl \
[email protected]:~/acrn-work
- sudo mv ~/acrn-work/iasl /usr/sbin
+ Then on the target system run these commands::
+
+ sudo cp ~/acrn-work/iasl /usr/sbin
sudo ln -s /usr/sbin/iasl /usr/bin/iasl
Option 2: use a USB stick to copy files
|
TravisCI CHANGE pcre2 should be already installed, do not install it | @@ -94,7 +94,6 @@ jobs:
- tar -xf cmocka-1.1.2.tar.xz
- cd cmocka-1.1.2 && mkdir build && cd build && cmake .. && make -j2 && sudo make install && cd ../..
- brew update
- - brew install pcre2
script:
- mkdir build && cd build && cmake -DENABLE_VALGRIND_TESTS=OFF .. && make -j2 && ctest --output-on-failure && cd -
|
Doc: Fix documentation of Magick::Image#crop
This patch will fix wrong description of documentation of Magick::Image#crop . | @@ -4681,26 +4681,26 @@ Image_init_copy(VALUE copy, VALUE orig)
/**
* Extract a region of the image defined by width, height, x, y.
*
- * @overload crop(reset = false, x, y, width, height)
- * @param reset [Boolean] true if reset the cropped image page canvas and position
+ * @overload crop(x, y, width, height, reset = false)
* @param x [Numeric] x position of start of region
* @param y [Numeric] y position of start of region
* @param width [Numeric] width of region
* @param height [Numeric] height of region
- *
- * @overload crop(reset = false, gravity, width, height)
* @param reset [Boolean] true if reset the cropped image page canvas and position
+ *
+ * @overload crop(gravity, width, height, reset = false)
* @param gravity [Magick::GravityType] the gravity type
* @param width [Numeric] width of region
* @param height [Numeric] height of region
-
- * @overload crop(reset = false, gravity, x, y, width, height)
* @param reset [Boolean] true if reset the cropped image page canvas and position
+
+ * @overload crop(gravity, x, y, width, height, reset = false)
* @param gravity [Magick::GravityType] the gravity type
* @param x [Numeric] x position of start of region
* @param y [Numeric] y position of start of region
* @param width [Numeric] width of region
* @param height [Numeric] height of region
+ * @param reset [Boolean] true if reset the cropped image page canvas and position
*
* @return [Magick::Image] a new image
* @see Image#crop!
|
vlib: add max-size configuration parameter for pmalloc
Enable 'max-size' configuration parameter to set maximum size of
memory space allocated for pmalloc module. This parameter along
with existing 'base-addr' falls into physmem section. Both are
dedicated parameters to pmalloc module.
Type: feature | @@ -178,6 +178,9 @@ vlib_physmem_config (vlib_main_t * vm, unformat_input_t * input)
{
if (unformat (input, "base-addr 0x%lx", &vpm->base_addr))
;
+ else if (unformat (input, "max-size %U",
+ unformat_memory_size, &vpm->max_size))
+ ;
else
return unformat_parse_error (input);
}
|
Increment version to 4.5.14. | #define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 5
#define MOD_WSGI_MICROVERSION_NUMBER 13
-#define MOD_WSGI_VERSION_STRING "4.5.13"
+#define MOD_WSGI_VERSION_STRING "4.5.14"
/* ------------------------------------------------------------------------- */
|
BugID:17711683: Fix network compile error when no cli module | @@ -584,6 +584,7 @@ static void read_persistent_conf(void)
get_wifi_ssid();
}
+#ifdef CONFIG_AOS_CLI
static void handle_netmgr_cmd(char *pwbuf, int blen, int argc, char **argv)
{
const char *rtype = argc > 1 ? argv[1] : "";
@@ -610,6 +611,7 @@ static struct cli_command ncmd = {
.help = "netmgr [start|clear|connect ssid password]",
.function = handle_netmgr_cmd,
};
+#endif
bool netmgr_get_ip_state()
{
@@ -666,7 +668,10 @@ int netmgr_wifi_init(void)
hal_wifi_module_t *module;
aos_register_event_filter(EV_WIFI, netmgr_events_executor, NULL);
+
+#ifdef CONFIG_AOS_CLI
aos_cli_register_command(&ncmd);
+#endif
module = hal_wifi_get_default_module();
memset(&g_netmgr_cxt, 0, sizeof(g_netmgr_cxt));
|
graphics/nxwidgets: Change CONFIG_USER_ENTRYPOINT to CONFIG_INIT_ENTRYPOINT | @@ -120,7 +120,7 @@ NXWidgets.:
see that setting like:
```conf
- CONFIG_USER_ENTRYPOINT="nsh_main"
+ CONFIG_INIT_ENTRYPOINT="nsh_main"
```
If you are not using in NSH, then each unit test has a unique entry point.
@@ -129,13 +129,13 @@ NXWidgets.:
`UnitTests/CButton` would be:
```conf
- CONFIG_USER_ENTRYPOINT="cbutton_main"
+ CONFIG_INIT_ENTRYPOINT="cbutton_main"
```
And the correct entry point for `UnitTests/nxwm` would be:
```conf
- CONFIG_USER_ENTRYPOINT="nxwm_main"
+ CONFIG_INIT_ENTRYPOINT="nxwm_main"
```
etc.
|
Apply main modifier to pb.h outputs | @@ -387,11 +387,11 @@ module BASE_UNIT {
DEFAULT(BUILD_PROTO_AS_EVLOG no)
when ($OPTIMIZE_PY_PROTOS_FLAG == "yes") {
- CPP_PROTO_OUTS=${output;hide;norel;noext;noauto:File.pb.cc} ${output;hide;norel;noext;noauto:File.pb.h}
+ CPP_PROTO_OUTS=${output;hide;norel;noext;noauto:File.pb.cc} ${output;main;hide;norel;noext;noauto:File.pb.h}
CPP_EV_OUTS=${output;hide;norel;noauto:File.pb.cc} ${output;hide;norel;noauto:File.pb.h}
}
otherwise {
- CPP_PROTO_OUTS=${output;hide;norel;noext:File.pb.cc} ${output;hide;norel;noext:File.pb.h}
+ CPP_PROTO_OUTS=${output;hide;norel;noext:File.pb.cc} ${output;main;hide;norel;noext:File.pb.h}
CPP_EV_OUTS=${output;hide;norel:File.pb.cc} ${output;hide;norel:File.pb.h}
}
|
Configuration: fixed comments parsing.
Unclosed multi-line comments and "/" at the end of JSON shouldn't be allowed. | @@ -1269,6 +1269,7 @@ nxt_conf_json_skip_space(u_char *start, u_char *end)
case '\r':
continue;
case '/':
+ start = p;
state = sw_after_slash;
continue;
}
@@ -1285,7 +1286,6 @@ nxt_conf_json_skip_space(u_char *start, u_char *end)
continue;
}
- p--;
break;
case sw_single_comment:
@@ -1318,6 +1318,10 @@ nxt_conf_json_skip_space(u_char *start, u_char *end)
break;
}
+ if (nxt_slow_path(state != sw_normal)) {
+ return start;
+ }
+
return p;
}
|
platform/primehub: revert interrupt change
This partially reverts commit
to make dual boot work again. | @@ -689,19 +689,14 @@ extern uint32_t *_fw_isr_vector_src;
// Called from assembly code in startup.s
void SystemInit(void) {
- // enable 8-byte stack alignment for IRQ handlers, in accord with EABI
- SCB->CCR |= SCB_CCR_STKALIGN_Msk;
-
- // since the firmware starts at 0x08008000, we need to set the vector table offset
- SCB->VTOR = (uint32_t)&_fw_isr_vector_src;
- // bootloader disables interrupts
- __enable_irq();
+ RCC_OscInitTypeDef osc_init;
+ RCC_ClkInitTypeDef clk_init;
// Using external 16Mhz oscillator
- RCC_OscInitTypeDef osc_init = { 0 };
osc_init.OscillatorType = RCC_OSCILLATORTYPE_HSE;
osc_init.HSEState = RCC_HSE_ON;
+ osc_init.HSIState = RCC_HSI_OFF;
osc_init.PLL.PLLState = RCC_PLL_ON;
osc_init.PLL.PLLSource = RCC_PLLSOURCE_HSE;
osc_init.PLL.PLLM = 8; // VCO_IN 2MHz (16MHz / 8)
@@ -711,7 +706,6 @@ void SystemInit(void) {
HAL_RCC_OscConfig(&osc_init);
- RCC_ClkInitTypeDef clk_init = { 0 };
clk_init.ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
clk_init.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
clk_init.AHBCLKDivider = RCC_SYSCLK_DIV1; // HCLK 96MHz
@@ -720,6 +714,15 @@ void SystemInit(void) {
HAL_RCC_ClockConfig(&clk_init, FLASH_LATENCY_5);
+ // enable 8-byte stack alignment for IRQ handlers, in accord with EABI
+ SCB->CCR |= SCB_CCR_STKALIGN_Msk;
+
+ // since the firmware starts at 0x08008000, we need to set the vector table offset
+ SCB->VTOR = (uint32_t)&_fw_isr_vector_src;
+
+ // bootloader disables interrupts
+ __enable_irq();
+
// If we are running dual boot, jump to other firmware if no buttons are pressed
pbio_platform_dual_boot();
|
use SIOCGIWNAME to detect presence of Wireless Extensions | @@ -7125,7 +7125,7 @@ memset(&iwr, 0, sizeof(iwr));
memcpy(&iwr.ifr_name, interfacename, IFNAMSIZ);
if(ioctl(fd_socket, SIOCGIWNAME, &iwr) < 0)
{
- perror("failed to detect wlan interface");
+ perror("failed to detect wlan interface - kernel possible complied without Wireless Extensions (CONFIG_CFG80211_WEXT=y and CONFIG_CFG80211_WEXT_EXPORT=y)");
if(forceinterfaceflag == false) return false;
}
memcpy(&interfaceprotocol, iwr.u.name, IFNAMSIZ);
|
fix:fix ethereum test case(test_001CreateWallet_0012CreateOnetimeWalletWithLoadExistedWallet) | @@ -349,6 +349,7 @@ END_TEST
START_TEST(test_001CreateWallet_0012CreateOnetimeWalletWithLoadExistedWallet)
{
BSINT32 rtnVal;
+ BoatIotSdkInit();
BoatEthWalletConfig wallet = get_ethereum_wallet_settings();
extern BoatIotSdkContext g_boat_iot_sdk_context;
wallet.prikeyCtx_config.load_existed_wallet = BOAT_TRUE;
|
FIX: travis ci test failure detection | @@ -17,10 +17,16 @@ if ($script_type eq "big") {
# common engine test script : ./t
if (grep $_ eq $engine_name, @engine_list) {
- system("prove $opt - < $srcdir/t/tlist/engine_$engine_name\_$ext\.txt :: $engine_name");
+ my $returnCode = system("prove $opt - < $srcdir/t/tlist/engine_$engine_name\_$ext\.txt :: $engine_name");
+ if ($returnCode != 0) {
+ exit(1);
+ }
} elsif ("$engine_name" eq "") {
# default engine test
- system("prove $opt - < $srcdir/t/tlist/engine_default_$ext\.txt :: default");
+ my $returnCode = system("prove $opt - < $srcdir/t/tlist/engine_default_$ext\.txt :: default");
+ if ($returnCode != 0) {
+ exit(1);
+ }
} else {
system("echo -e \'\033[31mmake test [TYPE=<small || big>] [ENGINE=<@engine_list>]\033[0m\n\'");
exit(1);
|
silence makefile warning on ubuntu
shell error on ubuntu when OS_VERSION_ID == 16.04:
/bin/sh: 1: [: Illegal number: 16.04 | @@ -78,7 +78,7 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
RPM_DEPENDS += python-devel
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
-else ifeq ($(shell if [ "$(OS_VERSION_ID)" -gt "25" ] ; then echo "y" ; fi),"y")
+else ifeq ($(shell if [ $(echo "$(OS_VERSION_ID) > 25" | bc) -eq 1 ] ; then echo "y" ; fi),"y")
RPM_DEPENDS += python2-devel
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
|
dbug fe: remember summary fold state correctly
By manually providing a key, we avoid auto-assigned keys, which would
cause the nth summary item to remain unfolded, even if its contents
changed. | @@ -37,7 +37,7 @@ export class SearchableList extends Component {
if (items.length === 0) {
items = 'none';
} else {
- items = items.map(item => (<div style={{marginTop: '4px'}}>{item.jsx}</div>));
+ items = items.map(item => (<div key={item.key} style={{marginTop: '4px'}}>{item.jsx}</div>));
}
return (<div style={{border: '1px solid grey', padding: '4px'}}>
|
please let super + tab be fixed | @@ -5057,15 +5057,17 @@ view(const Arg *arg)
int i;
selmon->seltags ^= 1; /* toggle sel tagset */
-
if (ui & TAGMASK) {
selmon->tagset[selmon->seltags] = ui & TAGMASK;
- selmon->pertag->prevtag = selmon->pertag->curtag;
- if (ui == ~0)
+ if (ui == ~0) {
+ selmon->pertag->prevtag = selmon->pertag->curtag;
selmon->pertag->curtag = 0;
- else {
+ } else {
for (i = 0; !(ui & 1 << i); i++) ;
+ if ((i + 1) == selmon->pertag->curtag)
+ return;
+ selmon->pertag->prevtag = selmon->pertag->curtag;
selmon->pertag->curtag = i + 1;
}
} else {
|
[net][sal_socket] improve closesocke/shutdown error handling | @@ -78,29 +78,39 @@ RTM_EXPORT(bind);
int shutdown(int s, int how)
{
- int socket;
+ int error = 0;
+ int socket = -1;
struct dfs_fd *d;
+ socket = dfs_net_getsocket(s);
+ if (socket < 0)
+ {
+ rt_set_errno(-ENOTSOCK);
+ return -1;
+ }
+
d = fd_get(s);
if (d == NULL)
{
rt_set_errno(-EBADF);
-
return -1;
}
- socket = dfs_net_getsocket(s);
if (sal_shutdown(socket, how) == 0)
{
+ error = 0;
+ }
+ else
+ {
+ rt_set_errno(-ENOTSOCK);
+ error = -1;
+ }
+
/* socket has been closed, delete it from file system fd */
fd_put(d);
fd_put(d);
- return 0;
- }
-
- return -1;
-
+ return error;
}
RTM_EXPORT(shutdown);
@@ -240,25 +250,39 @@ RTM_EXPORT(socket);
int closesocket(int s)
{
- int socket = dfs_net_getsocket(s);
+ int error = 0;
+ int socket = -1;
struct dfs_fd *d;
+ socket = dfs_net_getsocket(s);
+ if (socket < 0)
+ {
+ rt_set_errno(-ENOTSOCK);
+ return -1;
+ }
+
d = fd_get(s);
- if(!d)
+ if (d == RT_NULL)
{
+ rt_set_errno(-EBADF);
return -1;
}
if (sal_closesocket(socket) == 0)
{
+ error = 0;
+ }
+ else
+ {
+ rt_set_errno(-ENOTSOCK);
+ error = -1;
+ }
+
/* socket has been closed, delete it from file system fd */
fd_put(d);
fd_put(d);
- return 0;
- }
-
- return -1;
+ return error;
}
RTM_EXPORT(closesocket);
|
Produce a more coherent error message when creating an abstract method with a body | @@ -1278,6 +1278,11 @@ static void method(Compiler *compiler) {
// Setup function and parse parameters
beginFunction(compiler, &fnCompiler, TYPE_ABSTRACT);
endCompiler(&fnCompiler);
+
+ if (check(compiler, TOKEN_LEFT_BRACE)) {
+ error(compiler->parser, "Abstract methods can not have an implementation.");
+ return;
+ }
}
emitBytes(compiler, OP_METHOD, constant);
|
Fix typo in OPENSSL_malloc.pod
CLA: trivial | @@ -101,7 +101,7 @@ before ultimately calling OPENSSL_free().
OPENSSL_cleanse() fills B<ptr> of size B<len> with a string of 0's.
Use OPENSSL_cleanse() with care if the memory is a mapping of a file.
-If the storage controller uses write compression, then its possible
+If the storage controller uses write compression, then it's possible
that sensitive tail bytes will survive zeroization because the block of
zeros will be compressed. If the storage controller uses wear leveling,
then the old sensitive data will not be overwritten; rather, a block of
|
Restrict namespace length to 128 instead of 1024 | @@ -408,7 +408,7 @@ static grib_accessor* _grib_find_accessor(grib_handle* h, const char* name)
while ( *p != '.' && *p != '\0' ) p++;
if ( *p == '.' ) {
int i=0,len=0;
- char name_space[1024];
+ char name_space[128];
char* basename=NULL;
basename=p+1;
p--;
@@ -502,7 +502,7 @@ grib_accessor* grib_find_accessor_fast(grib_handle* h, const char* name)
while ( *p != '.' && *p != '\0' ) p++;
if ( *p == '.' ) {
int i=0,len=0;
- char name_space[1024];
+ char name_space[128];
p--;
i=0;
len=p-name+1;
|
fix very old memory leak in ASCII multigets
if using gets/cas or -o modern, and a key after the first key is too long (>
KEY_MAX_LENGTH), the suffixes used for the previous keys are leaked.
hopefully this solves the mystery memory leaks folks have had on and off over
the years... | @@ -3279,6 +3279,9 @@ static inline void process_get_command(conn *c, token_t *tokens, size_t ntokens,
out_string(c, "CLIENT_ERROR bad command line format");
while (i-- > 0) {
item_remove(*(c->ilist + i));
+ if (return_cas || !settings.inline_ascii_response) {
+ do_cache_free(c->thread->suffix_cache, *(c->suffixlist + i));
+ }
}
return;
}
|
export ipv4/ipv6 nodes to equal parts | @@ -523,39 +523,35 @@ int kad_blacklist( const IP* addr ) {
}
// Export known nodes; the maximum is 200 nodes
-int kad_export_nodes( IP addr_array[], size_t num ) {
- IP4 *addr4;
- IP6 *addr6;
+int kad_export_nodes( IP addrs[], size_t num ) {
+ IP4 addr4[150];
+ IP6 addr6[150];
int num4;
int num6;
- int n;
+ int n = 0;
+ int j = 0;
+ int k = 0;
- if( gconf->af == AF_INET6 ) {
- num6 = MIN(num, 200);
- addr6 = calloc( num6, sizeof(IP6) );
- num4 = 0;
- addr4 = NULL;
- } else {
- num6 = 0;
- addr6 = NULL;
- num4 = MIN(num, 200);
- addr4 = calloc( num4, sizeof(IP4) );
- }
+ num6 = MIN(num, N_ELEMS(addr4));
+ num4 = MIN(num, N_ELEMS(addr6));
dht_lock();
dht_get_nodes( addr4, &num4, addr6, &num6 );
dht_unlock();
- if( gconf->af == AF_INET6 ) {
- for( n = 0; n < num6; ++n ) {
- memcpy( &addr_array[n], &addr6[n], sizeof(IP6) );
+ // Export IPv4 and IPv6 addresses in equal parts
+ while( (num4 || num6 ) && num ) {
+ if( num && num4 ) {
+ memcpy( &addrs[n++], &addr4[j++], sizeof(IP4) );
+ num4--;
+ num--;
}
- free( addr6 );
- } else {
- for( n = 0; n < num4; ++n ) {
- memcpy( &addr_array[n], &addr4[n], sizeof(IP4) );
+
+ if( num && num6 ) {
+ memcpy( &addrs[n++], &addr6[k++], sizeof(IP6) );
+ num6--;
+ num--;
}
- free( addr4 );
}
return n;
|
Make CBMC type header script use absolute paths.
The type header script runs goto-instrument in a temporary directory,
so the script must construct absolute paths to the inputs before
changing directory to run the command. | @@ -93,7 +93,7 @@ def make_header_file(goto_binary, fyle, target_folder):
drop_header_cmd = ["goto-instrument",
"--dump-c-type-header",
module,
- goto_binary,
+ os.path.abspath(goto_binary),
header_file]
res = subprocess.run(drop_header_cmd,
stdout=subprocess.PIPE,
|
fix vs2017 pipeline vmimage | @@ -12,7 +12,7 @@ jobs:
displayName: Windows-2017
pool:
vmImage:
- windows-2017
+ vs2017-win2016
strategy:
matrix:
Debug:
@@ -82,7 +82,7 @@ jobs:
displayName: Linux
pool:
vmImage:
- ubuntu-16.04
+ ubuntu-18.04
strategy:
matrix:
Debug:
|
Set /oic/p and /oic/d not observable | @@ -865,6 +865,12 @@ register_resources(void)
// only local device registration
oc_add_resource(res_d2dserverlist);
oc_cloud_add_resource(res_d2dserverlist);
+
+ oc_resource_t *device_resource = oc_core_get_resource_by_index(OCF_D, DEVICE);
+ oc_resource_set_observable(device_resource, false);
+
+ oc_resource_t *platform_resource = oc_core_get_resource_by_index(OCF_P, DEVICE);
+ oc_resource_set_observable(platform_resource, false);
}
#ifdef OC_SECURITY
|
Fix incorrect test param. | @@ -312,7 +312,7 @@ storageGcsAuth(StorageGcs *this, HttpHeader *httpHeader)
{
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(STORAGE_GCS, this);
- FUNCTION_TEST_PARAM(KEY_VALUE, httpHeader);
+ FUNCTION_TEST_PARAM(HTTP_HEADER, httpHeader);
FUNCTION_TEST_END();
ASSERT(this != NULL);
|
Test: add sdk_config at the end | /* Include BLE default config at bottom to set the default values for the configurations which are not overridden */
#include "iot_ble_config_defaults.h"
+#include "sdk_config.h"
+
#endif /* _IOT_BLE_CONFIG_H_ */
|
Add HelloRetryRequest text to s_client/s_server | @@ -527,6 +527,7 @@ static STRINT_PAIR handshakes[] = {
{", ServerHello", 2},
{", HelloVerifyRequest", 3},
{", NewSessionTicket", 4},
+ {", HelloRetryRequest", 6},
{", EncryptedExtensions", 8},
{", Certificate", 11},
{", ServerKeyExchange", 12},
|
Fix parsing parameters | #include <nanoCLR_Application.h>
#include <target_common.h>
#include <iostream>
+#include <locale>
+#include <codecvt>
+#include <string>
//
// UNDONE: Feature configuration
@@ -68,7 +71,7 @@ bool Target_GetReleaseInfo(NFReleaseInfo &releaseInfo)
/////////////////////////////////////////////////////////////////////////////
//
-int _tmain(int argc, wchar_t *argv[])
+int _tmain(int argc, _TCHAR *argv[])
{
wprintf(L"\n.NET nanoFramework nanoCLR WIN32 v");
std::cout << VERSION_STRING;
@@ -87,10 +90,11 @@ int _tmain(int argc, wchar_t *argv[])
// fill arguments from command line
clrSettings.StartArgs.resize(argc - 1);
+ std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
+
for (int i = 0; i < argc - 1; i++)
{
- std::wstring argv_ = std::wstring(argv[1 + i]);
- clrSettings.StartArgs[i] = argv_;
+ clrSettings.StartArgs[i] = converter.from_bytes(argv[1 + i]);
}
ClrStartup(clrSettings);
|
config_tools: clear schema files
Clear schema files of config tools when 'make clean'. | @@ -240,6 +240,8 @@ def clean_configurator_deb(version, build_dir):
add_cmd_list(cmd_list, 'bash -c "find -name "build" -prune -exec rm -rf {} \;"', config_tools_path)
add_cmd_list(cmd_list, 'bash -c "find -name "target" -prune -exec rm -rf {} \;"', config_tools_path)
add_cmd_list(cmd_list, 'bash -c "rm -rf dist"', config_tools_path)
+ add_cmd_list(cmd_list, 'bash -c "rm -rf schema/sliced.xsd"', config_tools_path)
+ add_cmd_list(cmd_list, 'bash -c "rm -rf schema/allchecks.xsd"', config_tools_path)
add_cmd_list(cmd_list, 'bash -c "python3 ./configurator/packages/configurator/thirdLib/manager.py clean"', config_tools_path)
run_cmd_list(cmd_list)
return
|
vlib: switch when frames are different
[ebari] no need to switch if next2, next3 are equal to next_index
[dbarach] change fix_speculation calculaton to a branch-free xor/or tree | @@ -138,8 +138,8 @@ do { \
#define vlib_validate_buffer_enqueue_x4(vm,node,next_index,to_next,n_left_to_next,bi0,bi1,bi2,bi3,next0,next1,next2,next3) \
do { \
/* After the fact: check the [speculative] enqueue to "next" */ \
- u32 fix_speculation = next_index != next0 || next_index != next1 \
- || next_index != next2 || next_index != next3; \
+ u32 fix_speculation = (next_index ^ next0) | (next_index ^ next1) \
+ | (next_index ^ next2) | (next_index ^ next3); \
if (PREDICT_FALSE(fix_speculation)) \
{ \
/* rewind... */ \
@@ -181,6 +181,7 @@ do { \
n_left_to_next --; \
} \
else \
+ { \
vlib_set_next_frame_buffer (vm, node, next3, bi3); \
\
/* Change speculation: last 2 packets went to the same node*/ \
@@ -191,6 +192,7 @@ do { \
vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); \
} \
} \
+ } \
} while(0);
/** \brief Finish enqueueing one buffer forward in the graph.
|
esp32/machine_hw_spi: Fix large HW SPI transfers by splitting them up.
Breaks up HW SPI transfers into maximum chunks of 32736 bits (4092 bytes),
because this is the maximum that the underlying ESP IDF will accept. | #include "driver/spi_master.h"
+#define MP_HW_SPI_MAX_XFER_BYTES (4092)
+#define MP_HW_SPI_MAX_XFER_BITS (MP_HW_SPI_MAX_XFER_BYTES * 8) // Has to be an even multiple of 8
+
typedef struct _machine_hw_spi_obj_t {
mp_obj_base_t base;
spi_host_device_t host;
@@ -227,35 +230,52 @@ STATIC void machine_hw_spi_deinit(mp_obj_base_t *self_in) {
STATIC void machine_hw_spi_transfer(mp_obj_base_t *self_in, size_t len, const uint8_t *src, uint8_t *dest) {
machine_hw_spi_obj_t *self = MP_OBJ_TO_PTR(self_in);
- int bits_to_send = len * self->bits;
- bool shortMsg = len <= 4;
-
if (self->state == MACHINE_HW_SPI_STATE_DEINIT) {
mp_raise_msg(&mp_type_OSError, "transfer on deinitialized SPI");
return;
}
- struct spi_transaction_t transaction = {
- .flags = 0,
- .length = bits_to_send,
- .tx_buffer = NULL,
- .rx_buffer = NULL,
- };
+ struct spi_transaction_t transaction = { 0 };
+
+ // Round to nearest whole set of bits
+ int bits_to_send = len * 8 / self->bits * self->bits;
+
- if (shortMsg) {
+ if (len <= 4) {
if (src != NULL) {
memcpy(&transaction.tx_data, src, len);
}
- transaction.flags |= (SPI_TRANS_USE_TXDATA | SPI_TRANS_USE_RXDATA);
+
+ transaction.flags = SPI_TRANS_USE_TXDATA | SPI_TRANS_USE_RXDATA;
+ transaction.length = bits_to_send;
+ spi_device_transmit(self->spi, &transaction);
+
+ if (dest != NULL) {
+ memcpy(dest, &transaction.rx_data, len);
+ }
} else {
- transaction.tx_buffer = src;
- transaction.rx_buffer = dest;
+ int offset = 0;
+ int bits_remaining = bits_to_send;
+
+ while (bits_remaining) {
+ memset(&transaction, 0, sizeof(transaction));
+
+ transaction.length =
+ bits_remaining > MP_HW_SPI_MAX_XFER_BITS ? MP_HW_SPI_MAX_XFER_BITS : bits_remaining;
+
+ if (src != NULL) {
+ transaction.tx_buffer = src + offset;
+ }
+ if (dest != NULL) {
+ transaction.rx_buffer = dest + offset;
}
spi_device_transmit(self->spi, &transaction);
+ bits_remaining -= transaction.length;
- if (shortMsg && dest != NULL) {
- memcpy(dest, &transaction.rx_data, len);
+ // doesn't need ceil(); loop ends when bits_remaining is 0
+ offset += transaction.length / 8;
+ }
}
}
|
dm: apl-mrb: launch_uos: remove mei debug flags
Acked-by: Acked-by: Yu Wang | @@ -93,7 +93,7 @@ if [ $cse_passthrough == 1 ]; then
echo "0000:00:0f.0" > /sys/bus/pci/drivers/pci-stub/bind
boot_cse_option="$boot_cse_option"" -s 15,passthru,0/0f/0 "
else
- boot_cse_option="$boot_cse_option"" -s 15,virtio-heci,d1 "
+ boot_cse_option="$boot_cse_option"" -s 15,virtio-heci,0/0f/0 "
fi
# for sd card passthrough - SDXC/MMC Host Controller 00:1b.0
@@ -272,7 +272,7 @@ if [ $cse_passthrough == 1 ]; then
echo "0000:00:0f.0" > /sys/bus/pci/drivers/pci-stub/bind
boot_cse_option="$boot_cse_option"" -s 15,passthru,0/0f/0 "
else
- boot_cse_option="$boot_cse_option"" -s 15,virtio-heci,d1 "
+ boot_cse_option="$boot_cse_option"" -s 15,virtio-heci,0/0f/0 "
fi
#for memsize setting, total 8GB(>7.5GB) uos->6GB, 4GB(>3.5GB) uos->2GB
|
casta : remove rev0 configuration
casta doesn't support rev0 board.
BRANCH=firmware-octopus-11297.B
TEST=None | @@ -143,17 +143,6 @@ static void cbi_init(void)
}
DECLARE_HOOK(HOOK_INIT, cbi_init, HOOK_PRIO_INIT_I2C + 1);
-/* TODO: Casta: remove this routine after rev0 is not supported */
-static void board_init(void)
-{
- uint32_t val;
- if (cbi_get_board_version(&val) == EC_SUCCESS && val > 0)
- return;
-
- gpio_set_flags(GPIO_USB_C0_MUX_INT_ODL, GPIO_INT_FALLING | GPIO_PULL_UP);
-}
-DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT);
-
void board_overcurrent_event(int port, int is_overcurrented)
{
/* Check that port number is valid. */
|
move reset to common hmac_init function | @@ -93,7 +93,6 @@ static int s2n_sslv3_mac_init(struct s2n_hmac_state *state, s2n_hmac_algorithm a
GUARD(s2n_hash_update(&state->outer_just_key, key, klen));
GUARD(s2n_hash_update(&state->outer_just_key, state->xor_pad, state->xor_pad_size));
- memset(&state->xor_pad, 0, sizeof(state->xor_pad));
/* Copy inner_just_key to inner */
return s2n_hmac_reset(state);
@@ -105,7 +104,6 @@ static int s2n_tls_hmac_init(struct s2n_hmac_state *state, s2n_hmac_algorithm al
if (klen > state->xor_pad_size) {
GUARD(s2n_hash_update(&state->outer, key, klen));
GUARD(s2n_hash_digest(&state->outer, state->digest_pad, state->digest_size));
-
memcpy_check(state->xor_pad, state->digest_pad, state->digest_size);
copied = state->digest_size;
} else {
@@ -127,9 +125,7 @@ static int s2n_tls_hmac_init(struct s2n_hmac_state *state, s2n_hmac_algorithm al
}
GUARD(s2n_hash_update(&state->outer_just_key, state->xor_pad, state->xor_pad_size));
- memset(&state->xor_pad, 0, sizeof(state->xor_pad));
-
- return s2n_hmac_reset(state);
+ return 0;
}
int s2n_hmac_xor_pad_size(s2n_hmac_algorithm hmac_alg, uint16_t *xor_pad_size)
@@ -209,6 +205,14 @@ int s2n_hmac_init(struct s2n_hmac_state *state, s2n_hmac_algorithm alg, const vo
} else {
GUARD(s2n_tls_hmac_init(state, alg, key, klen));
}
+
+ /* Once we have updated the outer_just_key, don't need the key material in xor_pad, so wipe it.
+ * Since xor_pad is used as a source of bytes in s2n_hmac_digest_two_compression_rounds,
+ * this also prevents uninitilized bytes being used.
+ */
+ memset(&state->xor_pad, 0, sizeof(state->xor_pad));
+ GUARD(s2n_hmac_reset(state));
+
return 0;
}
|
zephyr/drivers/cros_flash/cros_flash_xec.c: Format with clang-format
BRANCH=none
TEST=none | @@ -303,8 +303,7 @@ static int flash_set_status_for_prot(const struct device *dev, int reg1)
flash_set_status(dev, reg1);
- spi_flash_reg_to_protect(reg1, 0, &addr_prot_start,
- &addr_prot_length);
+ spi_flash_reg_to_protect(reg1, 0, &addr_prot_start, &addr_prot_length);
return EC_SUCCESS;
}
@@ -392,7 +391,6 @@ static int cros_flash_xec_init(const struct device *dev)
return 0;
}
-
static int cros_flash_xec_write(const struct device *dev, int offset, int size,
const char *src_data)
{
|
component/bt: Fix BLE printf missing problem | @@ -186,7 +186,7 @@ void esp_log_write(esp_log_level_t level, const char* tag, const char* format, .
*/
#define ESP_LOG_BUFFER_HEX(tag, buffer, buff_len) \
do { \
- if (LOG_LOCAL_LEVEL > ESP_LOG_INFO) { \
+ if (LOG_LOCAL_LEVEL >= ESP_LOG_INFO) { \
ESP_LOG_BUFFER_HEX_LEVEL( tag, buffer, buff_len, ESP_LOG_INFO ); \
}\
} while(0)
@@ -205,7 +205,7 @@ void esp_log_write(esp_log_level_t level, const char* tag, const char* format, .
*/
#define ESP_LOG_BUFFER_CHAR(tag, buffer, buff_len) \
do { \
- if (LOG_LOCAL_LEVEL > ESP_LOG_INFO) { \
+ if (LOG_LOCAL_LEVEL >= ESP_LOG_INFO) { \
ESP_LOG_BUFFER_CHAR_LEVEL( tag, buffer, buff_len, ESP_LOG_INFO ); \
}\
} while(0)
|
Adding VS 2017 64 bit to Appveyor build matrix | version: 2.0.{build}
-image:
- - Visual Studio 2013
+matrix:
+ allow_failures:
+ #GROUP: (SUPPORTED/EXPERIMENTAL)
+ #EXPERIMENTAL is allowed to fail under build matrix
+ - GROUP: "EXPERIMENTAL"
+
+environment:
+ matrix:
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
+ VS_VERSION: "10 2010"
+ ARCH: Win32
+ GROUP: "SUPPORTED"
+ BOOST_ROOT:"C:/Libraries/boost"
+ # New build on Visual Studio 15 2017
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ VS_VERSION: "15 2017"
+ ARCH: Win64
+ GROUP: "EXPERIMENTAL"
+ BOOST_ROOT:"C:/Libraries/boost_1_67_0"
# called before repo cloning
init:
@@ -18,9 +35,14 @@ init:
- set BUILD_HOME=buildprod
- set TEST_HOME=nrtestsuite
- set NRTEST_SCRIPT=C:\Python27\Scripts
- - set GENERATOR="Visual Studio 10 2010"
- - set BOOST_ROOT="C:\\Libraries\\boost"
- - set BOOST_LIB="C:\\Libraries\\boost\\lib32-msvc-12.0"
+ - if "%ARCH%"=="Win64" (set VS_ARCH=Win64)
+ - set GENERATOR="Visual Studio %VS_VERSION%%VS_ARCH%"
+ # See values set
+ - echo %APPVEYOR_BUILD_WORKER_IMAGE%
+ - echo %ARCH%
+ - echo %BUILD_HOME%
+ - echo %GENERATOR%
+ - echo %BOOST_ROOT%
# called after repo clone
install:
@@ -32,7 +54,6 @@ before_build:
- cd %BUILD_HOME%
- cmake -G %GENERATOR%
-DBOOST_ROOT="%BOOST_ROOT%"
- -DBOOST_LIBRARYDIR="%BOOST_LIB%"
-DBoost_USE_STATIC_LIBS="ON" ..
# run custom build script
|
Make coverall happy. | @@ -609,6 +609,9 @@ def check_cls(cosmo):
nc3 = ccl.NumberCountsTracer(cosmo, True, dndz=(z,n), bias=(z,b), mag_bias=(z,b))
cmbl=ccl.CMBLensingTracer(cosmo, 1100.)
+ assert_raises(ValueError, ccl.WeakLensingTracer, cosmo, None)
+ assert_raises(ValueError, ccl.NumberCountsTracer, cosmo, False, (z,n), None)
+
# Check valid ell input is accepted
assert_( all_finite(ccl.angular_cl(cosmo, lens1, lens1, ell_scl)) )
assert_( all_finite(ccl.angular_cl(cosmo, lens1, lens1, ell_lst)) )
|
[libc] fix the extension routine that adds entropy to the random pool
Worked for short entropy but actually would end up zeroing out the new
entropy word. | @@ -20,7 +20,8 @@ void rand_add_entropy(const void *buf, size_t len) {
uint32_t enp = 0;
for (size_t i = 0; i < len; i++) {
- enp ^= ((enp << 8) | (enp >> 24)) ^ ((const uint8_t *)buf)[i];
+ uint32_t c = ((const uint8_t *)buf)[i];
+ enp = ((enp << 8) | (enp >> 24)) ^ c;
}
randseed ^= enp;
|
[mechanisms] remove pointer relatd to dimensionless arrays | //! The maximal number of contacts.
#define MBTB_MAX_CONTACTS_NUMBER 100
//!The dynamical bodies.
-extern SP::MBTB_Body sDS[];
+extern SP::MBTB_Body sDS[MBTB_MAX_BODIES_NUMBER];
//!The joint relations.
-extern MBTB_JointR * sJointRelations[];
+extern MBTB_JointR * sJointRelations[MBTB_MAX_JOINTS_NUMBER];
//!The contacts.
-extern MBTB_Contact * sContacts[];
+extern MBTB_Contact * sContacts[MBTB_MAX_CONTACTS_NUMBER];
//!The number of bodies.
extern unsigned int sNbOfBodies;
//!The number of joints.
@@ -36,9 +36,9 @@ extern unsigned int sFreqGraphic;
//!The output frequency.
extern unsigned int sFreqOutput;
//!The siconos joint interactions.
-extern SP::Interaction sInterJoints[];
+extern SP::Interaction sInterJoints[MBTB_MAX_JOINTS_NUMBER];
//!The siconos contact interactions.
-extern SP::Interaction sInterContacts[];
+extern SP::Interaction sInterContacts[MBTB_MAX_CONTACTS_NUMBER];
//!siconos model.
extern SP::NonSmoothDynamicalSystem myNsds;
//!siconos model t0.
@@ -50,9 +50,9 @@ extern unsigned int sUseGravity;
//!for the graph building.
//! The dynamical systems involved in the joint 'numJ' have indices sJointIndexDS[2*numJ] and sJointIndexDS[2*numJ+1].
-extern int sJointIndexDS[];
+extern int sJointIndexDS[2*MBTB_MAX_JOINTS_NUMBER];
//!The type of joint see JOINTS_TYPE.
-extern int sJointType[];
+extern int sJointType[MBTB_MAX_JOINTS_NUMBER];
//!The siconos simulation.
extern SP::TimeStepping sSimu;
//!The draw mode of the artefacts (forces, normals). Used with bit to bit test with MBTB_CST.
|
sync: Remove use of ACCEL_INTERRUPTS
sync sensor assume a hardware interrupt exists.
BRANCH=asurada,dedede,brya
TEST=Build all. Check Zephyr with herobrine. Check on bugzzy. | #error This driver needs CONFIG_ACCEL_FIFO
#endif
-#ifndef CONFIG_ACCEL_INTERRUPTS
-#error This driver needs CONFIG_ACCEL_INTERRUPTS
-#endif
-
struct sync_event_t {
uint32_t timestamp;
int counter;
|
Define the FP register size on PPC to be double
According to GLIBC headers those are in fact double (8 Byte) not
long double (16 Byte) | @@ -72,7 +72,7 @@ typedef uint64_t unw_word_t;
typedef int64_t unw_sword_t;
#endif
-typedef long double unw_tdep_fpreg_t;
+typedef double unw_tdep_fpreg_t;
/*
* Vector register (in PowerPC64 used for AltiVec registers)
|
Add a main vs 1.7 plot | @@ -249,7 +249,7 @@ def main():
int: The process return code.
"""
- absoluteXLimit = 35
+ absoluteXLimit = 40
charts = [
# --------------------------------------------------------
@@ -320,6 +320,17 @@ def main():
],
# --------------------------------------------------------
# Latest main vs last stable release charts
+ [
+ # Relative scores
+ ["thorough", "medium", "fast"],
+ ["ref-main-avx2"],
+ ["4x4", "6x6", "8x8"],
+ True,
+ "ref-1.7",
+ None,
+ "relative-main-vs-1.x.png",
+ (None, None)
+ ],
[
# Relative scores
["thorough", "medium", "fast", "fastest"],
|
improved detection of empty blocks | @@ -5448,6 +5448,12 @@ while(1)
printf("unsupported pcapng version: %d\n", pcapngshb.major_version);
break;
}
+ if(pcapngbh.total_length == 0)
+ {
+ pcapreaderrors++;
+ printf("empty block detected\n");
+ break;
+ }
aktseek = lseek(fd, 0, SEEK_CUR);
if(aktseek < 0)
{
@@ -5459,6 +5465,7 @@ while(1)
{
pcapngoptionwalk(fd, pcapngbh.total_length);
}
+
resseek = lseek(fd, aktseek +pcapngbh.total_length -BH_SIZE -SHB_SIZE, SEEK_SET);
if(resseek < 0)
{
@@ -5477,6 +5484,12 @@ while(1)
pcapngbh.block_type = byte_swap_32(pcapngbh.block_type);
pcapngbh.total_length = byte_swap_32(pcapngbh.total_length);
}
+ if(pcapngbh.total_length == 0)
+ {
+ pcapreaderrors++;
+ printf("empty block detected\n");
+ break;
+ }
if(pcapngbh.block_type == 1)
{
res = read(fd, &pcapngidb, IDB_SIZE);
|
libcupsfilters: In rastertopwg() removed unneeded marking of options in PPD | @@ -113,12 +113,7 @@ cups_file_t *inputfp; /* Print file */
back = ppdFindAttr(data->ppd, "cupsBackSide", NULL);
- if (data->ppd)
- {
- ppdMarkDefaults(data->ppd);
- ppdMarkOptions(data->ppd, data->num_options, data->options);
- }
- else
+ if (!data->ppd)
{
if (log) log(ld, FILTER_LOGLEVEL_DEBUG,
"rastertopwg: PPD file is not specified.");
|
doc: fix doxy for hiding internal symbols
Docyten syntax for EXCLUDE_SYMBOLS is with spaces for separator,
not commas. | @@ -866,7 +866,7 @@ EXCLUDE_PATTERNS =
# Exclude internal names (starting with an _) and doxygen-added __unnamed__
# names given to unnamed nested unions
-EXCLUDE_SYMBOLS = _*, *.__unnamed__
+EXCLUDE_SYMBOLS = _* *.__unnamed__
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
|
Namespaces: Update man page | .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "ELEKTRA\-NAMESPACES" "7" "March 2019" "" ""
+.TH "ELEKTRA\-NAMESPACES" "7" "May 2019" "" ""
.
.SH "NAME"
\fBelektra\-namespaces\fR \- namespaces
@@ -128,7 +128,7 @@ The configuration is typically located below \fBKDB_DB_SYSTEM\fR\. Other absolut
Keys that are not in a namespace (i\.e\. start with an \fB/\fR) are called cascading keys\. Cascading keys do not stem from a configuration source, but are used by applications to lookup a key in different namespaces\. So, multiple keys can contribute to each cascading key name\.
.
.P
-Cascading is the same as a name resolution and provides a namespace unification as described in Versatility and Unix semantics in namespace unification \fIhttp://dl\.acm\.org/citation\.cfm?id=1138045\fR\.
+Cascading is the same as a name resolution and provides a namespace unification as described in Versatility and Unix semantics in namespace unification \fIhttp://citeseerx\.ist\.psu\.edu/viewdoc/summary?doi=10\.1\.1\.81\.7888\fR\.
.
.P
Keys without a namespace can not be stored by their nature\. So they are transient: after a restart they are forgotten\.
|
BugID:21829515: Dump of WDG When >15s
set timeout to 15s when >15s | @@ -29,7 +29,7 @@ int32_t hal_wdg_init(wdg_dev_t *wdg)
to = wdg->config.timeout/1000;
if(0x00U != (to & 0xF0U)) {
- return EIO;
+ to = 0x0F; /*Fixme Timeout <= 15s. set 15s to void crash when > 15s.*/
}
wdt = (RDA_WDT_TypeDef *)WDT_0;
|
options/ansi: Implement wmem{cpy,move} | @@ -259,8 +259,15 @@ wchar_t *wcsncpy(wchar_t *__restrict dest, const wchar_t *__restrict src, size_t
return a;
}
-wchar_t *wmemcpy(wchar_t *__restrict, const wchar_t *__restrict, size_t) MLIBC_STUB_BODY
-wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t) MLIBC_STUB_BODY
+wchar_t *wmemcpy(wchar_t *__restrict dest, const wchar_t *__restrict src, size_t n) {
+ memcpy(dest, src, n * sizeof(wchar_t));
+ return dest;
+}
+
+wchar_t *wmemmove(wchar_t *dest, const wchar_t *src, size_t n) {
+ memmove(dest, src, n * sizeof(wchar_t));
+ return dest;
+}
wchar_t *wcscat(wchar_t *__restrict dest, const wchar_t *__restrict src) {
wcscpy(dest + wcslen(dest), src);
|
Change to use oso strings for osc hostname/port | @@ -2548,7 +2548,7 @@ void print_loading_message(char const *s) {
typedef struct {
Ged ged;
oso *file_name;
- char const *osc_hostname, *osc_port;
+ oso *osc_hostname, *osc_port;
int undo_history_limit;
int softmargin_y, softmargin_x;
int hardmargin_y, hardmargin_x;
@@ -2816,10 +2816,10 @@ int main(int argc, char **argv) {
break;
}
case Argopt_osc_server:
- t.osc_hostname = optarg;
+ osoput(&t.osc_hostname, optarg);
break;
case Argopt_osc_port:
- t.osc_port = optarg;
+ osoput(&t.osc_port, optarg);
break;
case Argopt_osc_midi_bidule:
midi_mode_deinit(&t.midi_mode);
@@ -2868,8 +2868,8 @@ int main(int argc, char **argv) {
ged_deinit(&t.ged);
exit(1);
}
- if (t.osc_port != NULL) {
- if (!ged_set_osc_udp(&t.ged, t.osc_hostname, t.osc_port)) {
+ if (t.osc_port) {
+ if (!ged_set_osc_udp(&t.ged, osoc(t.osc_hostname), osoc(t.osc_port))) {
fprintf(stderr, "Failed to set up OSC networking\n");
ged_deinit(&t.ged);
exit(1);
@@ -3828,6 +3828,8 @@ quit:
endwin();
ged_deinit(&t.ged);
osofree(t.file_name);
+ osofree(t.osc_hostname);
+ osofree(t.osc_port);
midi_mode_deinit(&t.midi_mode);
#ifdef FEAT_PORTMIDI
if (portmidi_is_initialized)
|
doc: Update acrnctrl readme
Update broken link and minor editorial changes | @@ -11,8 +11,6 @@ The ``acrnctl`` tool helps users create, delete, launch, and stop a User
VM (aka UOS). The tool runs under the Service VM, and User VMs should be based
on ``acrn-dm``. The daemon for acrn-manager is `acrnd`_.
-
-
Usage
=====
@@ -32,7 +30,7 @@ You can see the available ``acrnctl`` commands by running:
Use acrnctl [cmd] help for details
.. note::
- You must run ``acrnctl`` with root privileges, and make sure ``acrnd``
+ You must run ``acrnctl`` with root privileges, and make sure the ``acrnd``
service has been started before running ``acrnctl``.
Here are some usage examples:
@@ -54,7 +52,7 @@ container::
# acrnctl add launch_uos.sh -C
.. note:: You can download an :acrn_raw:`example launch_uos.sh script
- <devicemodel/samples/nuc/launch_uos.sh>`
+ <misc/config_tools/data/sample_launch_scripts/nuc/launch_uos.sh>`
that supports the ``-C`` (``run_container`` function) option.
Note that the launch script must only launch one User VM instance.
@@ -87,8 +85,9 @@ Use the ``list`` command to display VMs and their state:
Start VM
========
-If a VM is in a stopped state, you can start it with the start command. The acrnd service automatically loads launch scripts under /usr/share/acrn/conf/add/ to boot the VMs.
-command:
+If a VM is in a stopped state, you can start it with the ``start`` command. The
+``acrnd`` service automatically loads the launch script under
+``/usr/share/acrn/conf/add/`` to boot the VM.
.. code-block:: none
@@ -97,7 +96,7 @@ command:
Stop VM
=======
-Use the ``stop`` command to stop one or more running VM:
+Use the ``stop`` command to stop one or more running VMs:
.. code-block:: none
|
Enable css parser testcase | @@ -25,8 +25,8 @@ int main(void)
Logger_SetHandlerW( LoggerHandlerW );
#endif
ret |= test_string();
- ret |= test_image_reader();/*
- ret |= test_css_parser();
+ ret |= test_image_reader();
+ ret |= test_css_parser();/*
ret |= test_widget_render();
ret |= test_char_render();
ret |= test_string_render();*/
|
Fix fast sending of multiple group commands
The limit is 6 parallel in a 'burst'. Each command needs ~1 second
to be processed.
Mainly addresses | @@ -6419,7 +6419,7 @@ void DeRestPluginPrivate::processTasks()
return;
}
- if (runningTasks.size() > 4)
+ if (runningTasks.size() >= MAX_BACKGROUND_TASKS)
{
std::list<TaskItem>::iterator j = runningTasks.begin();
std::list<TaskItem>::iterator jend = runningTasks.end();
@@ -6460,7 +6460,7 @@ void DeRestPluginPrivate::processTasks()
// send only few requests to a destination at a time
int onAir = 0;
- const int maxOnAir = i->req.dstAddressMode() == deCONZ::ApsGroupAddress ? 4 : 2;
+ const int maxOnAir = i->req.dstAddressMode() == deCONZ::ApsGroupAddress ? 6 : 2;
std::list<TaskItem>::iterator j = runningTasks.begin();
std::list<TaskItem>::iterator jend = runningTasks.end();
@@ -6478,7 +6478,18 @@ void DeRestPluginPrivate::processTasks()
break;
}
- if (i->req.dstAddress() == j->req.dstAddress())
+ if (i->req.dstAddressMode() == deCONZ::ApsGroupAddress &&
+ j->req.dstAddressMode() == deCONZ::ApsGroupAddress)
+ {
+ onAir++;
+
+ if (onAir >= maxOnAir)
+ {
+ ok = false;
+ break;
+ }
+ }
+ else if (i->req.dstAddress() == j->req.dstAddress())
{
onAir++;
int dt = idleTotalCounter - j->sendTime;
|
Properly initialize file pointers to null
If in `init_cpu_power_data_k10temp` we fail to initialize all paths,
and fail initialization, then in the destructor, we will most likely
pass invalid value to the `fclose`. | @@ -68,10 +68,10 @@ struct CPUPowerData_k10temp : public CPUPowerData {
fclose(this->socCurrentFile);
};
- FILE* coreVoltageFile;
- FILE* coreCurrentFile;
- FILE* socVoltageFile;
- FILE* socCurrentFile;
+ FILE* coreVoltageFile {nullptr};
+ FILE* coreCurrentFile {nullptr};
+ FILE* socVoltageFile {nullptr};
+ FILE* socCurrentFile {nullptr};
};
struct CPUPowerData_zenpower : public CPUPowerData {
@@ -86,8 +86,8 @@ struct CPUPowerData_zenpower : public CPUPowerData {
fclose(this->socPowerFile);
};
- FILE* corePowerFile;
- FILE* socPowerFile;
+ FILE* corePowerFile {nullptr};
+ FILE* socPowerFile {nullptr};
};
struct CPUPowerData_rapl : public CPUPowerData {
@@ -101,7 +101,7 @@ struct CPUPowerData_rapl : public CPUPowerData {
fclose(this->energyCounterFile);
};
- FILE* energyCounterFile;
+ FILE* energyCounterFile {nullptr};
int lastCounterValue;
Clock::time_point lastCounterValueTime;
};
|
alpha_processing_neon.c: fix Dispatch/ExtractAlpha_NEON
the trailing width % 8 bytes would clear the upper bytes of
alpha_mask as they're done one at a time
since:
NEON: implement several alpha-processing functions | @@ -83,7 +83,7 @@ static void ApplyAlphaMultiply_NEON(uint8_t* rgba, int alpha_first,
static int DispatchAlpha_NEON(const uint8_t* WEBP_RESTRICT alpha,
int alpha_stride, int width, int height,
uint8_t* WEBP_RESTRICT dst, int dst_stride) {
- uint32_t alpha_mask = 0xffffffffu;
+ uint32_t alpha_mask = 0xffu;
uint8x8_t mask8 = vdup_n_u8(0xff);
uint32_t tmp[2];
int i, j;
@@ -107,6 +107,7 @@ static int DispatchAlpha_NEON(const uint8_t* WEBP_RESTRICT alpha,
dst += dst_stride;
}
vst1_u8((uint8_t*)tmp, mask8);
+ alpha_mask *= 0x01010101;
alpha_mask &= tmp[0];
alpha_mask &= tmp[1];
return (alpha_mask != 0xffffffffu);
@@ -135,7 +136,7 @@ static void DispatchAlphaToGreen_NEON(const uint8_t* WEBP_RESTRICT alpha,
static int ExtractAlpha_NEON(const uint8_t* WEBP_RESTRICT argb, int argb_stride,
int width, int height,
uint8_t* WEBP_RESTRICT alpha, int alpha_stride) {
- uint32_t alpha_mask = 0xffffffffu;
+ uint32_t alpha_mask = 0xffu;
uint8x8_t mask8 = vdup_n_u8(0xff);
uint32_t tmp[2];
int i, j;
@@ -157,6 +158,7 @@ static int ExtractAlpha_NEON(const uint8_t* WEBP_RESTRICT argb, int argb_stride,
alpha += alpha_stride;
}
vst1_u8((uint8_t*)tmp, mask8);
+ alpha_mask *= 0x0101010101;
alpha_mask &= tmp[0];
alpha_mask &= tmp[1];
return (alpha_mask == 0xffffffffu);
|
CMake: always move libraries;
Instead of only moving them when lovr is rebuilt.
That way plugins get moved into bin when their source changes. | @@ -321,7 +321,6 @@ if(NOT LOVR_BUILD_EXE)
target_compile_definitions(lovr PUBLIC LOVR_OMIT_MAIN) # specifically for win32 WinMain
endif()
-
set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET ${LOVR_SYMBOL_VISIBILITY})
set_target_properties(lovr PROPERTIES C_STANDARD 11)
set_target_properties(lovr PROPERTIES C_STANDARD_REQUIRED ON)
@@ -539,6 +538,9 @@ foreach(path ${LOVR_RESOURCES})
file(WRITE ${output} "const unsigned char ${identifier}[] = {${data}};\nconst unsigned int ${identifier}_len = sizeof(${identifier});\n")
endforeach()
+# Add a custom target that is always out of date so libraries are always moved
+add_custom_target(move_libraries ALL)
+
# Platforms
if(WIN32)
target_sources(lovr PRIVATE src/core/os_win32.c)
@@ -561,7 +563,7 @@ if(WIN32)
function(move_dll)
if(TARGET ${ARGV0})
- add_custom_command(TARGET lovr POST_BUILD
+ add_custom_command(TARGET move_libraries POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${ARGV0}>
$<TARGET_FILE_DIR:lovr>/$<TARGET_FILE_NAME:${ARGV0}>
@@ -606,13 +608,13 @@ elseif(APPLE)
if(TARGET ${ARGV0})
get_target_property(TARGET_TYPE ${ARGV0} TYPE)
if(${TARGET_TYPE} STREQUAL "MODULE_LIBRARY")
- add_custom_command(TARGET lovr POST_BUILD
+ add_custom_command(TARGET move_libraries POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${ARGV0}>
${EXE_DIR}/$<TARGET_FILE_NAME:${ARGV0}>
)
else()
- add_custom_command(TARGET lovr POST_BUILD
+ add_custom_command(TARGET move_libraries POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_SONAME_FILE:${ARGV0}>
${EXE_DIR}/$<TARGET_SONAME_FILE_NAME:${ARGV0}>
@@ -720,12 +722,13 @@ elseif(ANDROID)
# Copy plugin libraries to lib folder before packaging APK
foreach(target ${ALL_PLUGIN_TARGETS})
- add_custom_command(TARGET lovr POST_BUILD
+ add_custom_command(TARGET move_libraries POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${target}>
raw/lib/${ANDROID_ABI}/$<TARGET_FILE_NAME:${target}>
)
endforeach()
+ add_dependencies(buildAPK move_libraries)
endif()
elseif(UNIX)
if(LOVR_USE_LINUX_EGL)
@@ -744,13 +747,13 @@ elseif(UNIX)
if(TARGET ${ARGV0})
get_target_property(TARGET_TYPE ${ARGV0} TYPE)
if(${TARGET_TYPE} STREQUAL "MODULE_LIBRARY")
- add_custom_command(TARGET lovr POST_BUILD
+ add_custom_command(TARGET move_libraries POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${ARGV0}>
${CMAKE_BINARY_DIR}/bin/$<TARGET_FILE_NAME:${ARGV0}>
)
else()
- add_custom_command(TARGET lovr POST_BUILD
+ add_custom_command(TARGET move_libraries POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_SONAME_FILE:${ARGV0}>
${CMAKE_BINARY_DIR}/bin/$<TARGET_SONAME_FILE_NAME:${ARGV0}>
|
Fix code that was generating vtkError messages.
Per Allen Sanderson, surround the code with the proper if-condition, but comment out as it is not presently needed. | @@ -381,8 +381,14 @@ avtLCSFilter::SingleBlockSingleCalc( vtkDataSet *in_ds,
{
// Save the times/distances so that points that do not fully
// advect can be culled.
- for(size_t j = 0; j < (size_t) nTuples; ++j)
- outputArray->SetTuple1(j, remapTimes[j]);
+#if 0
+// Commented out because the code was used in avtLCSFilter::ComputeLyapunovExponent but not at the present time.
+ if(atts.GetOperationType() == LCSAttributes::Lyapunov )
+ {
+ for (size_t l = 0; l < nTuples; l++)
+ outputArray->SetTuple1(l, remapTimes[l]);
+ }
+#endif
// remapTimes does not contain all of the values only the
// ones for the integral curves on this processor. So sum
@@ -912,8 +918,14 @@ avtLCSFilter::RectilinearGridSingleCalc(std::vector<avtIntegralCurve*> &ics)
{
// Save the times/distances so that points that do not fully
// advect can be culled.
+#if 0
+// Commented out because the code was used in avtLCSFilter::ComputeLyapunovExponent but not at the present time.
+ if(atts.GetOperationType() == LCSAttributes::Lyapunov )
+ {
for (size_t l = 0; l < nTuples; l++)
outputArray->SetTuple1(l, remapTimes[l]);
+ }
+#endif
vtkDataArray* jacobian[3];
|
Make SerializeHeader virtual | @@ -279,19 +279,12 @@ namespace MiningCore.Blockchain.Bitcoin
return true;
}
- protected virtual BitcoinShare ProcessShareInternal(StratumClient<BitcoinWorkerContext> worker, string extraNonce2, uint nTime, uint nonce)
+ protected virtual byte[] SerializeHeader(byte[] coinbaseHash, uint nTime, uint nonce)
{
- var extraNonce1 = worker.Context.ExtraNonce1;
-
- // build coinbase
- var coinbase = SerializeCoinbase(extraNonce1, extraNonce2);
- var coinbaseHash = coinbaseHasher.Digest(coinbase);
-
// build merkle-root
var merkleRoot = mt.WithFirst(coinbaseHash)
.ToArray();
- // build block-header
var blockHeader = new BlockHeader
{
Version = (int)BlockTemplate.Version,
@@ -302,8 +295,19 @@ namespace MiningCore.Blockchain.Bitcoin
Nonce = nonce
};
+ return blockHeader.ToBytes();
+ }
+
+ protected virtual BitcoinShare ProcessShareInternal(StratumClient<BitcoinWorkerContext> worker, string extraNonce2, uint nTime, uint nonce)
+ {
+ var extraNonce1 = worker.Context.ExtraNonce1;
+
+ // build coinbase
+ var coinbase = SerializeCoinbase(extraNonce1, extraNonce2);
+ var coinbaseHash = coinbaseHasher.Digest(coinbase);
+
// hash block-header
- var headerBytes = blockHeader.ToBytes();
+ var headerBytes = SerializeHeader(coinbaseHash, nTime, nonce);
var headerHash = headerHasher.Digest(headerBytes, (ulong) nTime);
var headerValue = new BigInteger(headerHash);
@@ -454,7 +458,7 @@ namespace MiningCore.Blockchain.Bitcoin
BuildCoinbase();
}
- public object GetJobParams(bool isNew)
+ public virtual object GetJobParams(bool isNew)
{
return new object[]
{
|
peview: Add missing setting (Fixes | *
* Authors:
*
- * dmex 2017-2022
+ * dmex 2017-2023
*
*/
@@ -25,6 +25,7 @@ VOID PvAddDefaultSettings(
PhpAddIntegerSetting(L"EnableLegacyPropertiesDialog", L"0");
PhpAddIntegerSetting(L"EnableSecurityAdvancedDialog", L"1");
PhpAddIntegerSetting(L"EnableThemeSupport", L"0");
+ PhpAddIntegerSetting(L"EnableThemeAcrylicSupport", L"1");
PhpAddIntegerSetting(L"EnableTreeListBorder", L"1");
PhpAddIntegerSetting(L"EnableVersionSupport", L"0");
PhpAddIntegerSetting(L"GraphColorMode", L"1");
|
Subsets and Splits