message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
No need for another buffer, hcxrecord was zeroed in the beginning | @@ -453,8 +453,6 @@ uint8_t *pke_ptr = (uint8_t*)hashrec.pke;
uint8_t *eapol_ptr = (uint8_t*)hashrec.eapol;
FILE *fhshowinfo2 = NULL;
-char essidstring[36];
-
hash[0] = 0;
hash[1] = 1;
hash[2] = 2;
@@ -559,15 +557,13 @@ block[2] = hashrec.keymic[2];
block[3] = hashrec.keymic[3];
md5_64 (block, hash);
-memset(&essidstring, 0, 36);
-memcpy(&essidstring, hcxrecord->essid, hcxrecord->essid_len);
if(showinfo1 == TRUE)
{
printf("%08x%08x%08x%08x:%02x%02x%02x%02x%02x%02x:%02x%02x%02x%02x%02x%02x:%s\n",
hash[0], hash[1], hash[2], hash[3],
hcxrecord->mac_ap.addr[0], hcxrecord->mac_ap.addr[1], hcxrecord->mac_ap.addr[2], hcxrecord->mac_ap.addr[3], hcxrecord->mac_ap.addr[4], hcxrecord->mac_ap.addr[5],
hcxrecord->mac_sta.addr[0], hcxrecord->mac_sta.addr[1], hcxrecord->mac_sta.addr[2], hcxrecord->mac_sta.addr[3], hcxrecord->mac_sta.addr[4], hcxrecord->mac_sta.addr[5],
- essidstring);
+ hcxrecord->essid);
}
if(showinfo2 == TRUE)
@@ -585,7 +581,7 @@ if(showinfo2 == TRUE)
hash[0], hash[1], hash[2], hash[3],
hcxrecord->mac_ap.addr[0], hcxrecord->mac_ap.addr[1], hcxrecord->mac_ap.addr[2], hcxrecord->mac_ap.addr[3], hcxrecord->mac_ap.addr[4], hcxrecord->mac_ap.addr[5],
hcxrecord->mac_sta.addr[0], hcxrecord->mac_sta.addr[1], hcxrecord->mac_sta.addr[2], hcxrecord->mac_sta.addr[3], hcxrecord->mac_sta.addr[4], hcxrecord->mac_sta.addr[5],
- essidstring);
+ hcxrecord->essid);
fclose(fhshowinfo2);
}
return;
|
stm32/mboot: Update dependencies to enable parallel build with -j. | @@ -178,7 +178,7 @@ GEN_PINS_AF_CONST = $(HEADER_BUILD)/pins_af_const.h
GEN_PINS_AF_DEFS = $(HEADER_BUILD)/pins_af_defs.h
GEN_PINS_AF_PY = $(BUILD)/pins_af.py
-$(BUILD)/main.o: $(GEN_QSTRDEFS_GENERATED) $(GEN_PINS_AF_DEFS)
+$(OBJ): $(GEN_QSTRDEFS_GENERATED) $(GEN_PINS_AF_DEFS)
$(HEADER_BUILD):
$(MKDIR) -p $(BUILD)/genhdr
|
Work CD-CI
Remove config for PR trigger (now builds on all PRs for all branches).
Remove config for branch (now builds on all branches).
Tweak exclude path (wildcards are definitely not working). | trigger:
- branches:
- include:
- - master
- - dev/*
- - develop
- - develop-sdcard
- - develop-STM32L0-target
- - develop-mxchip-az3166
- - develop-nucleo144-f439zi
- - release-/*
- - refs/tags/*
+ # no branches config, we want to trigger builds for all branches
paths:
exclude:
- - /*.md
+ - README.md
+ - CHANGELOG.md
- .gitignore
- appveyor.yml
- cmake-variants.TEMPLATE.json
@@ -21,13 +12,7 @@ trigger:
# include:
# - v/*
-pr:
- branches:
- include:
- - master
- - develop/*
- - release/*
- autoCancel: true
+# no pr config, we want to trigger builds for all PRs on all branches
# add nf-tools repo to resources (for Azure Pipelines templates)
resources:
|
[persistence] sweep checkpoint files with best effort. | @@ -91,15 +91,15 @@ static bool do_chkpt_sweep_files(chkpt_st *cs)
logger->log(EXTENSION_LOG_WARNING, NULL,
"Failed to open snapshot directory. path: %s, error: %s\n",
cs->data_path, strerror(errno));
- return false;
- }
+ ret = false;
+ } else {
plen = strlen(CHKPT_SNAPSHOT_PREFIX); /* 9 */
while ((ent = readdir(dir)) != NULL) {
char *ptr = ent->d_name;
- if (strncmp(CHKPT_SNAPSHOT_PREFIX, ptr, plen) != 0) {
+ if (strncmp(CHKPT_SNAPSHOT_PREFIX, ptr, plen) != 0 ||
+ cs->lasttime == atoi(ptr + plen)) {
continue;
}
- if (cs->lasttime != atoi(ptr + plen)) {
sprintf(cs->snapshot_path, "%s/%s", cs->data_path, ent->d_name);
if (unlink(cs->snapshot_path) < 0 && errno != ENOENT) {
logger->log(EXTENSION_LOG_WARNING, NULL,
@@ -108,23 +108,23 @@ static bool do_chkpt_sweep_files(chkpt_st *cs)
ret = false; break;
}
}
- }
closedir(dir);
+ }
/* delete command log files. */
if ((dir = opendir(cs->logs_path)) == NULL) {
logger->log(EXTENSION_LOG_WARNING, NULL,
"Failed to open cmdlog directory. path: %s, error: %s\n",
cs->logs_path, strerror(errno));
- return false;
- }
+ ret = false;
+ } else {
plen = strlen(CHKPT_CMDLOG_PREFIX); /* 7 */
while ((ent = readdir(dir)) != NULL) {
char *ptr = ent->d_name;
- if (strncmp(CHKPT_CMDLOG_PREFIX, ptr, plen) != 0) {
+ if (strncmp(CHKPT_CMDLOG_PREFIX, ptr, plen) != 0 ||
+ cs->lasttime == atoi(ptr + plen)) {
continue;
}
- if (cs->lasttime != atoi(ptr + plen)) {
sprintf(cs->cmdlog_path, "%s/%s", cs->logs_path, ent->d_name);
if (unlink(cs->cmdlog_path) < 0 && errno != ENOENT) {
logger->log(EXTENSION_LOG_WARNING, NULL,
@@ -133,8 +133,9 @@ static bool do_chkpt_sweep_files(chkpt_st *cs)
ret = false; break;
}
}
- }
closedir(dir);
+ }
+
return ret;
}
|
Add pixbuf to doc index
I am sure I have seen this in the PR at some time | @@ -105,6 +105,7 @@ pages:
- 'pcm' : 'modules/pcm.md'
- 'perf': 'modules/perf.md'
- 'pipe': 'modules/pipe.md'
+ - 'pixbuf': 'modules/pixbuf.md'
- 'pwm' : 'modules/pwm.md'
- 'pwm2' : 'modules/pwm2.md'
- 'rfswitch' : 'modules/rfswitch.md'
|
boot: zephyr: do not override TEXT_SECTION_OFFSET
It is no longer necessary to override TEXT_SECTION_OFFSET when
BOARD_HAS_NRF5_BOOTLOADER. The nrf52840_pca10059 board no longer
overrides TEXT_SECTION_OFFSET but sets the correct FLASH_LOAD_OFFSET
instead, automatically. | @@ -14,18 +14,6 @@ config MCUBOOT
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
select USE_CODE_PARTITION if HAS_FLASH_LOAD_OFFSET
-if BOARD_HAS_NRF5_BOOTLOADER
-
-# When compiling MCUBoot, the image will be linked to the boot partition.
-# Override .text offset to make sure it is set to zero.
-# This is necessary when other bootloaders set a different default for
-# application images which are not bootloaders.
-
-config TEXT_SECTION_OFFSET
- default 0x00
-
-endif # BOARD_HAS_NRF5_BOOTLOADER
-
config BOOT_USE_MBEDTLS
bool
# Hidden option
|
doc: changes to commit function document
Fixed formatting issues and marked the decision as decided.
Relates to issue | @@ -30,6 +30,7 @@ section here.
- [Plugin Variants](plugin_variants.md)
- [Ingroup Removal](ingroup_removal.md)
- [Error Message Format](error_message_format.md)
+- [Commit Function](commit_function.md)
## In Discussion
@@ -51,4 +52,3 @@ section here.
- [Default Values](default_values.md)
- [High Level API](high_level_api.md)
- [Global KeySet](global_keyset.md)
-- [Commit Function](commit_function.md)
|
tests: internal: ml: add test case for issue 4949 | @@ -728,6 +728,73 @@ static void test_parser_python()
flb_config_exit(config);
}
+static void test_issue_4949()
+{
+ int i;
+ int len;
+ int ret;
+ int entries;
+ uint64_t stream_id;
+ msgpack_packer mp_pck;
+ msgpack_sbuffer mp_sbuf;
+ struct record_check *r;
+ struct flb_config *config;
+ struct flb_time tm;
+ struct flb_ml *ml;
+ struct flb_ml_parser_ins *mlp_i;
+ struct expected_result res = {0};
+
+ /* Expected results context */
+ res.key = "log";
+ res.out_records = python_output;
+
+ /* initialize buffers */
+ msgpack_sbuffer_init(&mp_sbuf);
+ msgpack_packer_init(&mp_pck, &mp_sbuf, msgpack_sbuffer_write);
+
+ /* Initialize environment */
+ config = flb_config_init();
+
+ /* Create docker multiline mode */
+ ml = flb_ml_create(config, "python-test");
+ TEST_CHECK(ml != NULL);
+
+ /* Generate an instance of multiline python parser */
+ mlp_i = flb_ml_parser_instance_create(ml, "python");
+ TEST_CHECK(mlp_i != NULL);
+
+ ret = flb_ml_stream_create(ml, "python", -1, flush_callback, (void *) &res,
+ &stream_id);
+ TEST_CHECK(ret == 0);
+
+ /* Generate an instance of multiline java parser */
+ mlp_i = flb_ml_parser_instance_create(ml, "java");
+ TEST_CHECK(mlp_i != NULL);
+
+ ret = flb_ml_stream_create(ml, "java", -1, flush_callback, (void *) &res,
+ &stream_id);
+ TEST_CHECK(ret == 0);
+
+ flb_time_get(&tm);
+
+ printf("\n");
+ entries = sizeof(python_input) / sizeof(struct record_check);
+ for (i = 0; i < entries; i++) {
+ r = &python_input[i];
+ len = strlen(r->buf);
+
+ /* Package as msgpack */
+ flb_time_get(&tm);
+ flb_ml_append(ml, stream_id, FLB_ML_TYPE_TEXT, &tm, r->buf, len);
+ }
+
+ if (ml) {
+ flb_ml_destroy(ml);
+ }
+
+ flb_config_exit(config);
+}
+
static void test_parser_elastic()
{
int i;
@@ -1234,5 +1301,6 @@ TEST_LIST = {
/* Issues reported on Github */
{ "issue_3817_1" , test_issue_3817_1},
{ "issue_4034" , test_issue_4034},
+ { "issue_4949" , test_issue_4949},
{ 0 }
};
|
kernel/os: Add helper to calculate array size
No more sizeof()/sizeof()... | #define CONTAINER_OF(ptr, type, field) \
((type *)(((char *)(ptr)) - offsetof(type, field)))
+/* Helper to calculate number of elements in array */
+#define ARRAY_SIZE(array) \
+ (sizeof(array) / sizeof((array)[0]))
+
#endif
|
Bump Imath version to current master | @@ -21,7 +21,7 @@ def openexr_deps():
http_archive,
name = "Imath",
build_file = "@openexr//:bazel/third_party/Imath.BUILD",
- strip_prefix = "Imath-f21e31a85a4a0b4ddcd980a19e448fd7eca72cce",
- sha256 = "6943dce2b2e8737d7cf1ae58103195b64c51c6330237ec07c12d829745b4c9c0",
- urls = ["https://github.com/AcademySoftwareFoundation/Imath/archive/f21e31a85a4a0b4ddcd980a19e448fd7eca72cce.zip"],
+ strip_prefix = "Imath-b1b5c7cb5f104bcf904d0925cca3abf3cc0f403f",
+ sha256 = "d116f2535253c78f1bf44815be55d5f133b3155485c9e95c667a4d0d32ee10ff",
+ urls = ["https://github.com/AcademySoftwareFoundation/Imath/archive/b1b5c7cb5f104bcf904d0925cca3abf3cc0f403f.zip"],
)
|
Bump Orca version to 2.51.2 | @@ -121,7 +121,7 @@ sync_tools: opt_write_test /opt/releng/apache-ant
@echo "Resolve finished";
ifeq "$(findstring aix,$(BLD_ARCH))" ""
- LD_LIBRARY_PATH='' wget -O - https://github.com/greenplum-db/gporca/releases/download/v2.51.1/bin_orca_centos5_release.tar.gz | tar zxf - -C $(BLD_TOP)/ext/$(BLD_ARCH)
+ LD_LIBRARY_PATH='' wget -O - https://github.com/greenplum-db/gporca/releases/download/v2.51.2/bin_orca_centos5_release.tar.gz | tar zxf - -C $(BLD_TOP)/ext/$(BLD_ARCH)
endif
clean_tools: opt_write_test
|
do stricter query sanitizing | @@ -63,6 +63,10 @@ int query_sanitize( char buf[], size_t buflen, const char query[] ) {
return 1;
}
+ if( !str_isValidHostname( query ) ) {
+ return 1;
+ }
+
// Convert to lower case
for( i = 0; i <= len; ++i ) {
buf[i] = tolower( query[i] );
|
Install on macOS via Homebrew in README
The application is now packaged for Homebrew:
<https://github.com/Homebrew/homebrew-core/pull/25173>
Give instructions to install it from Homebrew for macOS (it's much
easier).
Thanks to for the formula ;-) | @@ -116,10 +116,17 @@ export PATH="$JAVA_HOME/bin:$PATH"
#### Mac OS
-Use [Homebrew] to install the packages:
+The application is available in [Homebrew]. Just install it:
[Homebrew]: https://brew.sh/
+```bash
+brew install scrcpy
+```
+
+Instead, you may want to build it manually. Install the packages:
+
+
```bash
# runtime dependencies
brew install sdl2 ffmpeg
|
trying out flags for arm compiler | @@ -58,11 +58,16 @@ export compiler_vars="CC=icc CXX=icpc MPICC=mpicc MPIF90=mpiifort"
%endif
%endif
+
+
./bootstrap
./configure $compiler_vars --with-xml-prefix=/usr --with-papi=$PAPI_DIR --without-unwind \
--without-dyninst --disable-openmp-intel --prefix=%{install_path} --with-mpi=$MPI_DIR \
%if "%{mpi_family}" == "impi"
--with-mpi-libs=$MPI_DIR/lib/release \
+%endif
+%if "%{compiler_family}" == "arm1"
+ CFLAGS="-O3 -fsimdmath -fPIC" CXXFLAGS="-O3 -fsimdmath -fPIC" FCFLAGS="-O3 -fsimdmath -fPIC"
%endif
|| { cat config.log && exit 1; }
|
Enable processes menu for System process | * Main window: Processes tab
*
* Copyright (C) 2009-2016 wj32
- * Copyright (C) 2017-2018 dmex
+ * Copyright (C) 2017-2019 dmex
*
* This file is part of Process Hacker.
*
@@ -537,8 +537,8 @@ VOID PhMwpInitializeProcessMenu(
// If the user selected a fake process, disable all but a few menu items.
if (
PH_IS_FAKE_PROCESS_ID(Processes[0]->ProcessId) ||
- Processes[0]->ProcessId == SYSTEM_IDLE_PROCESS_ID ||
- Processes[0]->ProcessId == SYSTEM_PROCESS_ID // TODO: Some menu entires could be enabled for the system process?
+ Processes[0]->ProcessId == SYSTEM_IDLE_PROCESS_ID
+ //Processes[0]->ProcessId == SYSTEM_PROCESS_ID // (dmex)
)
{
PhSetFlagsAllEMenuItems(Menu, PH_EMENU_DISABLED, PH_EMENU_DISABLED);
|
build: intentionally limit the number of expose ci attributes
This is an investigative test for signal-to-noise on the ci dashboard. | @@ -21,8 +21,8 @@ let
# The key with google storage bucket write permission,
# deployed to ci via nixops `deployment.keys."service-account.json"`.
- serviceAccountKey =
- builtins.readFile ("/var/lib/hercules-ci-agent/secrets/service-account.json");
+ serviceAccountKey = builtins.readFile
+ ("/var/lib/hercules-ci-agent/secrets/service-account.json");
# Push a split output derivation containing "out" and "hash" outputs.
pushObject =
@@ -73,11 +73,11 @@ in localLib.dimension "system" systems (systemName: system:
haskell-nix.haskellLib.selectProjectPackages staticPackages.hs;
# The top-level set of attributes to build on ci.
- finalPackages = dynamicPackages // rec {
- # Replace some top-level attributes with their static variant.
- inherit (staticPackages) urbit tarball;
+ finalPackages = rec {
+ # Expose select packages to increase signal-to-noise of the ci dashboard.
+ inherit (staticPackages) urbit urbit-tests tarball;
- # Expose the nix-shell derivation as a sanity check.
+ # Expose the nix-shell derivation as a sanity check + possible cache hit.
shell = import ./shell.nix;
# Replace the .hs attribute with the individual collections of components
@@ -92,7 +92,7 @@ in localLib.dimension "system" systems (systemName: system:
# Note that .checks are the actual _execution_ of the tests.
hs = localLib.collectHaskellComponents haskellPackages;
- # Push the tarball to the remote google storage bucket.
+ # Push the tarball to the google storage bucket for the current platform.
release = pushObject {
name = tarball.name;
drv = tarball;
@@ -100,7 +100,7 @@ in localLib.dimension "system" systems (systemName: system:
contentType = "application/x-gtar";
};
- # Replace top-level pill attributes with push to google storage variants.
+ # Top-level pill attributes build and push-to-storage - only on linux.
} // lib.optionalAttrs (system == "x86_64-linux") {
ivory = pushPill "ivory" dynamicPackages.ivory;
brass = pushPill "brass" dynamicPackages.brass;
|
dbug: document "all subscriptions" option in gen | :: all in subs matching the parameters
:: direction: %incoming or %outgoing
:: specifics:
+:: ~ all subscriptions
:: [%ship ~ship] subscriptions to/from this ship
:: [%path /path] subscriptions on path containing /path
:: [%wire /wire] subscriptions on wire containing /wire
|
OcAppleRamDiskLib: Fix potential OOB operations and LoadFile result | @@ -373,8 +373,10 @@ OcAppleRamDiskRead (
++Index, CurrentOffset += (UINTN)Extent->Length
) {
Extent = &ExtentTable->Extents[Index];
+ ASSERT (Extent->Start <= MAX_UINTN);
+ ASSERT (Extent->Length <= MAX_UINTN);
- if (Offset >= CurrentOffset) {
+ if (Offset >= CurrentOffset && (Offset - CurrentOffset) < Extent->Length) {
LocalOffset = (Offset - CurrentOffset);
LocalSize = (UINTN)MIN ((Extent->Length - LocalOffset), Size);
CopyMem (
@@ -432,7 +434,7 @@ OcAppleRamDiskWrite (
ASSERT (Extent->Start <= MAX_UINTN);
ASSERT (Extent->Length <= MAX_UINTN);
- if (Offset >= CurrentOffset) {
+ if (Offset >= CurrentOffset && (Offset - CurrentOffset) < Extent->Length) {
LocalOffset = (Offset - CurrentOffset);
LocalSize = (UINTN)MIN ((Extent->Length - LocalOffset), Size);
CopyMem (
@@ -479,10 +481,11 @@ OcAppleRamDiskLoadFile (
return FALSE;
}
- for (Index = 0; FileSize > 0 && Index < ExtentTable->ExtentCount; ++Index) {
- RequestedSize = ReadSize = (UINTN)MIN (FileSize, ExtentTable->Extents[Index].Length);
-
+ for (Index = 0; Index < ExtentTable->ExtentCount; ++Index) {
ASSERT (ExtentTable->Extents[Index].Start <= MAX_UINTN);
+ ASSERT (ExtentTable->Extents[Index].Length <= MAX_UINTN);
+
+ RequestedSize = ReadSize = (UINTN)MIN (FileSize, ExtentTable->Extents[Index].Length);
Status = File->Read (
File,
&RequestedSize,
@@ -494,9 +497,12 @@ OcAppleRamDiskLoadFile (
}
FileSize -= RequestedSize;
+ if (FileSize == 0) {
+ return TRUE;
+ }
}
- return TRUE;
+ return FALSE;
}
VOID
|
chat: tweak channel item for new line-height | @@ -23,7 +23,7 @@ export class ChannelItem extends Component {
return (
<div
- className={'z1 ph4 pv1 ' + selectedCss}
+ className={'z1 ph4 pb1 ' + selectedCss}
onClick={this.onClick.bind(this)}
>
<div className="w-100 v-mid">
|
NANO-RP2040: Update memory config. | @@ -97,10 +97,10 @@ void pico_reset_to_bootloader(void);
#define OMV_MAIN_MEMORY RAM // data, bss and heap memory
#define OMV_STACK_MEMORY RAM // stack memory
-#define OMV_FB_SIZE (136K) // FB memory: header + QVGA/GS image
-#define OMV_FB_ALLOC_SIZE (12K) // minimum fb alloc size
-#define OMV_STACK_SIZE (8K)
-#define OMV_HEAP_SIZE (32 * 1024) // MicroPython's heap
+#define OMV_FB_SIZE (100K) // FB memory
+#define OMV_FB_ALLOC_SIZE (16K) // minimum fb alloc size
+#define OMV_STACK_SIZE (16K)
+#define OMV_HEAP_SIZE (64 * 1024) // MicroPython's heap
#define OMV_JPEG_BUF_SIZE (20 * 1024) // IDE JPEG buffer (header + data).
// GP LED
|
s/whitespace/no-op data/ | @@ -26,7 +26,7 @@ static const char *valid_pem_pairs[][2] = {
{ S2N_RSA_2048_PKCS8_CERT_CHAIN, S2N_RSA_2048_PKCS8_KEY },
{ S2N_RSA_2048_PKCS1_CERT_CHAIN, S2N_RSA_2048_PKCS1_KEY },
{ S2N_RSA_2048_PKCS1_LEAF_CERT, S2N_RSA_2048_PKCS1_KEY },
- /* PEMs with whitespace before/after entries are still valid */
+ /* PEMs with no-op data before/after entries are still valid */
{ S2N_LEAF_WHITESPACE_CERT_CHAIN, S2N_RSA_2048_PKCS1_KEY },
{ S2N_INTERMEDIATE_WHITESPACE_CERT_CHAIN, S2N_RSA_2048_PKCS1_KEY },
{ S2N_ROOT_WHITESPACE_CERT_CHAIN, S2N_RSA_2048_PKCS1_KEY },
|
tup: buildtoolsversion -> buildtools; native target instead of nil; | config = {
- target = nil,
+ target = 'native',
debug = true,
optimize = false,
supercharge = false,
@@ -37,7 +37,7 @@ config = {
sdk = nil,
ndk = nil,
version = nil,
- buildtoolsversion = nil,
+ buildtools = nil,
keystore = nil,
keystorepass = nil,
manifest = nil,
@@ -48,7 +48,7 @@ config = {
---> setup
-target = config.target or tup.getconfig('TUP_PLATFORM')
+target = config.target == 'native' and tup.getconfig('TUP_PLATFORM') or config.target
if target == 'macosx' then target = 'macos' end
cc = 'clang'
@@ -471,7 +471,7 @@ if target == 'android' then
config.headsets.pico and 'src/resources/AndroidManifest_pico.xml' or
config.headsets.openxr and 'src/resources/AndroidManifest_oculus.xml'
- tools = config.android.sdk .. '/build-tools/' .. config.android.buildtoolsversion
+ tools = config.android.sdk .. '/build-tools/' .. config.android.buildtools
ks = config.android.keystore
kspass = config.android.keystorepass
|
gsettings: write changes immediately | @@ -77,6 +77,27 @@ static GMutex elektra_settings_kdb_lock;
static GType elektra_settings_backend_get_type (void);
G_DEFINE_TYPE (ElektraSettingsBackend, elektra_settings_backend, G_TYPE_SETTINGS_BACKEND)
+/* elektra_settings_backend_sync implements g_settings_backend_sync:
+ * @backend: a #GSettingsBackend
+ *
+ * Write and read changes.
+ */
+static void elektra_settings_backend_sync (GSettingsBackend * backend)
+{
+ // TODO conflict management
+ ElektraSettingsBackend * esb = (ElektraSettingsBackend *) backend;
+
+ g_mutex_lock (&elektra_settings_kdb_lock);
+ if (gelektra_kdb_set (esb->gkdb, esb->gks, esb->gkey) == -1 || gelektra_kdb_get (esb->gkdb, esb->gks, esb->gkey) == -1)
+ {
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s\n", "Error on sync!");
+ g_mutex_unlock (&elektra_settings_kdb_lock);
+ return;
+ }
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s\n", "Sync state");
+ g_mutex_unlock (&elektra_settings_kdb_lock);
+}
+
static GVariant * elektra_settings_read_string (GSettingsBackend * backend, gchar * keypathname, const GVariantType * expected_type)
{
ElektraSettingsBackend * esb = (ElektraSettingsBackend *) backend;
@@ -251,6 +272,8 @@ static gboolean elektra_settings_backend_write (GSettingsBackend * backend, cons
gboolean ret = elektra_settings_write_string (backend, g_strconcat (G_ELEKTRA_SETTINGS_USER, G_ELEKTRA_SETTINGS_PATH, key, NULL),
value);
+ elektra_settings_backend_sync (backend);
+
// Notify GSettings that the key has changed
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s: %s", "Calling g_settings_backend_changed, Key", key);
g_settings_backend_changed (G_SETTINGS_BACKEND (backend), key, origin_tag);
@@ -569,27 +592,6 @@ static void elektra_settings_backend_unsubscribe (GSettingsBackend * backend, co
return;
}
-/* elektra_settings_backend_sync implements g_settings_backend_sync:
- * @backend: a #GSettingsBackend
- *
- * Write and read changes.
- */
-static void elektra_settings_backend_sync (GSettingsBackend * backend)
-{
- // TODO conflict management
- ElektraSettingsBackend * esb = (ElektraSettingsBackend *) backend;
-
- g_mutex_lock (&elektra_settings_kdb_lock);
- if (gelektra_kdb_set (esb->gkdb, esb->gks, esb->gkey) == -1 || gelektra_kdb_get (esb->gkdb, esb->gks, esb->gkey) == -1)
- {
- g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s\n", "Error on sync!");
- g_mutex_unlock (&elektra_settings_kdb_lock);
- return;
- }
- g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s\n", "Sync state");
- g_mutex_unlock (&elektra_settings_kdb_lock);
-}
-
/*
* Open elektra on empty level, as we asume that any application using GSettings is
* an application and GSettings itself does not offer any such distinction. In addition
|
SOVERSION bump to version 5.6.48 | @@ -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 47)
+set(SYSREPO_MICRO_SOVERSION 48)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
drivers/audio: fix CS4344 supported sample rates | @@ -272,7 +272,6 @@ static int cs4344_getcaps(FAR struct audio_lowerhalf_s *dev, int type,
/* Report the Sample rates we support */
caps->ac_controls.b[0] =
- AUDIO_SAMP_RATE_8K | AUDIO_SAMP_RATE_11K |
AUDIO_SAMP_RATE_16K | AUDIO_SAMP_RATE_22K |
AUDIO_SAMP_RATE_32K | AUDIO_SAMP_RATE_44K |
AUDIO_SAMP_RATE_48K;
|
Apply --StopTimeout=nn to the command or class that does the stop.
Otherwise it might wait for ever and the processes have to be kill by
hands. | @@ -1135,6 +1135,8 @@ static DWORD WINAPI serviceStop(LPVOID lpParameter)
apxLogWrite(APXLOG_MARK_INFO "Worker is not defined.");
return TRUE; /* Nothing to do */
}
+ if (timeout > 0x7FFFFFFF)
+ timeout = INFINITE; /* If the timeout was '-1' wait forewer */
if (_jni_shutdown) {
if (!IS_VALID_STRING(SO_STARTPATH) && IS_VALID_STRING(SO_STOPPATH)) {
/* If the Working path is specified change the current directory
@@ -1178,7 +1180,10 @@ static DWORD WINAPI serviceStop(LPVOID lpParameter)
}
else {
apxLogWrite(APXLOG_MARK_DEBUG "Waiting for Java JNI stop worker to finish for %s:%s...", _jni_sclass, _jni_smethod);
+ if (!timeout)
apxJavaWait(hWorker, INFINITE, FALSE);
+ else
+ apxJavaWait(hWorker, timeout, FALSE);
apxLogWrite(APXLOG_MARK_DEBUG "Java JNI stop worker finished.");
}
}
@@ -1251,7 +1256,10 @@ static DWORD WINAPI serviceStop(LPVOID lpParameter)
goto cleanup;
} else {
apxLogWrite(APXLOG_MARK_DEBUG "Waiting for stop worker to finish...");
+ if (!timeout)
apxHandleWait(hWorker, INFINITE, FALSE);
+ else
+ apxHandleWait(hWorker, timeout, FALSE);
apxLogWrite(APXLOG_MARK_DEBUG "Stop worker finished.");
}
wait_to_die = TRUE;
@@ -1272,8 +1280,6 @@ cleanup:
CloseHandle(gSignalThread);
gSignalEvent = NULL;
}
- if (timeout > 0x7FFFFFFF)
- timeout = INFINITE; /* If the timeout was '-1' wait forewer */
if (wait_to_die && !timeout)
timeout = 300 * 1000; /* Use the 5 minute default shutdown */
|
catboost model_ops truncate. | @@ -87,6 +87,7 @@ TFullModel ReadModel(IInputStream* modelStream, EModelType format) {
Load(modelStream, model);
} else if (format == EModelType::Json) {
NJson::TJsonValue jsonModel = NJson::ReadJsonTree(modelStream);
+ CB_ENSURE(jsonModel.IsDefined(), "Json model deserialization failed");
ConvertJsonToCatboostModel(jsonModel, &model);
} else {
CoreML::Specification::Model coreMLModel;
|
Clean up rocmaster_check_omp5.sh | export AOMP=/opt/rocm/aomp
cleanup(){
- if [ -e check-omp5.txt ]; then
- rm check-omp5.txt
- fi
- if [ -e passing-tests.txt ]; then
- rm passing-tests.txt
- fi
- if [ -e failing-tests.txt ]; then
- rm failing-tests.txt
- fi
- if [ -e make-fail.txt ]; then
- rm make-fail.txt
- fi
+ rm -f passing-tests.txt
+ rm -f failing-tests.txt
+ rm -f check-omp5.txt
+ rm -f make-fail.txt
}
#Clean all testing directories
@@ -36,7 +28,7 @@ echo " A non-zero exit code means a failure occured." >> check
echo "Tests that need to be visually inspected: devices, pfspecify, pfspecify_str, stream" >> check-omp5.txt
echo "***********************************************************************************" >> check-omp5.txt
-skiptests="red_bug_51 declare_variant"
+skiptests="red_bug_51 shape_noncontig metadirective"
#Loop over all directories and make run / make check depending on directory name
for directory in ./*/; do
@@ -51,21 +43,12 @@ for directory in ./*/; do
done
if [ $skip -ne 0 ] ; then
echo "Skip $base!"
-
- #flags has multiple runs
- elif [ $base == 'flags' ] ; then
- make
- make run > /dev/null 2>&1
else
make
if [ $? -ne 0 ]; then
echo "$base: Make Failed" >> ../make-fail.txt
fi
make check > /dev/null 2>&1
- #liba_bundled has an additional Makefile, that may fail on the make check
- if [ $? -ne 0 ] && ( [ $base == 'liba_bundled' ] || [ $base == 'liba_bundled_cmdline' ] ) ; then
- echo "$base: Make Failed" >> ../make-fail.txt
- fi
fi
echo ""
)
|
OcAppleSecureBootLib: Consume IMG4 object types | @@ -522,7 +522,7 @@ InternalVerifyImg4Worker (
IN UINTN ImageSize,
IN CONST VOID *ManifestBuffer,
IN UINTN ManifestSize,
- IN UINT32 Type,
+ IN UINT32 ObjType,
IN BOOLEAN SetFailureReason,
IN UINT8 SbPolicy
)
@@ -555,7 +555,7 @@ InternalVerifyImg4Worker (
Status = Img4Verify->Verify (
Img4Verify,
- Type,
+ ObjType,
ImageBuffer,
ImageSize,
SbPolicy,
@@ -577,7 +577,7 @@ EFIAPI
InternalVerifyImg4ByPathWorker (
IN APPLE_SECURE_BOOT_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
- IN UINT32 Type,
+ IN UINT32 ObjType,
IN BOOLEAN SetFailureReason,
IN UINT8 SbPolicy
)
@@ -706,7 +706,7 @@ InternalVerifyImg4ByPathWorker (
ImageSize,
ManifestBuffer,
ManifestSize,
- Type,
+ ObjType,
SetFailureReason,
SbPolicy
);
@@ -723,7 +723,7 @@ InternalVerifyImg4ByPathWorker (
@param[in] This A pointer to the current protocol instance.
@param[in] DevicePath The device path to the image to validate.
- @param[in] Type The IMG4 Manifest type to validate against.
+ @param[in] ObjType The IMG4 object type to validate against.
@param[in] SetFailureReason Whether to set the failure reason.
@retval EFI_SUCCESS The file at DevicePath is correctly signed.
@@ -743,7 +743,7 @@ EFIAPI
AppleSbVerifyImg4ByPath (
IN APPLE_SECURE_BOOT_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
- IN UINT32 Type,
+ IN UINT32 ObjType,
IN BOOLEAN SetFailureReason
)
{
@@ -762,7 +762,7 @@ AppleSbVerifyImg4ByPath (
Status = InternalVerifyImg4ByPathWorker (
This,
DevicePath,
- Type,
+ ObjType,
SetFailureReason,
SbPolicy
);
@@ -777,14 +777,14 @@ AppleSbVerifyImg4ByPath (
}
/**
- Verify the signature of ImageBuffer against Type within a IMG4 Manifest.
+ Verify the signature of ImageBuffer against ObjType within a IMG4 Manifest.
@param[in] This The pointer to the current protocol instance.
@param[in] ImageBuffer The buffer to validate.
@param[in] ImageSize The size, in bytes, of ImageBuffer.
@param[in] ManifestBuffer The buffer of the IMG4 Manifest.
@param[in] ManifestSize The size, in bytes, of ManifestBuffer.
- @param[in] Type The IMG4 Manifest type to validate against.
+ @param[in] ObjType The IMG4 object type to validate against.
@param[in] SetFailureReason Whether to set the failure reason.
@retval EFI_SUCCESS ImageBuffer is correctly signed.
@@ -805,7 +805,7 @@ AppleSbVerifyImg4 (
IN UINTN ImageSize,
IN CONST VOID *ManifestBuffer,
IN UINTN ManifestSize,
- IN UINT32 Type,
+ IN UINT32 ObjType,
IN BOOLEAN SetFailureReason
)
{
@@ -831,7 +831,7 @@ AppleSbVerifyImg4 (
ImageSize,
ManifestBuffer,
ManifestSize,
- Type,
+ ObjType,
SetFailureReason,
SbPolicy
);
@@ -839,8 +839,8 @@ AppleSbVerifyImg4 (
if (SetFailureReason) {
Reason = InternalImg4GetFailureReason (This, SbPolicy, Status);
- if (Type == SIGNATURE_32 ('n', 'r', 'k', 'm')
- || Type == SIGNATURE_32 ('d', 'r', 'k', 'm')) {
+ if (ObjType == APPLE_SB_OBJ_KERNEL
+ || ObjType == APPLE_SB_OBJ_KERNEL_DEBUG) {
AppleSbSetKernelFailureReason (This, Reason);
} else {
AppleSbSetFailureReason (This, Reason);
|
types plugins BUGFIX duplicated function declaration
copy-paste error | @@ -923,10 +923,10 @@ LY_ERR lyplg_type_store_xpath10(const struct ly_ctx *ctx, const struct lysc_type
struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
/**
- * @brief Comparison callback checking the union value.
+ * @brief Comparison callback checking the xpath1.0 value.
* Implementation of the ::lyplg_type_compare_clb.
*/
-LY_ERR lyplg_type_compare_union(const struct lyd_value *val1, const struct lyd_value *val2);
+LY_ERR lyplg_type_compare_xpath10(const struct lyd_value *val1, const struct lyd_value *val2);
/**
* @brief Printer callback printing the xpath1.0 value.
|
cmake: test if wine is available for mingw builds | @@ -64,6 +64,14 @@ if (CMAKE_COMPILER_IS_GNUCXX)
execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
if (WIN32)
message (STATUS "mingw detected")
+
+ # mingw builds need wine to be installed
+ find_program (WINE "wine")
+ if (WINE)
+ message (STATUS "wine detected")
+ else (WINE)
+ message (FATAL_ERROR "wine could not be found but is needed for mingw builds")
+ endif (WINE)
else (WIN32)
# not supported by icc:
|
OcAppleKernelLib: Fix incorrect offset in ProvideCurrentCpuInfo MSR patch | @@ -949,7 +949,8 @@ mProvideCurrentCpuInfoTopologyValidationPatch = {
.Limit = 0
};
-#define CURRENT_CPU_INFO_CORE_COUNT_OFFSET 4
+// Offset of value in below patch.
+#define CURRENT_CPU_INFO_CORE_COUNT_OFFSET 1
STATIC
UINT8
|
SOVERSION bump to version 7.8.4 | @@ -72,7 +72,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 7)
set(SYSREPO_MINOR_SOVERSION 8)
-set(SYSREPO_MICRO_SOVERSION 3)
+set(SYSREPO_MICRO_SOVERSION 4)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
pbio/integrator: improve integrator growth detect
In a discrete time system, the integral magnitude can still grow if the signs are opposite, so check the whole sum.
Also write as decrease, so the logic is easier to read: always add if magnitude decreases. | @@ -160,17 +160,20 @@ void pbio_count_integrator_update(pbio_count_integrator_t *itg, int32_t time_now
// Previous error will be multiplied by time delta and then added to integral (unless we limit growth)
int32_t cerr = itg->count_err_prev;
- // Check if integrator would grow due to this error, which is if it has same definite sign as integral
- bool growing = (cerr > 0 && itg->count_err_integral > 0) || (cerr < 0 && itg->count_err_integral < 0);
+ // Check if integrator magnitude would decrease due to this error
+ bool decrease = abs(itg->count_err_integral + cerr*(time_now - itg->time_prev)) < abs(itg->count_err_integral);
- // If growing, limit error growth by maximum integral rate
- if (growing) {
+ // If not deceasing, so growing, limit error growth by maximum integral rate
+ if (!decrease) {
cerr = cerr > integral_rate ? integral_rate : cerr;
cerr = cerr < -integral_rate ? -integral_rate : cerr;
+
+ // It might be decreasing now after all (due to integral sign change), so re-evaluate
+ decrease = abs(itg->count_err_integral + cerr*(time_now - itg->time_prev)) < abs(itg->count_err_integral);
}
- // Add change if allowed to grow, or if it deflates the integral
- if (abs(count_target - count_ref) <= integral_range || !growing) {
+ // Add change if we are near target, or always if it decreases the integral magnitude
+ if (abs(count_target - count_ref) <= integral_range || decrease) {
itg->count_err_integral += cerr*(time_now - itg->time_prev);
}
|
raspberrypi4-64.conf: Initial machine configuration | #@TYPE: Machine
-#@NAME: RaspberryPi 4 Development Board
+#@NAME: RaspberryPi 4 Development Board (64bit)
#@DESCRIPTION: Machine configuration for the RaspberryPi 4 in 64 bits mode
MACHINEOVERRIDES = "raspberrypi4:${MACHINE}"
@@ -21,5 +21,8 @@ SERIAL_CONSOLES ?= "115200;ttyS0"
MACHINE_FEATURES_append = " vc4graphics"
VC4DTBO ?= "vc4-fkms-v3d"
+ARMSTUB ?= "armstub8-gic.bin"
KERNEL_IMAGETYPE_DIRECT ?= "Image"
+
+RPI_EXTRA_CONFIG ?= "\n# RPi4 64bit has some limitation - see https://github.com/raspberrypi/linux/commit/cdb78ce891f6c6367a69c0a46b5779a58164bd4b\ntotal_mem=1024\narm_64bit=1"
|
Fix cut/paste (?) error. | @@ -40,7 +40,7 @@ the processor along
=end comment
SPARSE_ARRAY_OF() returns the name for a sparse array of the specified
-B<I<TYPE>>. DEFINE_STACK_OF() creates set of functions for a sparse
+B<I<TYPE>>. DEFINE_SPARSE_ARRAY_OF() creates set of functions for a sparse
array of B<I<TYPE>>. This will mean that a pointer to type B<I<TYPE>>
is stored in each element of a sparse array, the type is referenced by
B<SPARSE_ARRAY_OF>(B<I<TYPE>>) and each function name begins with
|
GCC/Clang fix for windows | #endif
#if SAMPGDK_WINDOWS
+ #ifdef _MSC_VER
#define SAMPGDK_CDECL __cdecl
#define SAMPGDK_STDCALL __stdcall
+ #else
+ #define SAMPGDK_CDECL __attribute__((cdecl))
+ #define SAMPGDK_STDCALL __attribute__((stdcall))
+ #endif
#elif SAMPGDK_LINUX
#define SAMPGDK_CDECL __attribute__((cdecl))
#define SAMPGDK_STDCALL __attribute__((stdcall))
|
CMakeLists.txt: fix set(CACHE) argument order
<type> comes before <docstring> | @@ -43,7 +43,7 @@ set(WEBP_DEP_INCLUDE_DIRS)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release"
- CACHE "Build type: Release, Debug, MinSizeRel or RelWithDebInfo" STRING
+ CACHE STRING "Build type: Release, Debug, MinSizeRel or RelWithDebInfo"
FORCE)
endif()
|
Use correct roughness for indirect specular lighting; | @@ -185,6 +185,7 @@ struct Surface {
vec3 diffuse;
vec3 emissive;
float metalness;
+ float roughness;
float roughness2;
float occlusion;
float clearcoat;
@@ -248,10 +249,10 @@ void initSurface(out Surface surface) {
surface.emissive = Material.glow.rgb * Material.glow.a;
if (flag_glow && flag_glowTexture) surface.emissive *= getPixel(GlowTexture, UV).rgb;
- float roughness = Material.roughness;
- if (flag_roughnessTexture) roughness *= getPixel(RoughnessTexture, UV).g;
- roughness = max(roughness, .05);
- surface.roughness2 = roughness * roughness;
+ surface.roughness = Material.roughness;
+ if (flag_roughnessTexture) surface.roughness *= getPixel(RoughnessTexture, UV).g;
+ surface.roughness = max(surface.roughness, .05);
+ surface.roughness2 = surface.roughness * surface.roughness;
surface.occlusion = 1.;
if (flag_ambientOcclusion) surface.occlusion *= getPixel(OcclusionTexture, UV).r * Material.occlusionStrength;
@@ -265,7 +266,7 @@ void initSurface(out Surface surface) {
}
float D_GGX(const Surface surface, float NoH) {
- float alpha2 = surface.roughness2 * surface.roughness2;
+ float alpha2 = surface.roughness * surface.roughness2;
float denom = (NoH * NoH) * (alpha2 - 1.) + 1.;
return alpha2 / (PI * denom * denom);
}
@@ -336,11 +337,12 @@ vec3 evaluateSphericalHarmonics(vec3 sh[9], vec3 n) {
vec3 getIndirectLighting(const Surface surface, textureCube environment, vec3 sphericalHarmonics[9]) {
float NoV = dot(surface.normal, surface.view);
- float roughness = surface.roughness2;
- vec2 lookup = prefilteredBRDF(NoV, roughness);
+ vec2 lookup = prefilteredBRDF(NoV, surface.roughness);
int mipmapCount = textureQueryLevels(samplerCube(environment, Sampler));
- vec3 specular = (surface.f0 * lookup.r + lookup.g) * textureLod(samplerCube(environment, Sampler), surface.reflection, roughness * mipmapCount).rgb;
+ vec3 ibl = textureLod(samplerCube(environment, Sampler), surface.reflection, surface.roughness * mipmapCount).rgb;
+ vec3 specular = (surface.f0 * lookup.r + lookup.g) * ibl;
+
vec3 sh = evaluateSphericalHarmonics(sphericalHarmonics, surface.normal);
vec3 diffuse = surface.diffuse * surface.occlusion * sh;
|
edit reset func | @@ -301,8 +301,9 @@ bool DynamixelDriver::reset(uint8_t id)
tools_[factor].dxl_info_[i].id = new_id;
}
- if (!strncmp(getModelName(new_id), "AX", strlen("AX")) ||
- !strncmp(getModelName(new_id), "MX-12W", strlen("MX-12W")))
+ char* model_name = getModelName(new_id);
+ if (!strncmp(model_name, "AX", strlen("AX")) ||
+ !strncmp(model_name, "MX-12W", strlen("MX-12W")))
baud = 1000000;
else
baud = 57600;
@@ -315,6 +316,18 @@ bool DynamixelDriver::reset(uint8_t id)
else
{
millis(2000);
+
+ if (!strncmp(model_name, "MX-28-2", strlen("MX-28-2")) ||
+ !strncmp(model_name, "MX-64-2", strlen("MX-64-2")) ||
+ !strncmp(model_name, "MX-106-2", strlen("MX-106-2")))
+ isOK = setPacketHandler(2.0);
+ else
+ isOK = setPacketHandler(1.0);
+
+ if (isOK)
+ return true;
+ else
+ return false;
}
}
else
@@ -359,34 +372,19 @@ bool DynamixelDriver::reset(uint8_t id)
else
{
millis(2000);
- }
- }
- else
- {
- return false;
- }
- }
- if (!strncmp(getModelName(new_id), "AX", 2) || !strncmp(getModelName(new_id), "RX", 2) || !strncmp(getModelName(new_id), "EX", 2))
- {
- isOK = setPacketHandler(1.0);
- }
- else if (!strncmp(getModelName(new_id), "MX", 2))
- {
- if (!strncmp(getModelName(new_id), "MX-28-2", strlen("MX-28-2")) || !strncmp(getModelName(new_id), "MX-64-2", strlen("MX-64-2")) || !strncmp(getModelName(new_id), "MX-106-2", strlen("MX-106-2")))
isOK = setPacketHandler(2.0);
+ if (isOK)
+ return true;
else
- isOK = setPacketHandler(1.0);
+ return false;
+ }
}
else
{
- isOK = setPacketHandler(2.0);
- }
-
- if (isOK = false)
return false;
-
- return true;
+ }
+ }
}
bool DynamixelDriver::writeRegister(uint8_t id, const char *item_name, int32_t data)
|
Make detaching attributes more flexible; | @@ -12,7 +12,7 @@ int l_lovrMeshAttachAttributes(lua_State* L) {
} else if (lua_istable(L, 4)) {
int length = lua_objlen(L, 4);
for (int i = 0; i < length; i++) {
- lua_rawgeti(L, -1, i + 1);
+ lua_rawgeti(L, 4, i + 1);
lovrMeshAttachAttribute(mesh, other, lua_tostring(L, -1), instanceDivisor);
lua_pop(L, 1);
}
@@ -26,10 +26,27 @@ int l_lovrMeshAttachAttributes(lua_State* L) {
return 0;
}
-int l_lovrMeshDetachAttribute(lua_State* L) {
+int l_lovrMeshDetachAttributes(lua_State* L) {
Mesh* mesh = luax_checktype(L, 1, Mesh);
- const char* name = luaL_checkstring(L, 2);
- lovrMeshDetachAttribute(mesh, name);
+ if (lua_isuserdata(L, 2)) {
+ Mesh* other = luax_checktype(L, 2, Mesh);
+ VertexFormat* format = lovrMeshGetVertexFormat(other);
+ for (int i = 0; i < format->count; i++) {
+ lovrMeshDetachAttribute(mesh, format->attributes[i].name);
+ }
+ } else if (lua_istable(L, 2)) {
+ int length = lua_objlen(L, 2);
+ for (int i = 0; i < length; i++) {
+ lua_rawgeti(L, 2, i + 1);
+ lovrMeshDetachAttribute(mesh, lua_tostring(L, -1));
+ lua_pop(L, 1);
+ }
+ } else {
+ int top = lua_gettop(L);
+ for (int i = 2; i <= top; i++) {
+ lovrMeshDetachAttribute(mesh, lua_tostring(L, i));
+ }
+ }
return 0;
}
@@ -281,7 +298,7 @@ int l_lovrMeshSetMaterial(lua_State* L) {
const luaL_Reg lovrMesh[] = {
{ "attachAttributes", l_lovrMeshAttachAttributes },
- { "detachAttribute", l_lovrMeshDetachAttribute },
+ { "detachAttributes", l_lovrMeshDetachAttributes },
{ "drawInstanced", l_lovrMeshDrawInstanced },
{ "draw", l_lovrMeshDraw },
{ "getVertexFormat", l_lovrMeshGetVertexFormat },
|
make build compatible with google oss-fuzz environment | @@ -533,14 +533,26 @@ IF (BUILD_FUZZER)
ADD_EXECUTABLE(h2o-fuzzer-http2 fuzz/driver.cc)
SET_TARGET_PROPERTIES(h2o-fuzzer-http1 PROPERTIES COMPILE_FLAGS "-DHTTP1")
SET_TARGET_PROPERTIES(h2o-fuzzer-http2 PROPERTIES COMPILE_FLAGS "-DHTTP2")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
+ IF (OSS_FUZZ)
+ # Use https://github.com/google/oss-fuzz compatiable options
+ SET(LIB_FUZZER FuzzingEngine)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer")
+ ELSE ()
+ # Default non-oss-fuzz options
+ SET(LIB_FUZZER "${CMAKE_CURRENT_BINARY_DIR}/libFuzzer.a")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-coverage=edge,indirect-calls,8bit-counters")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address -fsanitize-coverage=edge,indirect-calls,8bit-counters")
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
- TARGET_LINK_LIBRARIES(h2o-fuzzer-http1 libh2o-evloop ${EXTRA_LIBS} ${CMAKE_CURRENT_BINARY_DIR}/libFuzzer.a)
- TARGET_LINK_LIBRARIES(h2o-fuzzer-http2 libh2o-evloop ${EXTRA_LIBS} ${CMAKE_CURRENT_BINARY_DIR}/libFuzzer.a)
+
ADD_CUSTOM_TARGET(libFuzzer ${CMAKE_CURRENT_SOURCE_DIR}/misc/build_libFuzzer.sh WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
ADD_DEPENDENCIES(h2o-fuzzer-http1 libFuzzer)
ADD_DEPENDENCIES(h2o-fuzzer-http2 libFuzzer)
+ ENDIF (OSS_FUZZ)
+
+ TARGET_LINK_LIBRARIES(h2o-fuzzer-http1 libh2o-evloop ${EXTRA_LIBS} ${LIB_FUZZER})
+ TARGET_LINK_LIBRARIES(h2o-fuzzer-http2 libh2o-evloop ${EXTRA_LIBS} ${LIB_FUZZER})
+
ENDIF (BUILD_FUZZER)
# environment-specific tweaks
@@ -567,4 +579,7 @@ ELSE ()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
ENDIF ()
+# Retain CXX_FLAGS for std c++ compatiability across fuzz build/test environments
+IF (NOT BUILD_FUZZER)
SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
+ENDIF (NOT BUILD_FUZZER)
|
vppinfra: hash [un]set malloc/free takes a const key
Type: refactor
the key is not modified by these functions | @@ -276,7 +276,7 @@ uword hash_bytes (void *v);
/* Public inline function allocate and copy key to use in hash for pointer key */
always_inline void
-hash_set_mem_alloc (uword ** h, void *key, uword v)
+hash_set_mem_alloc (uword ** h, const void *key, uword v)
{
size_t ksz = hash_header (*h)->user;
void *copy = clib_mem_alloc (ksz);
@@ -292,14 +292,14 @@ hash_set_mem_alloc (uword ** h, void *key, uword v)
/* Public inline function to unset pointer key and then free the key memory */
always_inline void
-hash_unset_mem_free (uword ** h, void *key)
+hash_unset_mem_free (uword ** h, const void *key)
{
hash_pair_t *hp = hash_get_pair_mem (*h, key);
if (PREDICT_TRUE (hp != NULL))
{
- key = uword_to_pointer (hp->key, void *);
- hash_unset_mem (*h, key);
- clib_mem_free (key);
+ void *_k = uword_to_pointer (hp->key, void *);
+ hash_unset_mem (*h, _k);
+ clib_mem_free (_k);
}
}
|
updates ipc docu | @@ -81,8 +81,9 @@ oidc-token.
The api provides functions for getting a list of currently loaded providers and access token. They can be easily used. Alternative a client can directly communicate with the oidc-agent through UNIX domain sockets. The socket address can be get from the environment variable which is set by the agent. The request has to be sent json encoded.
The following fields and values have to be present for the different calls:
-- list of providers:
+#### List of Providers:
+##### Request
| field | value |
|---------|---------------|
| request | provider_list |
@@ -92,8 +93,30 @@ example:
{"request":"provider_list"}
```
-- access token:
+##### Response
+| field | value |
+|---------------|-----------------------|
+| status | success |
+| provider_list | JSON Array of strings |
+
+example:
+```
+{"status":"success", "provider_list":["iam", "test"]}
+```
+
+##### Error Response
+| field | value |
+|--------|---------------------|
+| status | failure |
+| error | <error_description> |
+
+example:
+```
+{"status":"failure", "error":"Bad Request: could not parse json"}
+```
+#### Access Token:
+##### Request
| field | value |
|------------------|------------------------|
| request | access_token |
@@ -105,6 +128,28 @@ example:
{"request":"access_token", "provider":"iam", "min_valid_period":60}
```
+##### Response
+| field | value |
+|--------------|----------------|
+| status | success |
+| access_token | <access_token> |
+
+example:
+```
+{"status":"success", "access_token":"token1234"}
+```
+
+##### Error Response
+| field | value |
+|--------|---------------------|
+| status | failure |
+| error | <error_description> |
+
+example:
+```
+{"status":"failure", "error":"Provider not loaded"}
+```
+
#### oidc-token
oidc-token is n example client using the provided C-api and can be used to easily get an oidc access token from the command line.
|
Fix 80 characters indentation in ecdsa_sign_wrap() | @@ -823,13 +823,15 @@ static int pk_ecdsa_sig_asn1_from_psa( unsigned char *sig, size_t *sig_len,
return( 0 );
}
-static int find_ecdsa_private_key( unsigned char **buf, unsigned char *end, size_t *key_len )
+static int find_ecdsa_private_key( unsigned char **buf, unsigned char *end,
+ size_t *key_len )
{
size_t len;
int ret;
if( ( ret = mbedtls_asn1_get_tag( buf, end, &len,
- MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) != 0 )
+ MBEDTLS_ASN1_CONSTRUCTED |
+ MBEDTLS_ASN1_SEQUENCE ) ) != 0 )
return( ret );
/* version */
@@ -864,7 +866,8 @@ static int ecdsa_sign_wrap( void *ctx_arg, mbedtls_md_type_t md_alg,
unsigned char buf[MBEDTLS_PK_ECP_PRV_DER_MAX_BYTES];
unsigned char *p;
mbedtls_pk_info_t pk_info = mbedtls_eckey_info;
- psa_algorithm_t psa_sig_md = PSA_ALG_ECDSA( mbedtls_psa_translate_md( md_alg ) );
+ psa_algorithm_t psa_sig_md =
+ PSA_ALG_ECDSA( mbedtls_psa_translate_md( md_alg ) );
size_t curve_bits;
psa_ecc_family_t curve =
mbedtls_ecc_group_to_psa( ctx->grp.id, &curve_bits );
|
Add Makefile recipe for debug build
Expose commands to build the application in debug mode. | GRADLE ?= ./gradlew
APP_BUILD_DIR := app-build
+APP_BUILD_DEBUG_DIR := app-build-debug
DIST := dist
TARGET_DIR := scrcpy
@@ -16,7 +17,19 @@ release: clean dist-zip sums
clean:
$(GRADLE) clean
- rm -rf "$(APP_BUILD_DIR)" "$(DIST)"
+ rm -rf "$(APP_BUILD_DIR)" "$(APP_BUILD_DEBUG_DIR)" "$(DIST)"
+
+build-app-debug:
+ [ -d "$(APP_BUILD_DEBUG_DIR)" ] || ( mkdir "$(APP_BUILD_DEBUG_DIR)" && meson app "$(APP_BUILD_DEBUG_DIR)" --buildtype debug )
+ ninja -C "$(APP_BUILD_DEBUG_DIR)"
+
+build-server-debug:
+ $(GRADLE) assembleDebug
+
+build-debug: build-app-debug build-server-debug
+
+run-debug:
+ SCRCPY_SERVER_JAR=server/build/outputs/apk/debug/server-debug.apk $(APP_BUILD_DEBUG_DIR)/scrcpy $(ARGS)
build-app:
[ -d "$(APP_BUILD_DIR)" ] || ( mkdir "$(APP_BUILD_DIR)" && meson app "$(APP_BUILD_DIR)" --buildtype release )
|
Avoid unnecessary metadata flushes in WT
Flushing metadata in WT is required only if at least of the request's cacheline
changed its state to clean. | @@ -110,8 +110,19 @@ static void _ocf_write_wt_req_complete(struct ocf_request *req)
req->complete(req, req->info.core_error ? req->error : 0);
ocf_engine_invalidate(req);
- } else {
+
+ return;
+ }
+
+ if (req->info.dirty_any) {
+ /* Some of the request's cachelines changed its state to clean */
ocf_engine_push_req_front_if(req, &_io_if_wt_flush_metadata, true);
+ } else {
+ ocf_req_unlock_wr(ocf_cache_line_concurrency(req->cache), req);
+
+ req->complete(req, req->info.core_error ? req->error : 0);
+
+ ocf_req_put(req);
}
}
@@ -164,6 +175,13 @@ static int _ocf_write_wt_do(struct ocf_request *req)
/* Get OCF request - increase reference counter */
ocf_req_get(req);
+ if (!req->info.dirty_any) {
+ /* Set metadata bits before the request submission only if the dirty
+ status for any of the request's cachelines won't change */
+ _ocf_write_wt_update_bits(req);
+ ENV_BUG_ON(req->info.flush_metadata);
+ }
+
/* Submit IO */
_ocf_write_wt_submit(req);
|
[strm] yolint: fix migrations. | @@ -444,44 +444,6 @@ migrations:
- a.yandex-team.ru/rtmapreduce/tools/sli
- a.yandex-team.ru/rtmapreduce/tools/sli_test
- a.yandex-team.ru/solomon/tools/solomon-sync
- - a.yandex-team.ru/strm/gogol/pkg/encoding/tskv_test
- - a.yandex-team.ru/strm/gogol/pkg/gogol
- - a.yandex-team.ru/strm/gogol/pkg/gogol_test
- - a.yandex-team.ru/strm/gorshok/pkg/content
- - a.yandex-team.ru/strm/gorshok/pkg/content/contenttypes
- - a.yandex-team.ru/strm/gorshok/pkg/content/fetchers
- - a.yandex-team.ru/strm/gorshok/pkg/content_test
- - a.yandex-team.ru/strm/gorshok/pkg/content/parsers
- - a.yandex-team.ru/strm/gorshok/pkg/content/parsers_test
- - a.yandex-team.ru/strm/gorshok/pkg/sandbox
- - a.yandex-team.ru/strm/gorshok/pkg/server
- - a.yandex-team.ru/strm/plgo/pkg/breaklast
- - a.yandex-team.ru/strm/plgo/pkg/breaklast_test
- - a.yandex-team.ru/strm/plgo/pkg/channel
- - a.yandex-team.ru/strm/plgo/pkg/channel_test
- - a.yandex-team.ru/strm/plgo/pkg/common
- - a.yandex-team.ru/strm/plgo/pkg/configuration
- - a.yandex-team.ru/strm/plgo/pkg/kaltura
- - a.yandex-team.ru/strm/plgo/pkg/kaltura/handlers
- - a.yandex-team.ru/strm/plgo/pkg/kaltura/handlers_test
- - a.yandex-team.ru/strm/plgo/pkg/playlist
- - a.yandex-team.ru/strm/plgo/pkg/playlist/mpd
- - a.yandex-team.ru/strm/plgo/pkg/playlist/mpd_test
- - a.yandex-team.ru/strm/plgo/pkg/playlist/request
- - a.yandex-team.ru/strm/plgo/pkg/playlist/request_test
- - a.yandex-team.ru/strm/plgo/pkg/signature
- - a.yandex-team.ru/strm/plgo/pkg/signature_test
- - a.yandex-team.ru/strm/pult/scheduler/pkg/dao
- - a.yandex-team.ru/strm/pult/scheduler/pkg/models
- - a.yandex-team.ru/strm/trns_manager/pkg/liveinfo
- - a.yandex-team.ru/strm/trns_manager/pkg/liveinfo_test
- - a.yandex-team.ru/strm/trns_manager/pkg/xaccelredirect/config
- - a.yandex-team.ru/strm/trns_manager/pkg/xaccelredirect/handlers
- - a.yandex-team.ru/strm/vagon/pkg/spriter
- - a.yandex-team.ru/strm/vagon/pkg/spriter_test
- - a.yandex-team.ru/strm/vagon/pkg/vagon
- - a.yandex-team.ru/strm/vagon/pkg/vagon_test
- - a.yandex-team.ru/strm/yql/ydb/create_table
- a.yandex-team.ru/transfer_manager/go/cmd/cdc_server
- a.yandex-team.ru/transfer_manager/go/cmd/pg_to_ch
- a.yandex-team.ru/transfer_manager/go/internal/config
|
Behave: Remove unused step
Remove unused behave step:
"the user waits for "{process_name}" to finish running" | @@ -1335,19 +1335,6 @@ def impl(context, filename, output):
if output not in cmd.get_stdout():
raise Exception('File %s on host %s does not contain "%s"' % (filepath, host, output))
-@then('the user waits for "{process_name}" to finish running')
-def impl(context, process_name):
- run_command(context, "ps ux | grep `which %s` | grep -v grep | awk '{print $2}' | xargs" % process_name)
- pids = context.stdout_message.split()
- while len(pids) > 0:
- for pid in pids:
- try:
- os.kill(int(pid), 0)
- except OSError:
- pids.remove(pid)
- time.sleep(10)
-
-
@given('the gpfdists occupying port {port} on host "{hostfile}"')
def impl(context, port, hostfile):
remote_gphome = os.environ.get('GPHOME')
|
Make read_long_string return the error message
Now the return type is similar to read_short_string, returning `false, err` on error. | @@ -176,7 +176,7 @@ function Lexer:read_short_string(delimiter)
return table.concat(parts)
end
-function Lexer:read_long_string(delimiter_length)
+function Lexer:read_long_string(delimiter_length, what)
self:try(newline)
local parts = {}
while true do
@@ -191,7 +191,7 @@ function Lexer:read_long_string(delimiter_length)
table.insert(parts, self.matched)
else
- return false
+ return false, string.format("Unclosed %s", what)
end
end
return table.concat(parts)
@@ -204,8 +204,8 @@ function Lexer:_next()
elseif self:try("--") then
if self:try(longstring_open) then
- local s = self:read_long_string(#self.matched)
- if not s then return false, "Unclosed long comment" end
+ local s, err = self:read_long_string(#self.matched, "long comment")
+ if not s then return false, err end
else
self:try(comment_line)
end
@@ -217,8 +217,8 @@ function Lexer:_next()
return "STRING", s
elseif self:try(longstring_open) then
- local s = self:read_long_string(#self.matched)
- if not s then return false, "Unclosed long string" end
+ local s, err = self:read_long_string(#self.matched, "long string")
+ if not s then return false, err end
return "STRING", s
elseif self:try(possible_number) then
|
gsettings: fix keynames, paths | @@ -202,7 +202,7 @@ static GVariant * elektra_settings_backend_read_user_value (GSettingsBackend * b
{
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s %s. %s %s.", "Function read_user_value:", key,
"Expected_type is:", g_variant_type_peek_string (expected_type));
- return elektra_settings_read_string (backend, g_strconcat (G_ELEKTRA_SETTINGS_USER, G_ELEKTRA_SETTINGS_PATH, key, NULL),
+ return elektra_settings_read_string (backend, g_strconcat (G_ELEKTRA_SETTINGS_PATH, key, NULL),
expected_type);
}
@@ -247,7 +247,7 @@ static gboolean elektra_settings_backend_write (GSettingsBackend * backend, cons
*/
static gint elektra_settings_keyset_from_tree (gpointer key, gpointer value, gpointer data)
{
- gchar * fullpathname = g_strconcat (G_ELEKTRA_SETTINGS_PATH, (gchar *) (key), NULL);
+ gchar * fullpathname = g_strconcat (G_ELEKTRA_SETTINGS_USER, G_ELEKTRA_SETTINGS_PATH, (gchar *) (key), NULL);
gchar * string_value = (value != NULL ? g_variant_print ((GVariant *) value, FALSE) : NULL);
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s %s: %s.", "Append to keyset ", fullpathname, string_value);
GElektraKeySet * gks = (GElektraKeySet *) data;
@@ -513,7 +513,7 @@ static void elektra_settings_backend_sync (GSettingsBackend * backend)
static void elektra_settings_backend_init (ElektraSettingsBackend * esb)
{
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s.", "Init new ElektraSettingsBackend");
- esb->gkey = gelektra_key_new ("", KEY_END);
+ esb->gkey = gelektra_key_new ("/", KEY_END);
esb->gkdb = gelektra_kdb_open (NULL, esb->gkey);
esb->gks = gelektra_keyset_new (0, GELEKTRA_KEYSET_END);
esb->subscription_gks = gelektra_keyset_new (0, GELEKTRA_KEYSET_END);
|
Apply filters to local addresses too. | @@ -339,7 +339,7 @@ check_xroutes(int send_updates)
int i, j, change = 0, rc;
struct kernel_route *routes;
struct filter_result filter_result;
- int numroutes, numaddresses;
+ int numroutes;
static int maxroutes = 8;
const int maxmaxroutes = 256 * 1024;
@@ -361,8 +361,6 @@ check_xroutes(int send_updates)
if(numroutes >= maxroutes)
goto resize;
- numaddresses = numroutes;
-
rc = kernel_routes(routes + numroutes, maxroutes - numroutes);
if(rc < 0)
fprintf(stderr, "Couldn't get kernel routes.\n");
@@ -372,9 +370,7 @@ check_xroutes(int send_updates)
if(numroutes >= maxroutes)
goto resize;
- /* Apply filter to kernel routes (e.g. change the source prefix). */
-
- for(i = numaddresses; i < numroutes; i++) {
+ for(i = 0; i < numroutes; i++) {
routes[i].metric = redistribute_filter(routes[i].prefix, routes[i].plen,
routes[i].src_prefix,
routes[i].src_plen,
|
change 99 to 128 to expose issuue first | @@ -140,9 +140,9 @@ static void dnut_prepare_intersect(struct dnut_job *cjob,
DNUT_TARGET_FLAGS_ADDR | DNUT_TARGET_FLAGS_SRC);
//result_table in DDR
- // 99 is a dummy value. HW will update this field when finished.
+ // 128 is a dummy value. HW will update this field when finished.
ddr_addr = 2*MAX_TABLE_SIZE;
- dnut_addr_set (&ijob_i->result_table, (void *)ddr_addr, 99, DNUT_TARGET_TYPE_CARD_DRAM ,
+ dnut_addr_set (&ijob_i->result_table, (void *)ddr_addr, 128, DNUT_TARGET_TYPE_CARD_DRAM ,
DNUT_TARGET_FLAGS_ADDR | DNUT_TARGET_FLAGS_DST |
DNUT_TARGET_FLAGS_END);
|
Rename fields that have had types renamed | @@ -13,16 +13,16 @@ namespace FFXIVClientStructs.FFXIV.Client.UI
[FieldOffset(0x220)] public AtkTextNode* AtkTextNode220;
[FieldOffset(0x228)] public AtkComponentButton* YesButton;
[FieldOffset(0x230)] public AtkComponentButton* NoButton;
- [FieldOffset(0x238)] public AtkComponentButton* AtkComponentUnknownButton238;
+ [FieldOffset(0x238)] public AtkComponentButton* AtkComponentButton238;
[FieldOffset(0x240)] public AtkResNode* AtkResNode240;
[FieldOffset(0x248)] public AtkResNode* AtkResNode248;
[FieldOffset(0x258)] public AtkResNode* AtkResNode258;
[FieldOffset(0x260)] public AtkComponentButton* AtkComponentButton260; // repeat 228
[FieldOffset(0x268)] public AtkComponentButton* AtkComponentButton268; // repeat 230
[FieldOffset(0x270)] public AtkComponentButton* AtkComponentButton270; // repeat 238
- [FieldOffset(0x278)] public AtkComponentHoldButton* AtkComponentUnknownButton278;
- [FieldOffset(0x280)] public AtkComponentHoldButton* AtkComponentUnknownButton280;
- [FieldOffset(0x288)] public AtkComponentHoldButton* AtkComponentUnknownButton288;
+ [FieldOffset(0x278)] public AtkComponentHoldButton* AtkComponentHoldButton278;
+ [FieldOffset(0x280)] public AtkComponentHoldButton* AtkComponentHoldButton280;
+ [FieldOffset(0x288)] public AtkComponentHoldButton* AtkComponentHoldButton288;
[FieldOffset(0x290)] public AtkComponentCheckBox* ConfirmCheckBox;
[FieldOffset(0x298)] public AtkTextNode* AtkTextNode298;
[FieldOffset(0x2A0)] public AtkComponentBase* AtkComponentBase2A0;
|
fix intra-bits for lp-gop | @@ -316,10 +316,6 @@ static double pic_allocate_bits(encoder_state_t * const state)
state->previous_encoder_state->frame->cur_gop_target_bits;
}
- if (encoder->cfg.gop_len <= 0) {
- return state->frame->cur_gop_target_bits;
- }
-
if (state->frame->is_irap && encoder->cfg.intra_bit_allocation) {
int total_cost = 0;
for (int y = 0; y < encoder->cfg.height; y += 8) {
@@ -343,6 +339,10 @@ static double pic_allocate_bits(encoder_state_t * const state)
return MAX(100, alpha*pow(state->frame->icost * 4 / bits, beta)*bits);
}
+ if (encoder->cfg.gop_len <= 0) {
+ return state->frame->cur_gop_target_bits;
+ }
+
const double pic_weight = encoder->gop_layer_weights[
encoder->cfg.gop[state->frame->gop_offset].layer - 1];
const double pic_target_bits =
|
flash_ec: Add dut_control_get_or_die function.
This will be used in CL:2441395.
BRANCH=none
TEST=With servo_v4 Type-A + servo_micro + ampton DUT:
$ util/flash_ec --board=ampton --verbose --read="$HOME"/ampton-ec-read0.bin | @@ -246,7 +246,7 @@ function dut_control() {
}
function dut_control_or_die {
- dut_control "$@" || die "dut-control $* exited $? (non-zero)"
+ dut_control "$@" || die "command exited $? (non-zero): dut-control $*"
}
function dut_control_get() {
@@ -256,7 +256,7 @@ function dut_control_get() {
fi
local ARGS DUT_GETVAL RETVAL
- ARGS=( "${DUT_CONTROL_CMD[@]}" "-o" "${DUT_CTRL_PREFIX}$1" )
+ ARGS=( "${DUT_CONTROL_CMD[@]}" "--value_only" "${DUT_CTRL_PREFIX}$1" )
RETVAL=0
# || statement is attached to avoid an exit if error exit is enabled.
DUT_GETVAL=$( "${ARGS[@]}" ) || RETVAL="$?"
@@ -268,6 +268,11 @@ function dut_control_get() {
echo "${DUT_GETVAL}"
}
+function dut_control_get_or_die {
+ dut_control_get "$@" || \
+ die "command exited $? (non-zero): dut-control --value_only $*"
+}
+
BOARD=${FLAGS_board}
in_array() {
|
Add AgentLobby | @@ -31,6 +31,7 @@ namespace FFXIVClientStructs.FFXIV.Client.UI.Agent
public AgentHUD* GetAgentHUD() => (AgentHUD*)GetAgentByInternalId(AgentId.Hud);
public AgentHudLayout* GetAgentHudLayout() => (AgentHudLayout*)GetAgentByInternalId(AgentId.HudLayout);
public AgentTeleport* GetAgentTeleport() => (AgentTeleport*)GetAgentByInternalId(AgentId.Teleport);
+ public AgentLobby* GetAgentLobby() => (AgentLobby*)GetAgentByInternalId(AgentId.Lobby);
}
public enum AgentId : uint {
|
os/include/tinyara/reboot_reason.h : Change board specific reboot reason from 250.
For board specific reboot reason, change to start them from 250. | typedef enum {
/* [Reboot Reason Code]
- * System : 50 ~ 79(75~79 : Board Specific),
+ * System : 50 ~ 79
* Network : 80 ~ 109,
* Common Service : 110 ~ 139,
- * App : 140 ~ 254
+ * App : 140 ~ 249
+ * Board Specific : 250 ~ 254
*/
REBOOT_REASON_INITIALIZED = 50,
REBOOT_SYSTEM_DATAABORT = 51, /* Data abort */
@@ -40,15 +41,15 @@ typedef enum {
REBOOT_SYSTEM_BINARY_UPDATE = 57, /* Reboot for Binary Update */
REBOOT_SYSTEM_BINARY_RECOVERYFAIL = 58, /* Binary Recovery Fail */
- REBOOT_BOARD_SPECIFIC1 = 75, /* Board Specific Reboot Reason */
- REBOOT_BOARD_SPECIFIC2 = 76,
- REBOOT_BOARD_SPECIFIC3 = 77,
- REBOOT_BOARD_SPECIFIC4 = 78,
- REBOOT_BOARD_SPECIFIC5 = 79,
-
REBOOT_NETWORK_WIFICORE_WATCHDOG = 80, /* Wi-Fi Core Watchdog Reset */
REBOOT_NETWORK_WIFICORE_PANIC = 81, /* Wi-Fi Core Panic */
+ REBOOT_BOARD_SPECIFIC1 = 250, /* Board Specific Reboot Reason */
+ REBOOT_BOARD_SPECIFIC2 = 251,
+ REBOOT_BOARD_SPECIFIC3 = 252,
+ REBOOT_BOARD_SPECIFIC4 = 253,
+ REBOOT_BOARD_SPECIFIC5 = 254,
+
REBOOT_UNKNOWN = 255,
} reboot_reason_code_t;
|
Update i2c.c
Fix issue with single bus clear counter but two I2C buses (I2C0, I2C1). The previously implemented single (static) counter would impact the second bus either if one bus has counter expiry.
Merges | @@ -1472,6 +1472,8 @@ static bool is_cmd_link_buffer_internal(const i2c_cmd_link_t *link)
}
#endif
+static uint8_t clear_bus_cnt[2] = { 0, 0 };
+
esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle, TickType_t ticks_to_wait)
{
ESP_RETURN_ON_FALSE(( i2c_num < I2C_NUM_MAX ), ESP_ERR_INVALID_ARG, I2C_TAG, I2C_NUM_ERROR_STR);
@@ -1489,7 +1491,6 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle,
}
#endif
// Sometimes when the FSM get stuck, the ACK_ERR interrupt will occur endlessly until we reset the FSM and clear bus.
- static uint8_t clear_bus_cnt = 0;
esp_err_t ret = ESP_FAIL;
i2c_obj_t *p_i2c = p_i2c_obj[i2c_num];
TickType_t ticks_start = xTaskGetTickCount();
@@ -1504,7 +1505,7 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle,
if (p_i2c->status == I2C_STATUS_TIMEOUT
|| i2c_hal_is_bus_busy(&(i2c_context[i2c_num].hal))) {
i2c_hw_fsm_reset(i2c_num);
- clear_bus_cnt = 0;
+ clear_bus_cnt[i2c_num] = 0;
}
i2c_reset_tx_fifo(i2c_num);
i2c_reset_rx_fifo(i2c_num);
@@ -1550,12 +1551,12 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle,
// If the I2C slave are powered off or the SDA/SCL are connected to ground, for example,
// I2C hw FSM would get stuck in wrong state, we have to reset the I2C module in this case.
i2c_hw_fsm_reset(i2c_num);
- clear_bus_cnt = 0;
+ clear_bus_cnt[i2c_num] = 0;
ret = ESP_ERR_TIMEOUT;
} else if (p_i2c->status == I2C_STATUS_ACK_ERROR) {
- clear_bus_cnt++;
- if (clear_bus_cnt >= I2C_ACKERR_CNT_MAX) {
- clear_bus_cnt = 0;
+ clear_bus_cnt[i2c_num]++;
+ if (clear_bus_cnt[i2c_num] >= I2C_ACKERR_CNT_MAX) {
+ clear_bus_cnt[i2c_num] = 0;
}
ret = ESP_FAIL;
} else {
@@ -1570,7 +1571,7 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle,
// If the I2C slave are powered off or the SDA/SCL are connected to ground, for example,
// I2C hw FSM would get stuck in wrong state, we have to reset the I2C module in this case.
i2c_hw_fsm_reset(i2c_num);
- clear_bus_cnt = 0;
+ clear_bus_cnt[i2c_num] = 0;
break;
}
}
|
BugID:16731946:delete useless kernel marco | #endif
/* kernel intrpt conf */
-#ifndef RHINO_CONFIG_INTRPT_MAX_NESTED_LEVEL
-#define RHINO_CONFIG_INTRPT_MAX_NESTED_LEVEL 188u
-#endif
-
#ifndef RHINO_CONFIG_INTRPT_GUARD
#define RHINO_CONFIG_INTRPT_GUARD 0
#endif
|
IO UV: Set libuv version in CMake code for example | @@ -78,6 +78,7 @@ if (FOUND_NAME GREATER -1)
target_link_libraries (${EXAMPLE} ${PC_libuv_LDFLAGS})
endif ()
+ find_package (libuv QUIET) # Make sure `libuv_VERSION` is defined correctly
if (libuv_VERSION VERSION_LESS "1.0")
target_compile_definitions (${EXAMPLE} PRIVATE "HAVE_LIBUV0")
else ()
|
Fix ESPIDF_Build_Test
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi | @@ -27,8 +27,8 @@ install-apt-get-deps:
# Fetch and extract Xtensa toolchain.
install-xtensa-esp32-gcc:
- wget https://dl.espressif.com/dl/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz --no-check-certificate --directory-prefix /tmp
- tar xvfz /tmp/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-linux-amd64.tar.gz --directory /tmp
+ wget https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz --no-check-certificate --directory-prefix /tmp
+ tar xvfz /tmp/xtensa-esp32-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz --directory /tmp
# Fetch Espressif IoT Development Framework and install its dependencies.
install-esp-idf:
|
Add ios_system license | @@ -267,6 +267,40 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```
+## ios_system
+
+```
+BSD 3-Clause License
+
+Copyright (c) 2018, Nicolas Holzschuch
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+```
+
## Python Apple support
```
|
spi_master: update spi performance test resulte for C6 | /*
- * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
+ * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#define IDF_PERFORMANCE_MAX_ECDSA_P192_VERIFY_OP 18000
#define IDF_PERFORMANCE_MAX_ECDSA_P256_VERIFY_OP 27000
-#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING 45
-#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA 40
-#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_NO_POLLING 115
-#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_NO_POLLING_NO_DMA 110
+#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_NO_POLLING 34
+#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING 17
+#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_NO_POLLING_NO_DMA 32
+#define IDF_PERFORMANCE_MAX_SPI_PER_TRANS_POLLING_NO_DMA 15
|
Add a few options to fix csmith test host incompatibilities
Disable packed structs, since Nyuzi doesn't support unaligned accesses
Disable 64-bit types, per issue Since my 64-bit host has a different
size for (long int), this could result in different conversions.
[ci skip] | @@ -51,7 +51,11 @@ def run_csmith_test(_):
source_file = 'test%04d.c' % x
print('running ' + source_file)
- subprocess.check_call(['csmith', '-o', source_file])
+ # Disable packed structs because we don't support unaligned accesses.
+ # Disable longlong to avoid incompatibilities between 32-bit Nyuzi
+ # and 64-bit hosts.
+ subprocess.check_call(['csmith', '-o', source_file, '--no-longlong',
+ '--no-packed-struct'])
# Compile and run on host
subprocess.check_call(
|
meta: add explainer line | @@ -2,7 +2,7 @@ blank_issues_enabled: true
contact_links:
- name: Submit a Landscape issue
url: https://github.com/urbit/landscape/issues/new/choose
- about: Issues with Landscape (Tlon's flagship client) should be filed at urbit/landscape.
+ about: Issues with Landscape (Tlon's flagship client) should be filed at urbit/landscape. This includes groups, chats, collections, notebooks, and more.
- name: urbit-dev mailing list
url: https://groups.google.com/a/urbit.org/g/dev
about: Developer questions and discussions also take place on the urbit-dev mailing list.
|
Replace `__xstat` with `stat`
remove `_STAT_VER` usage
closes | @@ -459,7 +459,7 @@ osIsFilePresent(pid_t pid, const char *path)
{
struct stat sb = {0};
- if (scope___xstat(_STAT_VER, path, &sb) != 0) {
+ if (scope_stat(path, &sb) != 0) {
return -1;
} else {
return sb.st_size;
|
[ctr/lua] changed compile option for window | @@ -10,7 +10,7 @@ package contract
#cgo !windows CFLAGS: -DLJ_TARGET_POSIX
#cgo darwin LDFLAGS: ${SRCDIR}/../libtool/lib/libluajit-5.1.a ${SRCDIR}/../libtool/lib/libgmp.dylib -lm
#cgo windows LDFLAGS: ${SRCDIR}/../libtool/lib/libluajit-5.1.a ${SRCDIR}/../libtool/bin/libgmp-10.dll -lm
-#cgo !darwin && !windows LDFLAGS: ${SRCDIR}/../libtool/lib/libluajit-5.1.a ${SRCDIR}/../libtool/lib/libgmp.so -lm
+#cgo !darwin,!windows LDFLAGS: ${SRCDIR}/../libtool/lib/libluajit-5.1.a ${SRCDIR}/../libtool/lib/libgmp.so -lm
#include <stdlib.h>
#include <string.h>
|
VERSION bump to version 2.1.48 | @@ -64,7 +64,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 2)
set(SYSREPO_MINOR_VERSION 1)
-set(SYSREPO_MICRO_VERSION 47)
+set(SYSREPO_MICRO_VERSION 48)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
common CHANGE macro support for checking 4 arguments | @@ -46,6 +46,7 @@ struct ly_ctx;
#define GETMACRO2(_1, _2, NAME, ...) NAME
#define GETMACRO3(_1, _2, _3, NAME, ...) NAME
#define GETMACRO4(_1, _2, _3, _4, NAME, ...) NAME
+#define GETMACRO5(_1, _2, _3, _4, _5, NAME, ...) NAME
/*
* If the compiler supports attribute to mark objects as hidden, mark all
@@ -153,12 +154,18 @@ void ly_vlog(const struct ly_ctx *ctx, enum LY_VLOG_ELEM elem_type, const void *
#define LY_CHECK_ARG_GOTO1(CTX, ARG, GOTO) if (!(ARG)) {LOGARG(CTX, ARG);goto GOTO;}
#define LY_CHECK_ARG_GOTO2(CTX, ARG1, ARG2, GOTO) LY_CHECK_ARG_GOTO1(CTX, ARG1, GOTO);LY_CHECK_ARG_GOTO1(CTX, ARG2, GOTO)
#define LY_CHECK_ARG_GOTO3(CTX, ARG1, ARG2, ARG3, GOTO) LY_CHECK_ARG_GOTO2(CTX, ARG1, ARG2, GOTO);LY_CHECK_ARG_GOTO1(CTX, ARG3, GOTO)
-#define LY_CHECK_ARG_GOTO(CTX, ...) GETMACRO4(__VA_ARGS__, LY_CHECK_ARG_GOTO3, LY_CHECK_ARG_GOTO2, LY_CHECK_ARG_GOTO1)(CTX, __VA_ARGS__)
+#define LY_CHECK_ARG_GOTO4(CTX, ARG1, ARG2, ARG3, ARG4, GOTO) LY_CHECK_ARG_GOTO3(CTX, ARG1, ARG2, ARG3, GOTO);\
+ LY_CHECK_ARG_GOTO1(CTX, ARG4, GOTO)
+#define LY_CHECK_ARG_GOTO(CTX, ...) GETMACRO5(__VA_ARGS__, LY_CHECK_ARG_GOTO4, LY_CHECK_ARG_GOTO3, LY_CHECK_ARG_GOTO2, \
+ LY_CHECK_ARG_GOTO1)(CTX, __VA_ARGS__)
#define LY_CHECK_ARG_RET1(CTX, ARG, RETVAL) if (!(ARG)) {LOGARG(CTX, ARG);return RETVAL;}
#define LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL) LY_CHECK_ARG_RET1(CTX, ARG1, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG2, RETVAL)
#define LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL) LY_CHECK_ARG_RET2(CTX, ARG1, ARG2, RETVAL);LY_CHECK_ARG_RET1(CTX, ARG3, RETVAL)
-#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO4(__VA_ARGS__, LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1)(CTX, __VA_ARGS__)
+#define LY_CHECK_ARG_RET4(CTX, ARG1, ARG2, ARG3, ARG4, RETVAL) LY_CHECK_ARG_RET3(CTX, ARG1, ARG2, ARG3, RETVAL);\
+ LY_CHECK_ARG_RET1(CTX, ARG4, RETVAL)
+#define LY_CHECK_ARG_RET(CTX, ...) GETMACRO5(__VA_ARGS__, LY_CHECK_ARG_RET4, LY_CHECK_ARG_RET3, LY_CHECK_ARG_RET2, LY_CHECK_ARG_RET1)\
+ (CTX, __VA_ARGS__)
/* count sequence size for LY_VCODE_INCHILDSTMT validation error code */
size_t LY_VCODE_INSTREXP_len(const char *str);
|
additional screenshot keybindings | @@ -92,15 +92,18 @@ static const char *instantassistcmd[] = {"instantassist", NULL};
static const char *nautiluscmd[] = {"nautilus", NULL};
static const char *slockcmd[] = {"ilock", NULL};
static const char *slockmcmd[] = {"ilock", "dmenu", NULL};
-static const char *instantswitchcmd[] = {"instantswitch", NULL};
+static const char *instantswitchcmd[] = {"rofi", "-show", "window", NULL};
static const char *instantshutdowncmd[] = {"instantshutdown", NULL};
static const char *notifycmd[] = {"instantnotify", NULL};
static const char *rangercmd[] = { "urxvt", "-e", "ranger", NULL };
static const char *panther[] = { "appmenu", NULL};
static const char *pavucontrol[] = { "pavucontrol", NULL};
static const char *clickcmd[] = { "autoclicker", NULL };
+
static const char *scrotcmd[] = { "/opt/instantos/menus/dm/ss.sh", NULL };
static const char *fscrotcmd[] = { "/opt/instantos/menus/dm/sm.sh", NULL };
+static const char *clipscrotcmd[] = { "/opt/instantos/menus/dm/sc.sh", NULL };
+static const char *fclipscrotcmd[] = { "/opt/instantos/menus/dm/sf.sh", NULL };
static const char *spoticli[] = { "spoticli", "m", NULL};
static const char *spotiprev[] = { "spoticli", "p", NULL};
@@ -204,6 +207,8 @@ static Key keys[] = {
{0, XK_Print, spawn, {.v = fscrotcmd}},
{MODKEY, XK_Print, spawn, {.v = scrotcmd}},
+ {MODKEY|ControlMask, XK_Print, spawn, {.v = clipscrotcmd}},
+ {MODKEY|Mod1Mask, XK_Print, spawn, {.v = fclipscrotcmd}},
{ MODKEY, XK_o, winview, {0} },
|
Confgen: link config options to parent choices in the docs | @@ -111,13 +111,31 @@ class DeprecatedOptions(object):
f_out.write(line)
def append_doc(self, config, path_output):
+
+ def option_was_written(opt):
+ return any(gen_kconfig_doc.node_should_write(node) for node in config.syms[opt].nodes)
+
if len(self.r_dic) > 0:
with open(path_output, 'a') as f_o:
header = 'Deprecated options and their replacements'
f_o.write('{}\n{}\n\n'.format(header, '-' * len(header)))
- for key in sorted(self.r_dic):
- f_o.write('- {}{}: :ref:`{}{}`\n'.format(config.config_prefix, key,
- config.config_prefix, self.r_dic[key]))
+ for dep_opt in sorted(self.r_dic):
+ new_opt = self.r_dic[dep_opt]
+ if new_opt not in config.syms or (config.syms[new_opt].choice is None and option_was_written(new_opt)):
+ # everything except config for a choice (no link reference for those in the docs)
+ f_o.write('- {}{} (:ref:`{}{}`)\n'.format(config.config_prefix, dep_opt,
+ config.config_prefix, new_opt))
+
+ if new_opt in config.named_choices:
+ # here are printed config options which were filtered out
+ syms = config.named_choices[new_opt].syms
+ for sym in syms:
+ if sym.name in self.rev_r_dic:
+ # only if the symbol has been renamed
+ dep_name = self.rev_r_dic[sym.name]
+
+ # config options doesn't have references
+ f_o.write(' - {}{}\n'.format(config.config_prefix, dep_name))
def append_config(self, config, path_output):
tmp_list = []
|
OcCpuLib: Update documentation | @@ -676,7 +676,9 @@ OcGetPmTimerAddr (
}
/**
- Calculate the TSC frequency
+ Calculate the TSC frequency via PM timer
+
+ @param[in] Recalculate Do not re-use previously cached information.
@retval The calculated TSC frequency.
**/
@@ -792,6 +794,15 @@ OcCalculateTSCFromPMTimer (
return TSCFrequency;
}
+/**
+ Calculate the ART frequency and derieve the CPU frequency for Intel CPUs
+
+ @param[out] CPUFrequency The derieved CPU frequency.
+ @param[in] Recalculate Do not re-use previously cached information.
+
+ @retval The calculated ART frequency.
+**/
+STATIC
UINT64
OcCalcluateARTFrequencyIntel (
OUT UINT64 *CPUFrequency,
@@ -1038,8 +1049,8 @@ ScanIntelProcessor (
//
// For logging purposes (the first call to these functions might happen
- // before logging is fully initialised), do use the cached results in DEBUG
- // builds.
+ // before logging is fully initialised), do not use the cached results in
+ // DEBUG builds.
//
Recalculate = FALSE;
@@ -1149,8 +1160,8 @@ ScanAmdProcessor (
//
// For logging purposes (the first call to these functions might happen
- // before logging is fully initialised), do use the cached results in DEBUG
- // builds.
+ // before logging is fully initialised), do not use the cached results in
+ // DEBUG builds.
//
Recalculate = FALSE;
|
Disabling timer when request header has been entirely read. | @@ -179,6 +179,7 @@ static const nxt_conn_state_t nxt_h1p_idle_state
.timer_handler = nxt_h1p_conn_timeout,
.timer_value = nxt_h1p_conn_timeout_value,
.timer_data = offsetof(nxt_socket_conf_t, idle_timeout),
+ .timer_autoreset = 1,
};
@@ -307,10 +308,14 @@ nxt_h1p_conn_header_parse(nxt_task_t *task, void *obj, void *data)
ret = nxt_http_parse_request(&h1p->parser, &c->read->mem);
- r = h1p->request;
-
ret = nxt_expect(NXT_DONE, ret);
+ if (ret != NXT_AGAIN) {
+ nxt_timer_disable(task->thread->engine, &c->read_timer);
+ }
+
+ r = h1p->request;
+
switch (ret) {
case NXT_DONE:
@@ -1076,6 +1081,7 @@ static const nxt_conn_state_t nxt_h1p_keepalive_state
.timer_handler = nxt_h1p_conn_timeout,
.timer_value = nxt_h1p_conn_timeout_value,
.timer_data = offsetof(nxt_socket_conf_t, idle_timeout),
+ .timer_autoreset = 1,
};
|
Fix an incorrect error flow in add_provider_groups | @@ -334,7 +334,7 @@ static int add_provider_groups(const OSSL_PARAM params[], void *data)
p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MAX_TLS);
if (p == NULL || !OSSL_PARAM_get_int(p, &ginf->maxtls)) {
SSLerr(0, ERR_R_PASSED_INVALID_ARGUMENT);
- return 0;
+ goto err;
}
p = OSSL_PARAM_locate_const(params, OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS);
|
stm32/Makefile: Allow to override CROSS_COMPILE with included Makefile. | @@ -42,7 +42,8 @@ OPENOCD ?= openocd
OPENOCD_CONFIG ?= boards/openocd_stm32f4.cfg
STARTUP_FILE ?= boards/startup_stm32$(MCU_SERIES).o
-CROSS_COMPILE = arm-none-eabi-
+# Select the cross compile prefix
+CROSS_COMPILE ?= arm-none-eabi-
INC += -I.
INC += -I$(TOP)
|
libbpf-tools: add links to BPF CO-RE posts
Add links to BPF CO-RE blog posts, explainint what it is, how to use it, and
giving practical recommendations on how to convert BCC BPF program to
libbpf-based one. | +Useful links
+------------
+
+- [BPF Portability and CO-RE](https://facebookmicrosites.github.io/bpf/blog/2020/02/19/bpf-portability-and-co-re.html)
+- [HOWTO: BCC to libbpf conversion](https://facebookmicrosites.github.io/bpf/blog/2020/02/20/bcc-to-libbpf-howto-guide.html)
+
Building
-------
|
add test for new multidimensional slice | @@ -10,6 +10,14 @@ tests/test-slice: ones slice resize nrmse
touch $@
+tests/test-slice-multidim: ones slice resize nrmse
+ set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
+ $(TOOLDIR)/ones 3 1 1 1 o.ra ;\
+ $(TOOLDIR)/resize -c 0 100 1 100 2 100 o.ra o0.ra ;\
+ $(TOOLDIR)/slice 0 50 1 50 2 50 o0.ra o1.ra ;\
+ $(TOOLDIR)/nrmse -t 0. o1.ra o.ra ;\
+ rm *.ra ; cd .. ; rmdir $(TESTS_TMP)
+ touch $@
-TESTS += tests/test-slice
+TESTS += tests/test-slice tests/test-slice-multidim
|
Add error handling for amount of case blocks in a switch statement. | @@ -2091,20 +2091,30 @@ static void switchStatement(Compiler *compiler) {
statement(compiler);
caseEnds[caseCount++] = emitJump(compiler,OP_JUMP);
patchJump(compiler, compareJump);
+
+ if (caseCount > 255) {
+ errorAtCurrent(compiler->parser, "Switch statement can not have more than 256 case blocks");
+ }
+
} while(match(compiler, TOKEN_CASE));
+
if (match(compiler,TOKEN_DEFAULT)){
emitByte(compiler, OP_POP); // expression.
consume(compiler, TOKEN_COLON, "Expect ':' after expression.");
statement(compiler);
}
+
if (match(compiler,TOKEN_CASE)){
- error(compiler->parser, "Unexcepted case after default");
+ error(compiler->parser, "Unexpected case after default");
}
+
consume(compiler, TOKEN_RIGHT_BRACE, "Expect '}' end switch body.");
+
for (int i = 0; i < caseCount; i++) {
patchJump(compiler, caseEnds[i]);
}
}
+
static void withStatement(Compiler *compiler) {
compiler->withBlock = true;
consume(compiler, TOKEN_LEFT_PAREN, "Expect '(' after 'with'.");
|
news: release fix | @@ -115,7 +115,7 @@ The following section lists news about the [modules](https://www.libelektra.org/
### Reference
-- Fixed missing Metadata in README and METADATA.ini.
+- Fixed missing Metadata in README and METADATA.ini. _(Michael Zronek)_
### Specload
|
DxeIpl: Fallback to 0xCF9 for reset register | @@ -306,18 +306,21 @@ PrepareFadtTable (
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
);
}
- if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, ResetValue) + sizeof (Fadt->ResetValue)) {
+
//
// Ensure FADT register information is valid and can be trusted before using.
// If not, use universal register settings. See AcpiFadtEnableReset() in OcAcpiLib.
//
- if (Fadt->ResetReg.Address != 0 && Fadt->ResetReg.RegisterBitWidth == 8) {
+ if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, ResetValue) + sizeof (Fadt->ResetValue)
+ && Fadt->ResetReg.Address != 0
+ && Fadt->ResetReg.RegisterBitWidth == 8) {
CopyMem (
&AcpiDescription->RESET_REG,
&Fadt->ResetReg,
sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
);
AcpiDescription->RESET_VALUE = Fadt->ResetValue;
+
} else {
//
// Use mostly universal default of 0xCF9.
@@ -329,21 +332,6 @@ PrepareFadtTable (
AcpiDescription->RESET_REG.AccessSize = EFI_ACPI_3_0_BYTE;
AcpiDescription->RESET_VALUE = 6;
}
- } else {
- //
- // ** CHANGE START **
- // Otherwise fill with defaults.
- //
- AcpiDescription->RESET_REG.Address = 0x64;
- AcpiDescription->RESET_REG.AddressSpaceId = EFI_ACPI_3_0_SYSTEM_IO;
- AcpiDescription->RESET_REG.RegisterBitWidth = 8;
- AcpiDescription->RESET_REG.RegisterBitOffset = 0;
- AcpiDescription->RESET_REG.AccessSize = EFI_ACPI_3_0_BYTE;
- AcpiDescription->RESET_VALUE = 0xFE;
- //
- // ** CHANGE END **
- //
- }
//
// ** CHANGE START **
|
changed test timeout in cmake | @@ -153,9 +153,9 @@ add_dependencies (tests test_async_perf)
# Test Timeout in seconds.
if (PIO_VALGRIND_CHECK)
- set (DEFAULT_TEST_TIMEOUT 480)
+ set (DEFAULT_TEST_TIMEOUT 800)
else ()
- set (DEFAULT_TEST_TIMEOUT 480)
+ set (DEFAULT_TEST_TIMEOUT 600)
endif ()
# All tests need a certain number of tasks, but they should be able to
|
Keywords get highlighted incorrectly | @@ -1998,7 +1998,7 @@ void parseCode(const tic_script_config* config, const char* start, u8* color, co
while(true)
{
- char c = *ptr;
+ char c = ptr[0];
if(blockCommentStart)
{
@@ -2135,7 +2135,7 @@ void parseCode(const tic_script_config* config, const char* start, u8* color, co
ptr += strlen(config->singleComment);
continue;
}
- else if(isalpha_(c) && ptr[-1] != '.')
+ else if(isalpha_(c))
{
wordStart = ptr;
ptr++;
|
T167: add preprocessor error if cowbench compiled with PMAP_LL. | #include "pmap_cow.h"
#include "debug.h"
+#ifndef PMAP_ARRAY
+#error need PMAP_ARRAY for pmap_cow to work
+#endif
+
static struct vnode *cow_root_pte = NULL;
#define EX_STACK_SIZE 16384
static char ex_stack[EX_STACK_SIZE];
|
Update mxml-file.c | @@ -2000,7 +2000,7 @@ mxml_load_data(
* Free the string buffer - we don't need it anymore...
*/
- free(buffer);
+ PhFree(buffer);
/*
* Find the top element and return it...
@@ -2036,7 +2036,7 @@ mxml_load_data(
mxmlDelete(first);
- free(buffer);
+ PhFree(buffer);
return (NULL);
}
|
apps/bttester: Add missing Pairing Consent command/event | @@ -291,6 +291,13 @@ struct gap_conn_param_update_cmd {
u16_t supervision_timeout;
} __packed;
+#define GAP_PAIRING_CONSENT_RSP 0x17
+struct gap_pairing_consent_rsp_cmd {
+ u8_t address_type;
+ u8_t address[6];
+ u8_t consent;
+} __packed;
+
/* events */
#define GAP_EV_NEW_SETTINGS 0x80
struct gap_new_settings_ev {
@@ -370,6 +377,12 @@ struct gap_sec_level_changed_ev {
u8_t level;
} __packed;
+#define GAP_EV_PAIRING_CONSENT_REQ 0x8a
+struct gap_pairing_consent_req_ev {
+ u8_t address_type;
+ u8_t address[6];
+} __packed;
+
/* GATT Service */
/* commands */
#define GATT_READ_SUPPORTED_COMMANDS 0x01
|
sysdeps/linux: Implement sys_sockname and sys_peername | @@ -541,6 +541,24 @@ int sys_setsockopt(int fd, int layer, int number, const void *buffer, socklen_t
return 0;
}
+int sys_sockname(int fd, struct sockaddr *addr_ptr, socklen_t max_addr_length,
+ socklen_t *actual_length) {
+ auto ret = do_syscall(SYS_getsockname, fd, addr_ptr, &max_addr_length);
+ if (int e = sc_error(ret); e)
+ return e;
+ *actual_length = max_addr_length;
+ return 0;
+}
+
+int sys_peername(int fd, struct sockaddr *addr_ptr, socklen_t max_addr_length,
+ socklen_t *actual_length) {
+ auto ret = do_syscall(SYS_getpeername, fd, addr_ptr, &max_addr_length);
+ if (int e = sc_error(ret); e)
+ return e;
+ *actual_length = max_addr_length;
+ return 0;
+}
+
int sys_listen(int fd, int backlog) {
auto ret = do_syscall(SYS_listen, fd, backlog, 0, 0, 0, 0);
if (int e = sc_error(ret); e)
|
imxrt/mkimg: Provide valid example | # $2 - kernel argument string
# $3 - output file name
# $4, ... - applications ELF(s)
-# example: ./mkimg-imxrt.sh phoenix-armv7-imxrt.elf "Xapp1.elf,Xapp2.elf" flash.img app1.elf app2.elf
+# example: ./mkimg-imxrt.sh phoenix-armv7-imxrt.elf "Xapp1.elf Xapp2.elf" flash.img app1.elf app2.elf
reverse() {
|
Fix exclusive actors reserve count | @@ -887,7 +887,7 @@ export const precompileScenes = (
const sprite = usedSpritesLookup[event.args.spriteSheetId];
actorsExclusiveLookup[actorId] = Math.max(
actorsExclusiveLookup[actorId] || 0,
- sprite.numTiles
+ sprite.numTiles * 2
);
}
}
|
CLEANUP: refactored the do_continuum_find() function. | @@ -532,7 +532,7 @@ static void do_hashring_replace(struct cluster_config *config, struct cont_item
static struct cont_item *
do_continuum_find(struct cont_item **continuum, uint32_t num_conts, uint32_t hvalue)
{
- int left, right, mid;
+ int left, right, mid, found;
left = 0;
right = num_conts-1;
@@ -547,11 +547,12 @@ do_continuum_find(struct cont_item **continuum, uint32_t num_conts, uint32_t hva
while (mid > 0 && continuum[mid-1]->hpoint == hvalue) {
mid -= 1;
}
- return continuum[mid];
+ found = mid;
} else {
/* That is, continuum[left]->hpoint > hvalue */
- return (left < num_conts) ? continuum[left] : continuum[0];
+ found = (left < num_conts) ? left : 0;
}
+ return continuum[found];
}
/*
|
dpdk: get a rid of "Invalid port_id=" log message | @@ -271,6 +271,7 @@ dpdk_lib_init (dpdk_main_t * dm)
struct rte_eth_dev_info dev_info;
struct rte_pci_device *pci_dev;
struct rte_eth_link l;
+ dpdk_portid_t next_port_id;
dpdk_device_config_t *devconf = 0;
vlib_pci_addr_t pci_addr;
uword *p = 0;
@@ -316,13 +317,14 @@ dpdk_lib_init (dpdk_main_t * dm)
devconf = &dm->conf->default_devconf;
/* Handle interface naming for devices with multiple ports sharing same PCI ID */
- if (pci_dev)
+ if (pci_dev &&
+ ((next_port_id = rte_eth_find_next (i)) != RTE_MAX_ETHPORTS))
{
struct rte_eth_dev_info di = { 0 };
struct rte_pci_device *next_pci_dev;
- rte_eth_dev_info_get (i + 1, &di);
+ rte_eth_dev_info_get (next_port_id, &di);
next_pci_dev = di.device ? RTE_DEV_TO_PCI (di.device) : 0;
- if (pci_dev && next_pci_dev &&
+ if (next_pci_dev &&
pci_addr.as_u32 != last_pci_addr.as_u32 &&
memcmp (&pci_dev->addr, &next_pci_dev->addr,
sizeof (struct rte_pci_addr)) == 0)
|
update verilator_root | @@ -31,7 +31,7 @@ copy $LOCAL_VERILATOR_DIR/ $SERVER:$REMOTE_VERILATOR_DIR
# enter the verisim directory and build the specific config on remote server
run "make -C $REMOTE_SIM_DIR clean"
-run "export RISCV=\"$REMOTE_RISCV_DIR\"; export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR; make -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR JAVA_ARGS=\"-Xmx8G -Xss8M\" $@"
+run "export RISCV=\"$REMOTE_RISCV_DIR\"; export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR/install/share/verilator; make -C $REMOTE_SIM_DIR VERILATOR_INSTALL_DIR=$REMOTE_VERILATOR_DIR JAVA_ARGS=\"-Xmx8G -Xss8M\" $@"
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
# copy back the final build
|
nimble/mesh: Fix missing SAR timeout in Proxy Server
Mesh Profile 1.0 Section 6.6:
"The timeout for the SAR transfer is 20 seconds. When the timeout expires,
the Proxy Server shall disconnect."
This allows passing MESH/SR/PROX/BV-05-C. | #define PDU_TYPE(data) (data[0] & BIT_MASK(6))
#define PDU_SAR(data) (data[0] >> 6)
+/* Mesh Profile 1.0 Section 6.6:
+ * "The timeout for the SAR transfer is 20 seconds. When the timeout
+ * expires, the Proxy Server shall disconnect."
+ */
+#define PROXY_SAR_TIMEOUT K_SECONDS(20)
+
#define SAR_COMPLETE 0x00
#define SAR_FIRST 0x01
#define SAR_CONT 0x02
@@ -117,6 +123,7 @@ static struct bt_mesh_proxy_client {
#if (MYNEWT_VAL(BLE_MESH_GATT_PROXY))
struct ble_npl_callout send_beacons;
#endif
+ struct k_delayed_work sar_timer;
struct os_mbuf *buf;
} clients[MYNEWT_VAL(BLE_MAX_CONNECTIONS)] = {
[0 ... (MYNEWT_VAL(BLE_MAX_CONNECTIONS) - 1)] = { 0 },
@@ -401,6 +408,23 @@ static void proxy_send_beacons(struct ble_npl_event *work)
}
}
+static void proxy_sar_timeout(struct ble_npl_event *work)
+{
+ struct bt_mesh_proxy_client *client;
+ int rc;
+
+ BT_WARN("Proxy SAR timeout");
+
+ client = ble_npl_event_get_arg(work);
+ assert(client != NULL);
+
+ if ((client->conn_handle != BLE_HS_CONN_HANDLE_NONE)) {
+ rc = ble_gap_terminate(client->conn_handle,
+ BLE_ERR_REM_USER_CONN_TERM);
+ assert(rc == 0);
+ }
+}
+
void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub)
{
int i;
@@ -550,6 +574,7 @@ static int proxy_recv(uint16_t conn_handle, uint16_t attr_handle,
return -EINVAL;
}
+ k_delayed_work_submit(&client->sar_timer, PROXY_SAR_TIMEOUT);
client->msg_type = PDU_TYPE(data);
net_buf_simple_add_mem(client->buf, data + 1, len - 1);
break;
@@ -579,6 +604,7 @@ static int proxy_recv(uint16_t conn_handle, uint16_t attr_handle,
return -EINVAL;
}
+ k_delayed_work_cancel(&client->sar_timer);
net_buf_simple_add_mem(client->buf, data + 1, len - 1);
proxy_complete_pdu(client);
break;
@@ -641,6 +667,7 @@ static void proxy_disconnected(uint16_t conn_handle, int reason)
bt_mesh_pb_gatt_close(conn_handle);
}
+ k_delayed_work_cancel(&client->sar_timer);
client->conn_handle = BLE_HS_CONN_HANDLE_NONE;
break;
}
@@ -1418,6 +1445,9 @@ int bt_mesh_proxy_init(void)
#endif
clients[i].buf = NET_BUF_SIMPLE(CLIENT_BUF_SIZE);
clients[i].conn_handle = BLE_HS_CONN_HANDLE_NONE;
+
+ k_delayed_work_init(&clients[i].sar_timer, proxy_sar_timeout);
+ k_delayed_work_add_arg(&clients[i].sar_timer, &clients[i]);
}
resolve_svc_handles();
|
dnstap socket tool better help text. | @@ -70,7 +70,7 @@ static void usage(char* argv[])
printf("usage: %s [options]\n", argv[0]);
printf(" Listen to dnstap messages\n");
printf("stdout has dnstap log, stderr has verbose server log\n");
- printf("-u <socketpath> use unix socket with this file name\n");
+ printf("-u <socketpath> listen to unix socket with this file name\n");
printf("-l long format for DNS printout\n");
printf("-v more verbose log output\n");
printf("-h this help text\n");
|
bootutil: Remove arbitrary limit on BOOT_MAX_IMG_SECTORS
Count is initialized before it is passed to flash_area_get_sectors. The
flash driver should use count to ensure an overrun does not occur. | @@ -162,17 +162,6 @@ extern const uint32_t boot_img_magic[4];
(hdr)->ih_ver.iv_revision, \
(hdr)->ih_ver.iv_build_num)
-/*
- * The current flashmap API does not check the amount of space allocated when
- * loading sector data from the flash device, allowing for smaller counts here
- * would most surely incur in overruns.
- *
- * TODO: make flashmap API receive the current sector array size.
- */
-#if BOOT_MAX_IMG_SECTORS < 32
-#error "Too few sectors, please increase BOOT_MAX_IMG_SECTORS to at least 32"
-#endif
-
#if MCUBOOT_SWAP_USING_MOVE
#define BOOT_STATUS_MOVE_STATE_COUNT 1
#define BOOT_STATUS_SWAP_STATE_COUNT 2
|
iOS: fix build on system where no any provisioning installed | @@ -1127,6 +1127,7 @@ namespace "config" do
mp_latest_UUID = nil
mp_latest_Time = nil
+ if File.exists? mp_folder
Dir.entries(mp_folder).select do |entry|
path = File.join(mp_folder,entry)
#puts '$$$ '+path.to_s
@@ -1169,6 +1170,7 @@ namespace "config" do
end
end
end
+ end
if mp_latest_UUID != nil
$provisionprofile = mp_latest_UUID
end
|
protect newline | @@ -267,9 +267,10 @@ runtime.
instead of any binding that is generic to all devices.
Example:
-
+```
# Execute firefox when alt, shift, and f are pressed together
bindsym Mod1+Shift+f exec firefox
+```
*bindcode* [--release|--locked] [--input-device=<device>] <code> <command>
is also available for binding with key codes instead of key names.
|
enabling IPV4 multicast discovery, so that Marek can continue. | @@ -1309,6 +1309,9 @@ issue_requests(char* current_udn)
{
oc_do_site_local_ipv6_discovery_all(&discovery, current_udn);
oc_do_realm_local_ipv6_discovery_all(&discovery, current_udn);
+#ifdef OC_IPV4
+ oc_do_ip_discovery_all(&discovery, current_udn);
+#endif
//oc_do_ip_discovery_all(& discovery, NULL);
//oc_do_ip_discovery("oic.wk.res", &discovery, NULL);
}
@@ -1319,6 +1322,9 @@ issue_requests_all(void)
PRINT("issue_requests_all: Discovery of devices at start up\n");
oc_do_site_local_ipv6_discovery_all(&discovery, NULL);
oc_do_realm_local_ipv6_discovery_all(&discovery, NULL);
+#ifdef OC_IPV4
+ oc_do_ip_discovery_all(&discovery, current_udn);
+#endif
//oc_do_ip_discovery_all(& discovery, NULL);
//oc_do_ip_discovery("oic.wk.res", &discovery, NULL);
}
|
web ui jenkins: refactor deploy function | @@ -889,33 +889,20 @@ def buildPackageDebianStretch() {
}]
}
-def deployDockerContainer(backendName, frontendName, backendImageId, frontendImageId, backendHost, frontendHost) {
+def deployDockerContainer(name, imageId, host) {
node("frontend") {
docker.withRegistry("https://${REGISTRY}",
'docker-hub-elektra-jenkins') {
- def backend = docker.image(backendImageId)
- def frontend = docker.image(frontendImageId)
- backend.pull()
- frontend.pull()
+ def img = docker.image(imageId)
+ img.pull()
- sh "docker stop -t 5 ${backendName} || /bin/true"
- sh "docker rm ${backendName} || /bin/true"
+ sh "docker stop -t 5 ${name} || /bin/true"
+ sh "docker rm ${name} || /bin/true"
backend.run("""\
- -e VIRTUAL_HOST=${backendHost} \
- -e LETSENCRYPT_HOST=${backendHost} \
+ -e VIRTUAL_HOST=${host} \
+ -e LETSENCRYPT_HOST=${host} \
-e LETSENCRYPT_EMAIL=jenkins@hub.libelektra.org \
- --name ${backendName} \
- --network=frontend_default \
- --restart=always"""
- )
-
- sh "docker stop -t 5 ${frontendName} || /bin/true"
- sh "docker rm ${frontendName} || /bin/true"
- frontend.run("""\
- -e VIRTUAL_HOST=${frontendHost} \
- -e LETSENCRYPT_HOST=${frontendHost} \
- -e LETSENCRYPT_EMAIL=jenkins@hub.libelektra.org \
- --name ${frontendName} \
+ --name ${name} \
--network=frontend_default \
--restart=always"""
)
@@ -925,9 +912,14 @@ def deployDockerContainer(backendName, frontendName, backendImageId, frontendIma
def deployHomepage() {
deployDockerContainer(
- "elektra-backend", "elektra-frontend",
- DOCKER_IMAGES.homepage_backend.id, DOCKER_IMAGES.homepage_frontend.id,
- "restapi.libelektra.org", "www.libelektra.org"
+ "elektra-backend",
+ DOCKER_IMAGES.homepage_backend.id,
+ "restapi.libelektra.org"
+ )
+ deployDockerContainer(
+ "elektra-frontend",
+ DOCKER_IMAGES.homepage_frontend.id,
+ "www.libelektra.org"
)
}
@@ -940,15 +932,19 @@ def buildHomepage() {
def deployWebUI() {
deployDockerContainer(
- "elektrad", "webd",
- DOCKER_IMAGES.webui_elektrad.id, DOCKER_IMAGES.webui_webd.id,
- "elektrad-demo.libelektra.org", "webdemo.libelektra.org"
+ "elektrad",
+ DOCKER_IMAGES.webui_elektrad.id,
+ "elektrad-demo.libelektra.org"
+ )
+ deployDockerContainer(
+ "webd",
+ DOCKER_IMAGES.webui_webd.id,
+ "webdemo.libelektra.org"
)
}
def buildWebUI() {
def webuiTasks = [:]
- webuiTasks << buildImageStage(DOCKER_IMAGES.webui_base)
webuiTasks << buildImageStage(DOCKER_IMAGES.webui_elektrad)
webuiTasks << buildImageStage(DOCKER_IMAGES.webui_webd)
return webuiTasks
|
Rebased: Add return value check for flash_func_start() calls | @@ -106,9 +106,6 @@ static error_t target_flash_init()
return ERROR_ALGO_DL;
}
- if (0 == swd_flash_syscall_exec(&flash->sys_call_s, flash->init, g_board_info.target_cfg->flash_start, 0, 0, 0)) {
- return ERROR_INIT;
- }
state = STATE_OPEN;
return ERROR_SUCCESS;
} else {
@@ -120,7 +117,10 @@ static error_t target_flash_init()
static error_t target_flash_uninit(void)
{
if (g_board_info.target_cfg) {
- flash_func_start(FLASH_FUNC_NOP);
+ error_t status = flash_func_start(FLASH_FUNC_NOP);
+ if (status != ERROR_SUCCESS) {
+ return status;
+ }
if (config_get_auto_rst()) {
// Resume the target if configured to do so
target_set_state(RESET_RUN);
@@ -142,8 +142,9 @@ static error_t target_flash_uninit(void)
static error_t target_flash_program_page(uint32_t addr, const uint8_t *buf, uint32_t size)
{
- if (g_board_info.target_cfg) {
+ if (g_board_info.target_cfg) {
+ error_t status = ERROR_SUCCESS;
const program_target_t *const flash = g_board_info.target_cfg->flash_algo;
// check if security bits were set
@@ -153,7 +154,12 @@ static error_t target_flash_program_page(uint32_t addr, const uint8_t *buf, uint
}
}
- flash_func_start(FLASH_FUNC_PROGRAM);
+ status = flash_func_start(FLASH_FUNC_PROGRAM);
+
+ if (status != ERROR_SUCCESS) {
+ return status;
+ }
+
while (size > 0) {
uint32_t write_size = MIN(size, flash->program_buffer_size);
@@ -216,7 +222,9 @@ static error_t target_flash_program_page(uint32_t addr, const uint8_t *buf, uint
static error_t target_flash_erase_sector(uint32_t addr)
{
+
if (g_board_info.target_cfg) {
+ error_t status = ERROR_SUCCESS;
const program_target_t *const flash = g_board_info.target_cfg->flash_algo;
// Check to make sure the address is on a sector boundary
@@ -224,8 +232,12 @@ static error_t target_flash_erase_sector(uint32_t addr)
return ERROR_ERASE_SECTOR;
}
+ status = flash_func_start(FLASH_FUNC_ERASE);
+
+ if (status != ERROR_SUCCESS) {
+ return status;
+ }
- flash_func_start(FLASH_FUNC_ERASE);
if (0 == swd_flash_syscall_exec(&flash->sys_call_s, flash->erase_sector, addr, 0, 0, 0)) {
return ERROR_ERASE_SECTOR;
}
@@ -242,7 +254,10 @@ static error_t target_flash_erase_chip(void)
error_t status = ERROR_SUCCESS;
const program_target_t *const flash = g_board_info.target_cfg->flash_algo;
- flash_func_start(FLASH_FUNC_PROGRAM);
+ status = flash_func_start(FLASH_FUNC_PROGRAM);
+ if (status != ERROR_SUCCESS) {
+ return status;
+ }
if (0 == swd_flash_syscall_exec(&flash->sys_call_s, flash->erase_chip, 0, 0, 0, 0)) {
return ERROR_ERASE_ALL;
}
|