message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
decision: write assumption about experts | @@ -13,7 +13,12 @@ But substantial decisions must be made in a transparent and participative way.
- [Documentation guidelines](/doc/contrib/documentation.md) apply.
- During the decision process, the PRs constantly get updated:
- Make changes as new commits to the pull request.
- - Questions in the PRs are answered by updating the PR and answering with the commit id.
+ - Questions in the PRs are answered by:
+ 1. updating the PR
+ 2. either:
+ - reply with a quote of the change and the commit SHA-ID
+ - reply with a diff of the change
+ - give a thumbs-up if the change was done exactly as suggested
- As generally recommended in Elektra, do not squash commits after they are visible on the pull request.
- Rebase only if the decision was already accepted and has a merge conflict.
- For reviewers:
@@ -29,6 +34,9 @@ But substantial decisions must be made in a transparent and participative way.
We don't need a vote (besides the approved review) or a benevolent dictatorship.
- Unlike the Rust Decision process, decisions in Elektra do not have a disadvantage if they were flawed in early stages.
Only the end results counts.
+- Different to initiatives like Rust, most contributors in Elektra are not experts in configuration management or programming languages.
+ So we do not expect that a clear problem or solution is in the decision's write mind beforehand.
+ Instead the decisions is also a supported learning process about the problem and solution.
## Considered Alternatives
|
TCPMv2: Update 'pdcable' console command
This patchset adds information about cable's Thunderbolt mode
response.
BRANCH=none
TEST=EC command "pdcable <port>" prints out the information about the
cable. | @@ -114,6 +114,7 @@ static int command_cable(int argc, char **argv)
struct pd_discovery *disc;
enum idh_ptype ptype;
int cable_rev;
+ union tbt_mode_resp_cable cable_mode_resp;
if (argc < 2)
return EC_ERROR_PARAM_COUNT;
@@ -134,6 +135,9 @@ static int command_cable(int argc, char **argv)
cable_rev = pd_get_vdo_ver(port, TCPC_TX_SOP_PRIME);
disc = pd_get_am_discovery(port, TCPC_TX_SOP_PRIME);
+ cable_mode_resp.raw_value =
+ pd_get_tbt_mode_vdo(port, TCPC_TX_SOP_PRIME);
+
/* Cable revision */
ccprintf("Cable Rev: %d.0\n", cable_rev + 1);
@@ -186,6 +190,28 @@ static int command_cable(int argc, char **argv)
disc->identity.product_t2.a2_rev30.usb_lanes);
}
}
+
+ if (!cable_mode_resp.raw_value)
+ return EC_SUCCESS;
+
+ ccprintf("Rounded support: %s\n",
+ cable_mode_resp.tbt_rounded ==
+ TBT_GEN3_GEN4_ROUNDED_NON_ROUNDED ? "Yes" : "No");
+
+ ccprintf("Optical cable: %s\n",
+ cable_mode_resp.tbt_cable == TBT_CABLE_OPTICAL ? "Yes" : "No");
+
+ ccprintf("Retimer support: %s\n",
+ cable_mode_resp.retimer_type == USB_RETIMER ?
+ "Yes" : "No");
+
+ ccprintf("Link training: %s-directional\n",
+ cable_mode_resp.lsrx_comm == BIDIR_LSRX_COMM ? "Bi" : "Uni");
+
+ ccprintf("Thunderbolt cable type: %s\n",
+ cable_mode_resp.tbt_active_passive == TBT_CABLE_ACTIVE ?
+ "Active" : "Passive");
+
return EC_SUCCESS;
}
|
First pass at updating the Raspberry Pi instructions. | -# Raspberry Pi Build Instructions
+# Raspberry Pi Build/Usage Instructions
All of this sample code will build on a Raspberry Pi, which can then be used
as an inexpensive print server or as part of an automated test framework.
-Run the following command to install the software you'll need to build and
+
+## Prerequisites
+
+Run the following command to install the core software you'll need to build and
use the ippsample code:
sudo apt-get install libnss-mdns avahi-daemon avahi-utils \
libavahi-client-dev libgnutls28-dev zlib1g-dev
-You'll also need version 1.8 to 1.9a of the MuPDF software (*not* the one
-that has been packaged for Raspbian which is much older) if you want to
-support local conversions of PDF and JPEG files to PWG Raster or HP PCL.
-You can download the MuPDF 1.9a software from:
+If you want to support local conversions of PDF and JPEG files to Apple/PWG
+Raster or HP PCL, you'll also need version 1.11 of the MuPDF software and *not*
+the much older version that has been packaged for Raspbian. You can download
+the MuPDF 1.11 software from:
http://www.mupdf.com
-If you haven't already done so, you can download the IPP sample sources
+For 3D support you'll need CuraEngine (part of Cura). The easiest way to build
+this is to head over to the Ultimaker Cura-build project:
+
+ https://github.com/Ultimaker/cura-build
+
+and mostly follow the Ubuntu/Linux instructions, doing a `make install` at the
+end instead of `make package`.
+
+
+## Building the IPP Sample Code
+
+If you haven't already done so, you can download the latested IPP sample sources
with Git using:
git clone https://github.com/istopwg/ippsample.git ippsample
@@ -27,3 +41,11 @@ build and install everything:
./configure
make
sudo make install
+
+
+## Using the IPP Server
+
+The `sample-configs` directory contains sample configuration directories for
+`ippserver` to do different things.
+
+> Work in progress here...
|
Restore the use of LDCMD when linking applications
It is a hack, but it existed in the recently removed Makefile.shared,
and its use is documented in fuzz/README.md, so we cannot drop it now.
Fixes | @@ -1053,7 +1053,7 @@ EOF
return <<"EOF";
$bin$exeext: $objs $deps
rm -f $bin$exeext
- $cmd $cmdflags \$(LDFLAGS) \$(BIN_LDFLAGS) -o $bin$exeext $objs \\
+ \$\${LDCMD:-$cmd} $cmdflags \$(LDFLAGS) \$(BIN_LDFLAGS) -o $bin$exeext $objs \\
\$(PLIB_LDFLAGS) $linklibs \$(EX_LIBS)
EOF
}
|
Update cppcheck suppressions... | @@ -6,24 +6,17 @@ cert-API01-C
// Don't report non-const casts. Inline suppression comments are not working,
// otherwise we'd be more selective...
-cert-EXP05-C:device.c
-cert-EXP05-C:device-network.c
-cert-EXP05-C:device-usb.c
-cert-EXP05-C:link.c
-cert-EXP05-C:mainloop-subcommands.c
-cert-EXP05-C:resource.c
-cert-EXP05-C:system-webif.c
-cert-EXP05-C:util.c
+cert-EXP05-C
// Not handling "(unsigned)~CONSTANT" properly...
cert-INT31-c
// fopen_s is NOT supported on POSIX platforms and DOES NOT APPLY for reading
// of files!
-cert-MSC24-C:job-filter.c
+cert-MSC24-C
// char something[###] = "constant" should not result in an error!
-cert-STR05-C:system-webif.c
+cert-STR05-C
// Not sure why this is a thing...
preprocessorErrorDirective
|
Travis: Add basic Linux build | @@ -14,6 +14,8 @@ matrix:
osx_image: xcode7.3
- os: osx
osx_image: xcode6.4
+ - os: linux
+ dist: trusty
before_install:
- |
@@ -41,6 +43,12 @@ before_install:
export Qt5_DIR=/usr/local/opt/qt5;
brew config;
fi
+ - |
+ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
+ sudo apt-get -qq update;
+ sudo apt-get install clang-format-3.8;
+ sudo apt-get install ninja-build;
+ fi
#
# Source is checked out in $TRAVIS_BUILD_DIR
@@ -51,6 +59,7 @@ before_script:
- mkdir build && cd build
- CMAKE_OPT=()
- echo $PATH
+ - plugins="ALL;-jni";
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
python2_ver=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') &&
CMAKE_OPT+=("-DPYTHON2_INCLUDE_DIR:PATH=$(python2-config --prefix)/include/python${python2_ver}") &&
@@ -58,11 +67,13 @@ before_script:
python3_ver=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') &&
CMAKE_OPT+=("-DPYTHON_INCLUDE_DIR:PATH=$(python3-config --prefix)/include/python${python3_ver}m") &&
CMAKE_OPT+=("-DPYTHON_LIBRARY:FILEPATH=$(python3-config --prefix)/lib/libpython${python3_ver}.dylib");
- plugins="ALL;-jni";
if [[ $(uname -r | cut -d "." -f 1) == 15 ]]; then plugins="${plugins};-CRYPTO"; fi;
ln -s /usr/local/opt/openssl/include/openssl/ /usr/local/include/openssl;
fi
- - cmake -GNinja -DBUILD_STATIC=OFF -DPLUGINS="${plugins:-ALL}" -DBINDINGS=ALL -DTOOLS=ALL -DKDB_DB_SYSTEM=$TRAVIS_BUILD_DIR/../kdbsystem ${CMAKE_OPT[@]} $TRAVIS_BUILD_DIR
+ - >
+ cmake -GNinja -DBUILD_STATIC=OFF -DPLUGINS="${plugins:-ALL}" -DBINDINGS=ALL -DTOOLS=ALL -DINSTALL_SYSTEM_FILES=OFF
+ -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../install -DKDB_DB_SYSTEM=$TRAVIS_BUILD_DIR/../kdbsystem ${CMAKE_OPT[@]} $TRAVIS_BUILD_DIR
+ - PATH=$PATH:$(ruby -e "puts File.expand_path('$TRAVIS_BUILD_DIR/../install/bin')")
script:
- ninja
|
docs/usocket: getaddrinfo: Describe af/type/proto optional params.
These can be optionally specified, but all ports are expected to be able to
accept them, at the very least ignore, though handling of "type" param
(SOCK_STREAM vs SOCK_DGRAM) is recommended. | @@ -79,19 +79,33 @@ Functions
# Create DGRAM UDP socket
socket(AF_INET, SOCK_DGRAM)
-.. function:: getaddrinfo(host, port)
+.. function:: getaddrinfo(host, port, af=0, type=0, proto=0, flags=0)
Translate the host/port argument into a sequence of 5-tuples that contain all the
- necessary arguments for creating a socket connected to that service. The list of
- 5-tuples has following structure::
+ necessary arguments for creating a socket connected to that service. Arguments
+ *af*, *type*, and *proto* (which have the same meaning as for `socket()` function)
+ can be used to filter which kind of addresses are returned. If a parameter not
+ specified or zero, all combinations of addresses can be returned (requiring
+ filtering on the user side).
+
+ The resulting list of 5-tuples has the following structure::
(family, type, proto, canonname, sockaddr)
The following example shows how to connect to a given url::
s = usocket.socket()
+ # This assumes that if "type" is not specified, address for
+ # SOCK_STREAM will be returned, which may be not true
s.connect(usocket.getaddrinfo('www.micropython.org', 80)[0][-1])
+ Recommended use of filtering params::
+
+ s = usocket.socket()
+ # Guaranteedly returns address which can be connect'ed to for
+ # stream operation.
+ s.connect(usocket.getaddrinfo('www.micropython.org', 80, 0, SOCK_STREAM)[0][-1])
+
.. admonition:: Difference to CPython
:class: attention
|
out_syslog: use new upstream prototype for tls handling | @@ -880,7 +880,7 @@ static int cb_syslog_init(struct flb_output_instance *ins, struct flb_config *co
}
ctx->u = flb_upstream_create(config, ins->host.name, ins->host.port,
- io_flags, (void *) &ins->tls);
+ io_flags, ins->tls);
if (!(ctx->u)) {
flb_syslog_config_destroy(ctx);
return -1;
|
client session BUGFIX ietf-yang-library model updated and its structure changed | @@ -621,8 +621,7 @@ nc_ctx_fill_yl(struct nc_session *session, ly_module_imp_clb user_clb, void *use
}
data_rpl = (struct nc_reply_data *)reply;
- if (!data_rpl->data || strcmp(data_rpl->data->schema->module->name, "ietf-yang-library") ||
- strcmp(data_rpl->data->schema->name, "modules-state")) {
+ if (!data_rpl->data || strcmp(data_rpl->data->schema->module->name, "ietf-yang-library")) {
ERR("Session %u: unexpected data in reply to a yang-library <get> RPC.", session->id);
goto cleanup;
}
|
fixed some more memory bugs in poise | @@ -1153,6 +1153,8 @@ void InitializeClimateParams(BODY *body, int iBody, int iVerbose) {
body[iBody].bSnowball = 0;
body[iBody].dFluxInGlobal = 0;
body[iBody].dIceFlowTot = 0;
+ body[iBody].dIceBalanceTot = 0;
+ body[iBody].iWriteLat = 0;
if (body[iBody].bColdStart) {
Toffset = -40.0;
@@ -1380,6 +1382,13 @@ void InitializeClimateParams(BODY *body, int iBody, int iVerbose) {
body[iBody].dInvMSea[2*i+1] = malloc(2*body[iBody].iNumLats*sizeof(double));
body[iBody].daIceMassTmp[i] = 0.0;
+ body[iBody].daIceBalanceAvg[i] = 0.0;
+ body[iBody].daIceFlowAvg[i] = 0.0;
+ body[iBody].daBedrockH[i] = 0.0;
+ body[iBody].daBedrockHEq[i] = 0.0;
+ body[iBody].daIceHeight[i] = 0.0;
+ body[iBody].daDIceHeightDy[i] = 0.0;
+
body[iBody].scaleSea[2*i] = 0.;
body[iBody].scaleSea[2*i+1] = 0.;
for (j=0;j<2*body[iBody].iNumLats;j++) {
@@ -2687,6 +2696,8 @@ void ForceBehaviorPoise(BODY *body,EVOLVE *evolve,IO *io,SYSTEM *system,UPDATE *
body[iBody].dIceFlowTot = 0.0; //total ice flow (should equal zero)
body[iBody].dIceMassTot = 0.0;
if (body[iBody].bIceSheets) {
+ printf("call\n");
+ fflush(stdout);
PoiseIceSheets(body,evolve,iBody);
}
}
@@ -4155,6 +4166,11 @@ void PoiseIceSheets(BODY *body, EVOLVE *evolve, int iBody) {
body[iBody].daIceHeight[iLat-1]-body[iBody].daBedrockH[iLat-1]) / \
(body[iBody].dRadius*deltax) )/2.0;
}
+ printf("%d\n",iLat);
+
+ printf("%f\n",fabs(body[iBody].daBedrockH[iLat]));
+ fflush(stdout);
+
body[iBody].daIceFlow[iLat] = 2*Aice*pow(RHOICE*grav,nGLEN)/(nGLEN+2.0) * \
pow(fabs(body[iBody].daDIceHeightDy[iLat]),nGLEN-1) * \
pow(body[iBody].daIceHeight[iLat]+body[iBody].daBedrockH[iLat],nGLEN+2);
|
dpdk: add function to add/del extra MAC addrs
Type: feature
Add a callback to install or remove an additional MAC address on
a DPDK-managed device. Note that some PMDs don't have support for
this so YMMV. | @@ -42,6 +42,29 @@ static char *dpdk_tx_func_error_strings[] = {
#undef _
};
+static clib_error_t *
+dpdk_add_del_mac_address (vnet_hw_interface_t * hi,
+ const u8 * address, u8 is_add)
+{
+ int error;
+ dpdk_main_t *dm = &dpdk_main;
+ dpdk_device_t *xd = vec_elt_at_index (dm->devices, hi->dev_instance);
+
+ if (is_add)
+ error = rte_eth_dev_mac_addr_add (xd->port_id,
+ (struct rte_ether_addr *) address, 0);
+ else
+ error = rte_eth_dev_mac_addr_remove (xd->port_id,
+ (struct rte_ether_addr *) address);
+
+ if (error)
+ {
+ return clib_error_return (0, "mac address add/del failed: %d", error);
+ }
+
+ return NULL;
+}
+
static clib_error_t *
dpdk_set_mac_address (vnet_hw_interface_t * hi,
const u8 * old_address, const u8 * address)
@@ -600,6 +623,7 @@ VNET_DEVICE_CLASS (dpdk_device_class) = {
.subif_add_del_function = dpdk_subif_add_del_function,
.rx_redirect_to_node = dpdk_set_interface_next_node,
.mac_addr_change_function = dpdk_set_mac_address,
+ .mac_addr_add_del_function = dpdk_add_del_mac_address,
.format_flow = format_dpdk_flow,
.flow_ops_function = dpdk_flow_ops_fn,
};
|
Feat:Modify llvm.s,appoint the fibocom_task_entry as thread entry point function | @ /* Define application-specific start/stop entry points for the module. */
- .extern test_dam_app_start
+ .extern fibocom_task_entry
@ /* Define common external refrences. */
@@ -46,7 +46,7 @@ _txm_module_preamble:
@ 1 -> MMU protection Enabled
.word _txm_module_thread_shell_entry - . + . @ Module Shell Entry Point
.p2align 2
- .word test_dam_app_start - . + . @ Module Start Thread Entry Point
+ .word fibocom_task_entry - . + . @ Module Start Thread Entry Point
.p2align 2
.word 0 @ Module Stop Thread Entry Point
.p2align 2
|
[build] autotools use AC_PROG_CC_STDC macro
autotools now use AC_PROG_CC_STDC macro instead of -std=gnu99.
The default in current modern gcc compilers is -std=gnu11
(Note: src/CMakeLists.txt and SConstruct still specify -std=gnu99) | @@ -62,6 +62,7 @@ AC_DEFUN([TRY_LDFLAGS],
dnl Checks for programs.
AC_PROG_CC
+AC_PROG_CC_STDC
AX_PROG_CC_FOR_BUILD
AM_PROG_CC_C_O
AC_PROG_LD
@@ -965,7 +966,6 @@ AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_found" = xyes)
dnl check for extra compiler options (warning options)
if test "${GCC}" = "yes"; then
TRY_CFLAGS([-Wall -W -Wshadow -pedantic])
- TRY_CFLAGS([-std=gnu99])
fi
AC_ARG_ENABLE(extra-warnings,
|
admin/meta-packages: include binutils for leap as well | @@ -63,9 +63,9 @@ Requires: OpenIPMI
Requires: pdsh%{PROJ_DELIM}
Requires: screen
Requires: sudo
-%if 0%{?rhel}
Requires: binutils
Requires: binutils-devel
+%if 0%{?rhel}
Requires: man-db
Requires: yum-utils
%endif
|
board/servo_v4/usb_pd_config.h: Format with clang-format
BRANCH=none
TEST=none
Tricium: disable | @@ -193,7 +193,8 @@ static inline void pd_select_polarity(int port, int polarity)
if (port == 0) {
/* CHG use the right comparator inverted input for COMP2 */
STM32_COMP_CSR = (val & ~STM32_COMP_CMP2INSEL_MASK) |
- (polarity ? STM32_COMP_CMP2INSEL_INM4 /* PA4:
+ (polarity ?
+ STM32_COMP_CMP2INSEL_INM4 /* PA4:
C0_CC2
*/
:
@@ -203,7 +204,8 @@ static inline void pd_select_polarity(int port, int polarity)
} else {
/* DUT use the right comparator inverted input for COMP1 */
STM32_COMP_CSR = (val & ~STM32_COMP_CMP1INSEL_MASK) |
- (polarity ? STM32_COMP_CMP1INSEL_INM5 /* PA5:
+ (polarity ?
+ STM32_COMP_CMP1INSEL_INM5 /* PA5:
C1_CC2
*/
:
|
{AH} ignore samtools idxstats usage test | @@ -266,7 +266,8 @@ class SamtoolsTest(unittest.TestCase):
# ignore commands that exit or cause other failures
# TODO: check - if reheader or phase is run in testStatements, sort fails
# here
- if command in ("view", "sort", "bam2fq", "flagstat", "reheader", "stats"):
+ if command in ("view", "sort", "bam2fq", "flagstat", "reheader",
+ "stats", "idxstats"):
continue
mapped_command = self.get_command(statement, map_to_internal=True)
pysam_method = getattr(self.module, mapped_command)
|
catboost: Fix build by removing version control conflict marker
Note: mandatory check (NEED_CHECK) was skipped | @@ -588,12 +588,8 @@ const ui8* GetFeatureDataBeginPtr(
consecutiveSubsetBegin,
featureIdx);
} else {
-<<<<<<< catboost/libs/algo/index_calcer.cpp
- return (**quantizedObjectsData.GetBinaryFeaturesPack((*packedIdx)[featureIdx]->PackIdx).GetSrc()).data();
-=======
return (**quantizedObjectsData.GetBinaryFeaturesPack(
(*packedIdx)[featureIdx]->PackIdx
- ).GetSrc()).Data();
->>>>>>> catboost/libs/algo/index_calcer.cpp
+ ).GetSrc()).data();
}
}
|
[mod_magnet] lighty.c.quotedenc(),dec() funcs
lighty.c.quotedenc() and lighty.c.quoteddec() convenience functions
to encode and decode MIME quoted-string, e.g. quoted-string formats
in HTTP headers. | @@ -935,6 +935,61 @@ static int magnet_hexenc(lua_State *L) {
return 1; /* uppercase hex string; use lua s = s:lower() to lowercase */
}
+static int magnet_quoteddec(lua_State *L) {
+ if (lua_isnoneornil(L, -1)) {
+ lua_pushlstring(L, "", 0);
+ return 1;
+ }
+ const_buffer s = magnet_checkconstbuffer(L, -1);
+ if (0 == s.len || s.ptr[0] != '"') {
+ lua_pushvalue(L, -1);
+ return 1;
+ }
+ buffer * const b = magnet_tmpbuf_acquire(L);
+ char *p = buffer_string_prepare_append(b, s.len);/*(s.len-1 is sufficient)*/
+ size_t i = 1;
+ for (; i < s.len && s.ptr[i] != '"'; ++i) {
+ if (s.ptr[i] == '\\') {
+ if (i+2 < s.len)
+ ++i;
+ else
+ break;
+ }
+ *p++ = s.ptr[i];
+ }
+ int rc = (i == s.len-1 && s.ptr[i] == '"');
+ if (rc)
+ lua_pushlstring(L, b->ptr, (size_t)(p - b->ptr));
+ magnet_tmpbuf_release(b);
+ return rc; /* 1 on success (pushed string); 0 on failure (no value) */
+}
+
+static int magnet_quotedenc(lua_State *L) {
+ if (lua_isnoneornil(L, -1)) {
+ lua_pushlstring(L, "", 0);
+ return 1;
+ }
+ const_buffer s = magnet_checkconstbuffer(L, -1);
+ if (0 == s.len) {
+ lua_pushvalue(L, -1);
+ return 1;
+ }
+ buffer * const b = magnet_tmpbuf_acquire(L);
+ char *p = buffer_string_prepare_append(b, 2+(s.len << 1));
+ *p++ = '"';
+ for (size_t i = 0; i < s.len; ++i) {
+ /*(note: not strictly checking for TEXT)*/
+ /*(TEXT: any OCTET except CTLs but including LWS)*/
+ if (s.ptr[i] == '"' || s.ptr[i] == '\\')
+ *p++ = '\\';
+ *p++ = s.ptr[i];
+ }
+ *p++ = '"';
+ lua_pushlstring(L, b->ptr, (size_t)(p - b->ptr));
+ magnet_tmpbuf_release(b);
+ return 1;
+}
+
static int magnet_xmlenc(lua_State *L) {
if (lua_isnoneornil(L, -1)) {
lua_pushlstring(L, "", 0);
@@ -2272,6 +2327,8 @@ static void magnet_init_lighty_table(lua_State * const L) {
,{ "fspath_simplify", magnet_fspath_simplify } /* simplify fspath */
,{ "cookie_tokens", magnet_cookie_tokens } /* parse cookie tokens */
,{ "readdir", magnet_readdir } /* dir walk */
+ ,{ "quoteddec", magnet_quoteddec } /* quoted-string decode */
+ ,{ "quotedenc", magnet_quotedenc } /* quoted-string encode */
,{ NULL, NULL }
};
|
esp32/modnetwork: Add network.(W)LAN.ifconfig('dhcp') support. | @@ -461,6 +461,7 @@ STATIC mp_obj_t esp_ifconfig(size_t n_args, const mp_obj_t *args) {
return mp_obj_new_tuple(4, tuple);
} else {
// set
+ if (MP_OBJ_IS_TYPE(args[1], &mp_type_tuple) || MP_OBJ_IS_TYPE(args[1], &mp_type_list)) {
mp_obj_t *items;
mp_obj_get_array_fixed_n(args[1], 4, &items);
netutils_parse_ipv4_addr(items[0], (void*)&info.ip, NETUTILS_BIG);
@@ -489,6 +490,14 @@ STATIC mp_obj_t esp_ifconfig(size_t n_args, const mp_obj_t *args) {
ESP_EXCEPTIONS(tcpip_adapter_set_dns_info(WIFI_IF_AP, TCPIP_ADAPTER_DNS_MAIN, &dns_info));
ESP_EXCEPTIONS(tcpip_adapter_dhcps_start(WIFI_IF_AP));
}
+ } else {
+ // check for the correct string
+ const char *mode = mp_obj_str_get_str(args[1]);
+ if ((self->if_id != WIFI_IF_STA && self->if_id != ESP_IF_ETH) || strcmp("dhcp", mode)) {
+ mp_raise_ValueError("invalid arguments");
+ }
+ ESP_EXCEPTIONS(tcpip_adapter_dhcpc_start(self->if_id));
+ }
return mp_const_none;
}
}
|
Extract String literal to static constant | @@ -9,6 +9,9 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class ClipboardManager {
+
+ private static final String PACKAGE_NAME = "com.android.shell";
+
private final IInterface manager;
private Method getPrimaryClipMethod;
private Method setPrimaryClipMethod;
@@ -45,7 +48,7 @@ public class ClipboardManager {
return null;
}
try {
- ClipData clipData = (ClipData) method.invoke(manager, "com.android.shell");
+ ClipData clipData = (ClipData) method.invoke(manager, PACKAGE_NAME);
if (clipData == null || clipData.getItemCount() == 0) {
return null;
}
@@ -63,7 +66,7 @@ public class ClipboardManager {
}
ClipData clipData = ClipData.newPlainText(null, text);
try {
- method.invoke(manager, clipData, "com.android.shell");
+ method.invoke(manager, clipData, PACKAGE_NAME);
} catch (InvocationTargetException | IllegalAccessException e) {
Ln.e("Could not invoke " + method.getName(), e);
}
|
vere: fix -Y (should not be resolved) | @@ -251,7 +251,7 @@ _main_getopt(c3_i argc, c3_c** argv)
break;
}
case 'Y': {
- u3_Host.ops_u.puk_c = _main_repath(optarg);
+ u3_Host.ops_u.puk_c = strdup(optarg);
break;
}
case 'Z': {
|
Upgrading to boost1.67 | @@ -7,9 +7,11 @@ matrix:
addons:
apt:
sources:
+ - sourceline: 'ppa:mhier/libboost-latest'
- ubuntu-toolchain-r-test
packages:
- g++-7
+ - boost1.67
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
@@ -27,8 +29,8 @@ before_install:
- eval "${MATRIX_EVAL}"
install:
- - sudo apt-get install -y libboost-test-dev
- - sudo apt-get install -y libboost-thread-dev
+# - sudo apt-get install -y libboost-test-dev
+# - sudo apt-get install -y libboost-thread-dev
before_script:
- mkdir -p $BUILD_HOME
|
relay: ensure numeric options have numeric arguments
Issue revealed that -m silently accepted a bogus option, leading to
undefined (faulty) behaviour. | @@ -509,7 +509,9 @@ main(int argc, char * const argv[])
break;
case 'L':
maxstalls = atoi(optarg);
- if (maxstalls < 0 || maxstalls >= (1 << SERVER_STALL_BITS)) {
+ if (maxstalls < 0 || maxstalls >= (1 << SERVER_STALL_BITS) ||
+ !isdigit(*optarg))
+ {
fprintf(stderr, "error: maximum stalls needs to be a number "
"between 0 and %d\n", (1 << SERVER_STALL_BITS) - 1);
do_usage(argv[0], 1);
@@ -541,7 +543,7 @@ main(int argc, char * const argv[])
break;
case 'm': {
int val = atoi(optarg);
- if (val < 0) {
+ if (val < 0 || !isdigit(*optarg)) {
fprintf(stderr, "error: max metric length needs to "
"be a number >=0\n");
do_usage(argv[0], 1);
@@ -617,6 +619,11 @@ main(int argc, char * const argv[])
break;
case 'O': {
int val = atoi(optarg);
+ if (val == 0 && !isdigit(*optarg)) {
+ fprintf(stderr, "error: optimiser threshold needs to "
+ "be a number\n");
+ do_usage(argv[0], 1);
+ }
optimiserthreshold = val < 0 ? -1 : val;
} break;
case '?':
|
tests: test_pipe.py. Fix missing import.
* Fix missing import (does not impact 'make test', fixes issue
running under 'make test-shell') | #!/usr/bin/env python
from socket import AF_INET, AF_INET6, inet_pton
-
-from framework import VppTestCase, VppTestRunner
-from vpp_interface import VppInterface
-from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
+import unittest
from scapy.packet import Raw
from scapy.layers.l2 import Ether
from scapy.layers.inet import IP, UDP
+from framework import VppTestCase, VppTestRunner
+from vpp_interface import VppInterface
+from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
+
class VppPipe(VppInterface):
"""
|
RPM spec update. | Name: libneat
-Version: 1.0.2~td5
+Version: 1.0.2~rc5.1
Release: 1
Summary: NEAT Project
License: BSD
Group: Applications/Internet
URL: https://github.com/NEAT-project/neat
-Source: %{name}-%{version}.tar.gz
+Source: %{name}-%{version}.tar.xz
AutoReqProv: on
BuildRequires: cmake
|
doc: PG 12 relnotes, add item - pg_test_fsync fix on Windows
Reported-by: Laurenz Albe
Discussion:
Backpatch-through: 12 | @@ -2833,6 +2833,20 @@ Author: Andrew Dunstan <[email protected]>
</para>
</listitem>
+ <listitem>
+<!--
+Author: Michael Paquier <[email protected]>
+2018-09-14 [0ba06e0bf] Allow concurrent-safe open() and fopen() in frontend
+2018-09-20 [40cfe8606] Enforce translation mode for Windows frontends to text
+-->
+
+ <para>
+ Fix <xref linkend="pgtestfsync"/> to report accurate
+ <literal>open_datasync</literal> durations on
+ <productname>Windows</productname> (Laurenz Albe)
+ </para>
+ </listitem>
+
</itemizedlist>
</sect4>
|
docs: rely on alternative approach to fix munge file permissions | @@ -7,9 +7,6 @@ pool, issue the following:
\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true]
[sms](*\#*) echo "/etc/slurm/slurm.conf -> /etc/slurm/slurm.conf" >> /install/custom/netboot/compute.synclist
[sms](*\#*) echo "/etc/munge/munge.key -> /etc/munge/munge.key" >>/install/custom/netboot/compute.synclist
-[sms](*\#*) echo "/etc/munge/ -> /etc/munge/" >> /install/custom/netboot/compute.synclist
-[sms](*\#*) echo "/var/log/munge -> /var/log/munge" >> /install/custom/netboot/compute.synclist
-[sms](*\#*) echo "/var/lib/munge -> /var/lib/munge" >> /install/custom/netboot/compute.synclist
\end{lstlisting}
% \end_ohpc_run
|
Specify prefix for lcov output.
This prevents pages from moving around depending on the subtest. | @@ -1178,6 +1178,7 @@ eval
{
executeTest(
"genhtml ${strLCovFile} --config-file=${strBackRestBase}/test/src/lcov.conf" .
+ " --prefix=${strBackRestBase}/test/.vagrant/code" .
" --output-directory=${strBackRestBase}/test/coverage/c");
foreach my $strCodeModule (sort(keys(%{$hCoverageActual})))
|
Suggest that BSD users compile with gcc | @@ -68,6 +68,10 @@ configure:
LDFLAGS="-L/some/directory" \
./configure ...
+On BSD, you may want to compile with `gcc` instead of `clang` by first installing `gcc`, and then specifying its path in the `CC` environment variable when configuring:
+
+ CC=/usr/local/bin/gcc9 ./configure
+
Once you have configured things, just type:
make ENTER
|
Fix dealing with array types when getting method parameters | @@ -256,6 +256,12 @@ HRESULT Library_corlib_native_System_Reflection_MethodBase::GetParametersNative_
hbObj = paraTypeHB.Dereference();
hbObj->SetReflection(paramElement.m_cls);
+ // deal with array types
+ if (paramElement.m_levels > 0)
+ {
+ hbObj->ReflectionData().m_levels = (CLR_UINT16)paramElement.m_levels;
+ }
+
// move pointer to the next element
paramInfoElement++;
}
|
ExtendedTools: Fix regression (reported by MarekKnapek) | @@ -307,8 +307,9 @@ VOID EtpProcessDiskPacket(
{
diskItem->ProcessItem = processItem;
PhSetReference(&diskItem->ProcessName, processItem->ProcessName);
+
+ PhReferenceProcessRecord(processItem->Record);
diskItem->ProcessRecord = processItem->Record;
- PhReferenceProcessRecord(diskItem->ProcessRecord);
if (!diskItem->ProcessIconValid && PhTestEvent(&processItem->Stage1Event))
{
@@ -522,7 +523,7 @@ VOID NTAPI EtpDiskProcessesUpdatedCallback(
if (!diskItem->ProcessRecord)
{
- PhReferenceProcessRecord(diskItem->ProcessRecord);
+ PhReferenceProcessRecord(diskItem->ProcessItem->Record);
diskItem->ProcessRecord = diskItem->ProcessItem->Record;
modified = TRUE;
}
|
doc: incorporate suggestions from | @@ -296,8 +296,8 @@ following 2 checklists:
### Consistency
-- [ ] Consistent naming schemes for enums, macros, typedefs and functions (called components below)
-- [ ] Similar things are named similarly
+- [ ] Consistent naming schemes for enums, macros, typedefs and functions
+- [ ] Same things are named the same and included in [Glossary](/doc/help/elektra-glossary.md)
- [ ] Different things are named differently
- [ ] The order of arguments should be consistent across similar functions
@@ -320,7 +320,6 @@ following 2 checklists:
### Documentation
- [ ] Change is mentioned in the Compatibility section of the release notes
-- [ ] No inconsistencies between documentation and code
- [ ] No inconsistencies between documentation and tests
- [ ] Proper Documentation of thread-safety of function
- [ ] All possible error states are documented
@@ -328,8 +327,8 @@ following 2 checklists:
#### Doxygen
-- [ ] Return Value
- [ ] Precondition / Postcondition / Invariant
+- [ ] `@retval`
- [ ] `@see`
- [ ] `@since`
- [ ] `@ingroup`
@@ -337,8 +336,10 @@ following 2 checklists:
### Naming
-- [ ] Abbreviations should be avoided in function names
-- [ ] Abbreviations should be avoided in parameter names
+- [ ] Abbreviations used in parameter names must be defined in the
+ [Glossary](/doc/help/elektra-glossary.md)
+- [ ] Abbreviations used in function names must be defined in the
+ [Glossary](/doc/help/elektra-glossary.md)
- [ ] Parameter names should neither be too long, nor too short
- [ ] Function names should neither be too long, nor too short
- [ ] Function name should be clear and unambiguous
@@ -354,10 +355,11 @@ following 2 checklists:
### Parameter & Return Types
- [ ] Functions should return the most specific type possible
-- [ ] Functions should require the most liberal type possible
+- [ ] Functions should require the most general type possible
- [ ] Functions should use constant types instead of boolean types
wherever sensible
- [ ] Wherever possible, function parameters should be `const`
+- [ ] Wherever possible, return types should be `const`
- [ ] Functions should have the least amount of parameters feasible
### Structural Clarity
@@ -370,12 +372,11 @@ following 2 checklists:
### Memory Management
- [ ] Memory Management should be handled by the function wherever possible
-- [ ] Functions, who require a large amount of memory to be allocated,
- state so in their documentation
+- [ ] Every memory allocation should be documented
### Extensibility
-- [ ] Function is easily extensible with additional functionality via bitmap-flags
+- [ ] Function is easily extensible with function flags (constants)
- [ ] Documentation does not impose limits, that would hinder further extensions
### Tests
@@ -383,6 +384,5 @@ following 2 checklists:
- [ ] Added functions are fully covered by tests
- [ ] All possible error states are covered by tests
- [ ] All possible configuration options are covered by tests
-- [ ] Tests cover possible edge-cases
-- [ ] No inconsistencies between tests and code
+- [ ] Function body has full test coverage
- [ ] No inconsistencies between tests and documentation
|
Increase column order limiting (https://wj32.org/processhacker/forums/viewtopic.php?t=2798) | @@ -214,7 +214,7 @@ INT_PTR CALLBACK PhpColumnsDlgProc(
break;
case IDOK:
{
-#define ORDER_LIMIT 100
+#define ORDER_LIMIT 200
PPH_LIST activeList;
ULONG activeCount;
ULONG i;
|
add section on network device to README | @@ -83,6 +83,31 @@ By passing the +blkdev argument on the simulator command line, you can allow
the RTL simulation to read and write from a file. Take a look at tests/blkdev.c
for an example of how Rocket can program the block device controller.
+## Using the network device
+
+Testchipip also includes a basic ethernet controller (SimpleNIC). The simulator
+provides a way to connect this up to a tap interface and thus interact with
+rocketchip as if it was a regular network node.
+
+First set up the tap interface. If you want to run the simulation as a regular
+user (recommended), use the following commands.
+
+ sudo ip tuntap add mode tap dev tap0 user $USER
+ sudo ip link set tap0 up
+ sudo ip addr add 192.168.1.1/24 dev tap0
+
+Then build the SimNetworkConfig and pass it the name of the tap interface
+
+ make CONFIG=SimNetworkConfig
+ ./simulator-example-SimNetworkConfig +netdev=tap0 ../tests/pingd.riscv
+
+Then run ping in a separate terminal.
+
+ ping 192.168.1.2
+
+You should now see the ping responses come back. The `pingd.riscv` program
+will also log each packet it receives.
+
## Adding an MMIO peripheral
You can RocketChip to create your own memory-mapped IO device and add it into
|
Add Double inside meta visitor of Converter | @@ -14,6 +14,7 @@ auto s_metaVisitor = [](auto... args) {
LuaRED<uint32_t, "Uint32">(),
LuaRED<uint64_t, "Uint64">(),
LuaRED<float, "Float">(),
+ LuaRED<double, "Double">(),
LuaRED<bool, "Bool">(),
LuaRED<Quaternion, "Quaternion">(),
LuaRED<Vector3, "Vector3">(),
|
Updated error message and setting origvalue only before transformations | @@ -160,6 +160,7 @@ int elektraMacaddrGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key *
if (rc != VALIDATION_ISINT)
{
+ keySetMeta (cur, "origvalue", keyString (cur));
transformMac (cur);
}
}
@@ -188,12 +189,10 @@ int elektraMacaddrSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned, Key *
{
ELEKTRA_SET_ERRORF (ELEKTRA_ERROR_INVALID_FORMAT, parentKey,
"%s is not in a supported format. Supported formats are:\nXX:XX:XX:XX:XX:XX\n"
- "XX-XX-XX-XX-XX-XX\nXXXXXX-XXXXXX",
+ "XX-XX-XX-XX-XX-XX\nXXXXXX-XXXXXX\nInteger values (0 - 281474976710655)",
keyString (cur));
return ELEKTRA_PLUGIN_STATUS_ERROR;
}
-
- keySetMeta (cur, "origvalue", keyString (cur));
}
return ELEKTRA_PLUGIN_STATUS_SUCCESS;
|
Fix misbehavior of H09 server on delayed FIN | @@ -964,6 +964,7 @@ int picoquic_h09_server_process_data(picoquic_cnx_t* cnx,
}
/* if FIN present, process request through http 0.9 */
+ if (stream_ctx->ps.hq.status != picohttp_server_stream_status_finished) {
if (fin_or_event == picoquic_callback_stream_fin || (stream_ctx->method == 0 && stream_ctx->ps.hq.status == picohttp_server_stream_status_crlf)) {
char buf[1024];
uint8_t post_response[512];
@@ -1030,7 +1031,8 @@ int picoquic_h09_server_process_data(picoquic_cnx_t* cnx,
stream_ctx->response_length = strlen(bad_request_message);
(void)picoquic_add_to_stream_with_ctx(cnx, stream_ctx->stream_id, (const uint8_t*)bad_request_message,
stream_ctx->response_length, 1, (void*)stream_ctx);
- } else {
+ }
+ else {
/* If this is HTTP1, send an HTTP1 OK message, with the appropriate content type */
if (stream_ctx->ps.hq.proto != 0) {
size_t header_length = 0;
@@ -1068,6 +1070,7 @@ int picoquic_h09_server_process_data(picoquic_cnx_t* cnx,
fflush(cnx->quic->F_log);
}
}
+ }
return ret;
}
|
modernize straggling reference to %aver | ?- sign
[%b %wake *] (on-take-wake:event-core wire error.sign)
::
- [%c %done *] (on-aver:event-core wire error.sign)
- [%g %done *] (on-aver:event-core wire error.sign)
- [%j %done *] (on-aver:event-core wire error.sign)
+ [%c %done *] (on-done:event-core wire error.sign)
+ [%g %done *] (on-done:event-core wire error.sign)
+ [%j %done *] (on-done:event-core wire error.sign)
::
[%c %memo *] (on-take-memo:event-core wire message.sign)
[%g %memo *] (on-take-memo:event-core wire message.sign)
++ event-core .
++ abet [(flop moves) ames-state]
++ emit |=(=move event-core(moves [move moves]))
- :: +on-aver: handle notice from vane that it processed a message
+ :: +on-done: handle notice from vane that it processed a message
::
- ++ on-aver
+ ++ on-done
|= [=wire error=(unit error)]
^+ event-core
::
|
Reinstate code setting desired ghost data type | @@ -990,6 +990,10 @@ avtVolumeFilter::ModifyContract(avtContract_p contract)
if (atts.GetScaling() == VolumeAttributes::Linear)
{
+ if ((atts.GetRendererType() == VolumeAttributes::RayCasting) &&
+ (atts.GetSampling() == VolumeAttributes::Trilinear))
+ ds->SetDesiredGhostDataType(GHOST_ZONE_DATA);
+
newcontract = new avtContract(contract, ds);
primaryVariable = new char[strlen(var)+1];
strcpy(primaryVariable, var);
@@ -1010,6 +1014,9 @@ avtVolumeFilter::ModifyContract(avtContract_p contract)
avtDataRequest_p nds = new avtDataRequest(exprName.c_str(),
ds->GetTimestep(), ds->GetRestriction());
nds->AddSecondaryVariable(var);
+ if ((atts.GetRendererType() == VolumeAttributes::RayCasting) &&
+ (atts.GetSampling() == VolumeAttributes::Trilinear))
+ nds->SetDesiredGhostDataType(GHOST_ZONE_DATA);
newcontract = new avtContract(contract, nds);
primaryVariable = new char[exprName.size()+1];
strcpy(primaryVariable, exprName.c_str());
@@ -1023,6 +1030,9 @@ avtVolumeFilter::ModifyContract(avtContract_p contract)
new avtDataRequest(exprName.c_str(),
ds->GetTimestep(), ds->GetRestriction());
nds->AddSecondaryVariable(var);
+ if ((atts.GetRendererType() == VolumeAttributes::RayCasting) &&
+ (atts.GetSampling() == VolumeAttributes::Trilinear))
+ nds->SetDesiredGhostDataType(GHOST_ZONE_DATA);
newcontract = new avtContract(contract, nds);
primaryVariable = new char[strlen(exprName.c_str())+1];
strcpy(primaryVariable, exprName.c_str());
|
MARS Streams: rename streams (case) | 1054 rjtd Tokyo
1055 cwao Montreal
1056 ammc Melbourne
-1057 efas European Flood Awareness System (EFAS)
-1058 efse European Flood Awareness System (EFAS) seasonal forecasts
-1059 efcl European Flood Awareness System (EFAS) climatology
+1057 efas European flood awareness system (EFAS)
+1058 efse European flood awareness system (EFAS) seasonal forecasts
+1059 efcl European flood awareness system (EFAS) climatology
1060 wfas Global flood awareness system (GLOFAS)
1061 wfcl Global flood awareness system (GLOFAS) climatology
1062 wfse Global flood awareness system (GLOFAS) seasonal forecasts
-1063 efrf European Flood Awareness System (EFAS) reforecasts
-1064 efsr European Flood Awareness System (EFAS) seasonal reforecasts
+1063 efrf European flood awareness system (EFAS) reforecasts
+1064 efsr European flood awareness system (EFAS) seasonal reforecasts
1065 wfrf Global flood awareness system (GLOFAS) reforecasts
1066 wfsr Global flood awareness system (GLOFAS) seasonal reforecasts
1070 msdc Monthly standard deviation and covariance
|
Comment why is used | @@ -540,6 +540,8 @@ class NameCheck():
self.set_return_code(2)
raise error
finally:
+ # Put back the original config regardless of there being errors.
+ # Works also for keyboard interrupts.
shutil.move("include/mbedtls/mbedtls_config.h.bak",
"include/mbedtls/mbedtls_config.h")
|
YAML: Remove trailing dot from non-sentences | @@ -187,10 +187,10 @@ static parserType * getNextChar (parserType * parser)
static parserType * putBackChar (parserType * parser)
{
ASSERT_NOT_NULL (parser);
- ELEKTRA_ASSERT (parser->buffer - 1 >= parser->bufferBase, "Can not put back more characters than available.");
+ ELEKTRA_ASSERT (parser->buffer - 1 >= parser->bufferBase, "Can not put back more characters than available");
// We assume that we never put back the newline character
- ELEKTRA_ASSERT (*(parser->buffer - 1) != '\n', "Tried to put back newline character.");
+ ELEKTRA_ASSERT (*(parser->buffer - 1) != '\n', "Tried to put back newline character");
parser->column--;
parser->bufferCharsAvailable++;
parser->buffer--;
|
Updated travis yml to reflect latest storage. | @@ -10,23 +10,19 @@ compiler:
env:
- CONFIGURE_OPTIONS=""
- CONFIGURE_OPTIONS="--enable-geoip=legacy --enable-utf8"
- - CONFIGURE_OPTIONS="--enable-geoip=legacy --enable-utf8 --enable-tcb=btree --disable-bzip --disable-zlib"
- - CONFIGURE_OPTIONS="--enable-geoip=legacy --enable-utf8 --enable-tcb=memhash --disable-bzip --disable-zlib"
- - CONFIGURE_OPTIONS="--enable-tcb=memhash --disable-bzip --disable-zlib"
- - CONFIGURE_OPTIONS="--enable-tcb=btree --disable-bzip --disable-zlib"
- - CONFIGURE_OPTIONS="--enable-geoip=mmdb --enable-utf8 --enable-tcb=btree --with-openssl"
+ - CONFIGURE_OPTIONS="--enable-geoip=legacy --enable-utf8 --enable-debug"
+ - CONFIGURE_OPTIONS="--enable-geoip=mmdb --enable-utf8 --with-openssl"
+ - CONFIGURE_OPTIONS="--enable-geoip=legacy --enable-utf8 --with-openssl --with-getline"
addons:
apt:
packages:
- - libglib2.0-dev
+ - libncursesw5-dev
- libncurses5-dev
- libgeoip-dev
- autoconf
- autotools-dev
- - libtokyocabinet-dev
- libssl-dev
- - libbz2-dev
- libmaxminddb-dev
- gettext
- autopoint
|
remove HSA_XNACK alltogether | @@ -136,9 +136,3 @@ else
RUNENV = env $(SET_DEVICE_DEBUG) $(TKILL)
endif
-ifeq ($(HSA_XNACK),1)
-# this causes issues on amd-stg-open, as the flag -offload-arch
-# does not exist. it incorrectly becomes -o ffload-arch
-# OMP_FLAGS += -offload-usm
-echo not settting -offload-usm
-endif
|
Deleting blanks in the line end | @@ -100,7 +100,6 @@ void fill_vnode_array(snapu32_t vex_num, VexNode * vex_array, snapu64_t address
{
xfer_bytes = read_bulk(src_mem, address + address_xfer_offset, left_bytes, block_buf);
-
ap_uint<VEX_WIDTH> iii, jjj;
for(iii = 0; iii < xfer_bytes/sizeof(VexNode); iii++)
@@ -118,7 +117,6 @@ void fill_vnode_array(snapu32_t vex_num, VexNode * vex_array, snapu64_t address
}
index ++;
}
-
left_bytes -= xfer_bytes;
address_xfer_offset += MAX_NB_OF_BYTES_READ;
}
@@ -160,14 +158,11 @@ void hls_action(snap_membus_t *din_gmem, snap_membus_t *dout_gmem,
ap_uint<VEX_WIDTH> i,j, root, current, vex_num;
ap_uint<VEX_WIDTH> vnode_cnt;
ap_uint<VEX_WIDTH> adjvex;
-
snapu32_t vnode_idx;
snapu64_t edgelink_ptr;
-
snap_membus_t edge_node;
snapu32_t buf_out[32]; //To fill a cacheline and write to output_traverse.
-
/* Required Action Type Detection */
switch (Action_Register->Control.flags) {
case 0:
@@ -208,19 +203,16 @@ void hls_action(snap_membus_t *din_gmem, snap_membus_t *dout_gmem,
//Enqueue
Q.write(root); //Need several actions to fill the internal until empty() takes effect.
-
for (i = 0; i < vex_num; i ++)
{
#pragma HLS UNROLL factor=128
visited[i] = 0;
}
-
// First fill
buf_out[0] = root;
vnode_cnt = 1;
vnode_idx = 1;
visited[root]=1;
-
while (!Q.empty())
{
current = Q.read();
@@ -263,10 +255,8 @@ void hls_action(snap_membus_t *din_gmem, snap_membus_t *dout_gmem,
//Last node
buf_out[vnode_idx] = 0xFF000000 + vnode_cnt; //0xFF is a mark of END.
write_out_buf(dout_gmem, commit_address, buf_out);
-
vnode_idx = 0;
commit_address += BPERCL; //One cacheline
-
//Update register
Action_Register->Data.status_pos = commit_address(31,0);
Action_Register->Data.status_vex = root;
|
common/led_policy_std.c: Format with clang-format
BRANCH=none
TEST=none | #define POWER_LED_OFF 0
#endif
-const enum ec_led_id supported_led_ids[] = {
- EC_LED_ID_BATTERY_LED, EC_LED_ID_POWER_LED};
+const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED,
+ EC_LED_ID_POWER_LED };
const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids);
@@ -108,15 +108,18 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
case EC_LED_ID_BATTERY_LED:
gpio_set_level(GPIO_BAT_LED_RED,
(brightness[EC_LED_COLOR_RED] != 0) ?
- BAT_LED_ON : BAT_LED_OFF);
+ BAT_LED_ON :
+ BAT_LED_OFF);
gpio_set_level(GPIO_BAT_LED_GREEN,
(brightness[EC_LED_COLOR_GREEN] != 0) ?
- BAT_LED_ON : BAT_LED_OFF);
+ BAT_LED_ON :
+ BAT_LED_OFF);
break;
case EC_LED_ID_POWER_LED:
gpio_set_level(GPIO_POWER_LED,
(brightness[EC_LED_COLOR_WHITE] != 0) ?
- POWER_LED_ON : POWER_LED_OFF);
+ POWER_LED_ON :
+ POWER_LED_OFF);
break;
default:
return EC_ERROR_UNKNOWN;
@@ -163,11 +166,11 @@ static void std_led_set_battery(void)
break;
case PWR_STATE_DISCHARGE:
if (charge_get_percent() < 3)
- bat_led_set_color((battery_second & 1)
- ? LED_OFF : LED_AMBER);
+ bat_led_set_color((battery_second & 1) ? LED_OFF :
+ LED_AMBER);
else if (charge_get_percent() < 10)
- bat_led_set_color((battery_second & 3)
- ? LED_OFF : LED_AMBER);
+ bat_led_set_color((battery_second & 3) ? LED_OFF :
+ LED_AMBER);
else
bat_led_set_color(LED_OFF);
break;
@@ -179,8 +182,8 @@ static void std_led_set_battery(void)
break;
case PWR_STATE_IDLE: /* External power connected in IDLE. */
if (chflags & CHARGE_FLAG_FORCE_IDLE)
- bat_led_set_color(
- (battery_second & 0x2) ? LED_GREEN : LED_AMBER);
+ bat_led_set_color((battery_second & 0x2) ? LED_GREEN :
+ LED_AMBER);
else
bat_led_set_color(LED_GREEN);
break;
|
Document SSL_CIPHER_get_handshake_digest() | =head1 NAME
-SSL_CIPHER_get_cipher_nid, SSL_CIPHER_get_digest_nid, SSL_CIPHER_get_kx_nid,
-SSL_CIPHER_get_auth_nid, SSL_CIPHER_is_aead,
-SSL_CIPHER_get_name, SSL_CIPHER_get_bits,
-SSL_CIPHER_get_version, SSL_CIPHER_description
+SSL_CIPHER_get_name,
+SSL_CIPHER_get_bits,
+SSL_CIPHER_get_version,
+SSL_CIPHER_description,
+SSL_CIPHER_get_cipher_nid,
+SSL_CIPHER_get_digest_nid,
+SSL_CIPHER_get_handshake_digest,
+SSL_CIPHER_get_kx_nid,
+SSL_CIPHER_get_auth_nid,
+SSL_CIPHER_is_aead
- get SSL_CIPHER properties
=head1 SYNOPSIS
@@ -18,6 +24,7 @@ SSL_CIPHER_get_version, SSL_CIPHER_description
char *SSL_CIPHER_description(const SSL_CIPHER *cipher, char *buf, int size);
int SSL_CIPHER_get_cipher_nid(const SSL_CIPHER *c);
int SSL_CIPHER_get_digest_nid(const SSL_CIPHER *c);
+ const EVP_MD *SSL_CIPHER_get_handshake_digest(const SSL_CIPHER *c);
int SSL_CIPHER_get_kx_nid(const SSL_CIPHER *c);
int SSL_CIPHER_get_auth_nid(const SSL_CIPHER *c);
int SSL_CIPHER_is_aead(const SSL_CIPHER *c);
@@ -38,8 +45,12 @@ If there is no cipher (e.g. for cipher suites with no encryption) then
B<NID_undef> is returned.
SSL_CIPHER_get_digest_nid() returns the digest NID corresponding to the MAC
-used by B<c>. If there is no digest (e.g. for AEAD cipher suites) then
-B<NID_undef> is returned.
+used by B<c> during record encryption/decryption. If there is no digest (e.g.
+for AEAD cipher suites) then B<NID_undef> is returned.
+
+SSL_CIPHER_get_handshake_digest() returns an EVP_MD for the digest used during
+the SSL/TLS handshake when using the SSL_CIPHER B<c>. Note that this may be
+different to the digest used to calculate the MAC for encrypted records.
SSL_CIPHER_get_kx_nid() returns the key exchange NID corresponding to the method
used by B<c>. If there is no key exchange, then B<NID_undef> is returned.
@@ -109,10 +120,12 @@ Some examples for the output of SSL_CIPHER_description():
=head1 HISTORY
SSL_CIPHER_get_version() was updated to always return the correct protocol
-string in OpenSSL 1.1.
+string in OpenSSL 1.1.0.
SSL_CIPHER_description() was changed to return B<NULL> on error,
-rather than a fixed string, in OpenSSL 1.1
+rather than a fixed string, in OpenSSL 1.1.0.
+
+SSL_CIPHER_get_handshake_digest() was added in OpenSSL 1.1.1.
=head1 SEE ALSO
@@ -121,7 +134,7 @@ L<SSL_get_ciphers(3)>, L<ciphers(1)>
=head1 COPYRIGHT
-Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
|
ic-proxy: correct SIGHUP handler
Fixed the bug that the SIGHUP handler was installed for SIGINT by
mistake, so the ic-proxy bgworkers would die on SIGHUP.
By correcting the signal name, now we could let the ic-proxy bgworkers
reload the postgresql.conf by executing "gpstop -u". | @@ -406,7 +406,7 @@ ic_proxy_server_main(void)
uv_signal_start(&ic_proxy_server_signal_hup, ic_proxy_server_on_signal, SIGHUP);
uv_signal_init(&ic_proxy_server_loop, &ic_proxy_server_signal_int);
- uv_signal_start(&ic_proxy_server_signal_hup, ic_proxy_server_on_signal, SIGINT);
+ uv_signal_start(&ic_proxy_server_signal_int, ic_proxy_server_on_signal, SIGINT);
/* on master */
uv_signal_init(&ic_proxy_server_loop, &ic_proxy_server_signal_term);
|
server_shutdown: ensure secondaries are stopped
if secondaries are still running when we exit shutdown, server_free may
result in invalid reads (of freed memory) | @@ -788,6 +788,12 @@ server_shutdown(server *s)
if (inqueue != 0)
for (i = 0; i < s->secondariescnt; i++)
__sync_add_and_fetch(&(s->secondaries[i]->failure), 1);
+ /* wait for the secondaries to be stopped so we surely don't get
+ * invalid reads when server_free is called */
+ for (i = 0; i < s->secondariescnt; i++) {
+ while (s->secondaries[i]->running)
+ usleep((200 + (rand() % 100)) * 1000);
+ }
}
__sync_bool_compare_and_swap(&(s->keep_running), 1, 0);
|
Add boot serial on Mynewt docs | @@ -36,3 +36,17 @@ different TLV structure, so images created by `newt` have to be generated
in this new format. That is done by passing the extra parameter `-2` as in:
`newt create-image <target> <version> <pubkey> -2`
+
+# Boot serial functionality with Mynewt
+
+Building with `BOOT_SERIAL: 1` enables some basic management functionality
+like listing images and uploading a new image to `slot0`. The serial bootloader
+requires that `mtu` is set to a value that is less than or equal to `256`.
+This can be done either by editing `~/.newtmgr.cp.json` and setting the `mtu`
+for the connection profile, or specifying you connection string manually as in:
+
+```
+newtmgr --conntype serial --connstring "dev=/dev/ttyUSB0,mtu=256" image upload -e blinky.img
+```
+
+where `/dev/ttyUSB0` is your serial port.
|
reduction define | #define S_DISCRETE_INPUT_NDISCRETES 16
#define S_COIL_START 0
#define S_COIL_NCOILS 64
-#define S_REG_INPUT_START (0x0000)
-#define S_REG_INPUT_NREGS (0x0006 - 0x0000)
+#define S_REG_INPUT_START 0
+#define S_REG_INPUT_NREGS 100
#define S_REG_HOLDING_START 0
-#define S_REG_HOLDING_NREGS (0x004B)
+#define S_REG_HOLDING_NREGS 100
/* salve mode: holding register's all address */
#define S_HD_RESERVE 0
/* salve mode: input register's all address */
/* slave mode: holding register"s startup address */
/* -----------------------Master Defines -------------------------------------*/
-#define M_DISCRETE_INPUT_START 1
+#define M_DISCRETE_INPUT_START 0
#define M_DISCRETE_INPUT_NDISCRETES 16
-#define M_COIL_START 1
+#define M_COIL_START 0
#define M_COIL_NCOILS 64
-#define M_REG_INPUT_START 1
+#define M_REG_INPUT_START 0
#define M_REG_INPUT_NREGS 100
-#define M_REG_HOLDING_START 1
+#define M_REG_HOLDING_START 0
#define M_REG_HOLDING_NREGS 100
/* master mode: holding register's all address */
#define M_HD_RESERVE 0
|
Clear additional global state between unit test runs
Clears out some global state that was being left over between unit tests runs, causing indeterminate results when running multiple tests against data at the global scope. | -- individual test runs.
---
+ local numBuiltInGlobalBlocks
+
function api.reset()
+ if numBuiltInGlobalBlocks == nil then
+ numBuiltInGlobalBlocks = #api.scope.global.blocks
+ end
+
for containerClass in p.container.eachChildClass(p.global) do
api.scope.global[containerClass.pluralName] = {}
end
+
+ api.scope.current = api.scope.global
+
+ local currentGlobalBlockCount = #api.scope.global.blocks
+ for i = currentGlobalBlockCount, numBuiltInGlobalBlocks + 1, -1 do
+ table.remove(api.scope.global.blocks, i)
+ end
end
|
Let graphs take up full content region | @@ -420,12 +420,12 @@ void HudElements::frame_timing(){
ImGui::PlotHistogram(hash, get_time_stat, HUDElements.sw_stats,
ARRAY_SIZE(HUDElements.sw_stats->frames_stats), 0,
NULL, min_time, max_time,
- ImVec2(ImGui::GetContentRegionAvailWidth() * 2.5, 50));
+ ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns, 50));
} else {
ImGui::PlotLines(hash, get_time_stat, HUDElements.sw_stats,
ARRAY_SIZE(HUDElements.sw_stats->frames_stats), 0,
NULL, min_time, max_time,
- ImVec2(ImGui::GetContentRegionAvailWidth() * 2.5, 50));
+ ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns, 50));
}
ImGui::PopStyleColor();
ImGui::SameLine(0,1.0f);
@@ -582,12 +582,12 @@ void HudElements::graphs(){
ImGui::PlotLines("", arr.data(),
arr.size(), 0,
NULL, HUDElements.min, HUDElements.max,
- ImVec2(ImGui::GetContentRegionAvailWidth() * 2.5, 50));
+ ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns, 50));
} else {
ImGui::PlotHistogram("", arr.data(),
arr.size(), 0,
NULL, HUDElements.min, HUDElements.max,
- ImVec2(ImGui::GetContentRegionAvailWidth() * 2.5, 50));
+ ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns, 50));
}
ImGui::PopStyleColor(1);
|
StartupAddressMode wasn't being handled on NetworkInterface get/update | @@ -41,6 +41,7 @@ HRESULT Library_sys_net_native_System_Net_NetworkInformation_NetworkInterface::I
pConfig[ FIELD___networkInterfaceType ].SetInteger( (CLR_UINT32)config.InterfaceType);
pConfig[ FIELD___specificConfigId ].SetInteger( (CLR_UINT32)config.SpecificConfigId);
+ pConfig[ FIELD___startupAddressMode ].SetInteger( (CLR_UINT32)config.StartupAddressMode);
NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( pConfig[ FIELD___macAddress ], NETIF_MAX_HWADDR_LEN, g_CLR_RT_WellKnownTypes.m_UInt8));
memcpy(pConfig[ FIELD___macAddress ].DereferenceArray()->GetFirstElement(), config.MacAddress, NETIF_MAX_HWADDR_LEN);
@@ -76,6 +77,7 @@ HRESULT Library_sys_net_native_System_Net_NetworkInformation_NetworkInterface::U
config.InterfaceType = (NetworkInterfaceType) pConfig[ FIELD___networkInterfaceType ].NumericByRef().u4;
config.SpecificConfigId = (CLR_UINT32) pConfig[ FIELD___specificConfigId ].NumericByRef().u4;
+ config.StartupAddressMode = (AddressMode) pConfig[ FIELD___startupAddressMode ].NumericByRef().u4;
if(pMACAddress != NULL)
{
@@ -137,6 +139,7 @@ HRESULT Library_sys_net_native_System_Net_NetworkInformation_NetworkInterface::G
pConfig[ FIELD___networkInterfaceType ].SetInteger( (CLR_UINT32)config.InterfaceType);
pConfig[ FIELD___specificConfigId ].SetInteger( (CLR_UINT32)config.SpecificConfigId);
+ pConfig[ FIELD___startupAddressMode ].SetInteger( (CLR_UINT32)config.StartupAddressMode);
NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( pConfig[ FIELD___macAddress ], NETIF_MAX_HWADDR_LEN, g_CLR_RT_WellKnownTypes.m_UInt8 ));
memcpy( pConfig[ FIELD___macAddress ].DereferenceArray()->GetFirstElement(), config.MacAddress, NETIF_MAX_HWADDR_LEN );
|
fix collections config | ++ txt
|= txs=(pole @t)
^- config:collections
+ :: TODO: putting ~ instead of * breaks this but shouldn't
+ ::
?> ?= $: full-path=@t
name=@t
desc=@t
com=@t
sk=@t
vis=@t
- ~
+ *
==
txs
::
- %- (hard config:collections)
:* %- need
%+ rash full-path.txs
;~ pfix (jest 'full-path: ')
::
(rash owner.txs ;~(pfix (jest 'owner: ~') fed:ag))
::
- (rash dc.txs ;~(pfix (jest 'date-created: ~') (cook |=(a=^ +.a) crub:so)))
+ %+ rash dc.txs
+ ;~ pfix
+ (jest 'date-created: ~')
+ (cook year when:so)
+ ==
::
- (rash lm.txs ;~(pfix (jest 'last-modified: ~') (cook |=(a=^ +.a) crub:so)))
+ %+ rash lm.txs
+ ;~ pfix
+ (jest 'last-modified: ~')
+ (cook year when:so)
+ ==
::
(rash type.txs ;~(pfix (jest 'type: ') (cook crip (star next))))
::
==
++ noun config:collections
--
-++ grad %txt
+++ grad %mime
--
|
cppcheck warning: knownConditionTrueFalse | @@ -1294,9 +1294,9 @@ static int stream_seek(void* data, off_t len)
static size_t stream_read(void* data, void* buffer, size_t len, int* err)
{
stream_struct* s = (stream_struct*)data;
- long n = len;
+ long n = 0;
- if (n != len) {
+ if (len > LONG_MAX) {
/* size_t cannot be coded into long */
*err = GRIB_INTERNAL_ERROR;
return -1;
|
Warning is fixed. | @@ -854,7 +854,7 @@ struct xdag_block* xdag_create_block(struct xdag_field *fields, int inputsCount,
int res0 = 1 + inputsCount + outputsCount + 3 * nkeysnum + (outsigkeyind < 0 ? 2 : 0);
if (res0 > XDAG_BLOCK_FIELDS) {
- return -1;
+ return NULL;
}
if (!send_time) {
|
Fixed buffer size in `ZydisPerfTest` | @@ -331,7 +331,7 @@ static void TestPerformance(const ZyanU8* buffer, ZyanUSize length, ZyanBool min
count += ProcessBuffer(&decoder, &formatter, /* cache, */ buffer, length, minimal_mode,
format, tokenize, use_cache);
}
- const char* color[3];
+ const char* color[4];
color[0] = minimal_mode ? CVT100_OUT(COLOR_VALUE_G) : CVT100_OUT(COLOR_VALUE_B);
color[1] = format ? CVT100_OUT(COLOR_VALUE_G) : CVT100_OUT(COLOR_VALUE_B);
color[2] = tokenize ? CVT100_OUT(COLOR_VALUE_G) : CVT100_OUT(COLOR_VALUE_B);
|
fix division by zero in vna.c | @@ -183,7 +183,7 @@ int main(int argc, char *argv[])
pthread_detach(thread);
for(i = 0; i < size; ++i)
{
- freq = start + (stop - start) * i / (size - 1);
+ freq = i > 0 ? start + (stop - start) * i / (size - 1) : start;
freq *= (1.0 + 1.0e-9 * corr);
*rx_freq = (uint32_t)floor(freq / 125.0e6 * (1<<30) + 0.5);
}
|
feat: include add-ons | @@ -51,7 +51,7 @@ BOTZ_SRC := $(patsubst %c, %.bz, $(BOTZ_SRC))
TEST_SRC := $(wildcard test/test-*.cpp test/test-*.c)
TEST_EXES := $(filter %.exe, $(TEST_SRC:.cpp=.exe) $(TEST_SRC:.c=.exe))
-LIBDISCORD_CFLAGS := -I./ -I./mujs -I./sqlite3 -I./jsB
+LIBDISCORD_CFLAGS := -I./ -I./mujs -I./sqlite3 -I./add-ons
LIBDISCORD_LDFLAGS := -L./$(LIBDIR) -ldiscord -lcurl -lpthread
ifeq ($(BEARSSL),1)
|
[core] comment out unused part of http_etag_remix
note: etag buffer etag->ptr might be NULL (etag->used = etag->sze = 0)
so buffer will need to be extended, not truncated, in that case.
buffer_string_set_length() is typically used to truncate strings. | @@ -47,11 +47,15 @@ static void
http_etag_remix (buffer * const etag, const char * const str, const uint32_t len)
{
uint32_t h = dekhash(str, len, len); /*(pass len as initial hash value)*/
+ #if 0 /*(currently never elen > 2; always cleared in http_etag_create())*/
uint32_t elen = buffer_string_length(etag);
if (elen > 2) /*(expect "..." if set)*/
h = dekhash(etag->ptr+1, elen-2, h);
buffer_string_set_length(etag, 1);
etag->ptr[0] = '\"';
+ #else
+ buffer_copy_string_len(etag, CONST_STR_LEN("\""));
+ #endif
buffer_append_int(etag, h);
buffer_append_string_len(etag, CONST_STR_LEN("\""));
}
|
cleanup complement's help | @@ -16,6 +16,8 @@ void complement_help(void) {
cerr << "Usage: " << "bedtools complement" << " [OPTIONS] -i <bed/gff/vcf> -g <genome>" << endl << endl;
+ cerr << "Options: " << endl;
+
cerr << "\t-L\t" << "Limit output to solely the chromosomes with records in the input file." << endl << endl;
cerr << "Notes: " << endl;
|
Solve bug in NodeJS Addon API. | # NODEJS_ADDON_API_INCLUDE_DIR - NodeJS Addon API headers path
# Prevent vervosity if already included
-if(NODEJS_ADDON_API_INCLUDE_DIR)
+if(NODEJS_ADDON_API_FOUND)
set(NODEJS_ADDON_API_FIND_QUIETLY TRUE)
endif()
+set(NODEJS_ADDON_API_INCLUDE_DIR "" CACHE PATH "NodeJS Addon API headers path")
+
# Include package manager
include(FindPackageHandleStandardArgs)
@@ -26,6 +28,7 @@ if(NOT NODEJS_FOUND)
endif()
# Get the includes
+if(NODEJS_ADDON_API_INCLUDE_DIR STREQUAL "")
execute_process(
COMMAND ${NODEJS_EXECUTABLE} -p "require('node-addon-api').include"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
@@ -40,6 +43,7 @@ endif()
string(REPLACE "\n" "" NODEJS_ADDON_API_INCLUDE_DIR ${NODEJS_ADDON_API_INCLUDE_DIR})
string(REPLACE "\"" "" NODEJS_ADDON_API_INCLUDE_DIR ${NODEJS_ADDON_API_INCLUDE_DIR})
+endif()
find_package_handle_standard_args(NODEJS_ADDON_API
REQUIRED_VARS NODEJS_ADDON_API_INCLUDE_DIR
|
Fix collision bug at bottom edge of screen | @@ -1021,6 +1021,12 @@ UBYTE SceneNpcAt_b(UBYTE index, UBYTE tx_a, UBYTE ty_a)
}
tx_b = DIV_8(ACTOR_X(ptr));
ty_b = DIV_8(ACTOR_Y(ptr));
+ if (ty_b == 0)
+ {
+ // If actor at posY=256 (really 0 since 8bit) convert to correct tile
+ // since DIV_8 will give tile as 0 rather than 32
+ ty_b = 32;
+ }
if ((ty_a == ty_b || ty_a == ty_b - 1) &&
(tx_a == tx_b || tx_a == tx_b + 1 || tx_a + 1 == tx_b))
{
|
gitlab/ci: reverting --track-origins=yes flag for valgrind | @@ -52,7 +52,8 @@ examples-memcheck:
stage: test
script:
- make -j4 examples
- - ls examples/*_example | sed -E "s#examples/(.*)#valgrind --tool=memcheck --track-origins=yes --log-file=examples/\1.log ./examples/\1#g" > run_examples_valgrind.sh
+ # setting --track-origins=yes gives more detail but takes longer than gitlab allows
+ - ls examples/*_example | sed -E "s#examples/(.*)#valgrind --tool=memcheck --log-file=examples/\1.log ./examples/\1#g" > run_examples_valgrind.sh
- /bin/sh run_examples_valgrind.sh
- tail -n +1 examples/*.log > valgrind.log
artifacts:
|
Do not send options multiple times in build_startup_packet()
This patch also tweak the related code a bit. | @@ -2238,55 +2238,20 @@ build_startup_packet(const PGconn *conn, char *packet,
/* GPSQL: */
if (conn->dboid && conn->dboid[0])
- {
- if (packet)
- strcpy(packet + packet_len, "dboid");
- packet_len += strlen("dboid") + 1;
- if (packet)
- strcpy(packet + packet_len, conn->dboid);
- packet_len += strlen(conn->dboid) + 1;
- }
+ ADD_STARTUP_OPTION("dboid", conn->dboid);
if (conn->dbdtsoid && conn->dbdtsoid[0])
- {
- if (packet)
- strcpy(packet + packet_len, "dbdtsoid");
- packet_len += strlen("dbdtsoid") + 1;
- if (packet)
- strcpy(packet + packet_len, conn->dbdtsoid);
- packet_len += strlen(conn->dbdtsoid) + 1;
- }
+ ADD_STARTUP_OPTION("dbdtsoid", conn->dbdtsoid);
if (conn->bootstrap_user && conn->bootstrap_user[0])
- {
- if (packet)
- strcpy(packet + packet_len, "bootstrap_user");
- packet_len += strlen("bootstrap_user") + 1;
- if (packet)
- strcpy(packet + packet_len, conn->bootstrap_user);
- packet_len += strlen(conn->bootstrap_user) + 1;
- }
+ ADD_STARTUP_OPTION("bootstrap_user", conn->bootstrap_user);
if (conn->encoding && conn->encoding[0])
- {
- if (packet)
- strcpy(packet + packet_len, "encoding");
- packet_len += strlen("encoding") + 1;
- if (packet)
- strcpy(packet + packet_len, conn->encoding);
- packet_len += strlen(conn->encoding) + 1;
- }
+ ADD_STARTUP_OPTION("encoding", conn->encoding);
/* CDB: Add qExec startup data */
if (conn->gpqeid && conn->gpqeid[0])
- {
- if (packet)
- strcpy(packet + packet_len, "gpqeid");
- packet_len += strlen("gpqeid") + 1;
- if (packet)
- strcpy(packet + packet_len, conn->gpqeid);
- packet_len += strlen(conn->gpqeid) + 1;
- }
+ ADD_STARTUP_OPTION("gpqeid", conn->gpqeid);
/* Add any environment-driven GUC settings needed */
for (next_eo = options; next_eo->envName; next_eo++)
@@ -2296,20 +2261,8 @@ build_startup_packet(const PGconn *conn, char *packet,
if ((val = getenv(next_eo->envName)) != NULL)
{
if (pg_strcasecmp(val, "default") != 0)
- {
- if (packet)
- strcpy(packet + packet_len, next_eo->pgName);
- packet_len += strlen(next_eo->pgName) + 1;
- if (packet)
- strcpy(packet + packet_len, val);
- packet_len += strlen(val) + 1;
+ ADD_STARTUP_OPTION(next_eo->pgName, val);
}
- } if (packet)
- strcpy(packet + packet_len, "options");
- packet_len += strlen("options") + 1;
- if (packet)
- strcpy(packet + packet_len, conn->pgoptions);
- packet_len += strlen(conn->pgoptions) + 1;
}
/* Add trailing terminator */
|
Renamed IXML export | @@ -50,7 +50,7 @@ SET_TARGET_PROPERTIES(ixml_shared PROPERTIES
)
INSTALL (TARGETS ixml_shared
- EXPORT IXMLCONFIG
+ EXPORT IXML
DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/upnp
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/upnp
@@ -88,11 +88,11 @@ TARGET_INCLUDE_DIRECTORIES (ixml_static
)
INSTALL (TARGETS ixml_static
- EXPORT IXMLCONFIG
+ EXPORT IXML
DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/upnp
)
-INSTALL (EXPORT IXMLCONFIG
+INSTALL (EXPORT IXML
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
)
|
Fix CID#1458569 | @@ -2321,6 +2321,10 @@ void uvpollable_cb(uv_poll_t *handle, int status, int events)
if (status < 0) {
nt_log(ctx, NEAT_LOG_DEBUG, "ERROR: %s", uv_strerror(status));
+ if (!flow) {
+ return;
+ }
+
#if !defined(USRSCTP_SUPPORT)
if (nt_base_stack(pollable_socket->stack) == NEAT_STACK_TCP ||
nt_base_stack(pollable_socket->stack) == NEAT_STACK_SCTP)
|
makefile changes for NOLAPACKE | @@ -51,6 +51,13 @@ else
endif
+ifeq ($(UNAME),Cygwin)
+ BUILDTYPE = Cygwin
+ NOLAPACKE ?= 1
+endif
+
+
+
# Paths
@@ -179,6 +186,11 @@ TMRI += ismrmrd
MODULES_bart += -lismrm
endif
+ifeq ($(NOLAPACKE),1)
+MODULES += -llapacke
+endif
+
+
XTARGETS += $(TBASE) $(TFLP) $(TNUM) $(TIO) $(TRECO) $(TCALIB) $(TMRI) $(TSIM)
TARGETS = bart $(XTARGETS)
@@ -270,9 +282,14 @@ BLAS_H := -I$(BLAS_BASE)/include
ifeq ($(BUILDTYPE), MacOSX)
BLAS_L := -L$(BLAS_BASE)/lib -lopenblas
else
+ifeq ($(NOLAPACKE),1)
+BLAS_L := -L$(BLAS_BASE)/lib -llapack -lblas
+CPPFLAGS += -Isrc/lapacke
+else
BLAS_L := -L$(BLAS_BASE)/lib -llapacke -lblas
endif
endif
+endif
|
M487 fix project file wrong ggd lib name | <RestoreSysVw>1</RestoreSysVw>
</Target>
<RunDebugAfterBuild>0</RunDebugAfterBuild>
- <TargetSelection>-1</TargetSelection>
+ <TargetSelection>20</TargetSelection>
<SimDlls>
<CpuDll></CpuDll>
<CpuDllArguments></CpuDllArguments>
<GroupName>lib-grenngrass</GroupName>
<Files>
<File>
- <FileName>aws_mqtt_agent.c</FileName>
+ <FileName>aws_greengrass_discovery.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\lib\greengrass\aws_greengrass_discovery.c</FilePath>
</File>
<File>
- <FileName>aws_mqtt_lib.c</FileName>
+ <FileName>aws_helper_secure_connect.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\lib\greengrass\aws_helper_secure_connect.c</FilePath>
</File>
|
usdt.py: improve error messags for enable_probe() | @@ -149,20 +149,18 @@ class USDT(object):
if lib.bcc_usdt_enable_probe(self.context, probe.encode('ascii'),
fn_name.encode('ascii')) != 0:
raise USDTException(
- ("failed to enable probe '%s'; a possible cause " +
- "can be that the probe requires a pid to enable") %
- probe
- )
+"""Failed to enable USDT probe '%s':
+the specified pid might not contain the given language's runtime,
+or the runtime was not built with the required USDT probes. Look
+for a configure flag similar to --with-dtrace or --enable-dtrace.
+To check which probes are present in the process, use the tplist tool.
+""" % probe)
def enable_probe_or_bail(self, probe, fn_name):
- if lib.bcc_usdt_enable_probe(self.context, probe.encode('ascii'),
- fn_name.encode('ascii')) != 0:
- print(
-"""Error attaching USDT probes: the specified pid might not contain the
-given language's runtime, or the runtime was not built with the required
-USDT probes. Look for a configure flag similar to --with-dtrace or
---enable-dtrace. To check which probes are present in the process, use the
-tplist tool.""")
+ try:
+ self.enable_probe(probe, fn_name)
+ except USDTException as e:
+ print(e)
sys.exit(1)
def get_context(self):
|
vmkit: added delay at VMkit monitor startup to wait required modules | #include <stdio.h>
#include <stdlib.h>
#include <barrelfish/barrelfish.h>
+#include <barrelfish/sys_debug.h>
#include <barrelfish/nameservice_client.h>
#include <barrelfish/terminal.h>
#include <vfs/vfs.h>
#include <pci/pci.h>
#define VFS_MOUNTPOINT "/vm"
-#define IMAGEFILE (VFS_MOUNTPOINT "/system-bench.img")
+#define IMAGEFILE (VFS_MOUNTPOINT "/system-ubuntu16-i386.img")
#define GRUB_IMG_PATH (VFS_MOUNTPOINT "/vmkitmon_grub")
void * grub_image = NULL;
@@ -36,6 +37,50 @@ void * hdd0_image = NULL;
size_t hdd0_image_size = 0;
struct guest * guest = NULL;
+#if defined(__x86_64__)
+static uint64_t tscperms;
+#endif
+
+static bool initialised = false;
+
+static void sleep_init(void)
+{
+ if (!initialised) {
+ bench_init();
+#if defined(__x86_64__)
+ errval_t err = sys_debug_get_tsc_per_ms(&tscperms);
+ assert(err_is_ok(err));
+#endif
+ initialised = true;
+ }
+}
+
+static void cycle_sleep(uint64_t cycles)
+{
+ if (!initialised) {
+ sleep_init();
+ }
+
+ uint64_t start = bench_tsc();
+ uint64_t stop = bench_tsc();
+ while ((stop - start) < cycles) {
+ // sys_yield(CPTR_NULL);
+ thread_yield_dispatcher(NULL_CAP);
+ stop = bench_tsc();
+ }
+}
+
+static void milli_sleep(uint64_t ms)
+{
+#if defined(__x86_64__)
+ uint64_t cycles = ms * tscperms;
+ cycle_sleep(cycles);
+#else
+ USER_PANIC("milli_sleep NYI for non-x86_64");
+#endif
+}
+
+
static void
vfs_load_file_to_memory (const char *file, void **data, size_t *size)
{
@@ -66,11 +111,19 @@ vfs_load_file_to_memory (const char *file, void **data, size_t *size)
int main (int argc, char *argv[])
{
+ int i = 0;
errval_t err;
char *cardName = NULL;
const char *imagefile = IMAGEFILE;
+ if (!initialised)
+ sleep_init();
+
+ printf("vmkitmon: wait 30s until kaluga is ready.");
+ for (i = 0; i < 30; i++)
+ milli_sleep(1000);
+
vfs_init();
bench_init();
|
Advertise support for "fetchable" jobs. | @@ -675,11 +675,24 @@ serverCreatePrinter(
};
static const char * const which_jobs[] =
{ /* which-jobs-supported values */
+ "aborted",
+ "all",
+ "canceled",
"completed",
"not-completed",
+ "pending",
+ "pending-held",
+ "processing",
+ "processing-stopped"
+ };
+ static const char * const which_jobs_proxy[] =
+ { /* which-jobs-supported values */
"aborted",
"all",
"canceled",
+ "completed",
+ "fetchable",
+ "not-completed",
"pending",
"pending-held",
"processing",
@@ -1535,6 +1548,9 @@ serverCreatePrinter(
}
/* which-jobs-supported */
+ if (printer->pinfo.proxy_group != SERVER_GROUP_NONE || printer->pinfo.max_devices > 0)
+ ippAddStrings(printer->pinfo.attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "which-jobs-supported", sizeof(which_jobs_proxy) / sizeof(which_jobs_proxy[0]), NULL, which_jobs_proxy);
+ else
ippAddStrings(printer->pinfo.attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "which-jobs-supported", sizeof(which_jobs) / sizeof(which_jobs[0]), NULL, which_jobs);
/* xri-authentication-supported */
|
Roll back the previous "pixel swizzler" commit
See the previous commit for the rationale. | @@ -15269,7 +15269,7 @@ wuffs_base__pixel_swizzler__bgr_565__index_bgra_nonpremul__src_over(
// TODO: unroll.
while (n >= 1) {
- uint32_t d0 = (
+ uint32_t d0 = wuffs_base__color_u16_rgb_565__as__color_u32_argb_premul(
wuffs_base__peek_u16le__no_bounds_check(d + (0 * 2)));
uint32_t s0 = wuffs_base__peek_u32le__no_bounds_check(dst_palette_ptr +
((size_t)s[0] * 4));
|
libc/string: fix typo, CONFIGC_ARCH_STPNCPY
CONFIG'C'_ is a typo, let's remove 'C'. | *
****************************************************************************/
-#ifndef CONFIGC_ARCH_STPNCPY
+#ifndef CONFIG_ARCH_STPNCPY
FAR char *stpncpy(FAR char *dest, FAR const char *src, size_t n)
{
FAR char *end = dest + n; /* End of dest buffer + 1 byte */
|
Fix setting of compiler definition for RTM | @@ -135,7 +135,7 @@ function(NF_SET_COMPILER_DEFINITIONS TARGET)
# set compiler definition for RTM build option
if(NF_BUILD_RTM)
- target_compile_definitions(${TARGET} PUBLIC BUILD_RTM)
+ target_compile_definitions(${TARGET} PUBLIC -DBUILD_RTM)
endif()
# set compiler definition for using Application Domains feature
|
assert: fix C++ STL container tostr when compiled with older gcc
> Until CWG 1558 (a C++11 defect), unused parameters in alias templates
were not guaranteed to ensure SFINAE and could be ignored, so earlier
compilers require a more complex definition of void_t, | @@ -36,8 +36,11 @@ extern "C" char *cr_user_wcs_tostr(const wchar_t **);
namespace criterion { namespace internal { namespace stream_override {
-template< class... >
-using __void_t = void;
+template< class... T>
+struct make_void { typedef void type; };
+
+template< class... T>
+using __void_t = typename make_void<T...>::type;
template<typename T, typename = void>
struct __is_printable: std::false_type {};
|
add odom init | @@ -57,6 +57,14 @@ void setup()
odom_pose[1] = 0.0;
odom_pose[2] = 0.0;
+ odom.pose.pose.position.x = odom_pose[0];
+ odom.pose.pose.position.y = odom_pose[1];
+ odom.pose.pose.position.z = 0;
+ odom.pose.pose.orientation = tf::createQuaternionFromYaw(odom_pose[2]);
+
+ odom.twist.twist.linear.x = 0.0;
+ odom.twist.twist.angular.z = 0.0;
+
joint_states.header.frame_id = "base_link";
joint_states.name = joint_states_name;
@@ -241,7 +249,7 @@ void publishSensorStateMsg(void)
int32_t current_tick;
- sensor_state_msg.header.stamp = ros_now();
+ sensor_state_msg.stamp = ros_now();
sensor_state_msg.battery = checkVoltage();
battery_state_msg.voltage = sensor_state_msg.battery;
|
Maximum offset is now NGTCP2_MAX_VARINT | @@ -2127,7 +2127,7 @@ static ssize_t conn_decrypt_pkt(ngtcp2_conn *conn, uint8_t *dest,
static void conn_extend_max_stream_offset(ngtcp2_conn *conn, ngtcp2_strm *strm,
size_t datalen) {
- if (strm->unsent_max_rx_offset <= UINT64_MAX - datalen) {
+ if (strm->unsent_max_rx_offset <= NGTCP2_MAX_VARINT - datalen) {
strm->unsent_max_rx_offset += datalen;
}
@@ -2549,7 +2549,7 @@ static int conn_recv_stream(ngtcp2_conn *conn, const ngtcp2_stream *fr) {
return NGTCP2_ERR_STREAM_ID;
}
- if (UINT64_MAX - fr->datalen < fr->offset) {
+ if (NGTCP2_MAX_VARINT - fr->datalen < fr->offset) {
return NGTCP2_ERR_PROTO;
}
|
Remove pg_regress' --load-language option.
We haven't used this option since inventing extensions. As of commit
it's actually formally equivalent to --load-extension, so
let's just drop it.
Discussion: | @@ -76,7 +76,6 @@ char *inputdir = ".";
char *outputdir = ".";
char *bindir = PGBINDIR;
char *launcher = NULL;
-static _stringlist *loadlanguage = NULL;
static _stringlist *loadextension = NULL;
static int max_connections = 0;
static int max_concurrent_tests = 0;
@@ -1997,16 +1996,6 @@ create_database(const char *dbname)
"ALTER DATABASE \"%s\" SET timezone_abbreviations TO 'Default';",
dbname, dbname, dbname, dbname, dbname, dbname);
- /*
- * Install any requested procedural languages. We use CREATE OR REPLACE
- * so that this will work whether or not the language is preinstalled.
- */
- for (sl = loadlanguage; sl != NULL; sl = sl->next)
- {
- header(_("installing %s"), sl->str);
- psql_command(dbname, "CREATE OR REPLACE LANGUAGE \"%s\"", sl->str);
- }
-
/*
* Install any requested extensions. We use CREATE IF NOT EXISTS so that
* this will work whether or not the extension is preinstalled.
@@ -2058,8 +2047,6 @@ help(void)
printf(_(" --launcher=CMD use CMD as launcher of psql\n"));
printf(_(" --load-extension=EXT load the named extension before running the\n"));
printf(_(" tests; can appear multiple times\n"));
- printf(_(" --load-language=LANG load the named language before running the\n"));
- printf(_(" tests; can appear multiple times\n"));
printf(_(" --max-connections=N maximum number of concurrent connections\n"));
printf(_(" (default is 0, meaning unlimited)\n"));
printf(_(" --max-concurrent-tests=N maximum number of concurrent tests in schedule\n"));
@@ -2096,7 +2083,6 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
{"dbname", required_argument, NULL, 1},
{"debug", no_argument, NULL, 2},
{"inputdir", required_argument, NULL, 3},
- {"load-language", required_argument, NULL, 4},
{"max-connections", required_argument, NULL, 5},
{"encoding", required_argument, NULL, 6},
{"outputdir", required_argument, NULL, 7},
@@ -2172,9 +2158,6 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
case 3:
inputdir = pg_strdup(optarg);
break;
- case 4:
- add_stringlist_item(&loadlanguage, optarg);
- break;
case 5:
max_connections = atoi(optarg);
break;
|
[persistence] simple refactoring of construct_item_attr | @@ -238,10 +238,11 @@ static void lrec_attr_print(lrec_attr_info *attr)
(attr->mflags & COLL_META_FLAG_READABLE ? 1 : 0));
}
-static inline void do_construct_item_attr(char *ptr, int size, item_attr *attr)
+static inline void do_construct_item_attr(char *ptr, item_attr *attr)
{
lrec_attr_info info;
- memcpy(&info, (char*)(ptr + size), sizeof(lrec_attr_info));
+ /* because lrec_attr_info is not aligned, set info with memcpy */
+ memcpy(&info, ptr, sizeof(lrec_attr_info));
attr->flags = info.flags;
attr->exptime = CONVERT_REL_EXPTIME(info.exptime);
attr->maxcount = info.maxcount;
@@ -588,7 +589,7 @@ static ENGINE_ERROR_CODE lrec_list_elem_insert_redo(LogRec *logrec)
/* create collection item */
item_attr attr;
- do_construct_item_attr(keyptr, body->keylen + body->vallen, &attr);
+ do_construct_item_attr(keyptr + body->keylen + body->vallen, &attr);
if (EXPIRED_REL_EXPTIME(attr.exptime)) {
return ENGINE_SUCCESS;
}
@@ -717,7 +718,7 @@ static ENGINE_ERROR_CODE lrec_set_elem_insert_redo(LogRec *logrec)
/* create collection item */
item_attr attr;
- do_construct_item_attr(valptr, body->vallen, &attr);
+ do_construct_item_attr(valptr + body->vallen, &attr);
if (EXPIRED_REL_EXPTIME(attr.exptime)) {
return ENGINE_SUCCESS;
}
@@ -848,7 +849,7 @@ static ENGINE_ERROR_CODE lrec_map_elem_insert_redo(LogRec *logrec)
/* create collection item */
item_attr attr;
- do_construct_item_attr(datptr, body->fldlen + body->vallen, &attr);
+ do_construct_item_attr(datptr + body->fldlen + body->vallen, &attr);
if (EXPIRED_REL_EXPTIME(attr.exptime)) {
return ENGINE_SUCCESS;
}
@@ -984,7 +985,7 @@ static ENGINE_ERROR_CODE lrec_bt_elem_insert_redo(LogRec *logrec)
/* create collection item */
item_attr attr;
int datlen = BTREE_REAL_NBKEY(log->body.nbkey) + log->body.neflag + log->body.vallen;
- do_construct_item_attr(datptr, datlen, &attr);
+ do_construct_item_attr(datptr + datlen, &attr);
if (EXPIRED_REL_EXPTIME(attr.exptime)) {
return ENGINE_SUCCESS;
}
|
nat: fix coverity 249178
Zero-initialize the variable
Type: fix | @@ -1346,7 +1346,7 @@ nat44_ed_in2out_slow_path_node_fn_inline (vlib_main_t *vm,
udp_header_t *udp0;
icmp46_header_t *icmp0;
snat_session_t *s0 = 0;
- clib_bihash_kv_16_8_t kv0, value0;
+ clib_bihash_kv_16_8_t kv0 = { 0 }, value0;
int translation_error = NAT_ED_TRNSL_ERR_SUCCESS;
b0 = *b;
|
Remove array initializer | @@ -111,7 +111,7 @@ static void compute_angular_offsets(
promise(weight_count > 0);
promise(max_angular_steps > 0);
- alignas(ASTCENC_VECALIGN) int isamplev[BLOCK_MAX_WEIGHTS] { 0 };
+ alignas(ASTCENC_VECALIGN) int isamplev[BLOCK_MAX_WEIGHTS];
// Precompute isample; arrays are always allocated 64 elements long
for (unsigned int i = 0; i < weight_count; i += ASTCENC_SIMD_WIDTH)
|
fpgaflash: include fpgaflash in tools rpm
Update CMakeLists.txt so that fpgaflash is included
in the tools rpm. The tool will be installed into
/usr/bin. | @@ -94,6 +94,7 @@ add_subdirectory(tools/mmlink)
add_subdirectory(tools/coreidle)
add_subdirectory(tools/fpgaconf)
add_subdirectory(tools/fpgabist)
+add_subdirectory(tools/fpgaflash)
add_subdirectory(tools/fpgainfo)
add_subdirectory(tools/c++utils)
add_subdirectory(tools/libopae++)
@@ -192,6 +193,7 @@ define_pkg(tools
toolfpgadiag
toolfpgabist
toolfpgadiagapps
+ toolfpgaflash
toolfpgainfo
toolfpgaport
opaecxxutils
|
check_formatting: skip reformat-source if not available
Previously check_formatting is aborted if clang-format is not found.
After this commit the behaviour of missing cmake_format is replicated
and only the portion that is relying on the command is skipped. | @@ -5,7 +5,6 @@ echo ELEKTRA CHECK FORMATTING
echo
command -v git >/dev/null 2>&1 || { echo "git command needed for this test, aborting" >&2; exit 0; }
-command -v clang-format-5.0 >/dev/null 2>&1 || command -v clang-format >/dev/null 2>&1 || { echo "clang-format command needed for this test, aborting" >&2; exit 0; }
cd "@CMAKE_SOURCE_DIR@"
@@ -15,7 +14,12 @@ then
exit 0
fi
+if which clang-format-5.0 > /dev/null || which clang-format > /dev/null
+then
scripts/reformat-source
+else
+ echo 'Warning: clang-format not available, skipping reformat-source'
+fi
if which sponge > /dev/null && which cmake-format > /dev/null
then
|
api: try to fix link | @@ -3,4 +3,4 @@ This folder contains information for contributors to Elektra.
- [Documentation Guidelines](documentation.md)
- [Copy on Write](copy_on_write.md)
- [mmapstorage](mmapstorage.md)
-- [API](api/README.md) Everything related to API design, review, maintenance etc.
+- [API](api/) Everything related to API design, review, maintenance etc.
|
Fix failure to check result of bn_rshift_fixed_top
Fixes | @@ -446,8 +446,10 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
snum->neg = num_neg;
snum->top = div_n;
snum->flags |= BN_FLG_FIXED_TOP;
- if (rm != NULL)
- bn_rshift_fixed_top(rm, snum, norm_shift);
+
+ if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
+ goto err;
+
BN_CTX_end(ctx);
return 1;
err:
|
print warning if packets with the same time stamp are detected | @@ -260,6 +260,8 @@ FILE *fheapol;
FILE *fhnetwork;
bool tscleanflag;
+bool tssameflag;
+
int endianess;
int pcapreaderrors;
unsigned long long int rawpacketcount;
@@ -273,6 +275,9 @@ uint8_t myaktnonce[32];
uint8_t filtermac[6];
+uint32_t tv_sec_old;
+uint32_t tv_usec_old;
+
char pcapnghwinfo[1024];
char pcapngosinfo[1024];
char pcapngapplinfo[1024];
@@ -535,6 +540,10 @@ if(tscleanflag == true)
{
printf("warning..........................: zero value time stamps detected - this prevents EAPOL timeout calculation\n");
}
+if(tssameflag == true)
+ {
+ printf("warning..........................: packets with same time stamp detected - this prevents EAPOL timeout calculation\n");
+ }
if(wdsframecount != 0)
{
printf("WDS packets......................: %llu\n", wdsframecount);
@@ -5273,6 +5282,12 @@ if((tv_sec == 0) && (tv_usec == 0))
tv_sec = tvtmp.tv_sec;
tv_usec = tvtmp.tv_usec;
}
+else if ((tv_sec == tv_sec_old) && (tv_usec == tv_usec_old))
+ {
+ tssameflag = true;
+ }
+tv_sec_old = tv_sec;
+tv_usec_old = tv_usec;
if(linktype == DLT_NULL)
{
@@ -6098,10 +6113,12 @@ char *pcapngstr = "pcapng";
char *msnetmon1str = "Microsoft NetworkMonitor 1";
char *msnetmon2str = "Microsoft NetworkMonitor 2";
+tscleanflag = false;
+tssameflag = false;
+
versionmajor = 0;
versionminor = 0;
dltlinktype = 0;
-tscleanflag = false;
endianess = 0;
pcapreaderrors = 0;
rawpacketcount = 0;
|
genvif: XID_SOP
BRANCH=none
TEST=verify XML output
Tested-by: Denis Brockus | @@ -1888,9 +1888,13 @@ static void init_vif_component_pd_dual_role_fields(
static void init_vif_component_sop_discovery_fields(
struct vif_field_t *vif_fields)
{
- if (IS_ENABLED(CONFIG_USB_PD_TCPMV2)) {
char hex_str[10];
+ set_vif_field(&vif_fields[XID_SOP],
+ "XID_SOP",
+ "0",
+ "0");
+
#if defined(CONFIG_USB_PID)
sprintf(hex_str, "%04X", CONFIG_USB_PID);
set_vif_field_itss(&vif_fields[PID_SOP],
@@ -1903,7 +1907,6 @@ static void init_vif_component_sop_discovery_fields(
DEFAULT_MISSING_PID, hex_str);
#endif
}
-}
/*********************************************************************
* Init VIF/Component[] Battery Charging 1.2 Fields
|
stm32/mboot: Add documentation for using mboot on PYBv1.x. | @@ -76,3 +76,44 @@ How to use
5. Use either USB DFU or I2C to download firmware. The script mboot.py shows how
to communicate with the I2C boot loader interface. It should be run on a
pyboard connected via I2C to the target board.
+
+Example: Mboot on PYBv1.x
+-------------------------
+
+By default mboot is not used on PYBv1.x, but full mboot configuration is provided
+for these boards to demonstrate how it works and for testing. To build and
+deploy mboot on these pyboards the only difference from the normal build process
+is to pass `USE_MBOOT=1` to make, so that the mboot configuration is used instead
+of the non-mboot configuration.
+
+In detail for PYBv1.0 (for PYBv1.1 use PYBV11 instead of PYBV10):
+
+1. Make sure the pyboard is in factory DFU mode (power up with BOOT0 connected to
+ 3V3), then build mboot and deploy it (from the stm32/mboot/ directory):
+
+ $ make BOARD=PYBV10 USE_MBOOT=1 clean all deploy
+
+ This will put mboot on the pyboard.
+
+2. Now put the pyboard in mboot mode by holding down USR, pressing RST, and
+ continue to hold down USR until the blue LED is lit (the 4th option in the
+ cycle) and then release USR. The red LED will blink once per second to
+ indicate that it's in mboot. Then build the MicroPython firmware and deploy
+ it (from the stm32/ directory):
+
+ $ make BOARD=PYBV10 USE_MBOOT=1 clean all deploy
+
+ MicroPython will now be on the device and should boot straightaway.
+
+On PYBv1.x without mboot the flash layout is as follows:
+
+ 0x08000000 0x08004000 0x08020000
+ | ISR text | filesystem | rest of MicroPython firmware
+
+On PYBv1.x with mboot the flash layout is as follows:
+
+ 0x08000000 0x08004000 0x08020000
+ | mboot | filesystem | ISR and full MicroPython firmware
+
+Note that the filesystem remains intact when going to/from an mboot configuration
+so its contents will be preserved.
|
external/iotivity: use snprintf instaed of sprintf
Replace sprintf to snprintf for safety | @@ -819,7 +819,7 @@ OCStackResult BuildStringFromActionSet(OCActionSet* actionset, char** desc)
actionTypeStr = (char *)OICMalloc(1024);
if(actionTypeStr != NULL)
{
- sprintf(actionTypeStr, "%ld %u", actionset->timesteps, actionset->type);
+ snprintf(actionTypeStr, sizeof(actionTypeStr), "%ld %u", actionset->timesteps, actionset->type);
if(remaining >= strlen(actionTypeStr) + strlen(ACTION_DELIMITER) + 1)
{
strncat(temp, actionTypeStr, strlen(actionTypeStr));
|
Added missing SceLibc exports.
The variable is the mspace libc uses for its heap allocations.
mspace_create_internal is what is used internally for mspace creation. No limitations on the flags used for creation. | @@ -4439,6 +4439,7 @@ modules:
mktime: 0xD1A2DFC3
mspace_calloc: 0x30470BBA
mspace_create: 0xCEF7C575
+ mspace_create_internal: 0x0B0341EB
mspace_create_with_flag: 0x055FCBC9
mspace_destroy: 0x30CBBC66
mspace_free: 0x3CDFD2A3
@@ -4642,6 +4643,7 @@ modules:
_Stdout: 0x5D8C1282
_Tolotab: 0xD662E07C
_Touptab: 0x36878958
+ libc_heap_mspace: 0xC906BBD5
SceLibm:
kernel: false
nid: 0xCDAE3C7D
|
move alua.c from libtcmu to runner
This make alua.c runner specific. | @@ -38,7 +38,6 @@ add_library(tcmu
SHARED
configfs.c
api.c
- alua.c
libtcmu.c
libtcmu-register.c
tcmuhandler-generated.c
@@ -66,7 +65,6 @@ install(TARGETS tcmu LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
add_library(tcmu_static
configfs.c
api.c
- alua.c
libtcmu.c
libtcmu-register.c
tcmuhandler-generated.c
@@ -86,6 +84,7 @@ target_link_libraries(tcmu_static
add_executable(tcmu-runner
tcmur_cmd_handler.c
tcmur_aio.c
+ alua.c
main.c
tcmuhandler-generated.c
)
|
Remove unintended return statements | @@ -1250,7 +1250,6 @@ int Handler::http_send_stop_sending(int64_t stream_id,
rv != 0) {
std::cerr << "ngtcp2_conn_shutdown_stream_read: " << ngtcp2_strerror(rv)
<< std::endl;
- return -1;
if (rv == NGTCP2_ERR_STREAM_NOT_FOUND) {
return 0;
}
@@ -1277,7 +1276,6 @@ int Handler::http_reset_stream(int64_t stream_id, uint64_t app_error_code) {
rv != 0) {
std::cerr << "ngtcp2_conn_shutdown_stream_write: " << ngtcp2_strerror(rv)
<< std::endl;
- return -1;
if (rv == NGTCP2_ERR_STREAM_NOT_FOUND) {
return 0;
}
|
os: Add support for nconfig frontend 'make nconfig'
This patch is ported from Nuttx to support 'make nconfig'. | @@ -240,7 +240,7 @@ BIN = $(BIN_DIR)/$(BIN_EXE)
memstat: $(BIN)
all: memstat
-.PHONY: context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean force_build applist appupdate
+.PHONY: context clean_context check_context config oldconfig menuconfig nconfig qconfig gconfig export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean force_build applist appupdate
# Target used to copy include/tinyara/math.h. If CONFIG_ARCH_MATH_H is
# defined, then there is an architecture specific math.h header file
@@ -580,6 +580,11 @@ oldconfig: apps_preconfig
menuconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-mconf Kconfig
+do_nconfig: apps_preconfig
+ $(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-nconf Kconfig
+
+nconfig: do_nconfig clean_context
+
qconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-qconf Kconfig
|
SM5803: Expand charger dump
Add some base page registers to charger dump.
BRANCH=None
TEST=on drawlat, confirm base register section prints | @@ -859,6 +859,17 @@ static int command_sm5803_dump(int argc, char **argv)
if (argc > 1)
chgnum = atoi(argv[1]);
+ /* Dump base regs */
+ ccprintf("BASE regs\n");
+ for (reg = 0x01; reg <= 0x30; reg++) {
+ if (!main_read8(chgnum, reg, ®val))
+ ccprintf("[0x%02X] = 0x%02x\n", reg, regval);
+ if (reg & 0xf) {
+ cflush(); /* Flush periodically */
+ watchdog_reload();
+ }
+ }
+
/* Dump measure regs */
ccprintf("MEAS regs\n");
for (reg = 0x01; reg <= 0xED; reg++) {
|
Fix Makefile passing build type too late and some other improvements
Adds BUILD_DIR config option
Adds BUILD_TYPE config option (i.e. Release, Debug, etc). Default set to RelWithDebInfo. Closes | @@ -10,11 +10,14 @@ WITH_SHARED_LIBUV ?= OFF
WITH_LUA_ENGINE ?= LuaJIT
LUA_BUILD_TYPE ?= Static
LUA_COMPAT53_DIR ?= deps/lua-compat-5.3
+BUILD_DIR ?= build
+# options: Release, Debug, RelWithDebInfo, MinSizeRel
+BUILD_TYPE ?= RelWithDebInfo
ifeq ($(WITH_LUA_ENGINE), LuaJIT)
- LUABIN=build/luajit
+ LUABIN=$(BUILD_DIR)/luajit
else
- LUABIN=build/lua
+ LUABIN=$(BUILD_DIR)/lua
endif
CMAKE_OPTIONS += \
@@ -23,7 +26,8 @@ CMAKE_OPTIONS += \
-DWITH_SHARED_LIBUV=$(WITH_SHARED_LIBUV) \
-DWITH_LUA_ENGINE=$(WITH_LUA_ENGINE) \
-DLUA_BUILD_TYPE=$(LUA_BUILD_TYPE) \
- -DLUA_COMPAT53_DIR=$(LUA_COMPAT53_DIR)
+ -DLUA_COMPAT53_DIR=$(LUA_COMPAT53_DIR) \
+ -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
ifeq ($(MAKE),mingw32-make)
CMAKE_OPTIONS += -G"MinGW Makefiles"
@@ -45,18 +49,18 @@ deps/luajit/src:
deps/lua-compat-5.3/c-api:
git submodule update --init deps/lua-compat-5.3
-build/Makefile: deps/libuv/include deps/luajit/src deps/lua-compat-5.3/c-api
- cmake -H. -Bbuild ${CMAKE_OPTIONS}
+$(BUILD_DIR)/Makefile: deps/libuv/include deps/luajit/src deps/lua-compat-5.3/c-api
+ cmake -H. -B$(BUILD_DIR) ${CMAKE_OPTIONS}
-luv: build/Makefile
- cmake --build build --config Debug
- $(LUV_CP) build/luv$(LUV_EXT) luv$(LUV_EXT)
+luv: $(BUILD_DIR)/Makefile
+ cmake --build $(BUILD_DIR)
+ $(LUV_CP) $(BUILD_DIR)/luv$(LUV_EXT) luv$(LUV_EXT)
install: luv
- $(MAKE) -C build install
+ $(MAKE) -C $(BUILD_DIR) install
clean:
- rm -rf build luv.so
+ rm -rf $(BUILD_DIR) luv$(LUV_EXT)
test: luv
${LUABIN} tests/run.lua
|
Fix link to libsbp html docs | @@ -46,7 +46,7 @@ a static library `libsbp-static`.
## Usage
For now, documentation for libsbp is available with
-[libswiftnav](http://docs.swift-nav.com/libswiftnav/group__sbp.html). A
+[libswiftnav](https://swift-nav.github.io/libsbp/c/build/docs/html). A
separate tutorial for applying SBP is at
https://github.com/swift-nav/sbp_tutorial.
|
hfuzz-cc: remove sanitizer-coverage-block-threshold | @@ -168,8 +168,6 @@ static void commonOpts(int *j, char **args)
args[(*j)++] = "-mllvm";
args[(*j)++] = "-sanitizer-coverage-prune-blocks=0";
args[(*j)++] = "-mllvm";
- args[(*j)++] = "-sanitizer-coverage-block-threshold=10000000";
- args[(*j)++] = "-mllvm";
args[(*j)++] = "-sanitizer-coverage-level=3";
}
|
[KConfig] Change the RT_DFS_ELM_USE_LFN cfg to choice. | @@ -29,15 +29,29 @@ if RT_USING_DFS
int "OEM code page"
default 437
+ choice
+ prompt "Support long file name"
+ default RT_DFS_ELM_USE_LFN_0
+
+ config RT_DFS_ELM_USE_LFN_0
+ bool "0: LFN disable"
+
+ config RT_DFS_ELM_USE_LFN_1
+ bool "1: LFN with static LFN working buffer"
+
+ config RT_DFS_ELM_USE_LFN_2
+ bool "2: LFN with dynamic LFN working buffer on the stack"
+
+ config RT_DFS_ELM_USE_LFN_3
+ bool "3: LFN with dynamic LFN working buffer on the heap"
+ endchoice
+
config RT_DFS_ELM_USE_LFN
- int "Support long file name"
- default 0
- range 0 3
- help
- 0: LFN disable
- 1: LFN with static LFN working buffer
- 2: LFN with dynamic LFN working buffer on the stack
- 3: LFN with dynamic LFN working buffer on the heap
+ int
+ default 0 if RT_DFS_ELM_USE_LFN_0
+ default 1 if RT_DFS_ELM_USE_LFN_1
+ default 2 if RT_DFS_ELM_USE_LFN_2
+ default 3 if RT_DFS_ELM_USE_LFN_3
config RT_DFS_ELM_MAX_LFN
int "Maximal size of file name length"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.