message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
BugID:17865306: Update security Config.in | +## --- Generated Automatically ---
source "security/alicrypto/Config.in"
source "security/id2/Config.in"
source "security/irot/Config.in"
@@ -9,3 +10,4 @@ source "security/isst/Config.in"
source "security/itls/Config.in"
source "security/mbedtls/Config.in"
source "security/prov/Config.in"
+## --- End ---
|
Update target mbedos5 README.
JerryScript-DCO-1.0-Signed-off-by: Marko Fabo | @@ -44,52 +44,31 @@ instructions above.
make is used to automate the process of fetching dependencies, and making sure that
mbed-cli is called with the correct arguments.
-### (optional) jshint
+### nodejs
-jshint is used to statically check your JavaScript code, as part of the build process.
-This ensures that pins you are using in your code are available on your chosen target
-platform.
+npm is used to install the dependencies in the local node_modules folder.
-### Python modules
+### gulp
-There are multiple Python module dependencies which can be installed with the
-following command invoked from your jerryscript/targets/mbedos5/tools directory:
+gulp is used to automate tasks, like cloning repositories or generate source files.
+If you create an own project, for more info see [mbed-js-gulp](https://github.com/ARMmbed/mbed-js-gulp).
-```bash
-pip install -r requirements.txt
-```
-
-If you have no pip installed but your are on an apt-managed system (e.g.,
-Ubuntu), issue the following command first:
-
-```bash
-apt-get -y install python-pip
-```
+### (optional) jshint
-(Otherwise, visit
-[pip documentation](https://pip.pypa.io/en/stable/installing/) for more
-information on how to install pip.)
+jshint is used to statically check your JavaScript code, as part of the build process.
+This ensures that pins you are using in your code are available on your chosen target
+platform.
## Quick Start
-Once you have all of your dependencies installed, you can build the project as follows:
+Once you have all of your dependencies installed, you can build the example project as follows:
```bash
-git clone https://github.com/jerryscript-project/jerryscript
-cd jerryscript/targets/mbedos5
-make getlibs
-# NRF52 Development Kit:
-make BOARD=NRF52_DK
-# FRDM K64F
-make BOARD=K64F
+git clone https://github.com/ARMmbed/mbed-js-example
+cd mbed-js-example
+npm install
+gulp --target=YOUR_TARGET_NAME
```
-The produced file (in .build/**[BOARD]**/GCC_ARM) can then be uploaded to your board, and will
+The produced file (in build/out/YOUR_TARGET_NAME) can then be uploaded to your board, and will
run when you press reset.
-
-If you make a modification to main.js, you can simply rerun make, and it will remember your
-previous choice of board:
-
-```bash
-make
-```
|
[util/generic/yexception.h] comment fix: doxygen style
Made after note by elric@ in | @@ -121,17 +121,20 @@ class TIoSystemError: public TSystemError, public TIoException {
class TFileError: public TIoSystemError {
};
-// TBadArgumentException should be thrown when an argument supplied to some function (or constructor)
-// is invalid or incorrect.
-//
-// NOTE: a special case when such argument is given to a function which performs type casting
-// (e.g. integer from string) is covered by the TBadCastException class which is derived from
-// TBadArgumentException.
+/* TBadArgumentException should be thrown when an argument supplied to some function (or constructor)
+ * is invalid or incorrect.
+ *
+ * \note
+ * A special case when such argument is given to a function which performs type casting
+ * (e.g. integer from string) is covered by the TBadCastException class which is derived from
+ * TBadArgumentException.
+ */
struct TBadArgumentException: public virtual yexception {
};
-// TBadCastException should be thrown to indicate the failure of some type casting procedure
-// (e.g. reading an integer parameter from string).
+/* TBadCastException should be thrown to indicate the failure of some type casting procedure
+ * (e.g. reading an integer parameter from string).
+ */
struct TBadCastException: public virtual TBadArgumentException {
};
|
build: requires cmake >= 3.0 | # Let's have fun!
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.0)
project(monkey C)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
|
mention make bootstrap as a potential step | @@ -10,8 +10,14 @@ applications, to embedded systems and potentially even kernel development.
## Build
-Compile with ./configure --prefix="/home/wherever/I/want" && make && make install
-The result will be among other things, the binaries 6m and mbld
+If you are building from development then issue `make bootstrap` after the call
+to `./configure`.
+
+* `./configure`
+* `make`
+* `make install`
+
+The result will be, among other things, the binaries 6m and mbld.
## Usage
@@ -68,7 +74,6 @@ More examples and a complete feature list can be found on the website.
## Status

-
## Try It Online
The online playground is a good place to get started with little setup.
|
interface: add tsc to precommit hook | "license": "MIT",
"lint-staged": {
"*.js": "eslint --cache --fix",
- "*.ts": "eslint --cache --fix",
- "*.tsx": "eslint --cache --fix"
+ "*.{ts,tsx}": ["eslint --cache --fix", "sh -c 'tsc --project tsconfig.json --noEmit'"]
}
}
|
Update test skip file | -# You may list a test case on each line in this file.
-# These cases will be skipped by run_tests.py
-# - the cases may be prefixed with a dash
-# - you can paste part or all of the summary output of run_tests.py
-# Lines can be commented out using #
+You may list a test case on each line in this file.
+The test cases listed here will be skipped by run_tests.py
+ - the cases may be prefixed with a dash
+ - you can paste part or all of the summary output of run_tests.py
+ - a copy of its output is saved to ./build/all-run-logs/last_log.txt
+Lines can be commented out using #
+Action out headers are not supported yet
+ test-action
-# Tests that contain functionality that is not supported yet
+Slice copying not implemented yet
test-bit2
-test-int
+
+Arithmetic operations are only supported on int<8>, int<16> and int<32>.
+ test-arithmetics
+
+Header stacks and unions are not supported
test-header-stacks
test-header-union-1
test-header-union-2
-test-skipping-bits-1
-test-skipping-bits-2
-test-varbit
-test-action
-
-# Tests that contain functionality in ways that are more complex than supported
-test-headers
-test-typedef
-
-# Shall be supported soon
-test-hdrinsts-nonaligned-flds
-# No controller yet
-vEPG
+Complex variable assignments are only partially supported
+ test-compound-assignment
|
peview: make filetimes consistent | @@ -1057,7 +1057,7 @@ PPH_STRING PvGetRelativeTimeString(
PhLargeIntegerToLocalSystemTime(&timeFields, &time);
timeString = PhaFormatDateTime(&timeFields);
- return PhaFormatString(L"%s ago (%s)", timeRelativeString->Buffer, timeString->Buffer);
+ return PhaFormatString(L"%s (%s ago)", timeString->Buffer, timeRelativeString->Buffer);
}
VOID PvpSetPeImageFileProperties(
|
more robust exit code handling | @@ -15,12 +15,15 @@ urbit.on \exit (code)->
process.on \exit -> urbit.write '\04' # send EOF to gracefully checkpoint
+exit-code = 0
+
on-next = (re,cb)->
urbit.pipe (new stream-snitch re).on \match once cb
on-next /\r\x1b\[K(\/~|ford: )/ ->
console.log "\n\n---\nnode: detected error, exiting in ~s30\n---\n\n"
+ exit-code := 1
set-timeout (-> process.exit 1), 30000
<- on-next /dojo> /
@@ -28,11 +31,13 @@ on-next /\r\x1b\[K(\/~|ford: )/ ->
urbit.write "%got-dojo\r"
<- on-next /%got-dojo/
-exit-code = 0
urbit.write "|start %test\r:test [%cores /]\r"
<- on-next /%cores-tested/
+if exit-code
+ process.exit exit-code
+
urbit.write "+test, =defer |, =seed `@uvI`(shaz %reproducible)\r"
on-next /(FAILED|CRASHED)/ ->
console.log "\n\n---\nnode: detected error\n---\n\n"
@@ -41,6 +46,10 @@ on-next /(FAILED|CRASHED)/ ->
urbit.write "%tested\r"
<- on-next /%tested/
+
+if exit-code
+ process.exit exit-code
+
console.log "\n\n---\nnode: STUB insert further tests here\n---\n\n"
urbit.write '\04'
|
[hardware] Disable `sram` reset for Verilator
Verilator cannot handle delayed assignments in for-loops unless it
unrolls them. This is not really an option here, so we can just
deactivate the sram's reset. | @@ -124,9 +124,11 @@ module tc_sram #(
// write memory array
always_ff @(posedge clk_i or negedge rst_ni) begin
if (!rst_ni) begin
+ `ifndef VERILATOR
for (int unsigned i = 0; i < NumWords; i++) begin
sram[i] <= init_val[i];
end
+ `endif
for (int i = 0; i < NumPorts; i++) begin
r_addr_q[i] <= {AddrWidth{1'b0}};
// initialize the read output register for each port
|
Meta: Fix minor spelling mistakes | @@ -561,7 +561,7 @@ cleanup:
* but the gid of the the key, has full access.
*
* 0007 decides about the world permissions. This is taken into
- * account when neighter the uid nor the gid matches. So that
+ * account when neither the uid nor the gid matches. So that
* example would allow everyone with a different uid and gid
* of that key gains full access.
*
@@ -1279,7 +1279,7 @@ int elektraSortTopology (KeySet * ks, Key ** array)
}
else if (i == j)
{
- // reflexiv depencency, do nothing
+ // reflexiv dependency, do nothing
}
else
{
@@ -1301,7 +1301,7 @@ int elektraSortTopology (KeySet * ks, Key ** array)
{
adjMatrix[j].isResolved = 0;
++unresolved;
- // cound unresolved dependencies
+ // count unresolved dependencies
depCount += gotUnresolved;
}
ksDel (deps);
|
unix/fatfs_port: Fix month offset in timestamp calculation. | @@ -5,7 +5,7 @@ DWORD get_fattime(void) {
time_t now = time(NULL);
struct tm *tm = localtime(&now);
return ((1900 + tm->tm_year - 1980) << 25)
- | (tm->tm_mon << 21)
+ | ((tm->tm_mon + 1) << 21)
| (tm->tm_mday << 16)
| (tm->tm_hour << 11)
| (tm->tm_min << 5)
|
Fix for older compilers | @@ -85,7 +85,8 @@ void TCOD_map_compute_fov_restrictive_shadowcasting_quadrant (map_t *m, int play
) {
visible = false;
} else {
- for (int idx = 0; idx < obstacles_in_last_line && visible; ++idx) {
+ int idx;
+ for (idx = 0; idx < obstacles_in_last_line && visible; ++idx) {
if (
start_slope <= end_angle[idx] &&
end_slope >= start_angle[idx]
@@ -193,7 +194,8 @@ void TCOD_map_compute_fov_restrictive_shadowcasting_quadrant (map_t *m, int play
) {
visible = false;
} else {
- for (int idx = 0; idx < obstacles_in_last_line && visible; ++idx) {
+ int idx;
+ for (idx = 0; idx < obstacles_in_last_line && visible; ++idx) {
if (
start_slope <= end_angle[idx] &&
end_slope >= start_angle[idx]
@@ -261,9 +263,10 @@ void TCOD_map_compute_fov_restrictive_shadowcasting_quadrant (map_t *m, int play
void TCOD_map_compute_fov_restrictive_shadowcasting(TCOD_map_t map, int player_x, int player_y, int max_radius, bool light_walls) {
map_t *m = (map_t *)map;
int max_obstacles;
+ int c;
/* first, zero the FOV map */
- for(int c = m->nbcells - 1; c >= 0; c--) {
+ for(c = m->nbcells - 1; c >= 0; c--) {
m->cells[c].fov = false;
}
|
pyocf: fix cache device config | @@ -75,6 +75,7 @@ class CacheAttachConfig(Structure):
("_open_cores", c_bool),
("_force", c_bool),
("_discard_on_start", c_bool),
+ ("_volume_params", c_void_p),
]
@@ -447,8 +448,8 @@ class Cache:
_cache_line_size=cache_line_size
if cache_line_size
else self.cache_line_size,
- _force=force,
_open_cores=True,
+ _force=force,
_discard_on_start=False,
)
|
fix BEEP PCM LSB+MSB 2 | @@ -414,7 +414,11 @@ static void IOOUTCALL pit_o77(UINT port, REG8 dat) {
break;
case 0x30:
beep_mode_bit = 2;
+#if !defined(__LIBRETRO__) && !defined(MSC_VER)
beep_mode_freq = 112;
+#else
+ beep_mode_freq = 56;
+#endif
break;
}
beep_mode_bit_c = 0;
|
CI: sonarqube: unmatched variable name always skip the job | @@ -435,7 +435,7 @@ code_quality_check:
- export CI_MR_IID=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py id ${CI_COMMIT_BRANCH})
- export CI_MR_COMMITS=$(python ${CI_PROJECT_DIR}/tools/ci/ci_get_mr_info.py commits ${CI_COMMIT_BRANCH} | tr '\n' ',')
# test if this branch have merge request, if not, exit 0
- - test -n "$CI_MERGE_REQUEST_IID" || exit 0
+ - test -n "$CI_MR_IID" || exit 0
- test -n "$CI_MR_COMMITS" || exit 0
- sonar-scanner
-Dsonar.analysis.mode=preview
@@ -447,7 +447,7 @@ code_quality_check:
-Dsonar.projectBaseDir=$CI_PROJECT_DIR
-Dsonar.exclusions=$EXCLUSIONS
-Dsonar.gitlab.project_id=$CI_PROJECT_ID
- -Dsonar.gitlab.commit_sha=CI_MR_COMMITS
+ -Dsonar.gitlab.commit_sha=$CI_MR_COMMITS
-Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME
-Dsonar.cxx.clangtidy.reportPath=$REPORT_DIR/clang_tidy_report.txt
-Dsonar.cxx.includeDirectories=components,/usr/include
|
adds assertions to protect u3r_mug against stack overflow | @@ -1603,6 +1603,17 @@ static inline mugframe*
_mug_push(c3_ys mov, c3_ys off, u3_noun veb)
{
u3R->cap_p += mov;
+
+ // ensure we haven't overflowed the stack
+ // (off==0 means we're on a north road)
+ //
+ if ( 0 == off ) {
+ c3_assert(u3R->cap_p > u3R->hat_p);
+ }
+ else {
+ c3_assert(u3R->cap_p < u3R->hat_p);
+ }
+
mugframe* cur = u3to(mugframe, u3R->cap_p + off);
cur->veb = veb;
cur->a = 0;
|
ci: make cache hash independent of input parameter | @@ -80,7 +80,7 @@ jobs:
zephyr/
bootloader/
zmk/
- key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('${{ inputs.config_path }}/west.yml') }}
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
|
Fix video/max7456.c:775:19: error: unused function '__mx7_write_reg__dmm'
video/max7456.c:792:19: error: unused function '__mx7_write_reg__dmdi'
video/max7456.c:809:19: error: unused function '__mx7_write_reg__dmah'
video/max7456.c:826:19: error: unused function '__mx7_write_reg__dmal' | @@ -761,74 +761,6 @@ static inline int __mx7_read_reg__cmdo(FAR struct mx7_dev_s *dev)
return val;
}
-/****************************************************************************
- * Name: __mx7_read_reg__dmm
- *
- * Description:
- * Returns the contents of DMM. A simple helper around __mx7_read_reg().
- *
- * Returned value:
- * Returns the register value, or a negative errno.
- *
- ****************************************************************************/
-
-static inline int __mx7_write_reg__dmm(FAR struct mx7_dev_s *dev,
- uint8_t val)
-{
- return __mx7_write_reg(dev, DMM, &val, sizeof(val));
-}
-
-/****************************************************************************
- * Name: __mx7_read_reg__dmdi
- *
- * Description:
- * Returns the contents of DMDI. A simple helper around __mx7_read_reg().
- *
- * Returned value:
- * Returns the register value, or a negative errno.
- *
- ****************************************************************************/
-
-static inline int __mx7_write_reg__dmdi(FAR struct mx7_dev_s *dev,
- uint8_t val)
-{
- return __mx7_write_reg(dev, DMDI, &val, sizeof(val));
-}
-
-/****************************************************************************
- * Name: __mx7_read_reg__dmah
- *
- * Description:
- * Returns the contents of DMAH. A simple helper around __mx7_read_reg().
- *
- * Returned value:
- * Returns the register value, or a negative errno.
- *
- ****************************************************************************/
-
-static inline int __mx7_write_reg__dmah(FAR struct mx7_dev_s *dev,
- uint8_t val)
-{
- return __mx7_write_reg(dev, DMAH, &val, sizeof(val));
-}
-
-/****************************************************************************
- * Name: __mx7_read_reg__dmal
- *
- * Description:
- * Returns the contents of DMAL. A simple helper around __mx7_read_reg().
- *
- * Returned value:
- * Returns the register value, or a negative errno.
- *
- ****************************************************************************/
-
-static inline int __mx7_write_reg__dmal(FAR struct mx7_dev_s *dev,
- uint8_t val)
-{
- return __mx7_write_reg(dev, DMAL, &val, sizeof(val));
-}
-
/****************************************************************************
* Name: __mx7_wait_reset
*
|
Update CMakeLists.txt
fix CMake to define ChibiOS default branch when the CHIBIOS_VERSION option isn't set at all | @@ -351,11 +351,14 @@ if(RTOS_CHIBIOS_CHECK)
message(FATAL_ERROR "error: could not find Git, make sure you have it installed.")
endif()
+ # ChibiOS version
+ set(CHIBIOS_VERSION_EMPTY TRUE)
+
# check if build was requested with a specifc ChibiOS version
if(DEFINED CHIBIOS_VERSION)
-
- if("${CHIBIOS_VERSION}" STREQUAL "")
- set(CHIBIOS_VERSION_EMPTY TRUE)
+ if("${CHIBIOS_VERSION}" NOT STREQUAL "")
+ set(CHIBIOS_VERSION_EMPTY FALSE)
+ endif()
endif()
if(CHIBIOS_VERSION_EMPTY)
@@ -378,8 +381,6 @@ if(RTOS_CHIBIOS_CHECK)
set(CHIBIOS_GIT_TAG "stable_${CHIBIOS_SHORT_VERSION}.x")
endif()
- endif()
-
# need to setup a separate CMake project to download the code from the GitHub repository
# otherwise it won't be available before the actual build step
configure_file("CMake/ChibiOS.CMakeLists.cmake.in"
|
Drop NeoverseN2 to armv8.2-a on OSX to make it build with gcc11 too | @@ -127,7 +127,7 @@ ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ10)))
ifneq ($(OSNAME), Darwin)
CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2
else
-CCOMMON_OPT += -march=armv8.5-a+sve -mtune=neoverse-n2
+CCOMMON_OPT += -march=armv8.2-a -mtune=cortex-a72
endif
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2
|
add update qml sailfish | @@ -590,12 +590,12 @@ namespace 'project' do
mkdir_p File.join($project_path, $final_name_app, "rpm")
mkdir_p File.join($project_path, $final_name_app, "privileges")
- if !File.exists?(File.join($project_path, $final_name_app, "qml"))
+ #if !File.exists?(File.join($project_path, $final_name_app, "qml"))
cp_r File.join($rhodes_path, "platform/shared/qt/sailfish/qml"), File.join($project_path, $final_name_app)
File.rename(
File.join($project_path, $final_name_app, "qml", "harbour-sailfishrhodes.qml"),
File.join($project_path, $final_name_app, "qml", "#{$final_name_app}.qml"))
- end
+ #end
if !File.exists?(File.join($project_path, $final_name_app, "icons"))
cp_r File.join($rhodes_path, "platform/shared/qt/sailfish/icons"), File.join($project_path, $final_name_app)
|
test for the string array and replication | @@ -54,7 +54,7 @@ diff $tempRef1 $tempText
# --------------------------------------------------------
-# Test 2
+# Test 2: percentConfidence
# --------------------------------------------------------
bufrFile=amv2_87.bufr
cat > $tempRules <<EOF
@@ -69,7 +69,36 @@ grep -q '^48 54 59.*91 97' $tempText
# --------------------------------------------------------
-# Test 3
+# Test 3: string arrays
+# --------------------------------------------------------
+bufrFile=sentinel1.bufr
+cat > $tempRules <<EOF
+ set unpack=1;
+ print "[stationAcquisition!0]";
+EOF
+cat $tempRules
+
+export ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS=1
+${tools_dir}/codes_bufr_filter $tempRules $bufrFile > $tempText 2>$tempErrs
+grep -q '^LBG LBG LBG LBG.*LBG$' $tempText
+
+
+# --------------------------------------------------------
+# Test 4: replication factors
+# --------------------------------------------------------
+bufrFile=sbu8_206.bufr
+cat > $tempRules <<EOF
+ set unpack=1;
+ print "[delayedDescriptorReplicationFactor!0]";
+EOF
+cat $tempRules
+
+export ECCODES_BUFR_MULTI_ELEMENT_CONSTANT_ARRAYS=1
+${tools_dir}/codes_bufr_filter $tempRules $bufrFile > $tempText 2>$tempErrs
+grep -q '^6 6 6.*24 24.*6 6' $tempText
+
+# --------------------------------------------------------
+# Test XX: Currently failing
# --------------------------------------------------------
bufrFile=asca_139.bufr
cat > $tempRules <<EOF
|
phantom: for random tubes, use full background and tweak tube size | @@ -547,6 +547,8 @@ void calc_phantom_tubes(const long dims[DIMS], complex float* out, bool kspace,
if (random) {
+ unsigned int max_count = 10000;
+
// background circle position and radius
float sx_bg = .9;
float px_bg = 0.;
@@ -557,8 +559,8 @@ void calc_phantom_tubes(const long dims[DIMS], complex float* out, bool kspace,
float smax = .4;
// min and max center position (-1. to 1.)
- float pmin = -.8;
- float pmax = .8;
+ float pmin = -1.;
+ float pmax = 1.;
// dead zone between tubes
float edge_scale = 1.2;
@@ -577,7 +579,7 @@ void calc_phantom_tubes(const long dims[DIMS], complex float* out, bool kspace,
while (overlap) {
- if (count > 1000) {
+ if (count > max_count) {
// shrink ellipse
smax *= .95;
@@ -610,7 +612,7 @@ void calc_phantom_tubes(const long dims[DIMS], complex float* out, bool kspace,
}
count++;
- if (total_count > 10000)
+ if (total_count > 100 * max_count)
error("Could not fit tube in phantom (requested %d, stopped at %d after %d trials\n", N, i/2, total_count);
}
debug_printf(DP_DEBUG4, "i=%d, (%f, %f), (%f, %f)\n", i, sx, sx, px, py);
|
fix bug for netif add crash | @@ -50,7 +50,7 @@ esp_err_t esp_event_send_legacy(system_event_t *event)
return ESP_ERR_INVALID_STATE;
}
- return esp_event_post(SYSTEM_EVENT, event->event_id, event, sizeof(*event), 0);
+ return esp_event_post(SYSTEM_EVENT, event->event_id, event, sizeof(*event), portMAX_DELAY);
}
esp_err_t esp_event_loop_init(system_event_cb_t cb, void *ctx)
|
kubectl-gadget: Print error when undeploy command timeouts
The undeploy command wasn't printing any error when there was a timeout
trying to remove the gadget namespace. It was misleading as Inspektor
Gadget was not actually removed and the command exited with 0. | @@ -234,12 +234,15 @@ again:
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second)
defer cancel()
- watchtools.Until(ctx, list.ResourceVersion, watcher, conditionFunc)
+ _, err := watchtools.Until(ctx, list.ResourceVersion, watcher, conditionFunc)
+ if err != nil {
+ errs = append(errs, fmt.Sprintf("failed waiting for %q namespace to be removed: %s", gadgetNamespace, err))
+ }
}
out:
if len(errs) > 0 {
- return fmt.Errorf("error removing IG:\n%s", strings.Join(errs, "\n"))
+ return fmt.Errorf("error removing Inspektor Gadget:\n%s", strings.Join(errs, "\n"))
}
if undeployWait {
|
Utilities: Fix TestExt4Dxe build after recent Ext4Pkg changes | @@ -9,7 +9,7 @@ PRODUCT = $(PROJECT)$(INFIX)$(SUFFIX)
OBJS = $(PROJECT).o
OBJS += BaseUcs2Utf8Lib.o BaseOrderedCollectionRedBlackTreeLib.o
OBJS += BlockGroup.o BlockMap.o Collation.o Directory.o DiskUtil.o
-OBJS += Ext4Dxe.o Extents.o File.o Inode.o Partition.o Superblock.o
+OBJS += Ext4Dxe.o Extents.o File.o Inode.o Partition.o Superblock.o Symlink.o
include ../../User/Makefile
|
Figured out purpose of some Niko specific attributes | @@ -3843,14 +3843,20 @@ Outdoor Temp to Display Timeout: set 30 for 'off' and 10800 for 'on'</descriptio
<!-- NIKO -->
<cluster id="0xfc00" name="Niko specific" mfcode="0x125f">
- <description>Niko specific attributes.</description>
+ <description>Niko specific attributes.
+
+LED color: 0 - off, 255 - white, 65280 - blue, 16711680 - red
+Child lock on: 0, Child lock off: 1
+LED on: 1, LED off: 0
+0x0300: Switches permission to write either to 0x0202 (1) or to 0x0302 (0)
+Writing 1 to 0x0202 and 0x0302 makes 0x0300 writable. Then writing 1 to 0x0300 sets 0x0300 bitmap from 0x11 to 0x12, but block all other writes to 0x03XX attributes.</description>
<server>
<attribute id="0x0000" name="Unknown" type="bmp8" mfcode="0x125f" access="rw" required="m"> </attribute>
- <attribute id="0x0100" name="Unknown" type="u24" mfcode="0x125f" access="rw" required="m"> </attribute>
- <attribute id="0x0101" name="Unknown" type="u8" mfcode="0x125f" access="rw" required="m"> </attribute>
+ <attribute id="0x0100" name="LED color" type="u24" mfcode="0x125f" access="rw" required="m"> </attribute>
+ <attribute id="0x0101" name="Child lock" type="u8" mfcode="0x125f" access="rw" required="m"> </attribute>
<attribute id="0x0102" name="Unknown" type="u8" mfcode="0x125f" access="rw" required="m"> </attribute>
<attribute id="0x0103" name="Unknown" type="u8" mfcode="0x125f" access="rw" required="m"> </attribute>
- <attribute id="0x0104" name="Unknown" type="u8" mfcode="0x125f" access="rw" required="m"> </attribute>
+ <attribute id="0x0104" name="LED on/off" type="u8" mfcode="0x125f" access="rw" required="m"> </attribute>
<attribute id="0x0200" name="Connected to power since" type="u32" mfcode="0x125f" access="r" required="m"> </attribute>
<attribute id="0x0201" name="Unknown" type="u48" mfcode="0x125f" access="rw" required="m"> </attribute>
<attribute id="0x0202" name="Unknown" type="u8" mfcode="0x125f" access="rw" required="m"> </attribute>
|
out_lib: fix "data size is unknown" error on MSVC
Right now, VC++ fails to compile out_lib due to the following error.
C2036: 'void *' unknown size
This patch fixes it by adding a explicit type cast to a char pointer. | @@ -143,7 +143,7 @@ static void out_lib_flush(void *data, size_t bytes,
FLB_OUTPUT_RETURN(FLB_ERROR);
}
- memcpy(data_for_user, data + last_off, alloc_size);
+ memcpy(data_for_user, (char *) data + last_off, alloc_size);
data_size = alloc_size;
break;
case FLB_OUT_LIB_FMT_JSON:
|
Fixed issue 1550 | @@ -322,7 +322,10 @@ static void pe_parse_debug_directory(PE* pe)
pcv_hdr_offset = pe_rva_to_offset(
pe, yr_le32toh(debug_dir->AddressOfRawData));
}
- else if (debug_dir->PointerToRawData != 0)
+
+ // Give it chance to read it from the RAW offset
+ // Sample: 735f72b3fcd72789f01e923c9de2a9ab5b5ffbece23633da81d976ad0ad159e3
+ if (pcv_hdr_offset <= 0 && debug_dir->PointerToRawData != 0)
{
pcv_hdr_offset = yr_le32toh(debug_dir->PointerToRawData);
}
|
chat: restore shortcode links to groups | import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
import { OverlaySigil } from './overlay-sigil';
import { uxToHex, cite, writeText } from '../../../../lib/util';
import moment from 'moment';
import ReactMarkdown from 'react-markdown';
import RemarkDisableTokenizers from 'remark-disable-tokenizers';
+import urbitOb from 'urbit-ob';
const DISABLED_BLOCK_TOKENS = [
'indentedCode',
@@ -71,7 +73,7 @@ export class Message extends Component {
</div>
);
} else if ('url' in letter) {
- let imgMatch =
+ const imgMatch =
/(jpg|img|png|gif|tiff|jpeg|JPG|IMG|PNG|TIFF|GIF|webp|WEBP|svg|SVG)$/
.exec(letter.url);
const youTubeRegex = new RegExp(String(/(?:https?:\/\/(?:[a-z]+.)?)/.source) // protocol
@@ -122,7 +124,6 @@ export class Message extends Component {
<div>
<a href={letter.url}
className="f7 lh-copy v-top bb b--white-d word-break-all"
- href={letter.url}
target="_blank"
rel="noopener noreferrer"
>
@@ -153,6 +154,22 @@ export class Message extends Component {
{letter.me}
</p>
);
+ } else {
+ const group = letter.text.match(
+ /([~][/])?(~[a-z]{3,6})(-[a-z]{6})?([/])(([a-z])+([/-])?)+/
+ );
+ if ((group !== null) // matched possible chatroom
+ && (group[2].length > 2) // possible ship?
+ && (urbitOb.isValidPatp(group[2]) // valid patp?
+ && (group[0] === letter.text))) { // entire message is room name?
+ return (
+ <Link
+ className="bb b--black b--white-d f7 mono lh-copy v-top"
+ to={'/~groups/join/' + group.input}
+ >
+ {letter.text}
+ </Link>
+ );
} else {
return (
<section className="chat-md-message">
@@ -163,6 +180,7 @@ export class Message extends Component {
);
}
}
+}
render() {
const { props, state } = this;
|
Do not touch Dictionary keys during JSON serialization | @@ -41,7 +41,13 @@ namespace Miningcore
builder.RegisterInstance(new JsonSerializerSettings
{
- ContractResolver = new CamelCasePropertyNamesContractResolver()
+ ContractResolver = new DefaultContractResolver
+ {
+ NamingStrategy = new CamelCaseNamingStrategy
+ {
+ ProcessDictionaryKeys = false
+ }
+ }
});
builder.RegisterType<MessageBus>()
|
Fix typo in comment
it -> if in mimalloc-types.h | @@ -270,7 +270,7 @@ typedef struct mi_segment_s {
struct mi_segment_s* prev;
size_t abandoned; // abandoned pages (i.e. the original owning thread stopped) (`abandoned <= used`)
- size_t abandoned_visits; // count how often this segment is visited in the abandoned list (to force reclaim it it is too long)
+ size_t abandoned_visits; // count how often this segment is visited in the abandoned list (to force reclaim if it is too long)
size_t used; // count of pages in use (`used <= capacity`)
size_t capacity; // count of available pages (`#free + used`)
|
Check group any on when light reachable state changes | @@ -1568,7 +1568,7 @@ void DeRestPluginPrivate::handleLightEvent(const Event &e)
webSocketServer->broadcastTextMessage(Json::serialize(map));
- if (e.what() == RStateOn && !lightNode->groups().empty())
+ if ((e.what() == RStateOn || e.what() == RStateReachable) && !lightNode->groups().empty())
{
std::vector<GroupInfo>::const_iterator i = lightNode->groups().begin();
std::vector<GroupInfo>::const_iterator end = lightNode->groups().end();
|
Improve checker.check comment | @@ -17,7 +17,16 @@ local check_field
-- Type-check a Titan module
--
--- Sets a _type field on some nodes. TODO: what nodes?
+-- Sets a _type field on some AST nodes:
+-- - Value declarations:
+-- - ast.Toplevel.Func
+-- - ast.Toplevel.Var
+-- - ast.Decl.Decl
+-- - ast.Exp
+-- - ast.Var
+--
+-- Sets a _field_types field on ast.Toplevel.Record nodes, mapping field names
+-- to their types.
--
-- @ param prog AST for the whole module
-- @ return true or false, followed by as list of compilation errors
|
Update the limited of function esp_ble_get_sendable_packets_num. | @@ -51,11 +51,21 @@ esp_err_t esp_ble_gatt_set_local_mtu (uint16_t mtu)
#if (BLE_INCLUDED == TRUE)
extern UINT16 L2CA_GetFreePktBufferNum_LE(void);
+/**
+ * @brief This function is called to get currently sendable packets number on controller,
+ * the function is called only in BLE running core now.
+ *
+ * @return
+ * sendable packets number on controller
+ *
+ */
+
uint16_t esp_ble_get_sendable_packets_num (void)
{
return L2CA_GetFreePktBufferNum_LE();
}
+
extern UINT16 L2CA_GetCurFreePktBufferNum_LE(UINT16 conn_id);
uint16_t esp_ble_get_cur_sendable_packets_num (uint16_t connid)
{
|
qword: Implement dup() | @@ -343,7 +343,28 @@ int sys_access(const char *path, int mode) {
return 0;
}
-int sys_dup(int fd, int flags, int *newfd) STUB_ONLY
+static int internal_dup(int fd, int *newfd, ...) {
+ va_list l;
+ va_start(l, newfd);
+ int ret;
+ int sys_errno = sys_fcntl(fd, F_DUPFD, l, &ret);
+ va_end(l);
+ if (sys_errno)
+ return sys_errno;
+ *newfd = ret;
+ return 0;
+}
+
+int sys_dup(int fd, int flags, int *newfd) {
+ (void)flags;
+ int ret;
+ int sys_errno = internal_dup(fd, &ret, 0);
+ if (sys_errno)
+ return sys_errno;
+ *newfd = ret;
+ return 0;
+}
+
int sys_dup2(int fd, int flags, int newfd) {
(void)flags;
int ret;
|
sh not show in the mfib flags commands | @@ -176,7 +176,7 @@ mfib_show_route_flags (vlib_main_t * vm,
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (mfib_route_flags_command, static) =
{
- .path = "sh mfib route flags",
+ .path = "show mfib route flags",
.short_help = "Flags applicable to an MFIB route",
.function = mfib_show_route_flags,
.is_mp_safe = 1,
@@ -205,7 +205,7 @@ mfib_show_itf_flags (vlib_main_t * vm,
/* *INDENT-OFF* */
VLIB_CLI_COMMAND (mfib_itf_flags_command, static) =
{
- .path = "sh mfib itf flags",
+ .path = "show mfib itf flags",
.short_help = "Flags applicable to an MFIB interfaces",
.function = mfib_show_itf_flags,
.is_mp_safe = 1,
|
Docs: removed reference to update pg_class | @@ -149,11 +149,6 @@ Segment 12 - gpfdist 4</screen></p>
<codeph>gp_autostats_mode</codeph> configuration parameter to
<codeph>NONE</codeph>.</li>
<li>External tables are not intended for frequent or ad hoc access.</li>
- <li>External tables have no statistics to inform the optimizer. You can set rough estimates
- for the number of rows and disk pages for the external table in the
- <codeph>pg_class</codeph> system catalog with a statement like the
- following:<codeblock>UPDATE pg_class SET reltuples=400000, relpages=400
-WHERE relname='myexttable';</codeblock></li>
<li>When using <codeph>gpfdist</codeph>, maximize network bandwidth by running one
<codeph>gpfdist</codeph> instance for each NIC on the ETL server. Divide the source data
evenly between the <codeph>gpfdist</codeph> instances.</li>
|
VERSION bump version to 0.9.2 | @@ -28,7 +28,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0")
# set version
set(LIBNETCONF2_MAJOR_VERSION 0)
set(LIBNETCONF2_MINOR_VERSION 9)
-set(LIBNETCONF2_MICRO_VERSION 1)
+set(LIBNETCONF2_MICRO_VERSION 2)
set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION})
set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
|
Build verilator on knight/ferry | @@ -104,14 +104,24 @@ jobs:
- name: Build extra tests
run: .github/scripts/build-extra-tests.sh
- install-verilator:
- name: install-verilator
- runs-on: self-hosted
+ install-verilator-knight:
+ name: install-verilator-knight
+ runs-on: knight
+ needs: cancel-prior-workflows
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Build verilator on knight CI machine
+ run: .github/scripts/remote-install-verilator.sh
+
+ install-verilator-ferry:
+ name: install-verilator-ferry
+ runs-on: ferry
needs: cancel-prior-workflows
steps:
- name: Checkout
uses: actions/checkout@v2
- - name: Build verilator on self-hosted
+ - name: Build verilator on ferry CI machine
run: .github/scripts/remote-install-verilator.sh
# Sentinel job to simplify how we specify which that basic setup is complete
@@ -119,7 +129,7 @@ jobs:
# When adding new prep jobs, please add them to `needs` below
setup-complete:
name: setup-complete
- needs: [install-toolchains, install-verilator, build-extra-tests]
+ needs: [install-toolchains, install-verilator-knight, install-verilator-ferry, build-extra-tests]
runs-on: ubuntu-latest
steps:
- name: Set up complete
|
upload travis builds to server (fix) | @@ -10,6 +10,7 @@ matrix:
osx_image: xcode9.3
env:
- OS_FOLDER=mac
+ - EXE_FILE=tic80.app
- os: linux
addons:
@@ -19,8 +20,9 @@ matrix:
- libasound2-dev
env:
- OS_FOLDER=linux
+ - EXE_FILE=tic80
after_success:
- - BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$OS_FOLDER/
- - tar -cvzf tic80.tar.gz --directory=$HOME/build/nesbox/TIC-80/bin tic80 tic80-sokol
+ - BUILDS_SERVER_PATH=${BUILD_SERVER}/files/$TRAVIS_BRANCH/$(date +%Y.%m.%d)/$OS_FOLDER
+ - tar -cvzf tic80.tar.gz --directory=$HOME/build/nesbox/TIC-80/bin $EXE_FILE
- curl --retry 3 --ftp-create-dirs -T tic80.tar.gz $BUILDS_SERVER_PATH/
|
Add `Walker.exhaust(Dirs|Files|All)` | @@ -35,9 +35,10 @@ class Walker {
return [current, dirs, files];
}
- // Convenience method to perform a full traversal. Be careful with this, as it can infinitely
- // loop if there are cycles in the file system (e.g. with symbolic links), and consume a large
- // amount of time and memory.
+ // Convenience methods to perform full traversals. Be careful with these, as they can
+ // infinitely loop if there are cycles in the file system (e.g. with symbolic links), and
+ // consume a large amount of time and memory.
+
exhaust() {
var results = [];
while {
@@ -47,6 +48,36 @@ class Walker {
}
return results;
}
+
+ exhaustDirs() {
+ var results = [];
+ while {
+ var x = this.next();
+ if (!x) break;
+ results.push(x[0]);
+ }
+ return results;
+ }
+
+ exhaustFiles() {
+ var results = [];
+ while {
+ var x = this.next();
+ if (!x) break;
+ results.extend(x[2].map(def (file) => Path.join(x[0], file)));
+ }
+ return results;
+ }
+
+ exhaustAll() {
+ var results = [];
+ while {
+ var x = this.next();
+ if (!x) break;
+ [1, 2].forEach(def (i) => results.extend(x[i].map(def (y) => Path.join(x[0], y))));
+ }
+ return results;
+ }
}
var dictuDir = Path.join(Path.dirname(__file__), '..');
@@ -74,5 +105,18 @@ while {
}
+print();
print('Example using `Walker.exhaust`:');
print(Walker(Path.join(dictuDir, '.github'), []).exhaust());
+
+print();
+print('Example using `Walker.exhaustDirs`:');
+print(Walker(Path.join(dictuDir, '.github'), []).exhaustDirs());
+
+print();
+print('Example using `Walker.exhaustFiles`:');
+print(Walker(Path.join(dictuDir, '.github'), []).exhaustFiles());
+
+print();
+print('Example using `Walker.exhaustAll`:');
+print(Walker(Path.join(dictuDir, '.github'), []).exhaustAll());
|
[io] do not output joints as rows in the contact points matrix | @@ -309,7 +309,7 @@ SP::SimpleMatrix MechanicsIO::contactPoints(const NonSmoothDynamicalSystem& nsds
unsigned int current_row;
result->resize(graph.vertices_number(), 14);
for(current_row=0, std11::tie(vi,viend) = graph.vertices();
- vi!=viend; ++vi, ++current_row)
+ vi!=viend; ++vi)
{
DEBUG_PRINTF("process interaction : %p\n", &*graph.bundle(*vi));
@@ -324,8 +324,9 @@ SP::SimpleMatrix MechanicsIO::contactPoints(const NonSmoothDynamicalSystem& nsds
inspector.inter = graph.bundle(*vi);
graph.bundle(*vi)->relation()->accept(inspector);
const SiconosVector& data = inspector.answer;
- if (data.size() == 14) result->setRow(current_row, data);
+ if (data.size() == 14) result->setRow(current_row++, data);
}
+ result->resize(current_row, 14);
}
return result;
}
|
Backport changes from protobuf 3.5 | @@ -720,14 +720,17 @@ int MapReflectionFriend::MessageMapSetItem(PyObject* _self, PyObject* key,
map_key, &value);
ScopedPyObjectPtr key(PyLong_FromVoidPtr(value.MutableMessageValue()));
- // PyDict_DelItem will have key error if the key is not in the map. We do
- // not want to call PyErr_Clear() which may clear other errors. Thus
- // PyDict_Contains() check is called before delete.
- int contains = PyDict_Contains(self->message_dict, key.get());
- if (contains < 0) {
- return -1;
- }
- if (contains) {
+ PyObject* cmsg_value = PyDict_GetItem(self->message_dict, key.get());
+ if (cmsg_value) {
+ // Need to keep CMessage stay alive if it is still referenced after
+ // deletion. Makes a new message and swaps values into CMessage
+ // instead of just removing.
+ CMessage* cmsg = reinterpret_cast<CMessage*>(cmsg_value);
+ Message* msg = cmsg->message;
+ cmsg->owner.reset(msg->New());
+ cmsg->message = cmsg->owner.get();
+ cmsg->parent = NULL;
+ msg->GetReflection()->Swap(msg, cmsg->message);
if (PyDict_DelItem(self->message_dict, key.get()) < 0) {
return -1;
}
|
update call to \OHPCVersion macro to allow pdf link | @@ -30,7 +30,7 @@ available updates, and one containing a repository of source RPMS. The tar file
also contains a small bash script to configure the package manager to use the
local repository after download. To use, simply unpack the tarball where you
would like to host the local repository and execute the make\_repo.sh script.
-Tar files for this release can be found at \href{http://build.openhpc.community/dist/\OHPCVersion{}}
- {\color{blue}http://build.openhpc.community/dist/\OHPCVersion{}}
+Tar files for this release can be found at \href{http://build.openhpc.community/dist/\OHPCVersion}
+ {\color{blue}{http://build.openhpc.community/dist/\OHPCVersion}}
\end{tcolorbox}
\end{center}
|
updates %eyre to ignore css %auth redirects | $red
=+ url=(en-purl hat pok(p [~ %html]) quy)
?+ p.pok ~|(bad-redirect+[p.pok url] !!)
+ :: ignore css
+ ::
+ {~ $css} !!
+ ::
{~ $js}
$(pez [%js auth-redir:js])
+ ::
{~ $json}
=/ red
(pairs:enjs ok+b+| red+(tape:enjs url) ~)
|
Add missing options reference | @@ -1088,7 +1088,7 @@ NTSTATUS PhpSetExploitProtectionEnabled(
{
if (PhSplitStringRefAtString(&keypath->sr, &replacementToken, TRUE, &stringBefore, &stringAfter))
{
- PhMoveReference(&keypath, PhConcatStringRef2(&wow6432Token, &stringAfter));
+ PhMoveReference(&keypath, PhConcatStringRef3(&stringBefore, &wow6432Token, &stringAfter));
if (NT_SUCCESS(PhCreateKey(
&keyHandle,
@@ -1153,7 +1153,7 @@ NTSTATUS PhpSetExploitProtectionEnabled(
{
if (PhSplitStringRefAtString(&keypath->sr, &replacementToken, TRUE, &stringBefore, &stringAfter))
{
- PhMoveReference(&keypath, PhConcatStringRef2(&wow6432Token, &stringAfter));
+ PhMoveReference(&keypath, PhConcatStringRef3(&stringBefore, &wow6432Token, &stringAfter));
status = PhCreateKey(
&keyHandle,
|
dm: Fix potential overflow bug
Fix a potential overflow problem in get_more_acpi_dev_info where ch_read
might have a value greater than 32. | @@ -165,7 +165,7 @@ int get_mmio_hpa_resource(char *name, uint64_t *res_start, uint64_t *res_size)
*/
int get_more_acpi_dev_info(char *hid, uint32_t instance, struct acpi_dev_pt_ops *ops)
{
- char pathbuf[128], line[64];
+ char pathbuf[128], line[32];
int ret = -1;
size_t ch_read;
FILE *fp;
|
Travis: merge all build tests in one job | @@ -50,7 +50,7 @@ before_install:
# The directory will need created unconditionally so we can always chgrp and
# mount it, even if empty. Checkout a pre-defined version.
- mkdir -p $OUT_OF_TREE_TEST_PATH
- - if [ ${TEST_NAME} = "out-of-tree-build" ] ; then
+ - if [ ${TEST_NAME} = "Out-of-tree builds" ] ; then
git clone --depth 1 https://github.com/contiki-ng/out-of-tree-tests $OUT_OF_TREE_TEST_PATH &&
cd $OUT_OF_TREE_TEST_PATH &&
git checkout $OUT_OF_TREE_TEST_VER ;
@@ -81,8 +81,7 @@ env:
- secure: 0nrV5yjpT2kE19Hlm7t619Qbmyjx/G7bSUI1c+U3kZbyuxnRlASjVcDN5uPBoimIfGiBRI0nRq690BogAJt4EKwbC1Dy8kC1XD8mRtQ2AIZ6PHaUoG9iS5sBhFBQK0XkB83bwh6omRn/04O0uuX74ooSWT7fDrWxi/y5+0ysXK6gRtOhdrJ3FU5OkNVewX8NeCdx3pOWhMOtXWdFkMIi1XRdDnvMM5/hHlHMkdXXtaZQX9UsK3Q3DSjPRLZjKRiOlcx9MIg2ebh9ITmd2Du2p2q/LKtoutJckvhbKQPWcZi/B+1ZTSff0FHBIg+EYxf6TeFuia7XSTWH7sr2CDCCtcvSR9bB5yW6jdmGfa8Af8I1TCBuqoSUo0Re50BZBZF7COleEh+IojbjXn2CIDMg5rT4Sh3qcMGvFn9OW1cz5h5UNSOk7EIAXXPcI7Aloxh2sBo4/DrvvbfIsKrvxV9Fx4bdyNtR7dZ7xsoOw6L0zttC3K9naf3VAOeBAyjBiRwm0tWxJC/buhTsKlYrthhyUrwLtYAFL4UHcazvz57hY/cEzR2X6F//9Hp7HFoNtn1E36doX3ZfeI22yxHMo9SYW7O69C45wbhJ29lAA9XXbYVyGBKFkY8C1NCZ0Xckt9H8/Ow5Sz8HmW/NNBJCn0Fsx+jezdGc4ED5naugNbLAyNg=
# Each line in the 'matrix' triggers a separate Travis build
matrix:
- - TEST_NAME='ARM builds' TESTS='compile-arm-ports'
- - TEST_NAME='Other builds' TESTS='documentation compile-base compile-nxp-ports compile-tools'
+ - TEST_NAME='Builds' TESTS='documentation compile-base compile-arm-ports compile-nxp-ports compile-tools'
- TEST_NAME='Cooja simulations' TESTS='rpl-lite rpl-classic simulation-base ipv6 ieee802154'
- TEST_NAME='Cooja + script' TESTS='tun-rpl-br'
- TEST_NAME='Script tests' TESTS='script-base native-runs ipv6-nbr coap-lwm2m packet-parsing'
|
dont compare actual branch to expected branch if branch/revision is a hash value | @@ -44,9 +44,11 @@ for repodirname in `ls $AOMP_REPOS` ; do
cd $fulldirname
HASH=`git log -1 --numstat --format="%h" |head -1`
flag=""
+ is_hash=0
get_branch_name
abranch=`git branch | awk '/\*/ { print $2; }'`
if [ "$abranch" == "(HEAD" ] ; then
+ is_hash=1
abranch=`git branch | awk '/\*/ { print $5; }' | cut -d")" -f1`
[ "$abranch" != "$HASH" ] && flag="!HASH! "
fi
@@ -57,7 +59,7 @@ for repodirname in `ls $AOMP_REPOS` ; do
if [ "$url" == "" ] ; then
url=`git config --get remote.gerritgit.url`
fi
- [ "$branch_name" != "$abranch" ] && flag="!BRANCH! "
+ [ "$branch_name" != "$abranch" ] && [ $is_hash == 0 ] && flag="!BRANCH! "
echo "$flag$repodirname url:$url desired:$branch_name actual:$abranch hash:$HASH"
fi
done
|
Updated <release> documentation | @@ -614,11 +614,11 @@ The latest release version is always listed on top.
\b Example:
\code
<releases>
- <release version="1.1.1">Fixed a problem with the feature xyz.
+ <release version="1.1.1" date="2020-05-12">Fixed a problem with the feature xyz.
</release>
- <release version="1.1.0">Introduces a new feature xyz.
+ <release version="1.1.0" date="2020-03-13">Introduces a new feature xyz.
</release>
- <release version="1.0.0">First published version.
+ <release version="1.0.0" date="2020-02-23">First published version.
</release>
</releases>
\endcode
@@ -640,6 +640,16 @@ The latest release version is always listed on top.
</package>
\endcode
+\b Example for a deprecated pack with a replacement:
+\code
+<releases>
+ <release version="1.0.1" date="2020-04-18" deprecated="2020-04-18" replacement="Vendor.pack_name">Deprecated: use Vendor.pack_name instead.
+ </release>
+ <release version="1.0.0" date="2020-03-24">Initial version.
+ </release>
+</releases>
+\endcode
+
<p> </p>
<table class="cmtable" summary="Element: Release">
|
Update README handle_cmd comments
Update REAMDE handle_cmd comments about the handle_cmd
passthrough support for handlers that also implement
read/write/flush callouts. | @@ -75,8 +75,8 @@ difference is who is responsible for the event loop.
There are two different ways to write a tcmu-runner plugin handler:
1. one can register .handle_cmd to take the full control of command handling
-2. or else one can register .{read, write, flush, ...} to only handle storage
- IO stuff.
+2. or else one can register .{read, write, flush, ...} to handle specific
+ operations and .handle_cmd to override the generic handling if needed.
With the option 1, tcmu-runner is in charge of the event loop
for your plugin, and your handler's `handle_cmd` function is called
|
webp-lossless-bitstream-spec: fix 'simple code' snippet
based on & | @@ -858,25 +858,29 @@ stream. This may be inefficient, but it is allowed by the format.
**(i) Simple Code Length Code:**
-This variant is used in the special case when only 1 or 2 Huffman code lengths
-are non-zero, and are in the range of \[0..255\]. All other Huffman code lengths
+This variant is used in the special case when only 1 or 2 Huffman symbols are
+in the range \[0, 255\] with code length `1`. All other Huffman code lengths
are implicitly zeros.
-The first bit indicates the number of non-zero code lengths:
+The first bit indicates the number of symbols:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-int num_code_lengths = ReadBits(1) + 1;
+int num_symbols = ReadBits(1) + 1;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The first code length is stored either using a 1-bit code for values of 0 and 1,
-or using an 8-bit code for values in range \[0..255\]. The second code length,
-when present, is coded as an 8-bit code.
+Following are the symbol values.
+This first symbol is coded using 1 or 8 bits depending on the value of
+`is_first_8bits`. The range is \[0, 1\] or \[0, 255\], respectively.
+The second symbol, if present, is always assumed to be in the range \[0, 255\]
+and coded using 8 bits.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int is_first_8bits = ReadBits(1);
-code_lengths[0] = ReadBits(1 + 7 * is_first_8bits);
-if (num_code_lengths == 2) {
- code_lengths[1] = ReadBits(8);
+symbol0 = ReadBits(1 + 7 * is_first_8bits);
+code_lengths[symbol0] = 1;
+if (num_symbols == 2) {
+ symbol1 = ReadBits(8);
+ code_lengths[symbol1] = 1;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
ames: gate "fragment crashed" printf on msg.veb | =/ =bone bone.shut-packet
::
?: ?=(%& -.meat.shut-packet)
- =+ ?~ dud ~
+ =+ ?. &(?=(^ dud) msg.veb) ~
%. ~
- %+ slog
+ %- slog
+ :_ tang.u.dud
leaf+"ames: {<her.channel>} fragment crashed {<mote.u.dud>}"
- ?.(msg.veb ~ tang.u.dud)
(run-message-sink bone %hear lane shut-packet ?=(~ dud))
:: Just try again on error, printing trace
::
|
Modify sandbox whitelist | @@ -64,8 +64,7 @@ static constexpr const char* s_cGlobalObjectsWhitelist[] =
"ToTweakDBID",
"WeakReference",
"GetMod",
- "__Game",
- "__Type",
+ "TweakDB"
};
static constexpr const char* s_cGlobalTablesWhitelist[] =
|
dockerfile: adjust distroless version | @@ -56,7 +56,7 @@ COPY conf/fluent-bit.conf \
conf/plugins.conf \
/fluent-bit/etc/
-FROM gcr.io/distroless/cc-debian10:fd0d99e8c54d7d7b2f3dd29f5093d030d192cbbc
+FROM gcr.io/distroless/cc-debian10
LABEL maintainer="Eduardo Silva <[email protected]>"
LABEL Description="Fluent Bit docker image" Vendor="Fluent Organization" Version="1.1"
|
Perhaps maintain m_size correctly | @@ -232,6 +232,8 @@ namespace ARIASDK_NS_BEGIN {
auto &v = *it;
if (matcher(v, whereFilter))
{
+ size_t recordSize = v.blob.size() + sizeof(v);
+ m_size -= std::min(m_size, recordSize);
it = records.erase(it);
continue;
}
@@ -296,6 +298,8 @@ namespace ARIASDK_NS_BEGIN {
{
// record id appears once only, so remove from set
idSet.erase(v.id);
+ size_t recordSize = v.blob.size() + sizeof(v);
+ m_size -= std::min(m_size, recordSize);
it = records.erase(it);
continue;
}
|
restores deterministic +test entropy seed | @@ -42,7 +42,8 @@ urb ./ship -p test -d ':- %renders /'
urb ./ship -d '~& %finish-test-renders ~'
# Run the test generator
-urb ./ship -d '+test' | tee test-generator-output
+urb ./ship -d '+test, =seed `@uvI`(shaz %reproducible)' |
+ tee test-generator-output
shutdown
|
kernel/task : Add ifndef condition for task_sigchild
task_exithook.c fails to link if signals are disabled because was unconditionally trying to send the SIGCHLD signal to the parent in certain configurations.
commit from Nuttx | @@ -293,7 +293,7 @@ static inline void task_groupexit(FAR struct task_group_s *group)
*
****************************************************************************/
-#ifdef CONFIG_SCHED_HAVE_PARENT
+#if defined(CONFIG_SCHED_HAVE_PARENT) && !defined(CONFIG_DISABLE_SIGNALS)
#ifdef HAVE_GROUP_MEMBERS
static inline void task_sigchild(gid_t pgid, FAR struct tcb_s *ctcb, int status)
{
@@ -413,11 +413,11 @@ static inline void task_sigchild(FAR struct tcb_s *ptcb, FAR struct tcb_s *ctcb,
}
#endif /* HAVE_GROUP_MEMBERS */
-#else /* CONFIG_SCHED_HAVE_PARENT */
+#else /* CONFIG_SCHED_HAVE_PARENT && !CONFIG_DISABLE_SIGNALS */
#define task_sigchild(x, ctcb, status)
-#endif /* CONFIG_SCHED_HAVE_PARENT */
+#endif /* CONFIG_SCHED_HAVE_PARENT && !CONFIG_DISABLE_SIGNALS */
/****************************************************************************
* Name: task_signalparent
|
specload: exit child process on error | #include <kdbmodule.h>
#include <kdbproposal.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
// keep #ifdef in sync with kdb export
@@ -379,8 +380,7 @@ bool loadSpec (KeySet * returned, const char * app, char * argv[], Key * parentK
// child
if (dup2 (fd[1], STDOUT_FILENO) == -1)
{
- ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_SPECLOAD, parentKey, "Could not execute app: %s", strerror (errno));
- return NULL;
+ exit (EXIT_FAILURE);
}
close (fd[0]);
@@ -388,8 +388,7 @@ bool loadSpec (KeySet * returned, const char * app, char * argv[], Key * parentK
execv (app, argv);
- ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_SPECLOAD, parentKey, "Could not execute app: %s", strerror (errno));
- return NULL;
+ exit (EXIT_FAILURE);
}
// parent
|
fix regions_count tracking in case of concurrent region allocations | @@ -184,6 +184,7 @@ static bool mi_region_commit_blocks(mem_region_t* region, size_t idx, size_t bit
// note: we don't need to increment the region count, this will happen on another allocation
for(size_t i = 1; i <= 4 && idx + i < MI_REGION_MAX; i++) {
if (mi_atomic_cas_strong(®ions[idx+i].info, info, 0)) {
+ mi_atomic_increment(®ions_count);
start = NULL;
break;
}
@@ -204,6 +205,7 @@ static bool mi_region_commit_blocks(mem_region_t* region, size_t idx, size_t bit
bool region_is_large = false;
void* start = mi_region_info_read(info,®ion_is_large,®ion_is_committed);
mi_assert_internal(!(region_is_large && !*allow_large));
+ mi_assert_internal(start!=NULL);
// set dirty bits
uintptr_t m;
@@ -225,6 +227,7 @@ static bool mi_region_commit_blocks(mem_region_t* region, size_t idx, size_t bit
}
// and return the allocation
+ mi_assert_internal(blocks_start != NULL);
*allow_large = region_is_large;
*p = blocks_start;
*id = (idx*MI_REGION_MAP_BITS) + bitidx;
@@ -278,6 +281,7 @@ static bool mi_region_alloc_blocks(mem_region_t* region, size_t idx, size_t bloc
const uintptr_t mask = mi_region_block_mask(blocks, 0);
const size_t bitidx_max = MI_REGION_MAP_BITS - blocks;
uintptr_t map = mi_atomic_read(®ion->map);
+ if (map==MI_REGION_MAP_FULL) return true;
#ifdef MI_HAVE_BITSCAN
size_t bitidx = mi_bsf(~map); // quickly find the first zero bit if possible
@@ -393,8 +397,8 @@ void* _mi_mem_alloc_aligned(size_t size, size_t alignment, bool* commit, bool* l
}
if (p == NULL) {
- // no free range in existing regions -- try to extend beyond the count.. but at most 4 regions
- for (idx = count; idx < count + 4 && idx < MI_REGION_MAX; idx++) {
+ // no free range in existing regions -- try to extend beyond the count.. but at most 8 regions
+ for (idx = count; idx < count + 8 && idx < MI_REGION_MAX; idx++) {
if (!mi_region_try_alloc_blocks(idx, blocks, size, commit, large, is_zero, &p, id, tld)) return NULL; // error
if (p != NULL) break;
}
@@ -402,12 +406,12 @@ void* _mi_mem_alloc_aligned(size_t size, size_t alignment, bool* commit, bool* l
if (p == NULL) {
// we could not find a place to allocate, fall back to the os directly
+ _mi_warning_message("unable to allocate from region: size %zu\n", size);
*is_zero = true;
p = _mi_os_alloc_aligned(size, alignment, commit, large, tld);
}
else {
- tld->region_idx = idx; // next start of search?
-
+ tld->region_idx = idx; // next start of search? currently not used as we use first-fit
}
mi_assert_internal( p == NULL || (uintptr_t)p % alignment == 0);
|
SOVERSION bump to version 5.6.27 | @@ -54,7 +54,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 5)
set(SYSREPO_MINOR_SOVERSION 6)
-set(SYSREPO_MICRO_SOVERSION 26)
+set(SYSREPO_MICRO_SOVERSION 27)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
runtime: steal from a parked thread on thread_yield | @@ -186,10 +186,9 @@ static bool work_available(struct kthread *k)
static bool steal_work(struct kthread *l, struct kthread *r)
{
thread_t *th;
- uint32_t i, avail, rq_tail;
+ uint32_t i, avail, rq_tail, lrq_head, lrq_tail;
assert_spin_lock_held(&l->lock);
- assert(l->rq_head == 0 && l->rq_tail == 0);
if (!work_available(r))
return false;
@@ -201,15 +200,18 @@ static bool steal_work(struct kthread *l, struct kthread *r)
if (avail) {
/* steal half the tasks */
avail = div_up(avail, 2);
- assert(avail <= div_up(RUNTIME_RQ_SIZE, 2));
rq_tail = r->rq_tail;
- for (i = 0; i < avail; i++)
- l->rq[i] = r->rq[rq_tail++ % RUNTIME_RQ_SIZE];
+ lrq_tail = l->rq_tail;
+ lrq_head = l->rq_head;
+ for (i = 0; i < avail && lrq_head - lrq_tail < RUNTIME_RQ_SIZE; i++)
+ l->rq[lrq_head++ % RUNTIME_RQ_SIZE] = r->rq[rq_tail++ % RUNTIME_RQ_SIZE];
+ for (; i < avail; i++)
+ list_add_tail(&l->rq_overflow, &r->rq[rq_tail++ % RUNTIME_RQ_SIZE]->link);
store_release(&r->rq_tail, rq_tail);
ACCESS_ONCE(r->q_ptrs->rq_tail) += avail;
spin_unlock(&r->lock);
- l->rq_head = avail;
+ l->rq_head = lrq_head;
ACCESS_ONCE(l->q_ptrs->rq_head) += avail;
STAT(THREADS_STOLEN) += avail;
return true;
@@ -231,7 +233,10 @@ static bool steal_work(struct kthread *l, struct kthread *r)
done:
if (th) {
- l->rq[l->rq_head++] = th;
+ if (likely(l->rq_head - l->rq_tail < RUNTIME_RQ_SIZE))
+ l->rq[l->rq_head++ % RUNTIME_RQ_SIZE] = th;
+ else
+ list_add_tail(&l->rq_overflow, &th->link);
ACCESS_ONCE(l->q_ptrs->rq_head)++;
STAT(THREADS_STOLEN)++;
}
@@ -502,12 +507,23 @@ void thread_park_and_unlock_np(spinlock_t *l)
*/
void thread_yield(void)
{
+ struct kthread *r, *k;
thread_t *myth = thread_self();
/* check for softirqs */
softirq_run(RUNTIME_SOFTIRQ_LOCAL_BUDGET);
- preempt_disable();
+ k = getk();
+
+ /* try to drain parked kthreads for fairness */
+ r = ks[rand_crc32c((uintptr_t)k) % maxks];
+ if (ACCESS_ONCE(r->parked)) {
+ spin_lock(&k->lock);
+ if (likely(ACCESS_ONCE(r->parked)))
+ steal_work(k, r);
+ spin_unlock(&k->lock);
+ }
+
assert(myth->state == THREAD_STATE_RUNNING);
myth->state = THREAD_STATE_SLEEPING;
myth->last_cpu = myk()->curr_cpu;
|
Update Cirrus CI FreeBSD release to 12.2. | @@ -11,7 +11,7 @@ auto_cancellation: $CIRRUS_BRANCH != 'integration'
# ----------------------------------------------------------------------------------------------------------------------------------
freebsd_12_task:
freebsd_instance:
- image_family: freebsd-12-1
+ image_family: freebsd-12-2
cpu: 4
memory: 4G
|
rune/README: clarify the depenencies to libsgx-dcap-quote-verify-dev/libsgx-dcap-quote-verify-devel
Fixes: | Additionally, `rune` by default enables seccomp support as [runc](https://github.com/opencontainers/runc#building) so you need to install libseccomp on your platform.
-Besides, `rune` depends on [SGX DCAP](https://github.com/intel/SGXDataCenterAttestationPrimitives). Please download and install the rpm(centos) or deb(ubuntu) from "https://download.01.org/intel-sgx/sgx-dcap/#version#linux/distro"
-- libsgx-dcap-quote-verify-dev(ubuntu) or libsgx-dcap-quote-verify-devel(centos)
+Besides, `rune` depends on [SGX DCAP](https://github.com/intel/SGXDataCenterAttestationPrimitives). Please download and install the `libsgx-dcap-quote-verify-devel` rpm (centos) or `libsgx-dcap-quote-verify-dev` deb (ubuntu) from [website](https://download.01.org/intel-sgx/sgx-linux/2.13.3/).
```bash
# create $WORKSPACE folder
|
Add `make clang-format` | SUBDIRS = lib tests
ACLOCAL_AMFLAGS = -I m4
+
+# Format source files using clang-format. Don't format source files
+# under third-party directory since we are not responsible for thier
+# coding style.
+clang-format:
+ CLANGFORMAT=`git config --get clangformat.binary`; \
+ test -z $${CLANGFORMAT} && CLANGFORMAT="clang-format"; \
+ $${CLANGFORMAT} -i lib/*.{c,h} lib/includes/ngtcp2/*.h
|
Disable Lua popen support in emscripten; | @@ -128,6 +128,7 @@ unset(LIB_SUFFIX CACHE)
if(EMSCRIPTEN)
option(LUA_USE_RELATIVE_LOADLIB OFF)
option(LUA_USE_ULONGJMP OFF)
+ option(LUA_USE_POPEN OFF)
add_subdirectory(deps/lua lua)
set_target_properties(lua luac liblua liblua_static PROPERTIES EXCLUDE_FROM_ALL 1)
include_directories(deps/lua/src ${CMAKE_BINARY_DIR}/lua)
|
Don't set rpath | @@ -24,16 +24,6 @@ mark_as_advanced(BROTLI_BUNDLED_MODE)
include(GNUInstallDirs)
-# When building shared libraries it is important to set the correct rpath.
-# See https://cmake.org/Wiki/CMake_RPATH_handling#Always_full_RPATH
-set(CMAKE_SKIP_BUILD_RPATH FALSE)
-set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_LIBDIR}" isSystemDir)
-if ("${isSystemDir}" STREQUAL "-1")
- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
-endif()
-
# Parse version information from common/version.h. Normally we would
# define these values here and write them out to configuration file(s)
# (i.e., config.h), but in this case we parse them from
|
fix(obj_class): fix possible memory leak when the default disp is NULL | @@ -56,6 +56,7 @@ lv_obj_t * lv_obj_class_create_obj(const lv_obj_class_t * class_p, lv_obj_t * pa
lv_disp_t * disp = lv_disp_get_default();
if(!disp) {
LV_LOG_WARN("No display created yet. No place to assign the new screen");
+ lv_mem_free(obj);
return NULL;
}
|
runtime: more egress packet buffers, smaller iokernel queues
Now that we have backpressure, we don't need enormous queues. However,
we weren't reserving enough egress packets buffers to fill up all the
TXQs completely. | #include "defs.h"
-#define PACKET_QUEUE_MCOUNT 8192
-#define COMMAND_QUEUE_MCOUNT 8192
+#define PACKET_QUEUE_MCOUNT 1024
+#define COMMAND_QUEUE_MCOUNT 512
+/* the egress buffer pool must be large enough to fill all the TXQs entirely */
+#define EGRESS_POOL_SIZE(nks) \
+ (PACKET_QUEUE_MCOUNT * MBUF_DEFAULT_LEN * (nks) * 2)
DEFINE_SPINLOCK(qlock);
unsigned int nrqs = 0;
@@ -52,7 +55,6 @@ static int generate_random_mac(struct eth_addr *mac)
// Could be a macro really, this is totally static :/
static size_t calculate_shm_space(unsigned int thread_count)
{
-
size_t ret = 0, q;
// Header + queue_spec information
@@ -81,7 +83,7 @@ static size_t calculate_shm_space(unsigned int thread_count)
BUILD_ASSERT(ETH_MAX_LEN + sizeof(struct tx_net_hdr) <=
MBUF_DEFAULT_LEN);
BUILD_ASSERT(PGSIZE_2MB % MBUF_DEFAULT_LEN == 0);
- ret += MBUF_DEFAULT_LEN * PACKET_QUEUE_MCOUNT;
+ ret += EGRESS_POOL_SIZE(thread_count);
ret = align_up(ret, PGSIZE_2MB);
return ret;
@@ -160,7 +162,7 @@ static int ioqueues_shm_setup(unsigned int threads)
ptr = (char *)align_up((uintptr_t)ptr, PGSIZE_2MB);
iok.tx_buf = ptr;
- iok.tx_len = MBUF_DEFAULT_LEN * PACKET_QUEUE_MCOUNT;
+ iok.tx_len = EGRESS_POOL_SIZE(threads);
ptr_to_shmptr(r, ptr, iok.tx_len);
ptr += iok.tx_len;
|
common/ioexpander.c: Format with clang-format
BRANCH=none
TEST=none | @@ -107,8 +107,8 @@ int ioex_get_flags(enum ioex_signal signal, int *flags)
if (g == NULL)
return EC_ERROR_BUSY;
- return ioex_config[g->ioex].drv->get_flags_by_mask(g->ioex,
- g->port, g->mask, flags);
+ return ioex_config[g->ioex].drv->get_flags_by_mask(g->ioex, g->port,
+ g->mask, flags);
}
int ioex_set_flags(enum ioex_signal signal, int flags)
@@ -118,8 +118,8 @@ int ioex_set_flags(enum ioex_signal signal, int flags)
if (g == NULL)
return EC_ERROR_BUSY;
- return ioex_config[g->ioex].drv->set_flags_by_mask(g->ioex,
- g->port, g->mask, flags);
+ return ioex_config[g->ioex].drv->set_flags_by_mask(g->ioex, g->port,
+ g->mask, flags);
}
int ioex_get_level(enum ioex_signal signal, int *val)
@@ -129,8 +129,8 @@ int ioex_get_level(enum ioex_signal signal, int *val)
if (g == NULL)
return EC_ERROR_BUSY;
- return ioex_config[g->ioex].drv->get_level(g->ioex, g->port,
- g->mask, val);
+ return ioex_config[g->ioex].drv->get_level(g->ioex, g->port, g->mask,
+ val);
}
int ioex_set_level(enum ioex_signal signal, int value)
@@ -140,8 +140,8 @@ int ioex_set_level(enum ioex_signal signal, int value)
if (g == NULL)
return EC_ERROR_BUSY;
- return ioex_config[g->ioex].drv->set_level(g->ioex, g->port,
- g->mask, value);
+ return ioex_config[g->ioex].drv->set_level(g->ioex, g->port, g->mask,
+ value);
}
#ifdef CONFIG_IO_EXPANDER_SUPPORT_GET_PORT
@@ -233,8 +233,8 @@ int ioex_init(int ioex)
if (system_jumped_late())
flags &= ~(GPIO_LOW | GPIO_HIGH);
- drv->set_flags_by_mask(g->ioex, g->port,
- g->mask, flags);
+ drv->set_flags_by_mask(g->ioex, g->port, g->mask,
+ flags);
}
}
@@ -253,8 +253,8 @@ static void ioex_init_default(void)
* If the IO Expander has been initialized or if the default
* initialization is disabled, skip initializing.
*/
- if (ioex_config[i].flags & (IOEX_FLAGS_INITIALIZED |
- IOEX_FLAGS_DEFAULT_INIT_DISABLED))
+ if (ioex_config[i].flags &
+ (IOEX_FLAGS_INITIALIZED | IOEX_FLAGS_DEFAULT_INIT_DISABLED))
continue;
ioex_init(i);
|
make sure tester script can be run from repo root | @@ -15,11 +15,13 @@ DEFINES=(
"RX_BAYANG_PROTOCOL_TELEMETRY_AUTOBIND"
"RX_FRSKY"
)
-SCRIPT_FOLDER="$(dirname "$0")"
OUTPUT_FOLDER="output"
+SCRIPT_FOLDER="$(dirname "$0")"
+SOURCE_FOLDER="$SCRIPT_FOLDER/.."
+BUILD_FOLDER="$SOURCE_FOLDER/build"
INDEX_PAGE="$OUTPUT_FOLDER/quicksilver.html"
-CONFIG_FILE="src/main/config/config.h"
+CONFIG_FILE="$SOURCE_FOLDER/src/main/config/config.h"
TARGETS_FILE="$SCRIPT_FOLDER/targets.json"
function resetConfig() {
@@ -68,8 +70,8 @@ for target in $(jq -r '.[] | @base64' $TARGETS_FILE); do
resetConfig
setConfig "$(config_get '.defines | to_entries[] | @base64')"
- if make -j32 MODE="$MODE" $TARGET_NAME &> /dev/null; then
- cp "build/$MODE/quicksilver.$TARGET_NAME.$MODE.hex" "$OUTPUT_FOLDER/$BUILD_NAME.hex"
+ if make -j32 -C "$SOURCE_FOLDER" MODE="$MODE" $TARGET_NAME &> /dev/null; then
+ cp "$BUILD_FOLDER/$MODE/quicksilver.$TARGET_NAME.$MODE.hex" "$OUTPUT_FOLDER/$BUILD_NAME.hex"
upload "$OUTPUT_FOLDER/$BUILD_NAME.hex" &> /dev/null
echo "<div><a target=\"_blank\" href=\"$BUILD_NAME.hex\">$BUILD_NAME</a></div>" >> $INDEX_PAGE
|
Fix leak in `h2o_http2_scheduler_relocate` if `src` has no children | @@ -267,8 +267,10 @@ void h2o_http2_scheduler_relocate(h2o_http2_scheduler_openref_t *dst, h2o_http2_
h2o_linklist_insert_list(&dst->node._all_refs, &src->node._all_refs);
/* node._queue */
dst->node._queue = src->node._queue;
- src->node._queue = NULL;
+ } else {
+ free(src->node._queue);
}
+ src->node._queue = NULL;
/* swap all_link */
h2o_linklist_insert(&src->_all_link, &dst->_all_link);
|
plugins: in_opentelemetry: updated decoder interface | @@ -96,22 +96,33 @@ static int process_payload_metrics(struct flb_opentelemetry *ctx, struct http_co
struct mk_http_session *session,
struct mk_http_request *request)
{
- struct cmt *decoded_context;
+ struct cfl_list decoded_contexts;
+ struct cfl_list *iterator;
+ struct cmt *context;
size_t offset;
int result;
offset = 0;
- result = cmt_decode_opentelemetry_create(&decoded_context,
+ result = cmt_decode_opentelemetry_create(&decoded_contexts,
request->data.data,
request->data.len,
&offset);
if (result == CMT_DECODE_OPENTELEMETRY_SUCCESS) {
ctx->ins->event_type = FLB_INPUT_METRICS;
- result = flb_input_metrics_append(ctx->ins, NULL, 0, decoded_context);
- cmt_decode_opentelemetry_destroy(decoded_context);
+ cfl_list_foreach(iterator, &decoded_contexts) {
+ context = cfl_list_entry(iterator, struct cmt, _head);
+
+ result = flb_input_metrics_append(ctx->ins, NULL, 0, context);
+
+ if (result != 0) {
+ flb_plg_debug(ctx->ins, "could not ingest metrics context : %d", result);
+ }
+ }
+
+ cmt_decode_opentelemetry_destroy(&decoded_contexts);
}
return 0;
|
board/dewatt/led.c: Format with clang-format
BRANCH=none
TEST=none | @@ -46,18 +46,27 @@ DECLARE_HOOK(HOOK_INIT, led_pwm_ch_init, HOOK_PRIO_INIT_PWM - 1);
__override struct led_descriptor
led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
- [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
- [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
- [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
- [STATE_CHARGING_FULL_S5] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
- [STATE_DISCHARGE_S0] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
- [STATE_DISCHARGE_S3] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC},
+ [STATE_CHARGING_LVL_1] = { { EC_LED_COLOR_AMBER,
+ LED_INDEFINITE } },
+ [STATE_CHARGING_LVL_2] = { { EC_LED_COLOR_AMBER,
+ LED_INDEFINITE } },
+ [STATE_CHARGING_FULL_CHARGE] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
+ [STATE_CHARGING_FULL_S5] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S0] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S3] = { { EC_LED_COLOR_AMBER,
+ 1 * LED_ONE_SEC },
{ LED_OFF, 3 * LED_ONE_SEC } },
[STATE_DISCHARGE_S5] = { { LED_OFF, LED_INDEFINITE } },
- [STATE_BATTERY_ERROR] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC},
+ [STATE_BATTERY_ERROR] = { { EC_LED_COLOR_AMBER,
+ 1 * LED_ONE_SEC },
{ LED_OFF, 1 * LED_ONE_SEC } },
- [STATE_FACTORY_TEST] = {{EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC},
- {EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC} },
+ [STATE_FACTORY_TEST] = { { EC_LED_COLOR_AMBER,
+ 2 * LED_ONE_SEC },
+ { EC_LED_COLOR_BLUE,
+ 2 * LED_ONE_SEC } },
};
const enum ec_led_id supported_led_ids[] = {
|
examples/dnsclient_test : remove log of official hostname
This commit is to remove log of official hostname
- gethostbyname API doesn't return official hostname and alias
- so to prevent user confusion, remove log | @@ -154,7 +154,6 @@ int dnsclient_main(int argc, char *argv[])
return -1;
} else {
printf("DNS results\n");
- printf(" Official hostname : %s\n", shost->h_name);
printf(" IP Address : %s\n", ip_ntoa((ip_addr_t *)shost->h_addr_list[0]));
}
|
mdns: fix memory leak in pbuf if tcpipadapter failed to get netif | @@ -301,6 +301,7 @@ static err_t _mdns_udp_pcb_write_api(struct tcpip_api_call_data *api_call_msg)
mdns_pcb_t * _pcb = &_mdns_server->interfaces[msg->tcpip_if].pcbs[msg->ip_protocol];
esp_err_t err = tcpip_adapter_get_netif(msg->tcpip_if, &nif);
if (err) {
+ pbuf_free(msg->pbt);
msg->err = err;
return err;
}
|
nva: Fix typo | /*
- * Copyright 2011,2016 Roy Spliet <[email protected]>
+ * Copyright 2020 Roy Spliet <[email protected]>
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
void help()
{
- printf("Retreives PMU from the GPU.\nJust run, and pipe output to"
+ printf("Retrieves PMU from the GPU.\nJust run, and pipe output to"
"file.\n");
}
|
[BACKPORT] s32k3xx:EDMA fix DMAMUX1 access violation
apache/nuttx#7757 | @@ -1061,7 +1061,7 @@ DMACH_HANDLE s32k3xx_dmach_alloc(uint16_t dmamux, uint8_t dchpri)
/* Make sure that the channel is disabled. */
- putreg8(EDMA_CH_INT, S32K3XX_EDMA_TCD[dmach->chan] +
+ putreg32(EDMA_CH_INT, S32K3XX_EDMA_TCD[dmach->chan] +
S32K3XX_EDMA_CH_INT_OFFSET);
/* Disable the associated DMAMUX for now */
@@ -1129,8 +1129,8 @@ void s32k3xx_dmach_free(DMACH_HANDLE handle)
/* Make sure that the channel is disabled. */
- putreg8(EDMA_CH_INT, S32K3XX_EDMA_TCD[dmach->chan]
- + S32K3XX_EDMA_CH_INT_OFFSET);
+ putreg32(EDMA_CH_INT, S32K3XX_EDMA_TCD[dmach->chan] +
+ S32K3XX_EDMA_CH_INT_OFFSET);
/* Disable the associated DMAMUX */
@@ -1140,7 +1140,7 @@ void s32k3xx_dmach_free(DMACH_HANDLE handle)
}
else
{
- putreg8(0, S32K3XX_DMAMUX1_CHCFG(dmach->chan));
+ putreg8(0, S32K3XX_DMAMUX1_CHCFG(dmach->chan - 16));
}
}
@@ -1598,7 +1598,7 @@ void s32k3xx_dmasample(DMACH_HANDLE handle, struct s32k3xx_dmaregs_s *regs)
}
else
{
- regs->dmamux = getreg32(S32K3XX_DMAMUX1_CHCFG(chan)); /* Channel configuration */
+ regs->dmamux = getreg32(S32K3XX_DMAMUX1_CHCFG(chan - 16)); /* Channel configuration */
}
spin_unlock_irqrestore(NULL, flags);
|
ethernet: Fix node ordering on ARP feautre ARC
Type: fix
Fixes:
this improves the tracing for dropped ARP packets | @@ -460,6 +460,8 @@ arp_enable (ethernet_arp_main_t * am, u32 sw_if_index)
am->ethernet_arp_by_sw_if_index[sw_if_index].enabled = 1;
vnet_feature_enable_disable ("arp", "arp-reply", sw_if_index, 1, NULL, 0);
+ vnet_feature_enable_disable ("arp", "arp-disabled", sw_if_index, 0, NULL,
+ 0);
}
static int
@@ -478,6 +480,8 @@ arp_disable (ethernet_arp_main_t * am, u32 sw_if_index)
if (!arp_is_enabled (am, sw_if_index))
return;
+ vnet_feature_enable_disable ("arp", "arp-disabled", sw_if_index, 1, NULL,
+ 0);
vnet_feature_enable_disable ("arp", "arp-reply", sw_if_index, 0, NULL, 0);
eai = &am->ethernet_arp_by_sw_if_index[sw_if_index];
@@ -1707,7 +1711,7 @@ VNET_FEATURE_ARC_INIT (arp_feat, static) =
{
.arc_name = "arp",
.start_nodes = VNET_FEATURES ("arp-input"),
- .last_in_arc = "arp-disabled",
+ .last_in_arc = "error-drop",
.arc_index_ptr = ðernet_arp_main.feature_arc_index,
};
@@ -3048,9 +3052,10 @@ send_ip4_garp_w_addr (vlib_main_t * vm,
static clib_error_t *
vnet_arp_delete_sw_interface (vnet_main_t * vnm, u32 sw_if_index, u32 is_add)
{
+ ethernet_arp_main_t *am = ðernet_arp_main;
+
if (!is_add && sw_if_index != ~0)
{
- ethernet_arp_main_t *am = ðernet_arp_main;
ethernet_arp_ip4_entry_t *e;
/* *INDENT-OFF* */
pool_foreach (e, am->ip4_entry_pool, ({
@@ -3063,6 +3068,12 @@ vnet_arp_delete_sw_interface (vnet_main_t * vnm, u32 sw_if_index, u32 is_add)
vnet_arp_unset_ip4_over_ethernet_internal (vnm, &args);
}));
/* *INDENT-ON* */
+ arp_disable (am, sw_if_index);
+ }
+ else if (is_add)
+ {
+ vnet_feature_enable_disable ("arp", "arp-disabled",
+ sw_if_index, 1, NULL, 0);
}
return (NULL);
|
Shell Recorder: Improve usage message | @@ -308,7 +308,7 @@ rm -f ./stdout ./stderr
if [ "$#" -lt '1' ] || [ "$#" -gt '2' ];
then
- printf 'Usage: ./shell_recorder input_script [protocol to compare]\n'
+ printf 'Usage: %s input_script [protocol to compare]\n' "$0"
rm "$OutFile"
exit 0
fi
|
drivers/audio/cs4344: fix configure function when setting mclk | @@ -602,6 +602,7 @@ cs4344_configure(FAR struct audio_lowerhalf_s *dev,
{
audwarn("WARNING: MCLK could not be set on lower half\n");
priv->mclk_freq = 0;
+ ret = OK;
}
}
|
added CTRL+[0...7] to switch bank | @@ -805,7 +805,13 @@ static void drawBankIcon(s32 x, s32 y)
if(i == impl.bank.indexes[mode])
tic_api_rect(tic, rect.x, rect.y, rect.w, rect.h, tic_color_red);
- tic_api_print(tic, (char[]){'0' + i, '\0'}, rect.x+1, rect.y+1, i == impl.bank.indexes[mode] ? tic_color_white : over ? tic_color_red : tic_color_light_grey, false, 1, false);
+ tic_api_print(tic, (char[]){'0' + i, '\0'}, rect.x+1, rect.y+1,
+ i == impl.bank.indexes[mode]
+ ? tic_color_white
+ : over
+ ? tic_color_red
+ : tic_color_light_grey,
+ false, 1, false);
}
@@ -1530,6 +1536,22 @@ void switchCrtMonitor()
}
#endif
+#if defined(TIC80_PRO)
+
+static void switchBank(s32 bank)
+{
+ for(s32 i = 0; i < COUNT_OF(BankModes); i++)
+ if(BankModes[i] == impl.mode)
+ {
+ if(impl.bank.chained)
+ memset(impl.bank.indexes, bank, sizeof impl.bank.indexes);
+ else impl.bank.indexes[i] = bank;
+ break;
+ }
+}
+
+#endif
+
static void processShortcuts()
{
tic_mem* tic = impl.studio.tic;
@@ -1584,6 +1606,16 @@ static void processShortcuts()
else if(keyWasPressedOnce(tic_key_r)) runProject();
else if(keyWasPressedOnce(tic_key_return)) runProject();
else if(keyWasPressedOnce(tic_key_s)) saveProject();
+
+#if defined(TIC80_PRO)
+
+ else
+ for(s32 key = tic_key_0, bank = 0; key <= tic_key_7; key++, bank++)
+ if(keyWasPressedOnce(key))
+ switchBank(bank);
+
+#endif
+
}
else
{
|
update for PIN 3.7 and g++-7 | @@ -5,14 +5,14 @@ cd "$(dirname "$0")/pin"
case "`uname`" in
Linux)
if test -d pin-latest; then true; else
- curl -L https://software.intel.com/sites/landingpage/pintool/downloads/pin-2.14-71313-gcc.4.4.7-linux.tar.gz | tar xz
- ln -s pin-2.14-71313-gcc.4.4.7-linux pin-latest
+ curl -L https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.7-97619-g0d0c92f4f-gcc-linux.tar.gz | tar xz
+ ln -s pin-3.7-97619-g0d0c92f4f-gcc-linux pin-latest
fi
# pin build deps, good?
if which apt-get; then
echo "apt-getting pin tool building deps"
- sudo apt-get -qq -y install g++-4.9 gcc-4.9-multilib g++-4.9-multilib || echo "WARNING: apt-get failed"
+ sudo apt-get -qq -y install g++-7 gcc-7-multilib g++-7-multilib || echo "WARNING: apt-get failed"
else
echo "WARNING: you don't have apt-get, you are required to fetch pin tool building deps (e.g. 32 bit libs) on your own"
fi
|
Solve minor bug in cxx port. | @@ -9,7 +9,8 @@ endif()
# Target name
set(target cxx_port)
-set(target_name ${META_PROJECT_NAME})
+string(TOLOWER ${META_PROJECT_NAME} target_name)
+
set(target_export "${META_PROJECT_NAME}-cxx")
# Exit here if required dependencies are not met
|
support writing pipe files & delete read pipe files | @@ -288,7 +288,19 @@ complex float* create_cfl(const char* name, int D, const long dimensions[D])
switch (type) {
case FILE_TYPE_PIPE:
- error("stdout not supported\n");
+
+ ;
+
+ const char* filename = tempnam(NULL, "bart-");
+
+ debug_printf(DP_DEBUG1, "Temp file for pipe: %s\n", filename);
+
+ complex float* ptr = shared_cfl(D, dimensions, filename);
+
+ if (-1 == write_cfl_header(1, filename, D, dimensions))
+ error("Writing to stdout\n");
+
+ return ptr;
case FILE_TYPE_RA:
return create_zra(name, D, dimensions);
@@ -464,6 +476,10 @@ static complex float* load_cfl_internal(const char* name, int D, long dimensions
skip: ;
complex float* ret = (priv ? private_cfl : shared_cfl)(D, dimensions, filename ?: name_bdy);
+ if (FILE_TYPE_PIPE == type)
+ if (0 != unlink(filename))
+ error("Error unlinking temporary file %s\n", filename);
+
free(filename);
return ret;
|
fix fedora spec file modules
-update spec file with module name.so.*
%{_libdir}/libopae-c.so.*
%{_libdir}/libbitstream.so.*
%{_libdir}/libopae-cxx-core.so.*
%{_libdir}/libopae-c++-utils.so.*
%{_libdir}/libopae-c++-nlb.so.*
%{_libdir}/libfpgad-api.so.* | @@ -169,25 +169,14 @@ done
%license %{_datadir}/opae/LICENSE
%license %{_datadir}/opae/COPYING
-%{_libdir}/libopae-c.so.%{version}
-%{_libdir}/libopae-c.so.2
-%{_libdir}/libbitstream.so.%{version}
-%{_libdir}/libbitstream.so.2
-%{_libdir}/libopae-cxx-core.so.%{version}
-%{_libdir}/libopae-cxx-core.so.2
-%{_libdir}/libopae-c++-utils.so.%{version}
-%{_libdir}/libopae-c++-utils.so.2
-%{_libdir}/libopae-c++-nlb.so.%{version}
-%{_libdir}/libopae-c++-nlb.so.2
-%{_libdir}/libfpgad-api.so.%{version}
-%{_libdir}/libfpgad-api.so.2
-
-%{_libdir}/libmml-srv.so.%{version}
-%{_libdir}/libmml-srv.so.2
-
-%{_libdir}/libmml-stream.so.%{version}
-%{_libdir}/libmml-stream.so.2
-
+%{_libdir}/libopae-c.so.*
+%{_libdir}/libbitstream.so.*
+%{_libdir}/libopae-cxx-core.so.*
+%{_libdir}/libopae-c++-utils.so.*
+%{_libdir}/libopae-c++-nlb.so.*
+%{_libdir}/libfpgad-api.so.*
+%{_libdir}/libmml-srv.so.*
+%{_libdir}/libmml-stream.so.*
%post devel
|
RTX5: register access order changed (SVC_Initialize) | @@ -592,8 +592,11 @@ __STATIC_INLINE void SVC_Initialize (void) {
}
SCB->SHPR[7] = (uint8_t)(0xFEU << n);
#elif (__ARM_ARCH_8M_BASE__ == 1U)
- SCB->SHPR[1] |= 0x00FF0000U;
- SCB->SHPR[0] |= (SCB->SHPR[1] << (8+1)) & 0xFC000000U;
+ uint32_t n;
+
+ n = SCB->SHPR[1] | 0x00FF0000U;
+ SCB->SHPR[1] = n;
+ SCB->SHPR[0] |= (n << (8+1)) & 0xFC000000U;
#elif ((__ARM_ARCH_7M__ == 1U) || \
(__ARM_ARCH_7EM__ == 1U))
uint32_t p, n;
@@ -606,8 +609,11 @@ __STATIC_INLINE void SVC_Initialize (void) {
}
SCB->SHP[7] = (uint8_t)(0xFEU << n);
#elif (__ARM_ARCH_6M__ == 1U)
- SCB->SHP[1] |= 0x00FF0000U;
- SCB->SHP[0] |= (SCB->SHP[1] << (8+1)) & 0xFC000000U;
+ uint32_t n;
+
+ n = SCB->SHP[1] | 0x00FF0000U;
+ SCB->SHP[1] = n;
+ SCB->SHP[0] |= (n << (8+1)) & 0xFC000000U;
#endif
}
|
jna: fix formatting | @@ -50,8 +50,7 @@ public class HelloElektra {
ka = Key.create("user:/cutpoint/hello", "hiback"),
kb = Key.create("user:/cutpoint/hello2", "hellotoo"),
kc = Key.create("user:/different/hello", "hellothere");
- KeySet whole = KeySet.create(ka, kb, kc),
- cut = whole.cut(cutpoint);
+ KeySet whole = KeySet.create(ka, kb, kc), cut = whole.cut(cutpoint);
ka.setString("hibackagain");
kb.setBoolean(false);
|
gimble: set 90% input current limit
BRANCH=none
TEST=make -j BOARD=gimble
Tested-by: Scott Chao | #include "battery.h"
#include "button.h"
#include "charge_ramp.h"
+#include "charge_state_v2.h"
#include "charger.h"
#include "common.h"
#include "compile_time_macros.h"
@@ -112,3 +113,17 @@ enum battery_present battery_hw_present(void)
/* The GPIO is low when the battery is physically present */
return gpio_get_level(batt_pres) ? BP_NO : BP_YES;
}
+
+__override void board_set_charge_limit(int port, int supplier, int charge_ma,
+ int max_ma, int charge_mv)
+{
+ /*
+ * Follow OEM request to limit the input current to
+ * 90% negotiated limit.
+ */
+ charge_ma = charge_ma * 90 / 100;
+
+ charge_set_input_current_limit(MAX(charge_ma,
+ CONFIG_CHARGER_INPUT_CURRENT),
+ charge_mv);
+}
|
Remove references to old header file from cmake file | @@ -250,7 +250,7 @@ target_include_directories(ipmctl_os_interface PUBLIC
src/os/nvm_api
src/os/s_string
)
-# TODO: Remove the backup winioctl.h file when the 17650+ Windows SDK is publicly released
+
if (MSVC)
string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+\\.[0-9]+" "\\1" sdk_version_major $ENV{WindowsSDKVersion})
string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" sdk_version_major2 $ENV{WindowsSDKVersion})
@@ -258,10 +258,7 @@ if (MSVC)
if (${sdk_version_major} GREATER 9 AND ${sdk_version_minor} GREATER 17650)
MESSAGE("Using Windows SDK 17650+")
else()
- MESSAGE("Using internal winioctl.h")
- target_include_directories(ipmctl_os_interface PUBLIC
- src/os/win/sdk
- )
+ MESSAGE(FATAL_ERROR "Requires Windows SDK version 17650 or newer.")
endif()
endif()
|
netutils/webclient: combine similar code from http_client_send_request
Two functions that is 'http_client_send_request' and
'http_client_send_request' are very similar code.
This commit combines similar codes from two functions. | @@ -1286,19 +1286,16 @@ errret:
return -1;
}
-int http_client_send_request(struct http_client_request_t *request,
+static int http_client_send_requests(struct http_client_request_t *request,
void *ssl_config,
- struct http_client_response_t *response)
+ struct http_client_response_t *response,
+ wget_callback_t cb)
{
#ifdef CONFIG_NET_SECURITY_TLS
struct mallinfo data;
struct http_client_ssl_config_t *ssl_conf = ssl_config;
#endif
- if (response == NULL) {
- printf("Error: Response is null\n");
- return -1;
- }
if (request == NULL) {
printf("Error: Request is null\n");
return -1;
@@ -1307,6 +1304,7 @@ int http_client_send_request(struct http_client_request_t *request,
request->callback = NULL;
request->tls = false;
request->response = response;
+ request->callback = cb;
if (request->url == NULL) {
printf("Error: URL is NULL!!\n");
@@ -1338,56 +1336,28 @@ int http_client_send_request(struct http_client_request_t *request,
return client_send_request(request);
}
-int http_client_send_request_async(struct http_client_request_t *request,
+int http_client_send_request(struct http_client_request_t *request,
void *ssl_config,
- wget_callback_t cb)
+ struct http_client_response_t *response)
{
-#ifdef CONFIG_NET_SECURITY_TLS
- struct mallinfo data;
- struct http_client_ssl_config_t *ssl_conf = ssl_config;
-#endif
-
- if (cb == NULL) {
- printf("Error: Callback is Null\n");
- return -1;
- }
- if (request == NULL) {
- printf("Error: Request is null\n");
- return -1;
- }
-
- request->callback = cb;
- request->tls = false;
- request->response = NULL;
-
- if (request->url == NULL) {
- printf("Error: URL is NULL!!\n");
- return -1;
- }
- if (WEBCLIENT_CONF_MAX_ENTITY_SIZE < strlen(request->entity)) {
- printf("Error: Too small buffer size\n");
+ if (response == NULL) {
+ printf("Error: Response is null\n");
return -1;
}
-#ifdef CONFIG_NET_SECURITY_TLS
- if (ssl_conf) {
- request->tls = true;
- memcpy(&request->ssl_config, ssl_conf, sizeof(struct http_client_ssl_config_t));
- data = mallinfo();
- if (data.fordblks < WEBCLIENT_CONF_MIN_TLS_MEMORY) {
- printf("Error: Not enough memory!!\n");
- return -1;
+ return http_client_send_requests(request, ssl_config, response, NULL);
}
- }
-#endif
- request->buffer = (char *)malloc(request->buflen);
- if (request->buffer == NULL) {
- printf("Error: Fail to malloc buffer\n");
+int http_client_send_request_async(struct http_client_request_t *request,
+ void *ssl_config,
+ wget_callback_t cb)
+{
+ if (cb == NULL) {
+ printf("Error: Callback is Null\n");
return -1;
}
- return client_send_request(request);
+ return http_client_send_requests(request, ssl_config, NULL, cb);
}
int http_client_response_init(struct http_client_response_t *response)
|
[add]Add nrf52833 support for Bluetooth protocol stack | @@ -91,6 +91,25 @@ if BSP_USING_UART
depends on BSP_USING_UART0
endif
+choice
+prompt "BLE STACK"
+default BLE_STACK_USING_NULL
+help
+ Select the ble stack
+
+config BLE_STACK_USING_NULL
+ bool "not use the ble stack"
+
+config BSP_USING_SOFTDEVICE
+ select PKG_USING_NRF5X_SDK
+ bool "Nordic softdevice(perpheral)"
+
+config BSP_USING_NIMBLE
+ select PKG_USING_NIMBLE
+ select PKG_NIMBLE_BSP_NRF52840
+ bool "use nimble stack(iot)"
+endchoice
+
endmenu
|
VERSION bump to version 1.4.17 | @@ -31,7 +31,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 1)
set(SYSREPO_MINOR_VERSION 4)
-set(SYSREPO_MICRO_VERSION 16)
+set(SYSREPO_MICRO_VERSION 17)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
update gitbook help output | @@ -12,6 +12,12 @@ oidc-add -- A client for adding and removing accounts to the oidc-agent
-l, --list Lists the available account configurations
-p, --print Prints the encrypted account configuration and
exits
+ --pw-cmd=CMD Command from which the agent can read the
+ encryption password
+ --pw-keyring Stores the used encryption password in the
+ systems' keyring
+ --pw-store[=LIFETIME] Keeps the encryption password encrypted in memory
+ for LIFETIME seconds. Default: Forever
-r, --remove The account configuration is removed, not added
-R, --remove-all Removes all account configurations currently
loaded
|
updated buffer size too small for popular carrier in India Airtel -> airtelgprs.com
Merges | @@ -101,7 +101,7 @@ err:
esp_err_t esp_modem_dce_define_pdp_context(modem_dce_t *dce, uint32_t cid, const char *type, const char *apn)
{
modem_dte_t *dte = dce->dte;
- char command[32];
+ char command[64];
int len = snprintf(command, sizeof(command), "AT+CGDCONT=%d,\"%s\",\"%s\"\r", cid, type, apn);
DCE_CHECK(len < sizeof(command), "command too long: %s", err, command);
dce->handle_line = esp_modem_dce_handle_response_default;
|
Docs: Fix jumplinks in UEFI section | @@ -4548,7 +4548,7 @@ functioning. Feature highlights:
\item Audio path is the base filename corresponding to a file identifier. For macOS bootloader audio paths refer to
\href{https://github.com/acidanthera/OpenCorePkg/blob/master/Include/Apple/Protocol/AppleVoiceOver.h}{\texttt{APPLE\_VOICE\_OVER\_AUDIO\_FILE} definition}.
For OpenCore audio paths refer to
- \href{https://github.com/acidanthera/OpenCorePkg/blob/master/Include/Protocol/OcAudio.h}{\texttt{OC\_VOICE\_OVER\_AUDIO\_FILE} definition}.
+ \href{https://github.com/acidanthera/OpenCorePkg/blob/master/Include/Acidanthera/Protocol/OcAudio.h}{\texttt{OC\_VOICE\_OVER\_AUDIO\_FILE} definition}.
The only exception is OpenCore boot chime file, which is \texttt{OCEFIAudio\_VoiceOver\_Boot.wav}.
\end{itemize}
@@ -4690,7 +4690,7 @@ functioning. Feature highlights:
\item \texttt{-1} --- permit any release date to load (strongly discouraged).
\item Other --- use custom minimal APFS release date, e.g. \texttt{20200401}
for 2020/04/01. APFS release dates can be found in OpenCore boot log
- and \href{https://github.com/acidanthera/OpenCorePkg/blob/master/Include/Library/OcApfsLib.h}{\texttt{OcApfsLib}}.
+ and \href{https://github.com/acidanthera/OpenCorePkg/blob/master/Include/Acidanthera/Library/OcApfsLib.h}{\texttt{OcApfsLib}}.
\end{itemize}
\item
@@ -4714,7 +4714,7 @@ functioning. Feature highlights:
\item \texttt{-1} --- permit any version to load (strongly discouraged).
\item Other --- use custom minimal APFS version, e.g. \texttt{1412101001000000}
from macOS Catalina 10.15.4. APFS versions can be found in OpenCore boot log
- and \href{https://github.com/acidanthera/OpenCorePkg/blob/master/Include/Library/OcApfsLib.h}{\texttt{OcApfsLib}}.
+ and \href{https://github.com/acidanthera/OpenCorePkg/blob/master/Include/Acidanthera/Library/OcApfsLib.h}{\texttt{OcApfsLib}}.
\end{itemize}
\end{enumerate}
|
compiler: Add 'speed' profile for M33 | @@ -28,6 +28,7 @@ compiler.path.objcopy: arm-none-eabi-objcopy
compiler.flags.base: -mcpu=cortex-m33 -mthumb-interwork -mthumb -Wall -Werror -fno-exceptions -ffunction-sections -fdata-sections
compiler.flags.default: [compiler.flags.base, -O1, -ggdb]
compiler.flags.optimized: [compiler.flags.base, -Os, -ggdb]
+compiler.flags.speed: [compiler.flags.base, -O3, -ggdb]
compiler.flags.debug: [compiler.flags.base, -Og, -ggdb]
compiler.as.flags: [-x, assembler-with-cpp]
|
core/cortex-m/llsr.c: Format with clang-format
BRANCH=none
TEST=none | @@ -38,13 +38,11 @@ static int command_llsr(int argc, char **argv)
const struct {
uint32_t shift_by;
uint64_t result;
- } cases[] = {
- {0, start},
+ } cases[] = { { 0, start },
{ 16, 0x123456789ABCull },
{ 32, 0x12345678u },
{ 48, 0x1234u },
- {64, 0u}
- };
+ { 64, 0u } };
for (x = 0; x < ARRAY_SIZE(cases); ++x) {
if ((start >> cases[x].shift_by) != cases[x].result) {
@@ -58,8 +56,7 @@ static int command_llsr(int argc, char **argv)
}
DECLARE_CONSOLE_COMMAND(
- llsrtest, command_llsr,
- "",
+ llsrtest, command_llsr, "",
"Run tests against the LLSR ABI. Prints SUCCESS or FAILURE.");
#endif /* CONFIG_LLSR_TEST */
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.