message
stringlengths
6
474
diff
stringlengths
8
5.22k
Cirrus: Use POSIX shell syntax
@@ -47,7 +47,7 @@ bsd_task: # Work around stalled process plugin and library problems on FreeBSD: https://issues.libelektra.org/2323 - sudo mount -t fdescfs fdesc /dev/fd - &run_tests | # Run tests - if [ "$ENABLE_ASAN" == 'ON' ]; then + if [ "$ENABLE_ASAN" = 'ON' ]; then cmake --build "$BUILD_DIR" --target run_nocheckshell else [ "$BUILD_FULL" = 'ON' ] && KDB=kdb-full || KDB=kdb
Fix a warning found in build testing
@@ -205,9 +205,9 @@ static const char g_redirect1[] = ">"; static const char g_redirect2[] = ">>"; #ifndef CONFIG_DISABLE_ENVIRON static const char g_exitstatus[] = "?"; -#endif static const char g_success[] = "0"; static const char g_failure[] = "1"; +#endif static const char g_nullstring[] = ""; /****************************************************************************
Update the info callback documentation for TLSv1.3
=head1 NAME -SSL_CTX_set_info_callback, SSL_CTX_get_info_callback, SSL_set_info_callback, SSL_get_info_callback - handle information callback for SSL connections +SSL_CTX_set_info_callback, +SSL_CTX_get_info_callback, +SSL_set_info_callback, +SSL_get_info_callback +- handle information callback for SSL connections =head1 SYNOPSIS @@ -37,7 +41,8 @@ callback function for B<ssl>. When setting up a connection and during use, it is possible to obtain state information from the SSL/TLS engine. When set, an information callback function -is called whenever the state changes, an alert appears, or an error occurs. +is called whenever a significant event occurs such as: the state changes, +an alert appears, or an error occurs. The callback function is called as B<callback(SSL *ssl, int where, int ret)>. The B<where> argument specifies information about where (in which context) @@ -51,12 +56,15 @@ B<where> is a bitmask made up of the following bits: =item SSL_CB_LOOP -Callback has been called to indicate state change inside a loop. +Callback has been called to indicate state change or some other significant +state machine event. This may mean that the callback gets invoked more than once +per state in some situations. =item SSL_CB_EXIT -Callback has been called to indicate error exit of a handshake function. -(May be soft error with retry option for non-blocking setups.) +Callback has been called to indicate exit of a handshake function. This will +happen after the end of a handshake, but may happen at other times too such as +on error or when IO might otherwise block and non-blocking is being used. =item SSL_CB_READ @@ -84,11 +92,17 @@ Callback has been called due to an alert being sent or received. =item SSL_CB_HANDSHAKE_START -Callback has been called because a new handshake is started. +Callback has been called because a new handshake is started. In TLSv1.3 this is +also used for the start of post-handshake message exchanges such as for the +exchange of session tickets, or for key updates. It also occurs when resuming a +handshake following a pause to handle early data. =item SSL_CB_HANDSHAKE_DONE 0x20 -Callback has been called because a handshake is finished. +Callback has been called because a handshake is finished. In TLSv1.3 this is +also used at the end of an exchange of post-handshake messages such as for +session tickets or key updates. It also occurs if the handshake is paused to +allow the exchange of early data. =back
docs/fingerprint: Update power numbers for icetower/dartmonkey BRANCH=none TEST=view in gitiles
@@ -351,28 +351,34 @@ When the MCU is in **low power** mode during the AP suspend (as emulated by @@ pp3300_dx_mcu_mw 1243 2.25 0.39 10.26 2.10 ``` -### Dragontalon +### Icetower v0.1 <!-- mdformat off(b/139308852) --> *** note -**NOTE**: The sensor doesn't work on Dragontalon, so the measurements below show -zero for the sensor. +**NOTE**: Icetower v0.1 has a hardware bug in the INA connections, so you cannot +measure the 1.8V fingerprint sensor rail. See http://b/178098140. *** <!-- mdformat on --> ```bash -(chroot) $ dut-control -t 60 pp3300_h7_mv pp3300_h7_mw pp1800_fpc_mv pp1800_fpc_mw +(chroot) $ dut-control -t 60 pp3300_dx_mcu_mv pp3300_dx_fp_mv pp3300_dx_mcu_mw pp3300_dx_fp_mw ``` -**Firmware Version**: `dartmonkey_v2.0.4017-9c45fb4b3` +**Firmware Version**: `dartmonkey_v2.0.2887-311310808-RO_v2.0.7304-441100b93-RW.bin` + +#### MCU is idle + +``` +(chroot) $ dut-control fpmcu_slp_s3:off +``` ``` @@ NAME COUNT AVERAGE STDDEV MAX MIN -@@ sample_msecs 1502 39.96 13.14 379.43 22.31 -@@ pp1800_fpc_mv 1502 0.00 0.00 0.00 0.00 -@@ pp1800_fpc_mw 1502 0.00 0.00 0.00 0.00 -@@ pp3300_h7_mv 1502 3288.00 0.00 3288.00 3288.00 -@@ pp3300_h7_mw 1502 8.20 0.51 18.08 7.67 +@@ sample_msecs 174 345.60 31.93 457.62 283.00 +@@ pp3300_dx_fp_mv 174 3264.00 0.00 3264.00 3264.00 +@@ pp3300_dx_fp_mw 174 0.00 0.00 0.00 0.00 +@@ pp3300_dx_mcu_mv 174 3260.69 3.94 3264.00 3256.00 +@@ pp3300_dx_mcu_mw 174 5.47 0.10 5.48 4.17 ``` ## Chrome OS Build (portage / ebuild)
improved response time
@@ -1134,12 +1134,24 @@ while(1) sendacknowledgement(macf->addr2.addr); sendauthentication(macf->addr2.addr, macf->addr1.addr); } + continue; + } + + else if((macf->subtype == MAC_ST_ACTION) && (staytime <= 5)) + { + if(memcmp(broadcastaddr.addr, macf->addr1.addr, 6) == 0) + { + senddeauth(MAC_ST_DEAUTH, WLAN_REASON_PREV_AUTH_NOT_VALID, broadcastaddr.addr, macf->addr2.addr); + continue; + } + senddeauth(MAC_ST_DISASSOC, WLAN_REASON_DISASSOC_AP_BUSY, macf->addr1.addr, macf->addr2.addr); + senddeauth(MAC_ST_DISASSOC, WLAN_REASON_DISASSOC_AP_BUSY, macf->addr2.addr, macf->addr1.addr); } continue; } /* check handshake frames */ - if(macf->type == MAC_TYPE_DATA && LLC_SIZE <= pkh->len && be16toh(((llc_t*)payload)->type) == LLC_TYPE_AUTH) + else if((macf->type == MAC_TYPE_DATA) && (LLC_SIZE <= pkh->len) && (be16toh(((llc_t*)payload)->type) == LLC_TYPE_AUTH)) { eap = (eap_t*)(payload + LLC_SIZE); if(eap->type == 3) @@ -1161,24 +1173,7 @@ while(1) continue; } - if(staytime <= 5) - { - if(macf->type == MAC_TYPE_MGMT) - { - if(macf->subtype == MAC_ST_ACTION) - { - if(memcmp(broadcastaddr.addr, macf->addr1.addr, 6) == 0) - { - senddeauth(MAC_ST_DEAUTH, WLAN_REASON_PREV_AUTH_NOT_VALID, broadcastaddr.addr, macf->addr2.addr); - continue; - } - senddeauth(MAC_ST_DISASSOC, WLAN_REASON_DISASSOC_AP_BUSY, macf->addr1.addr, macf->addr2.addr); - senddeauth(MAC_ST_DISASSOC, WLAN_REASON_DISASSOC_AP_BUSY, macf->addr2.addr, macf->addr1.addr); - continue; - } - } - - if(macf->type == MAC_TYPE_CTRL) + else if((macf->type == MAC_TYPE_CTRL) && (staytime <= 5)) { if(macf->subtype == MAC_ST_BACK) { @@ -1202,7 +1197,7 @@ while(1) continue; } - if(macf->type == MAC_TYPE_DATA) + else if((macf->type == MAC_TYPE_DATA) && (staytime <= 5)) { if(macf->subtype == MAC_ST_NULL) { @@ -1211,7 +1206,7 @@ while(1) continue; } - else if(macf->subtype == MAC_ST_QOSNULL) + if(macf->subtype == MAC_ST_QOSNULL) { senddeauth(MAC_ST_DISASSOC, WLAN_REASON_DISASSOC_AP_BUSY, macf->addr1.addr, macf->addr2.addr); senddeauth(MAC_ST_DISASSOC, WLAN_REASON_DISASSOC_AP_BUSY, macf->addr2.addr, macf->addr1.addr); @@ -1228,7 +1223,6 @@ while(1) continue; } } - } return; } /*===========================================================================*/
DM: multiboot info address in DM for elf loader is wrong. The () was missed during the patch refine. This patch add it. Acked-by: Yu Wang
@@ -294,7 +294,7 @@ acrn_sw_load_elf(struct vmctx *ctx) ctx->bsp_regs.vcpu_regs.gprs.rax = MULTIBOOT_MACHINE_STATE_MAGIC; if (multiboot_image == 1) { - mi = (struct multiboot_info *)ctx->baseaddr + MULTIBOOT_OFFSET; + mi = (struct multiboot_info *)(ctx->baseaddr + MULTIBOOT_OFFSET); memset(mi, 0, sizeof(*mi)); if (multiboot_flags == (1 << 1)) {
fix: including a filename doesn't impact other fields
@@ -84,20 +84,19 @@ logconf_setup(struct logconf *config, const char config_file[]) /* SET LOGGER CONFIGS */ if (!IS_EMPTY_STRING(logging->filename)) { - if (true == g_first_run) { + if (true == g_first_run) config->logger.f = fopen(logging->filename, "w+"); + else + config->logger.f = fopen(logging->filename, "a+"); log_add_fp(config->logger.f, get_log_level(logging->level)); + ASSERT_S(NULL != config->logger.f, "Could not create logger file"); + } + if (true == logging->quiet) { // make sure fatal still prints to stderr log_add_fp(stderr, LOG_FATAL); } log_set_level(get_log_level(logging->level)); log_set_quiet(logging->quiet); - } - else { - config->logger.f = fopen(logging->filename, "a+"); - } - ASSERT_S(NULL != config->logger.f, "Could not create logger file"); - } /* SET HTTP DUMP CONFIGS */ if (true == logging->http.enable) {
Fix coverity CID - Dereference before NULL check in EVP_DigestFinal_ex()
@@ -367,11 +367,18 @@ int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) /* The caller can assume that this removes any secret data from the context */ int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *isize) { - int ret; + int ret, sz; size_t size = 0; - size_t mdsize = EVP_MD_size(ctx->digest); + size_t mdsize = 0; - if (ctx->digest == NULL || ctx->digest->prov == NULL) + if (ctx->digest == NULL) + return 0; + + sz = EVP_MD_size(ctx->digest); + if (sz < 0) + return 0; + mdsize = sz; + if (ctx->digest->prov == NULL) goto legacy; if (ctx->digest->dfinal == NULL) {
Mac friendly build instruction
@@ -58,13 +58,16 @@ Build from git $ git clone --depth 1 https://github.com/openssl/openssl $ cd openssl $ # For Linux - $ ./Configure enable-tls1_3 --prefix=$PWD/build linux-x86_64 + $ ./config enable-tls1_3 --prefix=$PWD/build $ make -j$(nproc) $ make install_sw $ cd .. $ git clone https://github.com/ngtcp2/ngtcp2 $ cd ngtcp2 $ autoreconf -i + $ # For Mac users who have installed libev with MacPorts, append + $ # ',-L/opt/local/lib' to LDFLAGS, and also pass + $ # CPPFLAGS="-I/opt/local/include" to ./configure. $ ./configure PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig LDFLAGS="-Wl,-rpath,$PWD/../openssl/build/lib" $ make -j$(nproc) check
Restore initializers for mutex and conditional
@@ -571,6 +571,9 @@ int blas_thread_init(void){ atomic_store_queue(&thread_status[i].queue, (blas_queue_t *)0); thread_status[i].status = THREAD_STATUS_WAKEUP; + pthread_mutex_init(&thread_status[i].lock, NULL); + pthread_cond_init (&thread_status[i].wakeup, NULL) + #ifdef NEED_STACKATTR ret=pthread_create(&blas_threads[i], &attr, &blas_thread_server, (void *)i);
msp: rescrict powerlevel
@@ -318,7 +318,7 @@ static void msp_process_serial_cmd(msp_t *msp, msp_magic_t magic, uint16_t cmd, } if (remaining >= 2) { - settings->power_level = payload[2] - 1; + settings->power_level = max(payload[2], 1) - 1; settings->pit_mode = payload[3]; remaining -= 2; }
Fix vlsi/Makefile opts meta
@@ -123,11 +123,12 @@ $(SIM_CONF): $(VLSI_RTL) $(HARNESS_FILE) $(HARNESS_SMEMS_FILE) $(sim_common_file for x in $(filter-out "",$(VCS_CXXFLAGS)); do \ echo ' - "'$$x'"' >> $@; \ done + echo " compiler_cc_opts_meta: 'append'" >> $@ echo " compiler_ld_opts:" >> $@ for x in $(filter-out "",$(VCS_LDFLAGS)); do \ echo ' - "'$$x'"' >> $@; \ done - echo " compiler_opts_meta: 'append'" >> $@ + echo " compiler_ls_opts_meta: 'append'" >> $@ echo " execution_flags_prepend: ['$(PERMISSIVE_ON)']" >> $@ echo " execution_flags_append: ['$(PERMISSIVE_OFF)']" >> $@ echo " execution_flags:" >> $@
BugID:19854862:add disable aos2.1 breakpoint function
@@ -211,7 +211,7 @@ static void ota_download_thread(void *hand) aos_task_delete("event_task"); ota_msleep(500); #endif - tmp_breakpoint = ota_get_break_point(); + tmp_breakpoint = 0; memset(&last_hash, 0x00, sizeof(last_hash)); ota_get_last_hash((char *)&last_hash); if (tmp_breakpoint && (strncmp((char *)&last_hash, ctx->hash, OTA_HASH_LEN) == 0)) {
generic platform: If /bmc in device tree, attempt to init one For the most part, this gets us somewhere on some OpenPOWER systems before there's a platform file for that machine. Useful in bringup only, and marked as such with scary looking log messages.
#include <errorlog.h> #include <bt.h> #include <nvram.h> +#include <platforms/astbmc/astbmc.h> bool manufacturing_mode = false; struct platform platform; @@ -105,7 +106,17 @@ opal_call(OPAL_CEC_REBOOT2, opal_cec_reboot2, 2); static bool generic_platform_probe(void) { + if (dt_find_by_path(dt_root, "bmc")) { + /* We appear to have a BMC... so let's cross our fingers + * and see if we can do anything! + */ + prlog(PR_ERR, "GENERIC BMC PLATFORM: **GUESSING** that there's " + "*maybe* a BMC we can talk to.\n"); + prlog(PR_ERR, "THIS IS ****UNSUPPORTED****, BRINGUP USE ONLY.\n"); + astbmc_early_init(); + } else { uart_init(); + } return true; } @@ -115,8 +126,15 @@ static void generic_platform_init(void) if (uart_enabled()) set_opal_console(&uart_opal_con); + if (dt_find_by_path(dt_root, "bmc")) { + prlog(PR_ERR, "BMC-GUESSWORK: Here be dragons with a taste for human flesh\n"); + astbmc_init(); + } else { + /* Otherwise we go down the ultra-minimal path */ + /* Enable a BT interface if we find one too */ bt_init(); + } /* Fake a real time clock */ fake_rtc_init(); @@ -127,6 +145,23 @@ static int64_t generic_cec_power_down(uint64_t request __unused) return OPAL_UNSUPPORTED; } +static int generic_resource_loaded(enum resource_id id, uint32_t subid) +{ + if (dt_find_by_path(dt_root, "bmc")) + return flash_resource_loaded(id, subid); + + return OPAL_EMPTY; +} + +static int generic_start_preload_resource(enum resource_id id, uint32_t subid, + void *buf, size_t *len) +{ + if (dt_find_by_path(dt_root, "bmc")) + return flash_start_preload_resource(id, subid, buf, len); + + return OPAL_EMPTY; +} + static struct bmc_platform generic_bmc = { .name = "generic", }; @@ -140,6 +175,8 @@ static struct platform generic_platform = { .nvram_start_read = fake_nvram_start_read, .nvram_write = fake_nvram_write, .cec_power_down = generic_cec_power_down, + .start_preload_resource = generic_start_preload_resource, + .resource_loaded = generic_resource_loaded, }; const struct bmc_platform *bmc_platform = &generic_bmc;
core/flash: Log return code when ffs_init() fails Knowing the return code is at least better than not knowing the return code.
@@ -693,7 +693,7 @@ static int flash_load_resource(enum resource_id id, uint32_t subid, rc = ffs_init(0, flash->size, flash->bl, &ffs, 1); if (rc) { - prerror("FLASH: Can't open ffs handle\n"); + prerror("FLASH: Can't open ffs handle: %d\n", rc); goto out_unlock; }
added complete RADIUS frame header
#define WPA_KEY_INFO_ERROR WBIT(10) #define WPA_KEY_INFO_REQUEST WBIT(11) #define WPA_KEY_INFO_ENCR_KEY_DATA WBIT(12) /* IEEE 802.11i/RSN only */ - /*===========================================================================*/ struct radiotap_header { @@ -123,6 +122,13 @@ struct ethernet2_header typedef struct ethernet2_header eth2_t; #define ETH2_SIZE (sizeof(eth2_t)) /*===========================================================================*/ +struct loopback_header +{ + uint32_t family; +} __attribute__((packed)); +typedef struct loopback_header loba_t; +#define LOBA_SIZE (sizeof(loba_t)) +/*===========================================================================*/ #define WLAN_DEVNAMELEN_MAX 16 struct prism_item { @@ -161,14 +167,13 @@ struct ppi_header } __attribute__((packed)); typedef struct ppi_header ppi_t; #define PPI_SIZE (sizeof(ppi_t)) - /*===========================================================================*/ -struct loopback_header +struct fcs_frame { - uint32_t family; -} __attribute__((packed)); -typedef struct loopback_header loba_t; -#define LOBA_SIZE (sizeof(loba_t)) + uint32_t fcs; +}; +typedef struct fcs_frame fcs_t; +#define FCS_SIZE (sizeof(fcs_t)) /*===========================================================================*/ struct qos_frame { @@ -548,12 +553,21 @@ struct tacacsp_frame typedef struct tacacsp_frame tacacsp_t; #define TACACSP_SIZE offsetof(tacacsp_t, data) /*===========================================================================*/ -struct fcs_frame +#define RADIUS_AUTHENTICATOR_LENGTH 16 +#define RADIUS_PASSWORD_BLOCK_SIZE 16 +#define RADIUS_HEADER_LENGTH 20 +#define RADIUS_MAX_SIZE 1000 +#define RADIUS_MAX_ATTRIBUTE_SIZE 253 +struct radius_frame_t { - uint32_t fcs; -}; -typedef struct fcs_frame fcs_t; -#define FCS_SIZE (sizeof(fcs_t)) + uint8_t code; + uint8_t id; + uint16_t length; + uint8_t authenticator[RADIUS_AUTHENTICATOR_LENGTH]; + uint8_t attrs[RADIUS_MAX_SIZE -RADIUS_HEADER_LENGTH]; +} __attribute__ ((packed)); +typedef struct radius_frame radius_t; +#define RADIUS_SIZE offsetof(radius_t, data) /*===========================================================================*/ /* global var */ static const uint8_t nullnonce[] =
SoapyLMS: Revert IQbalance change
@@ -237,7 +237,7 @@ bool SoapyLMS7::hasIQBalance(const int /*direction*/, const size_t /*channel*/) void SoapyLMS7::setIQBalance(const int direction, const size_t channel, const std::complex<double> &balance) { const auto lmsDir = (direction == SOAPY_SDR_TX)?LMS7002M::Tx:LMS7002M::Rx; - double gain = std::abs(balance); if (gain == 0) gain = 1.0; + double gain = std::abs(balance); double gainI = 1.0; if (gain < 1.0) gainI = gain/1.0; double gainQ = 1.0; if (gain > 1.0) gainQ = 1.0/gain; std::unique_lock<std::recursive_mutex> lock(_accessMutex);
Removed reference to kbhit() which is no longer in the code
@@ -153,7 +153,6 @@ int main( void ) /* Start the trace recording - the recording is written to a file if configASSERT() is called. */ printf( "\r\nTrace started.\r\nThe trace will be dumped to disk if a call to configASSERT() fails.\r\n" ); - printf( "Uncomment the call to kbhit() in this file to also dump trace with a key press.\r\n" ); uiTraceStart(); } #endif
interface: update CONTRIBUTING.md
@@ -28,12 +28,13 @@ module.exports = { ``` Change the URL to your livenet ship (if making front-end changes) or keep it the -same (if [developing on a local development ship][local]). Then, from -'pkg/interface': +same (if [developing on a local development ship][local]). Then, from the root +of the repository -``` -npm ci -npm run start +```bash +npm i +npm run bootstrp +cd pkg/interface && npm run start ``` The dev server will start at `http://localhost:9000`. Sign in as you would
fix:fix ethereum test case(test_001CreateWallet_0017CreateSixWalletUnloadTwoCreateOne)
@@ -505,6 +505,7 @@ END_TEST START_TEST(test_001CreateWallet_0017CreateSixWalletUnloadTwoCreateOne) { BSINT32 rtnVal; + BoatIotSdkInit(); BoatEthWalletConfig wallet = get_ethereum_wallet_settings(); extern BoatIotSdkContext g_boat_iot_sdk_context; wallet.prikeyCtx_config.prikey_genMode = BOAT_WALLET_PRIKEY_GENMODE_INTERNAL_GENERATION;
prevent overflow in allocation of RLE buufer
@@ -24,6 +24,10 @@ RleCompressor::RleCompressor (const Header &hdr, size_t maxScanLineSize): _tmpBuffer (0), _outBuffer (0) { + if(maxScanLineSize > std::numeric_limits<int>::max()) + { + throw IEX_NAMESPACE::OverflowExc ("ScanLine size too large for RleCompressor"); + } _tmpBuffer = new char [maxScanLineSize]; _outBuffer = new char [uiMult (maxScanLineSize, size_t (3)) / 2]; }
Fix typo in psa config comment Change "are" to "aren't" to avoid making the comment misleading.
@@ -253,7 +253,7 @@ extern "C" { #endif /* PSA_WANT_ALG_STREAM_CIPHER */ /* The MBEDTLS_PSA_HAVE_SOFT_KEY_TYPE_* are defined if a key type is selected, - * but we are configured to accelerate this key type. */ + * but we aren't configured to accelerate this key type. */ #if defined(PSA_WANT_KEY_TYPE_AES) && !defined(MBEDTLS_PSA_ACCEL_KEY_TYPE_AES) #define PSA_HAVE_SOFT_KEY_TYPE_AES 1 #endif
Bugfix for wpaclean detection.
@@ -1219,7 +1219,7 @@ while((pcapstatus = pcap_next_ex(pcapin, &pkh, &packet)) != -2) continue; packetcount++; - if((pkh->ts.tv_sec == 0) && (pkh->ts.tv_sec == 0)) + if((pkh->ts.tv_sec == 0) && (pkh->ts.tv_usec == 0)) wcflag = true;
Split attestation results generation into a separate call
@@ -183,31 +183,51 @@ Inputs: supports one format, but some plugins might accept either JWT or CWT for instance, and supplying this avoids having to implement format detection heuristics by trying to parse the buffer. -* Requested Attestation Results format (e.g., CWT, JWT, X.509, etc.). - Defaults to letting the plugin choose one. Outputs: -* Attestation Results buffer OCTET STRING -* Format used for Attestation Results buffer +* Claim set HANDLE Return status codes: -* Success indicates that Attestation Results were generated as requested +* Success indicates that the Evidence was recognized as trusted + and a Claim set handle was generated as requested * Invalid-handle indicates that the appraisal policy handle is not valid * Untrusted-Results indicates that the Evidence did not pass appraisal, - but that signed Attestation Results were generated saying so + but a Claim set handle was still generated * Failed-to-get-endorsements indicates that the call failed because necessary endorsements could not be obtained * Specified-format-not-supported indicates that the specified Evidence format is not supported -* Requested-format-not-supported indicates that the requested - Attestation Results format could not be used * Parse-error indicates that the Evidence buffer provided could not be correctly parsed * Other failure indicates that the call failed for any other reason This is the main attestation functionality of the Verifier. +A pure Verifier would pass the output handle to GetAttestationResults +in order to generated signed AttestationResults. A combined +Verifier/Relying Party could simply use it with GetClaimValue (see below). + +## GetAttestationResults call + +Inputs: + +* Claim set HANDLE +* Requested Attestation Results format (e.g., CWT, JWT, X.509, etc.). + Defaults to letting the plugin choose one. + +Outputs: + +* Attestation Results buffer OCTET STRING +* Format used for Attestation Results buffer + +Return status codes: + +* Success indicates that Attestation Results were generated as requested +* Invalid-handle indicates that the claim set handle is not valid +* Requested-format-not-supported indicates that the requested + Attestation Results format could not be used +* Other failure indicates that the call failed for any other reason # Relying Party APIs
Test XML_ParserReset in internal entity expansion
@@ -1469,7 +1469,6 @@ START_TEST(test_set_base) } END_TEST - /* Test attribute counts, indexing, etc */ typedef struct attrInfo { const char *name; @@ -1566,6 +1565,34 @@ START_TEST(test_attributes) } END_TEST +/* Test reset works correctly in the middle of processing an internal + * entity. Exercises some obscure code in XML_ParserReset(). + */ +START_TEST(test_reset_in_entity) +{ + const char *text = + "<!DOCTYPE doc [\n" + "<!ENTITY wombat 'wom'>\n" + "<!ENTITY entity 'hi &wom; there'>\n" + "]>\n" + "<doc>&entity;</doc>"; + XML_ParsingStatus status; + + resumable = XML_TRUE; + XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler); + if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_FALSE) == XML_STATUS_ERROR) + xml_failure(parser); + XML_GetParsingStatus(parser, &status); + if (status.parsing != XML_SUSPENDED) + fail("Parsing status not SUSPENDED"); + XML_ParserReset(parser, NULL); + XML_GetParsingStatus(parser, &status); + if (status.parsing != XML_INITIALIZED) + fail("Parsing status doesn't reset to INITIALIZED"); +} +END_TEST + + /* * Namespaces tests. */ @@ -2487,6 +2514,7 @@ make_suite(void) tcase_add_test(tc_basic, test_set_foreign_dtd); tcase_add_test(tc_basic, test_set_base); tcase_add_test(tc_basic, test_attributes); + tcase_add_test(tc_basic, test_reset_in_entity); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,
revert empty lines
@@ -766,6 +766,7 @@ static void CalcBestScoreLeafwise( TVector<TCandidatesContext>* candidatesContexts, // [dataset] TFold* fold, TLearnContext* ctx) { + TVector<std::pair<size_t, size_t>> tasks; // vector of (contextIdx, candId) for (auto contextIdx : xrange(candidatesContexts->size())) { @@ -1122,7 +1123,6 @@ static void MarkFeaturesAsUsed( } } - static TSplitTree GreedyTensorSearchOblivious( const TTrainingDataProviders& data, double modelLength,
Use nanosleep instead of usleep; usleep is deprecated and does not exist on some new Linux systems.
#include "platform.h" -#include <unistd.h> #include <string.h> +#include <time.h> #include "platform_glfw.c.h" @@ -9,7 +9,11 @@ const char* lovrPlatformGetName() { } void lovrPlatformSleep(double seconds) { - usleep((unsigned int) (seconds * 1000000)); + seconds += .5e-9; + struct timespec t; + t.tv_sec = seconds; + t.tv_nsec = (seconds - t.tv_sec) * 1e9L; + while (nanosleep(&t, &t)); } void lovrPlatformOpenConsole() {
Cleanup no attrib warning in clang
@@ -52,7 +52,11 @@ typedef struct sdd { #define SDD_HDR(s) ((sdd_header *)s - 1) #if defined(__GNUC__) || defined(__clang__) +#if __has_attribute(noinline) && __has_attribute(noclone) #define SDD_NOINLINE __attribute__((noinline, noclone)) +#else +#define SDD_NOINLINE __attribute__((noinline)) +#endif #elif defined(_MSC_VER) #define SDD_NOINLINE __declspec(noinline) #else
OpenCoreDevProps: Remove redundant arguments
@@ -156,8 +156,7 @@ OcLoadDevPropsSupport ( DEBUG_INFO, "OC: Setting devprop %a:%a - ignored, exists\n", AsciiDevicePath, - AsciiProperty, - Status + AsciiProperty )); }
add gdal libs (test)
<Abi>armeabi-v7a</Abi> <Link>armeabi-v7a\libcarto_mobile_sdk.so</Link> </EmbeddedNativeLibrary> + <EmbeddedNativeLibrary Include="$baseDir\prebuilt\gdal\libs\armeabi-v7a\libgdal.so"> + <Abi>armeabi-v7a</Abi> + <Link>armeabi-v7a\libgdal.so</Link> + </EmbeddedNativeLibrary> + <EmbeddedNativeLibrary Include="$baseDir\prebuilt\gdal\libs\armeabi-v7a\libproj.so"> + <Abi>armeabi-v7a</Abi> + <Link>armeabi-v7a\libproj.so</Link> + </EmbeddedNativeLibrary> <EmbeddedNativeLibrary Include="$buildDir\..\xamarin_android-x86\libcarto_mobile_sdk.so"> <Abi>x86</Abi> <Link>x86\libcarto_mobile_sdk.so</Link> </EmbeddedNativeLibrary> + <EmbeddedNativeLibrary Include="$baseDir\prebuilt\gdal\libs\x86\libgdal.so"> + <Abi>x86</Abi> + <Link>x86\libgdal.so</Link> + </EmbeddedNativeLibrary> + <EmbeddedNativeLibrary Include="$baseDir\prebuilt\gdal\libs\x86\libproj.so"> + <Abi>x86</Abi> + <Link>x86\libproj.so</Link> + </EmbeddedNativeLibrary> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" /> <ItemGroup>
Fix typo in DeserializeResGroupInfo() len was used instead of cpuset_len. In most of cases this resulted in garbage being copied. But rare out-of-page reads could cause a crash.
@@ -2539,7 +2539,7 @@ DeserializeResGroupInfo(struct ResGroupCaps *capsOut, cpuset_len = ntohl(itmp); if (cpuset_len >= sizeof(capsOut->cpuset)) elog(ERROR, "malformed serialized resource group info"); - memcpy(capsOut->cpuset, ptr, len); ptr += cpuset_len; + memcpy(capsOut->cpuset, ptr, cpuset_len); ptr += cpuset_len; capsOut->cpuset[cpuset_len] = '\0'; memcpy(&itmp, ptr, sizeof(int32)); ptr += sizeof(int32);
Fix block-size determination for decode passes
@@ -344,7 +344,7 @@ int init_astcenc_config( { block_x = comp_image.block_x; block_y = comp_image.block_y; - block_z = comp_image.block_y; + block_z = comp_image.block_z; } astcenc_preset preset = ASTCENC_PRE_FAST;
use net_socket so that in adheres the global ipv4/ipv6 setting
#include "ext-lpd.h" -// Set a socket non-blocking; defined in src/net.c -int net_set_nonblocking( int fd ); - enum { // Packets per minute to be handled PACKET_LIMIT_MAX = 20, @@ -111,11 +108,7 @@ int create_send_socket( int af, const char ifname[] ) { const int opt_off = 0; int sock; - if( (sock = socket( af, SOCK_DGRAM, IPPROTO_IP ) ) < 0 ) { - goto fail; - } - - if( net_set_nonblocking( sock ) != 0 ) { + if( (sock = net_socket( "LPD", ifname, IPPROTO_IP, af ) ) < 0 ) { goto fail; } @@ -158,17 +151,11 @@ fail: } int create_receive_socket( const IP *addr, const char ifname[] ) { - const int opt_on = 1; const int opt_off = 0; const int af = addr->ss_family; + int sock; - int sock = socket( addr->ss_family, SOCK_DGRAM, IPPROTO_IP ); - - if( net_set_nonblocking( sock ) != 0 ) { - goto fail; - } - - if( setsockopt( sock, SOL_SOCKET, SO_REUSEADDR, (void const*) &opt_on, sizeof(opt_on) ) != 0 ) { + if( (sock = net_socket( "LPD", ifname, IPPROTO_IP, af ) ) < 0 ) { goto fail; }
Fix CID : Null pointer dereference in self_test.c
@@ -174,8 +174,10 @@ static int verify_integrity(OSSL_CORE_BIO *bio, OSSL_FUNC_BIO_read_ex_fn read_ex OSSL_SELF_TEST_onbegin(ev, event_type, OSSL_SELF_TEST_DESC_INTEGRITY_HMAC); mac = EVP_MAC_fetch(libctx, MAC_NAME, NULL); + if (mac == NULL) + goto err; ctx = EVP_MAC_CTX_new(mac); - if (mac == NULL || ctx == NULL) + if (ctx == NULL) goto err; *p++ = OSSL_PARAM_construct_utf8_string("digest", DIGEST_NAME,
Improve FAQ explanations
@@ -32,7 +32,16 @@ in the release, so it should work out-of-the-box. ### Device unauthorized -Check [stackoverflow][device-unauthorized]. + +> error: device unauthorized. +> This adb server's $ADB_VENDOR_KEYS is not set +> Try 'adb kill-server' if that seems wrong. +> Otherwise check for a confirmation dialog on your device. + +When connecting, a popup should open on the device. You must authorize USB +debugging. + +If it does not open, check [stackoverflow][device-unauthorized]. [device-unauthorized]: https://stackoverflow.com/questions/23081263/adb-android-device-unauthorized @@ -62,7 +71,7 @@ the identifier of the device you want to mirror must be provided: scrcpy -s 01234567890abcdef ``` -Note that if your device is connected over TCP/IP, you'll get this message: +Note that if your device is connected over TCP/IP, you might get this message: > adb: error: more than one device/emulator > ERROR: "adb reverse" returned with value 1
doc: test for simple xsd edit CI test for simple xsd edit
severity and intent: - 1 (LOG_FATAL) system is unusable -- 2 (LOG_ACRN) +- 2 (LOG_ACRN) hypervisor failure - 3 (LOG_ERROR) error conditions - 4 (LOG_WARNING) warning conditions - 5 (LOG_INFO) informational
Remove --fullscreen validation Many options are meaningless if --no-display is set. We don't want to validate all possible combinations, so don't make an exception for --fullscreen.
@@ -628,11 +628,6 @@ scrcpy_parse_args(struct scrcpy_cli_args *args, int argc, char *argv[]) { return false; } - if (!opts->display && opts->fullscreen) { - LOGE("-f/--fullscreen-window is incompatible with -N/--no-display"); - return false; - } - int index = optind; if (index < argc) { LOGE("Unexpected additional argument: %s", argv[index]);
Date: update return values
@@ -413,6 +413,7 @@ static int validateDate (Key * key, Key * parentKey) if (rc == -1) { ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_D_T_FMT, parentKey, "%s doesn't match format string %s", date, formatString); + rc = 0; } } else if (!strcasecmp (stdString, "ISO8601")) @@ -425,11 +426,11 @@ static int validateDate (Key * key, Key * parentKey) formatString); else ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_D_T_FMT, parentKey, "%s is not a valid ISO8601 date", date); + rc = 0; } else if (rc == 0) { ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_D_T_FMT, parentKey, "syntax error in ISO8601 format string '%s'", formatString); - rc = -1; } } else if (!strcasecmp (stdString, "RFC2822")) @@ -438,6 +439,7 @@ static int validateDate (Key * key, Key * parentKey) if (rc == -1) { ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_D_T_FMT, parentKey, "%s doesn't match rfc2822 specification", date); + rc = 0; } } else if (!strcasecmp (stdString, "RFC822")) @@ -446,6 +448,7 @@ static int validateDate (Key * key, Key * parentKey) if (rc == -1) { ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_D_T_FMT, parentKey, "%s doesn't match format string %s", date, formatString); + rc = 0; } } @@ -478,7 +481,7 @@ int elektraDateGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned ELEKTRA_UN if (meta) { int r = validateDate (cur, parentKey); - if (r == -1) + if (r == 0) { rc = -1; } @@ -499,7 +502,7 @@ int elektraDateSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned ELEKTRA_UN if (meta) { int r = validateDate (cur, parentKey); - if (r == -1) + if (r == 0) { rc = -1; }
Maybe a bit more visible install command
@@ -47,7 +47,11 @@ You can then subsequently uninstall MangoHud via the following command #### GitHub releases -If you do not wish to compile anything, simply download the file under [Releases](https://github.com/flightlessmango/MangoHud/releases), extract it, and run `./mangohud-setup.sh install` from within the extracted folder. +If you do not wish to compile anything, simply download the file under [Releases](https://github.com/flightlessmango/MangoHud/releases), extract it, and from within the extracted folder in terminal, execute: + +``` +./mangohud-setup.sh install +``` #### Arch-based distributions
Automatically annotate tf graph with gradients
#define CFL_SIZE sizeof(complex float) #endif - +//#define TF_AUTOGRAD 1 +// The TensorFlow C API does not support all gradients +// Thus we require that the TensorFlow graph is annotated with gradients #ifdef TENSORFLOW @@ -427,6 +429,41 @@ static bool cmp_arg(struct tf_arg arg1, struct tf_arg arg2) return result; } +#ifdef TF_AUTOGRAD + +static void tf_add_placeholder_same_shape(TF_Graph* graph, const char* name, TF_Status* status, struct TF_Output out) +{ +#ifdef TENSORFLOW + TF_OperationDescription* desc = TF_NewOperation(graph, "Placeholder", name); + + int N = TF_GraphGetTensorNumDims(graph, out, status); + + if (TF_GetCode(status) != TF_OK) + error("Add Tensorflow Placeholder failed: %s\n", TF_Message(status)); + + long tdims[N ?: 1]; + TF_GraphGetTensorShape(graph, out, tdims, N, status); + + if (TF_GetCode(status) != TF_OK) + error("Add Tensorflow Placeholder failed: %s\n", TF_Message(status)); + + TF_DataType type = TF_OperationOutputType(out); + + TF_SetAttrType(desc, "dtype", type); + TF_SetAttrShape(desc, "shape", tdims, N); + TF_FinishOperation(desc, status); + + if (TF_GetCode(status) != TF_OK) + error("Add Tensorflow Placeholder failed: %s\n", TF_Message(status)); +#else + UNUSED(graph); + UNUSED(name); + UNUSED(status); + UNUSED(out); +#endif +} +#endif + const struct nlop_s* nlop_tf_create(int OO, int II, const char* path, bool session) { assert(1 == OO); @@ -477,8 +514,15 @@ const struct nlop_s* nlop_tf_create(int OO, int II, const char* path, bool sessi (*nr_out_dim)[i] = arg.N; (*out_dims_tf)[i] = arg.dims; +#ifdef TF_AUTOGRAD + char grad_ys_name[20]; + sprintf(grad_ys_name, "grad_ys_bart_%d", i); + + tf_add_placeholder_same_shape(graph, grad_ys_name, status, arg.out); +#else char grad_ys_name[20]; sprintf(grad_ys_name, "grad_ys_%d", i); +#endif struct tf_arg arg_grad_y = process_arg(graph, grad_ys_name, status); @@ -528,6 +572,13 @@ const struct nlop_s* nlop_tf_create(int OO, int II, const char* path, bool sessi (*nr_in_dim)[i] = arg.N; (*in_dims_tf)[i] = arg.dims; +#ifdef TF_AUTOGRAD +#ifdef TENSORFLOW + TF_AddGradients(graph, data->outputs_op, 1, (*inputs_op) + i, 1, data->grad_ys_op, data->status, (*grad_op) + i); + if (TF_GetCode(status) != TF_OK) + error("Add Tensorflow Gradient failed: %s\n", TF_Message(status)); +#endif +#else char grad_name[20]; sprintf(grad_name, "grad_%d", i); @@ -538,6 +589,7 @@ const struct nlop_s* nlop_tf_create(int OO, int II, const char* path, bool sessi error("Tensorflow input and corresponding gradient do not have the same shape!"); (*grad_op)[i] = arg_grad.out; +#endif } data->inputs_op = *PTR_PASS(inputs_op);
ini: reset removeSectionKey only when needed
@@ -1263,9 +1263,12 @@ static int iniWriteKeySet (FILE * fh, Key * parentKey, KeySet * returned, IniPlu } else { - if (removeSectionKey) keyDel (sectionKey); - sectionKey = parentKey; + if (removeSectionKey) + { + keyDel (sectionKey); removeSectionKey = 0; + } + sectionKey = parentKey; fprintf (fh, "[]\n"); } }
[Tools] add IAR get version support
@@ -156,3 +156,38 @@ def IARProject(target, script): out.close() IARWorkspace(target) + +def IARVersion(): + import subprocess + import re + + def IARPath(): + import rtconfig + + # set environ + old_environ = os.environ + os.environ['RTT_CC'] = 'iar' + reload(rtconfig) + + # get iar path + path = rtconfig.EXEC_PATH + + # restore environ + os.environ = old_environ + reload(rtconfig) + + return path + + path = IARPath(); + + if os.path.exists(path): + cmd = os.path.join(path, 'iccarm.exe') + else: + print('Get IAR version error. Please update IAR installation path in rtconfig.h!') + return "0.0" + + child = subprocess.Popen([cmd, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) + stdout, stderr = child.communicate() + + # example stdout: IAR ANSI C/C++ Compiler V8.20.1.14183/W32 for ARM + return re.search('[\d\.]+', stdout).group(0) \ No newline at end of file
Update FreeRTOS_ARP.c
@@ -607,7 +607,7 @@ NetworkBufferDescriptor_t *pxNetworkBuffer; #if ( ipconfigHAS_DEBUG_PRINTF != 0 ) FreeRTOS_printf( ( "xNetworkInterfaceOutput failed. Link down?\n" ) ); #else - ; + ; /* Do nothing */ #endif } }
feat(Makefile): replace existing member, instead of always appending
@@ -259,15 +259,15 @@ all_api_libs : $(LIBDISCORD) $(LIBGITHUB) $(LIBREDDIT) $(LIBSLACK) $(LIBADDONS) # API libraries compilation $(LIBDISCORD) : $(CEE_UTILS_OBJS) $(COMMON_OBJS) $(DISCORD_OBJS) | $(LIBDIR) - $(AR) -cvq $@ $^ + $(AR) -cqsv $@ $? $(LIBGITHUB) : $(CEE_UTILS_OBJS) $(COMMON_OBJS) $(GITHUB_OBJS) | $(LIBDIR) - $(AR) -cvq $@ $^ + $(AR) -cqsv $@ $? $(LIBREDDIT) : $(CEE_UTILS_OBJS) $(COMMON_OBJS) $(REDDIT_OBJS) | $(LIBDIR) - $(AR) -cvq $@ $^ + $(AR) -cqsv $@ $? $(LIBSLACK) : $(CEE_UTILS_OBJS) $(COMMON_OBJS) $(SLACK_OBJS) | $(LIBDIR) - $(AR) -cvq $@ $^ + $(AR) -cqsv $@ $? $(LIBADDONS) : $(CEE_UTILS_OBJS) $(COMMON_OBJS) $(ADDONS_OBJS) | $(LIBDIR) - $(AR) -cvq $@ $^ + $(AR) -cqsv $@ $? mujs: $(MAKE) -C mujs
SOVERSION bump to version 5.5.11
@@ -45,7 +45,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 5) -set(SYSREPO_MICRO_SOVERSION 10) +set(SYSREPO_MICRO_SOVERSION 11) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
Limit driver spam
@@ -1004,7 +1004,7 @@ static ButtonQueueEntry *incrementAndPostButtonQueue(SurviveObject *so) { ButtonQueueEntry *entry = &(ctx->buttonQueue.entry[ctx->buttonQueue.nextWriteIndex]); - SV_VERBOSE(100, "%s Button event %s %d %s %f", survive_colorize_codename(so), + SV_VERBOSE(110, "%s Button event %s %d %s %f", survive_colorize_codename(so), SurviveInputEventStr(entry->eventType), entry->buttonId, SurviveAxisStr(so->object_subtype, entry->ids[0]), entry->axisValues[0]); @@ -1694,7 +1694,7 @@ static void handle_battery(SurviveObject *w, uint8_t batStatus) { w->charging = charging; w->charge = percent; SurviveContext *ctx = w->ctx; - SV_VERBOSE(100, "%s Battery charge %d%%(%s)", w->codename, percent, charging ? "Charging" : "Not charging"); + SV_VERBOSE(110, "%s Battery charge %d%%(%s)", w->codename, percent, charging ? "Charging" : "Not charging"); } }
chat-cli: use name:title
++ connect ^- move [ost.bowl %peer /chat-store [our-self %chat-store] /updates] -:: +true-self: moons to planets -:: -++ true-self - |= who=ship - ^- ship - ?. ?=(%earl (clan:title who)) who - (sein:title our.bowl now.bowl who) -++ our-self (true-self our.bowl) +:: +++ our-self (name:title our.bowl) :: +target-to-path: prepend ship to the path :: ++ target-to-path
Update hcd_rp2040.c Remove reference to the deprecated "num" and "in" members of struct hw_endpoint which still exist in an assert statement and break DEBUG builds.
@@ -487,7 +487,6 @@ bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet // EP0 out _hw_endpoint_init(ep, dev_addr, 0x00, ep->wMaxPacketSize, 0, 0); assert(ep->configured); - assert(ep->num == 0 && !ep->in); ep->total_len = 8; ep->transfer_size = 8; ep->active = true;
output: fix protocol loader/check
#include <fluent-bit/flb_utils.h> #include <fluent-bit/flb_plugin_proxy.h> -#define protcmp(a, b) strncasecmp(a, b, strlen(a)) - /* Validate the the output address protocol */ static int check_protocol(char *prot, char *output) { int len; + char *p; - len = strlen(prot); - if (len > strlen(output)) { - return 0; + p = strstr(output, "://"); + if (p && p != output) { + len = p - output; + } + else { + len = strlen(output); } - if (protcmp(prot, output) != 0) { + if (strlen(prot) != len) { return 0; } + /* Output plugin match */ + if (strncasecmp(prot, output, len) == 0) { return 1; } + return 0; +} + /* Invoke pre-run call for the output plugin */ void flb_output_pre_run(struct flb_config *config) { @@ -233,7 +240,7 @@ struct flb_output_instance *flb_output_new(struct flb_config *config, /* Create and load instance */ instance = flb_calloc(1, sizeof(struct flb_output_instance)); if (!instance) { - perror("malloc"); + flb_errno(); return NULL; } instance->config = config;
lindar: add define CONFIG_CMD_TCPC_DUMP add EC console command for TCPC dump. BRANCH=firmware-volteer-13672.B TEST=make buildall -j
#undef CONFIG_USBC_RETIMER_INTEL_BB #undef CONFIG_USBC_RETIMER_INTEL_BB_RUNTIME_CONFIG +/* EC console commands */ +#define CONFIG_CMD_TCPC_DUMP + /* * Macros for GPIO signals used in common code that don't match the * schematic names. Signal names in gpio.inc match the schematic and are
gsettings: fix sentence
@@ -36,7 +36,7 @@ add_library (elektrasettings SHARED elektrasettingsbackend.c ${ELEKTRA_HEADERS}) set (GSETTINGS_MODULE_PRIORITY 50 CACHE STRING - "GIO Module Priority. Higher than 100 means dconf backend will be default.") + "GIO Module Priority. Higher than 100 means the Elektra gsettings backend will be default.") target_compile_definitions (elektrasettings PRIVATE G_ELEKTRA_SETTINGS_MODULE_PRIORITY=${GSETTINGS_MODULE_PRIORITY}) if (GELEKTRA_LIBRARY) include (LibFindMacros)
docker: remove moreutils+pip from stretch
@@ -16,7 +16,6 @@ RUN apt-get update \ ruby \ ruby-dev \ python-all \ - python-pip \ python3-all \ libpython3-dev \ dh-exec \ @@ -73,11 +72,9 @@ RUN apt-get update \ lcov \ icheck \ valgrind \ - moreutils \ && rm -rf /var/lib/apt/lists/* RUN cabal update && cabal install hspec QuickCheck -RUN pip install --upgrade cmake_format pyyaml # Google Test ENV GTEST_ROOT=/opt/gtest
Example slip-radio: do not compile for native
@@ -2,6 +2,9 @@ CONTIKI_PROJECT=slip-radio all: $(CONTIKI_PROJECT) MODULES += os/services/slip-cmd +# slip-radio is only intended for platforms with SLIP support +PLATFORMS_EXCLUDE = native + CONTIKI=../.. include $(CONTIKI)/Makefile.identify-target
Give each platform it's own dedicated SWO port otherwise they could collide.
@@ -36,17 +36,17 @@ CONNECTION_LIST = [None, # Instance 0, Lint, no connection, no need for a l "gdb_port": u_utils.STLINK_GDB_PORT + 2}, # Instance 12, NRF52, SARA-R412M-02B {"lock": None, "serial_port": "COM7", "debugger": "683920969", - "swo_port": u_utils.JLINK_SWO_PORT + 1}, + "swo_port": u_utils.JLINK_SWO_PORT + 3}, # Instance 13, C208 with SARA-R412M-02B connected via Segger J-Link box {"lock": None, "serial_port": "COM12", "debugger": "50102100", - "swo_port": u_utils.JLINK_SWO_PORT + 2}, + "swo_port": u_utils.JLINK_SWO_PORT + 4}, # Instance 14, C030-U201 board (STM32F4), live network 3G {"lock": None, "serial_port": "COM4", "debugger": "066FFF565053787567193329", - "swo_port": u_utils.STLINK_SWO_PORT + 3, + "swo_port": u_utils.STLINK_SWO_PORT + 5, "gdb_port": u_utils.STLINK_GDB_PORT + 3}, # Instance 15, NRF53: the COM port is the lowest numbered of the three {"lock": None, "serial_port": "COM15", "debugger": "960115898", - "swo_port": u_utils.JLINK_SWO_PORT + 3}] + "swo_port": u_utils.JLINK_SWO_PORT + 6}] def init_locks(manager): '''Create locks'''
misc/opts.c: check result of opt_uint
@@ -490,7 +490,10 @@ bool opt_int(void* ptr, char c, const char* optarg) bool opt_uint(void* ptr, char c, const char* optarg) { UNUSED(c); - *(unsigned int*)ptr = atoi(optarg); + int val = atoi(optarg); + if (0 > val) + error("Argument to opt_uint must be unsigned"); + *(unsigned int*)ptr = (unsigned int) val; return false; }
crypto: fix set crypto handlers Type: fix
@@ -172,7 +172,7 @@ vnet_crypto_set_handler2 (char *alg_name, char *engine, if (!p) return -1; - for (i = 0; i < VNET_CRYPTO_OP_N_TYPES; i += 2) + for (i = 0; i < VNET_CRYPTO_OP_N_TYPES; i++) { vnet_crypto_op_data_t *od; vnet_crypto_op_id_t id = ad->op_by_type[i];
tests/posix: don't refer to SIGCANCEL on host-libc
@@ -156,7 +156,9 @@ static void test_sigmask() { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGUSR1); +#ifndef USE_HOST_LIBC sigaddset(&set, SIGCANCEL); +#endif assert(!pthread_attr_init(&attr)); assert(!pthread_attr_setsigmask_np(&attr, &set)); @@ -167,8 +169,10 @@ static void test_sigmask() { assert(!pthread_attr_getsigmask_np(&attr, &other_set)); assert(sigismember(&other_set, SIGUSR1)); +#ifndef USE_HOST_LIBC // Test whether internal signals get filtered properly. assert(!sigismember(&other_set, SIGCANCEL)); +#endif } static void *getattr_worker(void *arg) {
Improve error handling in pg_regress for commit
@@ -782,6 +782,12 @@ convert_sourcefiles_in(char *source_subdir, char *dest_dir, char *dest_subdir, c repls.content_zero_hostname = content_zero_hostname; repls.username = get_user_name(&errstr); + if (repls.username == NULL) + { + fprintf(stderr, "%s: %s\n", progname, errstr); + exit_nicely(2); + } + /* finally loop on each file and do the replacement */ for (name = names; *name; name++) { @@ -3235,7 +3241,7 @@ get_host_name(int16 contentid, char role) hostname = psprintf("%s", trim_white_space(line)); - if (hostname == NULL) + if (strcmp("", hostname) == 0) { fprintf(stderr, _("%s: failed to determine hostname for content 0 primary\n"), progname);
examples/unionfs: Remove [a|b]testdir.h in distclean
@@ -72,5 +72,7 @@ context:: romfs_atestdir.h romfs_btestdir.h distclean:: $(call DELFILE, atestdir.img) $(call DELFILE, btestdir.img) + $(call DELFILE, atestdir.h) + $(call DELFILE, btestdir.h) include $(APPDIR)/Application.mk
docs: describe clib_time monotonic timebase support Type: docs
@@ -170,6 +170,74 @@ the rate adjustment algorithm. The code rejects frequency samples corresponding to the sort of adjustment which might occur if someone changes the gold standard kernel clock by several seconds. +### Monotonic timebase support + +Particularly during system initialization, the "gold standard" system +reference clock can change by a large amount, in an instant. It's not +a best practice to yank the reference clock - in either direction - by +hours or days. In fact, some poorly-constructed use-cases do so. + +To deal with this reality, clib_time_now(...) returns the number of +seconds since vpp started, *guaranteed to be monotonically +increasing, no matter what happens to the system reference clock*. + +This is first-order important, to avoid breaking every active timer in +the system. The vpp host stack alone may account for tens of millions +of active timers. It's utterly impractical to track down and fix +timers, so we must deal with the issue at the timebase level. + +Here's how it works. Prior to adjusting the clock rate, we collect the +kernel reference clock and the cpu clock: + +``` + /* Ask the kernel and the CPU what time it is... */ + now_reference = unix_time_now (); + now_clock = clib_cpu_time_now (); +``` + +Compute changes for both clocks since the last rate adjustment, +roughly 15 seconds ago: + +``` + /* Compute change in the reference clock */ + delta_reference = now_reference - c->last_verify_reference_time; + + /* And change in the CPU clock */ + delta_clock_in_seconds = (f64) (now_clock - c->last_verify_cpu_time) * + c->seconds_per_clock; +``` + +Delta_reference is key. Almost 100% of the time, delta_reference and +delta_clock_in_seconds are identical modulo one system-call +time. However, NTP or a privileged user can yank the system reference +time - in either direction - by an hour, a day, or a decade. + +As described above, clib_time_now(...) must return monotonically +increasing answers to the question "how long has it been since vpp +started, in seconds." To do that, the clock rate adjustment algorithm +begins by recomputing the initial reference time: + +``` + c->init_reference_time += (delta_reference - delta_clock_in_seconds); +``` + +It's easy to convince yourself that if the reference clock changes by +15.000000 seconds and the cpu clock tick time changes by 15.000000 +seconds, the initial reference time won't change. + +If, on the other hand, delta_reference is -86400.0 and delta clock is +15.0 - reference time jumped backwards by exactly one day in a +15-second rate update interval - we add -86415.0 to the initial +reference time. + +Given the corrected initial reference time, we recompute the total +number of cpu ticks which have occurred since the corrected initial +reference time, at the current clock tick rate: + +``` + c->total_cpu_time = (now_reference - c->init_reference_time) + * c->clocks_per_second; +``` Format ------
Added lv_dropdown_clear_options, convert options when adding
@@ -177,6 +177,26 @@ void lv_dropdown_set_text(lv_obj_t * ddlist, const char * txt) lv_obj_invalidate(ddlist); } +/** + * Clear any options in a drop down list. Static or dynamic. + * @param ddlist pointer to drop down list object + */ +void lv_dropdown_clear_options(lv_obj_t * ddlist) +{ + LV_ASSERT_OBJ(ddlist, LV_OBJX_NAME); + lv_dropdown_ext_t * ext = lv_obj_get_ext_attr(ddlist); + if(ext->options == NULL) return; + + if(ext->static_txt == 0) + lv_mem_free(ext->options); + + ext->options = NULL; + ext->static_txt = 0; + ext->option_cnt = 0; + + lv_obj_invalidate(ddlist); +} + /** * Set the options in a drop down list from a string * @param ddlist pointer to drop down list object @@ -262,11 +282,17 @@ void lv_dropdown_add_option(lv_obj_t * ddlist, const char * option, uint16_t pos lv_dropdown_ext_t * ext = lv_obj_get_ext_attr(ddlist); - /*Clear any existing static options*/ + /*Convert static options to dynmaic*/ if(ext->static_txt != 0) { - ext->options = NULL; + char * static_options = ext->options; + size_t len = strlen(static_options) + 1; + + ext->options = lv_mem_alloc(len); + LV_ASSERT_MEM(ext->options); + if(ext->options == NULL) return; + + strcpy(ext->options, static_options); ext->static_txt = 0; - ext->option_cnt = 0; } /*Allocate space for the new option*/
blockresolver: Fix testmod
@@ -30,7 +30,7 @@ static void test_BlockresolverRead (char * fileName) output_error (parentKey); Plugin * storage = elektraPluginOpen ("mini", modules, ksNew (0, KS_END), 0); succeed_if (storage->kdbGet (storage, ks, parentKey) >= 0, "storage->kdbGet failed"); - succeed_if (!strcmp (keyString (ksLookupByName (ks, "system/test/blockresolver-read/section/key", 0)), "inside block"), + succeed_if (!strcmp (keyString (ksLookupByName (ks, "system/test/blockresolver-read/key", 0)), "inside block"), "blockresolver failed to resolve requested block"); elektraPluginClose (storage, 0); elektraPluginClose (resolver, 0); @@ -64,7 +64,7 @@ static void test_BlockresolverWrite (char * fileName, char * compareName) succeed_if (resolver->kdbGet (resolver, ks, parentKey) >= 0, "blockresolver->kdbGet failed"); Plugin * storage = elektraPluginOpen ("mini", modules, ksNew (0, KS_END), 0); succeed_if (storage->kdbGet (storage, ks, parentKey) >= 0, "storage->kdbGet failed"); - keySetString (ksLookupByName (ks, "system/test/blockresolver-write/section/key", 0), "only the inside has changed"); + keySetString (ksLookupByName (ks, "system/test/blockresolver-write/key", 0), "only the inside has changed"); succeed_if (storage->kdbSet (storage, ks, parentKey) >= 0, "storage->kdbSet failed"); succeed_if (resolver->kdbSet (resolver, ks, parentKey) >= 0, "blockresolver->kdbSet failed"); succeed_if (resolver->kdbSet (resolver, ks, parentKey) >= 0, "blockresolver->kdbSet failed");
chat: bump url message size
@@ -196,7 +196,7 @@ export class MessageWithSigil extends PureComponent<MessageProps> { scrollWindow={scrollWindow} className="fl pr3 v-top bg-white bg-gray0-d" /> - <div className="fr clamp-message white-d" style={{ flexGrow: 1, marginTop: -12 }}> + <div className="fr f8 clamp-message white-d" style={{ flexGrow: 1, marginTop: -12 }}> <div className="hide-child" style={{ paddingTop: '8px' }}> <p className="v-mid f9 black white-d dib mr3 c-default"> <span
SOVERSION bump to version 4.1.22
@@ -38,7 +38,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 4) set(SYSREPO_MINOR_SOVERSION 1) -set(SYSREPO_MICRO_SOVERSION 21) +set(SYSREPO_MICRO_SOVERSION 22) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
update ya tool arc keep all modification if we create new local branch create and checkout new branch with given source show tree, changes and colorize output
}, "arc": { "formula": { - "sandbox_id": [353992795], + "sandbox_id": [354619373], "match": "arc" }, "executable": {
[Kernel] Fix the wrong indentation
* Date Author Notes * 2018-10-30 Bernard The first version */ - -#include <rtthread.h> #include <rthw.h> +#include <rtthread.h> #ifdef RT_USING_SMP static struct rt_cpu rt_cpus[RT_CPUS_NR];
Register SWIG C Python modules as py namespace submodules. This moves private swig modules from the top level to the packages of public swig wrappers. This changes the users of private modules to use public wrappers (with a fallback for ontodb).
@@ -274,9 +274,6 @@ def onpy_srcs(unit, *args): elif path.endswith('.ev'): evs.append(pathmod) elif path.endswith('.swg'): - if py3: - ymake.report_configure_error('SWIG is not yet supported for Python 3: https://st.yandex-team.ru/DEVTOOLS-4863') - else: swigs.append(path) # ignore mod, use last (and only) ns else: ymake.report_configure_error('in PY_SRCS: unrecognized arg {!r}'.format(path)) @@ -438,12 +435,12 @@ def onpy_srcs(unit, *args): if swigs: unit.onsrcs(swigs) - prefix = unit.get('MODULE_PREFIX') + prefix = unit.get('MODULE_PREFIX') # 'libpy' project = unit.get('REALPRJNAME') - py_register(unit, prefix + project, py3) + onpy_register(unit, ns + prefix + project) path = '${ARCADIA_BUILD_ROOT}/' + '{}/{}.py'.format(upath, project) - arg = '{}={}'.format(path, ns + project.replace('/', '.')) - unit.onpy_srcs([arg]) + arg = '{}={}'.format(path, ns + project) + onpy_srcs(unit, arg) def _check_test_srcs(*args):
Trivial doc change to test readthedocs
@@ -22,7 +22,7 @@ typedef struct { /** * Compute b(a), the bias of the clustering sample of a cosmology at a given scale factor - * This is input from LSS group. + * This is input from the LSS group. * @param cosmo Cosmological parameters * @param a scale factor, normalized to a=1 today. * @param status Status flag. 0 if there are no errors, nonzero otherwise.
Update firpfb.c typo
@@ -97,7 +97,7 @@ FIRPFB() FIRPFB(_create)(unsigned int _M, return q; } -// create firpfb from external coefficients +// create firpfb using kaiser window // _M : number of filters in the bank // _m : filter semi-length [samples] // _fc : filter cut-off frequency 0 < _fc < 0.5 @@ -122,7 +122,7 @@ FIRPFB() FIRPFB(_create_kaiser)(unsigned int _M, exit(1); } - // generate square-root Nyquist filter + // design filter using kaiser window unsigned int H_len = 2*_M*_m + 1; float Hf[H_len]; liquid_firdes_kaiser(H_len, _fc/(float)_M, _As, 0.0f, Hf);
Fixed console error caused by previous commit
@@ -715,17 +715,17 @@ void CGTypedArray<TYPE, ARG_TYPE>::SetCount( size_t nNewCount ) if ( nNewCount > m_nCount ) { - TYPE *pNewData = reinterpret_cast<TYPE *>(new BYTE[nNewCount * sizeof(TYPE *)]); + BYTE *pNewData = new BYTE[nNewCount * sizeof(TYPE)]; if ( m_nCount ) { // Copy the old stuff to the new array - memcpy(static_cast<void *>(pNewData), m_pData, m_nCount * sizeof(TYPE *)); - delete[] reinterpret_cast<BYTE *>(m_pData); // don't call any destructors. + memcpy(static_cast<void *>(pNewData), m_pData, m_nCount * sizeof(TYPE)); + delete[] reinterpret_cast<BYTE *>(m_pData); // don't call any destructor } - // Just construct or init the new stuff. - ConstructElements( pNewData + m_nCount, nNewCount - m_nCount ); - m_pData = pNewData; + // Just construct or init the new stuff + ConstructElements(reinterpret_cast<TYPE *>(pNewData) + m_nCount, nNewCount - m_nCount); + m_pData = reinterpret_cast<TYPE *>(pNewData); m_nRealCount = nNewCount; }
[component/ulog] Fix ulog hexdump show issue.
@@ -684,7 +684,7 @@ void ulog_hexdump(const char *tag, rt_size_t width, rt_uint8_t *buf, rt_size_t s log_len = 6 + name_len + 2; rt_memset(log_buf, ' ', log_len); } - fmt_result = rt_snprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE, "%04X-%04X: ", i, i + width); + fmt_result = rt_snprintf(log_buf + log_len, ULOG_LINE_BUF_SIZE, "%04X-%04X: ", i, i + width - 1); /* calculate log length */ if ((fmt_result > -1) && (fmt_result <= ULOG_LINE_BUF_SIZE)) {
Fix warning on overwrite-only This function is unused in overwrite-only mode. Clang seems to catch this, whereas gcc does not. Add the proper ifdefs so that the simulator tests all pass on MacOS.
@@ -779,6 +779,7 @@ done: return rc; } +#ifndef MCUBOOT_OVERWRITE_ONLY static inline int boot_status_init_by_id(int flash_area_id, const struct boot_status *bs) { @@ -807,6 +808,7 @@ boot_status_init_by_id(int flash_area_id, const struct boot_status *bs) return 0; } +#endif #ifndef MCUBOOT_OVERWRITE_ONLY static int
Minor optimization in tuplesort_skiptuples_mk for in memory non unique tuple store which just advances current position by N instead of getting tuple N times. Author: Max Yang
@@ -1728,7 +1728,7 @@ tuplesort_getdatum_mk(Tuplesortstate_mk *state, bool forward, bool tuplesort_skiptuples_mk(Tuplesortstate_mk *state, int64 ntuples, bool forward) { - MemoryContext oldcontext = MemoryContextSwitchTo(state->sortcontext); + MemoryContext oldcontext; bool fOK; /* @@ -1739,14 +1739,23 @@ tuplesort_skiptuples_mk(Tuplesortstate_mk *state, int64 ntuples, bool forward) Assert(ntuples >= 0); /* - * GPDB_84_MERGE_FIXME: This simplistic implementation just calls - * gettuple, even if the sort happened in memory. - */ - - /* - * We could probably optimize these cases better, but for now it's - * not worth the trouble. + * Optimize skip strategy only for in memory non unique store. But for unique store, we + * use normal one by one logic because we need to check the emptiness of entries. */ + if (state->status == TSS_SORTEDINMEM && !state->mkctxt.unique) + { + TuplesortPos_mk *pos = &state->pos; + if (pos->current + ntuples <= state->entry_count) + { + pos->current += ntuples; + return true; + } + pos->eof_reached = true; + return false; + } + else + { + oldcontext = MemoryContextSwitchTo(state->sortcontext); fOK = true; while (ntuples-- > 0) { @@ -1765,8 +1774,8 @@ tuplesort_skiptuples_mk(Tuplesortstate_mk *state, int64 ntuples, bool forward) } MemoryContextSwitchTo(oldcontext); - - return true; + return fOK; + } }
examples/foc/Kconfig: update EXAMPLES_FOC_MMODE range
@@ -315,11 +315,13 @@ config EXAMPLES_FOC_FMODE config EXAMPLES_FOC_MMODE int "Motor control mode" default 2 - range 1 3 + range 1 5 ---help--- 1 - torque control 2 - velocity control 3 - position control + 4 - align only + 5 - ident only config EXAMPLES_FOC_OPENLOOP_Q int "FOC open-loop Vq/Iq setting [x1000]"
[examples] n_cubes.py appears to need more multipoints iterations Even with increased multipoints iterations, sometimes cubes fall through the floor. Sliding appears to be problematic for Bullet's convex-convex algorithm. But it seems more robust with these values.
@@ -11,6 +11,12 @@ import siconos.numerics as Numerics import random +import siconos +options = siconos.mechanics.collision.bullet.SiconosBulletOptions() +options.worldScale = 1.0 +options.perturbationIterations = 7 +options.minimumPointsPerturbationThreshold = 7 + n_cube=3 n_row=2 n_col=2 @@ -104,10 +110,10 @@ with Hdf5(mode='r+') as io: face_class=None, edge_class=None, gravity_scale=1, + options = options, t0=0, T=nstep*step, h=step, - multipoints_iterations=True, theta=0.50001, Newton_max_iter=1, set_external_forces=None,
options/posix: implement recv() and recvfrom()
@@ -84,14 +84,28 @@ int listen(int, int) { return 0; } -ssize_t recv(int, void *, size_t, int) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +ssize_t recv(int sockfd, void *__restrict buf, size_t len, int flags) { + return recvfrom(sockfd, buf, len, flags, NULL, NULL); } -ssize_t recvfrom(int, void *__restrict, size_t, int, struct sockaddr *__restrict, socklen_t *__restrict) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +ssize_t recvfrom(int sockfd, void *__restrict buf, size_t len, int flags, + struct sockaddr *__restrict src_addr, socklen_t *__restrict addrlen) { + struct iovec iov = {}; + iov.iov_base = buf; + iov.iov_len = len; + + struct msghdr hdr = {}; + hdr.msg_name = src_addr; + hdr.msg_iov = &iov; + hdr.msg_iovlen = 1; + + int ret = recvmsg(sockfd, &hdr, flags); + if (ret < 0) + return ret; + + if(addrlen) + *addrlen = hdr.msg_namelen; + return ret; } ssize_t recvmsg(int fd, struct msghdr *hdr, int flags) {
remove supported check from parse sig algs
@@ -4915,9 +4915,17 @@ int mbedtls_ssl_parse_sig_alg_ext( mbedtls_ssl_context *ssl, MBEDTLS_SSL_DEBUG_MSG( 4, ( "received signature algorithm: 0x%x %s", sig_alg, mbedtls_ssl_sig_alg_to_str( sig_alg ) ) ); - - if( ! mbedtls_ssl_sig_alg_is_supported( ssl, sig_alg ) ) +#if defined(MBEDTLS_SSL_PROTO_TLS1_2) + if( +#if defined(MBEDTLS_SSL_PROTO_TLS1_3) + ssl->tls_version == MBEDTLS_SSL_VERSION_TLS1_2 && +#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */ + ( ! ( mbedtls_ssl_sig_alg_is_supported( ssl, sig_alg ) && + mbedtls_ssl_sig_alg_is_offered( ssl, sig_alg ) ) ) ) + { continue; + } +#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ MBEDTLS_SSL_DEBUG_MSG( 4, ( "valid signature algorithm: %s", mbedtls_ssl_sig_alg_to_str( sig_alg ) ) );
dm-hook: rename %dm-inbox
|^ %+ poke-our:pass %graph-store %+ update:cg:gra now.bowl - :+ %add-graph [our.bowl %inbox] + :+ %add-graph [our.bowl %dm-inbox] [graph `%graph-validator-dm %.n] :: ++ dm-parser =+ !<(=update:store vase) ?+ -.q.update !! %add-nodes - ?> ?=([@ %inbox] resource.q.update) + ?> ?=([@ %dm-inbox] resource.q.update) =^ cards state ?: =(our.bowl src.bowl) (outgoing-add (hash-and-sign nodes.q.update)) :_ state(screened (~(del by screened) ship)) %+ welp (add-missing-root ship) :~ %+ poke-our:pass %graph-store - (update:cg:gra now.bowl %add-nodes [our.bowl %inbox] unscreened) + (update:cg:gra now.bowl %add-nodes [our.bowl %dm-inbox] unscreened) :: (give %accept ship) == |= =ship =/ =index:store [ship ~] - (check-node-existence:gra [our.bowl %inbox] index) + (check-node-existence:gra [our.bowl %dm-inbox] index) :: ++ add-node |= [=index:store =node:store] ^- update:store - :^ now.bowl %add-nodes [our.bowl %inbox] + :^ now.bowl %add-nodes [our.bowl %dm-inbox] (~(gas by *nodes) [index node] ~) :: ++ add-missing-root %+ snoc (add-missing-root ship) %+ poke-our:pass %graph-store %+ update:cg:gra now.bowl - [%add-nodes [our.bowl %inbox] (normalize-incoming nodes)] + [%add-nodes [our.bowl %dm-inbox] (normalize-incoming nodes)] -- :: ++ on-watch :_ ~ =+ indices=(~(gas in *(set index:store)) ~[ship acked] ~) %+ poke-our:pass %graph-store - (update:cg:gra now.bowl %remove-posts [our.bowl %inbox] indices) + (update:cg:gra now.bowl %remove-posts [our.bowl %dm-inbox] indices) :: ++ remove-pending |= =ship
OpenCanopy: Never X-offset the first letter of a label
@@ -650,13 +650,8 @@ GuiGetLabel ( InfoPairs = (CONST BMF_KERNING_PAIR **)&TextInfo->Chars[StringLen]; TargetCharX = 0; - if (TextInfo->Chars[0]->xoffset >= 0) { - InitialCharX = 0; - InitialWidthOffset = 0; - } else { InitialCharX = -TextInfo->Chars[0]->xoffset; InitialWidthOffset = TextInfo->Chars[0]->xoffset; - } for (Index = 0; Index < StringLen; ++Index) { ASSERT (TextInfo->Chars[Index]->yoffset + TextInfo->OffsetY >= 0);
Yan LR: Use correct variable in log message
@@ -200,7 +200,7 @@ bool YAMLLexer::addIndentation (size_t const lineIndex) { if (static_cast<long long> (lineIndex) > indents.top ()) { - ELEKTRA_LOG_DEBUG ("Add indentation %zu", column); + ELEKTRA_LOG_DEBUG ("Add indentation %zu", lineIndex); indents.push (lineIndex); return true; }
Verify opae-c tests work on hw
@@ -55,8 +55,8 @@ class open_c_p : public ::testing::TestWithParam<std::string> { system_ = test_system::instance(); system_->initialize(); system_->prepare_syfs(platform_); - invalid_device_ = test_device::unknown(); + filter_ = nullptr; ASSERT_EQ(fpgaInitialize(NULL), FPGA_OK); ASSERT_EQ(fpgaGetProperties(nullptr, &filter_), FPGA_OK); ASSERT_EQ(fpgaPropertiesSetObjectType(filter_, FPGA_ACCELERATOR), FPGA_OK); @@ -84,7 +84,6 @@ class open_c_p : public ::testing::TestWithParam<std::string> { fpga_handle accel_; test_platform platform_; uint32_t num_matches_; - test_device invalid_device_; test_system *system_; }; @@ -95,4 +94,5 @@ TEST_P(open_c_p, mallocfails) { EXPECT_EQ(accel_, nullptr); } -INSTANTIATE_TEST_CASE_P(open_c, open_c_p, ::testing::ValuesIn(test_platform::keys(true))); +INSTANTIATE_TEST_CASE_P(open_c, open_c_p, + ::testing::ValuesIn(test_platform::mock_platforms({})));
fix(linux): segmentation fault on draw window with minimal size
@@ -125,7 +125,7 @@ static void X11Surface_OnResize(LCUI_Surface s, int width, int height) int depth; XGCValues gcv; Visual *visual; - if (width == s->width && height == s->height) { + if (width == s->width && height == s->height && s->ximage && s->gc) { return; } if (s->ximage) {
Fix find handle crash when sorting ObjectAddress or OriginalName columns
@@ -172,6 +172,18 @@ BEGIN_SORT_FUNCTION(Handle) } END_SORT_FUNCTION +BEGIN_SORT_FUNCTION(ObjectAddress) +{ + sortResult = uintptrcmp((ULONG_PTR)node1->HandleObject, (ULONG_PTR)node2->HandleObject); +} +END_SORT_FUNCTION + +BEGIN_SORT_FUNCTION(OriginalName) +{ + sortResult = PhCompareString(node1->ObjectNameString, node2->ObjectNameString, TRUE); +} +END_SORT_FUNCTION + VOID HandleObjectLoadSettingsTreeList( _Inout_ PPH_HANDLE_SEARCH_CONTEXT Context ) @@ -209,7 +221,7 @@ ULONG HandleObjectNodeHashtableHashFunction( _In_ PVOID Entry ) { - return PhHashIntPtr((ULONG_PTR)(*(PPH_HANDLE_OBJECT_TREE_ROOT_NODE*)Entry)->HandleObject); + return PhHashIntPtr((ULONG_PTR)(*(PPH_HANDLE_OBJECT_TREE_ROOT_NODE*)Entry)->Handle); } VOID DestroyHandleObjectNode( @@ -226,7 +238,6 @@ VOID DestroyHandleObjectNode( PPH_HANDLE_OBJECT_TREE_ROOT_NODE AddHandleObjectNode( _Inout_ PPH_HANDLE_SEARCH_CONTEXT Context, - _In_ PVOID HandleObject, _In_ HANDLE Handle ) { @@ -241,7 +252,6 @@ PPH_HANDLE_OBJECT_TREE_ROOT_NODE AddHandleObjectNode( handleObjectNode->Node.TextCache = handleObjectNode->TextCache; handleObjectNode->Node.TextCacheSize = TREE_COLUMN_ITEM_MAXIMUM; - handleObjectNode->HandleObject = HandleObject; handleObjectNode->Handle = Handle; PhAddEntryHashtable(Context->NodeHashtable, &handleObjectNode); @@ -254,14 +264,14 @@ PPH_HANDLE_OBJECT_TREE_ROOT_NODE AddHandleObjectNode( PPH_HANDLE_OBJECT_TREE_ROOT_NODE FindHandleObjectNode( _In_ PPH_HANDLE_SEARCH_CONTEXT Context, - _In_ PVOID HandleObject + _In_ HANDLE Handle ) { PH_HANDLE_OBJECT_TREE_ROOT_NODE lookupHandleObjectNode; PPH_HANDLE_OBJECT_TREE_ROOT_NODE lookupHandleObjectNodePtr = &lookupHandleObjectNode; PPH_HANDLE_OBJECT_TREE_ROOT_NODE *handleObjectNode; - lookupHandleObjectNode.HandleObject = HandleObject; + lookupHandleObjectNode.Handle = Handle; handleObjectNode = (PPH_HANDLE_OBJECT_TREE_ROOT_NODE*)PhFindEntryHashtable( Context->NodeHashtable, @@ -329,6 +339,8 @@ BOOLEAN NTAPI HandleObjectTreeNewCallback( SORT_FUNCTION(Type), SORT_FUNCTION(Name), SORT_FUNCTION(Handle), + SORT_FUNCTION(ObjectAddress), + SORT_FUNCTION(OriginalName) }; int (__cdecl *sortFunction)(void *, const void *, const void *); @@ -672,7 +684,7 @@ VOID PhpFindObjectAddResultEntries( processItem = PhReferenceProcessItem(clientId.UniqueProcess); - objectNode = AddHandleObjectNode(Context, searchResult->Object, searchResult->Handle); + objectNode = AddHandleObjectNode(Context, searchResult->Handle); objectNode->ProcessId = searchResult->ProcessId; objectNode->ResultType = searchResult->ResultType; objectNode->ClientIdName = PhGetClientIdNameEx(&clientId, processItem ? processItem->ProcessName : NULL); @@ -683,7 +695,10 @@ VOID PhpFindObjectAddResultEntries( PhPrintPointer(objectNode->HandleString, searchResult->Handle); if (searchResult->Object) + { + objectNode->HandleObject = searchResult->Object; PhPrintPointer(objectNode->ObjectString, searchResult->Object); + } PhDereferenceObject(processItem); }
Fix Regression in draft-29 TP Acceptance
@@ -386,10 +386,8 @@ QuicCryptoTlsReadExtensions( return Status; } - } else if ( - Connection->Stats.QuicVersion != QUIC_VERSION_DRAFT_29 && - (ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS || - ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS_DRAFT)) { + } else if (Connection->Stats.QuicVersion != QUIC_VERSION_DRAFT_29) { + if (ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS) { if (!QuicCryptoTlsDecodeTransportParameters( Connection, FALSE, @@ -401,6 +399,20 @@ QuicCryptoTlsReadExtensions( FoundTransportParameters = TRUE; } + } else { + if (ExtType == TLS_EXTENSION_TYPE_QUIC_TRANSPORT_PARAMETERS_DRAFT) { + if (!QuicCryptoTlsDecodeTransportParameters( + Connection, + FALSE, + Buffer, + ExtLen, + &Connection->PeerTransportParams)) { + return QUIC_STATUS_INVALID_PARAMETER; + } + FoundTransportParameters = TRUE; + } + } + BufferLength -= ExtLen; Buffer += ExtLen; }
Fix incorrect image paths in HOME.md
@@ -25,7 +25,7 @@ IO operations to underlying block device. A system administrator can manage cache instances via Intel CAS CLI management utility called "casadm". -![OCF Linux deployment view](deployment-1.png) +![OCF Linux deployment view](img/deployment-1.png) Another example of OCF usage is user space block level cache for QEMU (see picture below). In this example following adaptation layers may exist: @@ -40,7 +40,7 @@ and primary storage device. For example bottom adapter for caching device may be implemented using kernel bypass techniques, providing low-latency access to cache media. -![OCF deployment in QEMU example](deployment-2.png) +![OCF deployment in QEMU example](img/deployment-2.png) # Management interface Management interface delivered with Intel OCF enables system administrator to: @@ -247,7 +247,7 @@ storage device - <b>IO completion</b> - is signalled by calling completion function specified in IO configuration phase -![An example of IO flow](io-path.png) +![An example of IO flow](img/io-path.png) ## IO submission example ```c
nrf/drivers/bluetooth/ble_drv: Don't handle non-events. When there is a non-BLE event (sd_evt_get), the ble_evt_handler is invoked anyway even if it returns NRF_ERROR_NOT_FOUND.
@@ -1071,12 +1071,24 @@ void SWI2_EGU2_IRQHandler(void) { sd_evt_handler(evt_id); } - uint32_t err_code; uint16_t evt_len = sizeof(m_ble_evt_buf); - do { - err_code = sd_ble_evt_get(m_ble_evt_buf, &evt_len); + while (1) { + uint32_t err_code = sd_ble_evt_get(m_ble_evt_buf, &evt_len); + if (err_code != NRF_SUCCESS) { + // Possible error conditions: + // * NRF_ERROR_NOT_FOUND: no events left, break + // * NRF_ERROR_DATA_SIZE: retry with a bigger data buffer + // (currently not handled, TODO) + // * NRF_ERROR_INVALID_ADDR: pointer is not aligned, should + // not happen. + // In all cases, it's best to simply stop now. + if (err_code == NRF_ERROR_DATA_SIZE) { + BLE_DRIVER_LOG("NRF_ERROR_DATA_SIZE\n"); + } + break; + } ble_evt_handler((ble_evt_t *)m_ble_evt_buf); - } while (err_code != NRF_ERROR_NOT_FOUND && err_code != NRF_SUCCESS); + } } #endif // BLUETOOTH_SD
Add stlink-tools link for Debian and Ubuntu Add stlink-tools link for Debian and Ubuntu
@@ -28,8 +28,9 @@ Windows users can [download v1.3.0](https://github.com/texane/stlink/releases/ta Mac OS X users can install from [homebrew](http://brewformulas.org/Stlink) or [download v1.3.0](https://github.com/texane/stlink/releases/tag/1.3.0) from the releases page. -For Debian Linux based distributions there is no package available - in the standard repositories so you need to install [from source](doc/compiling.md) yourself. +Debian Linux users can install it via the ```stlink-tool``` package [repository](https://packages.debian.org/buster/stlink-tools) + +Ubuntu Linux users can install it via the ```stlink-tool``` package [repository](https://packages.ubuntu.com/cosmic/stlink-tools) Arch Linux users can install from the [repository](https://www.archlinux.org/packages/community/x86_64/stlink)
graph-threads: delete thread gets rid of metadata properly
(poke-our %graph-store %graph-update !>([%0 now.bowl %remove-graph rid])) ;< ~ bind:m (poke-our %graph-push-hook %push-hook-action !>([%remove rid])) + ;< ~ bind:m + %+ poke-our %metadata-hook + metadata-hook-action+!>([%remove (en-path:resource rid)]) + ;< ~ bind:m + %+ poke-our %metadata-store + :- %metadata-action + !> :+ %remove + (en-path:resource rid) + [%graph (en-path:resource rid)] (pure:m ~) -- ::
Bump minimum tools version
@@ -3,7 +3,7 @@ if (NOT DEFINED BLIT_ONCE) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) - set(BLIT_MINIMUM_TOOLS_VERSION "0.7.0") + set(BLIT_MINIMUM_TOOLS_VERSION "0.7.1") find_package(PythonInterp 3.6 REQUIRED)
HV: remove dummy DRHD in template platform acpi info The DRHD MACROs are needed only when CONFIG_DMAR_PARSE_ENABLED set to n, whereas the template platform_acpi_info.h is prepared for generic boards that usually CONFIG_DMAR_PARSE_ENABLED is set to y, so remove these dummy DRHD info MACROs. Acked-by: Eddie Dong
#define WAKE_VECTOR_32 0UL #define WAKE_VECTOR_64 0UL -/* DRHD of DMAR */ -#define DRHD_COUNT 0U - -#define DRHD0_DEV_CNT 0U -#define DRHD0_SEGMENT 0U -#define DRHD0_FLAGS 0U -#define DRHD0_REG_BASE 0UL -#define DRHD0_IGNORE false -#define DRHD0_DEVSCOPE0_BUS 0U -#define DRHD0_DEVSCOPE0_PATH 0U -#define DRHD0_DEVSCOPE1_BUS 0U -#define DRHD0_DEVSCOPE1_PATH 0U -#define DRHD0_DEVSCOPE2_BUS 0U -#define DRHD0_DEVSCOPE2_PATH 0U -#define DRHD0_DEVSCOPE3_BUS 0U -#define DRHD0_DEVSCOPE3_PATH 0U - -#define DRHD1_DEV_CNT 0U -#define DRHD1_SEGMENT 0U -#define DRHD1_FLAGS 0U -#define DRHD1_REG_BASE 0UL -#define DRHD1_IGNORE false -#define DRHD1_DEVSCOPE0_BUS 0U -#define DRHD1_DEVSCOPE0_PATH 0U -#define DRHD1_DEVSCOPE1_BUS 0U -#define DRHD1_DEVSCOPE1_PATH 0U -#define DRHD1_DEVSCOPE2_BUS 0U -#define DRHD1_DEVSCOPE2_PATH 0U -#define DRHD1_DEVSCOPE3_BUS 0U -#define DRHD1_DEVSCOPE3_PATH 0U -#define DRHD1_IOAPIC_ID 0U - -#define DRHD2_DEV_CNT 0U -#define DRHD2_SEGMENT 0U -#define DRHD2_FLAGS 0U -#define DRHD2_REG_BASE 0U -#define DRHD2_IGNORE false -#define DRHD2_DEVSCOPE0_BUS 0U -#define DRHD2_DEVSCOPE0_PATH 0U -#define DRHD2_DEVSCOPE1_BUS 0U -#define DRHD2_DEVSCOPE1_PATH 0U -#define DRHD2_DEVSCOPE2_BUS 0U -#define DRHD2_DEVSCOPE2_PATH 0U -#define DRHD2_DEVSCOPE3_BUS 0U -#define DRHD2_DEVSCOPE3_PATH 0U - -#define DRHD3_DEV_CNT 0U -#define DRHD3_SEGMENT 0U -#define DRHD3_FLAGS 0U -#define DRHD3_REG_BASE 0U -#define DRHD3_IGNORE false -#define DRHD3_DEVSCOPE0_BUS 0U -#define DRHD3_DEVSCOPE0_PATH 0U -#define DRHD3_DEVSCOPE1_BUS 0U -#define DRHD3_DEVSCOPE1_PATH 0U -#define DRHD3_DEVSCOPE2_BUS 0U -#define DRHD3_DEVSCOPE2_PATH 0U -#define DRHD3_DEVSCOPE3_BUS 0U -#define DRHD3_DEVSCOPE3_PATH 0U +#ifndef CONFIG_DMAR_PARSE_ENABLED +#error "The template platform_acpi_info.h would not include DRHD info MACROs, if your Kconfig disabled \ +ACPI DMA Remapping tables parsing, please include DRHD info MACROs in your board specific platform_acpi_info.h \ +and put the file under hypervisor/arch/x86/configs/($CONFIG_BOARD)/." +#endif #endif /* PLATFORM_ACPI_INFO_H */
added configure arguments to --version output
@@ -140,6 +140,39 @@ display_version (void) fprintf (stdout, "GoAccess - %s.\n", GO_VERSION); fprintf (stdout, "%s: http://goaccess.io\n", INFO_MORE_INFO); fprintf (stdout, "Copyright (C) 2009-2016 by Gerardo Orellana\n"); + fprintf (stdout, "\nBuild configure arguments:\n"); +#ifdef DEBUG + fprintf (stdout, " --enable-debug\n"); +#endif +#ifdef HAVE_NCURSESW_NCURSES_H + fprintf (stdout, " --enable-utf8\n"); +#endif +#ifdef HAVE_LIBGEOIP + fprintf (stdout, " --enable-geoip=legacy\n"); +#endif +#ifdef HAVE_LIBMAXMINDDB + fprintf (stdout, " --enable-geoip=mmdb\n"); +#endif +#ifdef TCB_MEMHASH + fprintf (stdout, " --enable-tcb=memhash\n"); +#endif +#ifdef TCB_BTREE + fprintf (stdout, " --enable-tcb=btree\n"); +#endif +#if defined(TCB_MEMHASH) || defined(TCB_BTREE) +#ifndef HAVE_ZLIB + fprintf (stdout, " --disable-zlib\n"); +#endif +#ifndef HAVE_BZ2 + fprintf (stdout, " --disable-bzip\n"); +#endif +#endif +#ifdef WITH_GETLINE + fprintf (stdout, " --with-getline\n"); +#endif +#ifdef HAVE_LIBSSL + fprintf (stdout, " --with-openssl\n"); +#endif } /* Get the enumerated value given a string.
Move schema to the beginning of the file
#!/usr/bin/env nodejs -// This script generates markdown files for libdill documentation. -// These are further processed to generate both UNIX and HTML man pages. +/* + +This script generates markdown files for libdill documentation. +These are further processed to generate both UNIX and HTML man pages. + +Schema: + + name: name of the function + info: short description of the function + is_in_libdillimpl: if true, the function is in libdillimpl.h + protocol : { // should be present only if the function is related to a network protocol + name: name of the protocol + info: description of the protocol + example: example of usage of the protocol, a piece of C code + } + result: { // omit this field for void functions + type: return type of the function + } + args: [ // may be ommited for functions with no arguments + { + name: name of the argument + type: type of the argument + info: description of the argument + } + ] + add_to_synopsis: a piece of code to be added to synopsis, between the include and the function declaration + has_iol: if true, adds I/O list to the list of arguments + has_deadline: if true, adds deadline to the list of arguments + has_handle_argument: set to true if at least one of the arguments is a handle + allocates_handle: set to true is the function allocates at least one handle + prologue: the part of the description of the function to go before the list of arguments + epilogue: the part of the description of the function to go after the list of arguments + errors: a list of possible errors, the descriptions will be pulled from standard_errors object + custom_errors: [{ // custom errors take precedence over standard errors + error name: error description + }] + example: example of the usage of the function, a piece of C code; if present, overrides the protocol example + mem: size // if set, _mem variant of the function will be generated; size if the size macro such as TCP_SIZE or UDP_SIZE +*/ var fs = require('fs'); @@ -901,42 +938,6 @@ for(i = 0; i != 1000000; ++i) { }, ] -/* - Schema: - - name: name of the function - info: short description of the function - is_in_libdillimpl: if true, the function is in libdillimpl.h - protocol : { // should be present only if the function is related to a network protocol - name: name of the protocol - info: description of the protocol - example: example of usage of the protocol, a piece of C code - } - result: { // omit this field for void functions - type: return type of the function - } - args: [ // may be ommited for functions with no arguments - { - name: name of the argument - type: type of the argument - info: description of the argument - } - ] - add_to_synopsis: a piece of code to be added to synopsis, between the include and the function declaration - has_iol: if true, adds I/O list to the list of arguments - has_deadline: if true, adds deadline to the list of arguments - has_handle_argument: set to true if at least one of the arguments is a handle - allocates_handle: set to true is the function allocates at least one handle - prologue: the part of the description of the function to go before the list of arguments - epilogue: the part of the description of the function to go after the list of arguments - errors: a list of possible errors, the descriptions will be pulled from standard_errors object - custom_errors: [{ // custom errors take precedence over standard errors - error name: error description - }] - example: example of the usage of the function, a piece of C code; if present, overrides the protocol example - mem: size // if set, _mem variant of the function will be generated; size if the size macro such as TCP_SIZE or UDP_SIZE -*/ - function generate_man_page(fx, mem) { var t = "";
Shrink an expr tree field to 16 bits with padding after.
@@ -63,7 +63,7 @@ typedef struct lily_ast_ { uint16_t args_collected; union { - uint32_t pile_pos; + uint16_t pile_pos; /* For raw integers or booleans, this is the value to write to the bytecode. */ int16_t backing_value; @@ -71,6 +71,8 @@ typedef struct lily_ast_ { uint16_t literal_reg_spot; }; + uint16_t pad; + union { lily_item *item; lily_sym *sym;
Fix the relative link to opensrc/hsa-runtme in the rocr-runtime directory
@@ -217,13 +217,17 @@ if [[ "$AOMP_VERSION" == "13.1" ]] || [[ $AOMP_MAJOR_VERSION -gt 13 ]] ; then # build_rocr.sh expects directory rocr-runtime which is a subdir of hsa-runtime # Link in the open source hsa-runtime as "src" directory if [ -d $AOMP_REPOS/hsa-runtime ] ; then + if [ ! -L $AOMP_REPOS/rocr-runtime/src ] ; then echo "Fixing rocr-runtime with correct link to hsa-runtime/opensrc/hsa-runtime src" echo mkdir -p $AOMP_REPOS/rocr-runtime mkdir -p $AOMP_REPOS/rocr-runtime echo cd $AOMP_REPOS/rocr-runtime cd $AOMP_REPOS/rocr-runtime - echo ln -sf ../hsa-runtime/opensrc/hsa-runtime src - ln -sf ../hsa-runtime/opensrc/hsa-runtime src + echo ln -sf -t $AOMP_REPOS/rocr-runtime ../hsa-runtime/opensrc/hsa-runtime + ln -sf -t $AOMP_REPOS/rocr-runtime ../hsa-runtime/opensrc/hsa-runtime + echo ln -sf hsa-runtime src + ln -sf hsa-runtime src + fi fi exit $rc fi
Set the texture unpack alignment to 1
@@ -348,6 +348,9 @@ public: if (dw>mPixelWidth/2) { x0 = 0; + if ( (mPixelWidth*pw) & 0x03 ) + copy_required = true; + else dw = mPixelWidth; } else @@ -390,6 +393,7 @@ public: { #ifndef NME_GLES glPixelStorei(GL_UNPACK_ROW_LENGTH, mSurface->Width()); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); #endif glTexSubImage2D(GL_TEXTURE_2D, 0, x0, y0,
ia32: Adding PS/2 keyboard detection in _init.S to prevent deadlock during A20 line unmasking
@@ -56,6 +56,11 @@ _init_plo: /* Store system page address in esi register */ movl (%eax), %esi + /* Test presence of PS/2 keyboard */ + inb $0x64, %al + cmp $0xff, %al + jz _init_setupPaging + /* Disable A20 line mask */ call _init_empty8042 movb $0xd1, %al
Set maximal size of CIPSEND to 2048 (supported by ESP)
* to optimize speed performance of sending data */ #ifndef ESP_CFG_CONN_MAX_DATA_LEN -#define ESP_CFG_CONN_MAX_DATA_LEN (2048/4) +#define ESP_CFG_CONN_MAX_DATA_LEN 2048 #endif /**
api: Enable COMPARE_AND_WRITE command Since the runner has already supported the CAW command, enable it. If the MAXIMUM COMPARE AND WRITE LENGTH field, which in "SCSI Commands Reference Manual" the section "Block Limits VPD Page (B0h)" set to zero, means disable the CAW command.
@@ -493,6 +493,19 @@ finish_page83: val16 = htobe16(0x3c); memcpy(&data[2], &val16, 2); + /* + * From SCSI Commands Reference Manual, section Block Limits + * VPD page (B0h) + * + * MAXIMUM COMPARE AND WRITE LENGTH: set to a non-zero value + * indicates the maximum value that the device server accepts + * in the NUMBER OF LOGICAL BLOCKS field in the COMPARE AND + * WRITE command. + * + * It should be less than or equal to MAXIMUM TRANSFER LENGTH. + */ + data[5] = 0x01; + block_size = tcmu_get_attribute(dev, "hw_block_size"); if (block_size < 0) { return tcmu_set_sense_data(sense, ILLEGAL_REQUEST,
Made CLI signal handler linux specific
#include <survive.h> -#include <signal.h> static volatile int keepRunning = 1; +#ifdef __linux__ + +#include <signal.h> +#include <stdlib.h> + void intHandler(int dummy) { if(keepRunning == 0) exit(-1); keepRunning = 0; } +#endif + int main(int argc, char **argv) { +#ifdef __linux__ signal(SIGINT, intHandler); signal(SIGTERM, intHandler); signal(SIGKILL, intHandler); +#endif SurviveContext *ctx = survive_init(argc, argv); if (ctx == 0) // implies -help or similiar
FIB: DVR paths are not considered L3 attached
@@ -1344,6 +1344,7 @@ fib_route_attached_cross_table (const fib_entry_t *fib_entry, */ if (ip46_address_is_zero(&rpath->frp_addr) && (~0 != rpath->frp_sw_if_index) && + !(rpath->frp_flags & FIB_ROUTE_PATH_DVR) && (fib_entry->fe_fib_index != fib_table_get_index_for_sw_if_index(fib_entry_get_proto(fib_entry), rpath->frp_sw_if_index))) @@ -1359,6 +1360,15 @@ fib_route_attached_cross_table (const fib_entry_t *fib_entry, static inline int fib_path_is_attached (const fib_route_path_t *rpath) { + /* + * DVR paths are not attached, since we are not playing the + * L3 game with these + */ + if (rpath->frp_flags & FIB_ROUTE_PATH_DVR) + { + return (0); + } + /* * - All zeros next-hop * - a valid interface