message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Update release notes to explicitly select release commit when tagging. | @@ -99,7 +99,7 @@ v2.14: Bug Fix and Improvements
- Add user guides for CentOS/RHEL 6/7.
```
-The first line will be the release title and the rest will be the body. The tag field should be updated with the current version so a tag is created from master.
+The first line will be the release title and the rest will be the body. The tag field should be updated with the current version so a tag is created from master. **Be sure to select the release commit explicitly rather than auto-tagging the last commit in master!**
## Push web documentation to master and deploy
```
|
Size of structure ware updated. | @@ -29,12 +29,12 @@ typedef struct WL_Config_s {
uint32_t wr_size; /*!< Minimum amount of bytes per one block at write operation: 1...*/
uint32_t version; /*!< A version of current implementatioon. To erase and reallocate complete memory this ID must be different from id before.*/
size_t temp_buff_size; /*!< Size of temporary allocated buffer to copy from one flash area to another. The best way, if this value will be equal to sector size.*/
- uint32_t reserved[6]; /*!< dummy array to make wl_config_t size compatible with flash encryption (divided by 16)*/
+ uint32_t reserved[5]; /*!< dummy array to make wl_config_t size compatible with flash encryption (divided by 16)*/
uint32_t crc; /*!< CRC for this config*/
public:
WL_Config_s()
{
- for (int i=0 ; i< 6 ; i++) this->reserved[i] = 0;
+ for (int i=0 ; i< 5 ; i++) this->reserved[i] = 0;
}
} wl_config_t;
|
feat(fabric test):
add fabric test case "TxQueryFail_Args_NULL" | @@ -611,6 +611,35 @@ START_TEST(test_002Transaction_0024TxQueryFail_Txptr_NULL)
}
END_TEST
+START_TEST(test_002Transaction_0025TxQueryFail_Args_NULL)
+{
+ BSINT32 rtnVal;
+ BoatHlfabricTx tx_ptr;
+ BoatHlfabricWallet *g_fabric_wallet_ptr = NULL;
+ BoatHlfabricWalletConfig wallet_config = get_fabric_wallet_settings();
+ BoatIotSdkInit();
+ /* 1. execute unit test */
+ rtnVal = BoatWalletCreate(BOAT_PROTOCOL_HLFABRIC, NULL, &wallet_config, sizeof(BoatHlfabricWalletConfig));
+ g_fabric_wallet_ptr = BoatGetWalletByIndex(rtnVal);
+
+ rtnVal = BoatHlfabricTxInit(&tx_ptr, g_fabric_wallet_ptr, NULL, "mycc", NULL, "mychannel", "Org1MSP");
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricWalletSetNetworkInfo(tx_ptr.wallet_ptr, wallet_config.nodesCfg);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ long int timesec = 0;
+ time(×ec);
+ rtnVal = BoatHlfabricTxSetTimestamp(&tx_ptr, timesec, 0);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSetArgs(&tx_ptr, NULL, NULL, NULL);
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+ rtnVal = BoatHlfabricTxSubmit(&tx_ptr);
+ ck_assert_int_eq(rtnVal, BOAT_ERROR_COMMON_INVALID_ARGUMENT);
+ BoatHlfabricTxDeInit(&tx_ptr);
+ BoatIotSdkDeInit();
+ fabricWalletConfigFree(wallet_config);
+}
+END_TEST
+
Suite *make_transaction_suite(void)
{
@@ -647,6 +676,7 @@ Suite *make_transaction_suite(void)
tcase_add_test(tc_transaction_api, test_002Transaction_0022TxInvokeFail_Args_ADD1);
tcase_add_test(tc_transaction_api, test_002Transaction_0023TxQuery_Success);
tcase_add_test(tc_transaction_api, test_002Transaction_0024TxQueryFail_Txptr_NULL);
+ tcase_add_test(tc_transaction_api, test_002Transaction_0025TxQueryFail_Args_NULL);
return s_transaction;
}
|
Fixing double init value | @@ -66,7 +66,7 @@ void arm_dot_prod_f64(
float64_t * result)
{
uint32_t blkCnt; /* Loop counter */
- float64_t sum = 0.0f; /* Temporary return variable */
+ float64_t sum = 0.; /* Temporary return variable */
/* Initialize blkCnt with number of samples */
blkCnt = blockSize;
|
Fixed lis2dh12 to work on scales above 2G.
Fixed lis2dh12_get_full_scale to actually report the correct scale, by not shifting it.
Value returned by lis2dh12_get_full_scale is utilized for calculation in poll_read and stream_read. | @@ -757,7 +757,7 @@ lis2dh12_get_full_scale(struct sensor_itf *itf, uint8_t *fs)
goto err;
}
- *fs = (reg & LIS2DH12_CTRL_REG4_FS) >> 4;
+ *fs = (reg & LIS2DH12_CTRL_REG4_FS);
return 0;
err:
|
fix crash in VmaAllocator_T::AllocateDedicatedMemory | @@ -15493,9 +15493,9 @@ VkResult VmaAllocator_T::AllocateDedicatedMemory(
allocInfo.allocationSize = size;
#if VMA_DEDICATED_ALLOCATION || VMA_VULKAN_VERSION >= 1001000
+ VkMemoryDedicatedAllocateInfoKHR dedicatedAllocInfo = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR };
if(!canAliasMemory)
{
- VkMemoryDedicatedAllocateInfoKHR dedicatedAllocInfo = { VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR };
if(m_UseKhrDedicatedAllocation || m_VulkanApiVersion >= VK_MAKE_VERSION(1, 1, 0))
{
if(dedicatedBuffer != VK_NULL_HANDLE)
|
travis: update docker image version
add genromfs
add kconfig-frontends | @@ -8,6 +8,9 @@ services:
- docker
env:
+ global:
+ - TIZENRT_IMG_VERSION=1.4.6
+ matrix:
- BUILD_CONFIG=artik055s/audio
- BUILD_CONFIG=artik053/grpc
- BUILD_CONFIG=artik053/st_things
@@ -17,11 +20,11 @@ env:
- BUILD_CONFIG=qemu/tc_64k
before_install:
-- docker pull tizenrt/tizenrt:1.4.4
+- docker pull tizenrt/tizenrt:${TIZENRT_IMG_VERSION}
- echo "${TRAVIS_BUILD_DIR}"
script:
-- docker run -d -it --name tizenrt_docker -v ${TRAVIS_BUILD_DIR}:/root/tizenrt -w /root/tizenrt/os tizenrt/tizenrt:1.4.4 /bin/bash
+- docker run -d -it --name tizenrt_docker -v ${TRAVIS_BUILD_DIR}:/root/tizenrt -w /root/tizenrt/os tizenrt/tizenrt:${TIZENRT_IMG_VERSION} /bin/bash
- docker exec tizenrt_docker arm-none-eabi-gcc --version
- docker exec tizenrt_docker make distclean
|
Add support for ejecting build (no button yet) | @@ -208,7 +208,8 @@ export const consoleClear = () => {
export const runBuild = ({
buildType = "web",
- exportBuild = false
+ exportBuild = false,
+ ejectBuild = false
} = {}) => async (dispatch, getState) => {
dispatch({ type: types.CMD_START });
dispatch({ type: types.SET_SECTION, section: "build" });
@@ -242,6 +243,10 @@ export const runBuild = ({
);
}
+ if (ejectBuild) {
+ await fs.copy(`${outputRoot}`, `${projectRoot}/eject`);
+ }
+
dispatch({ type: types.CMD_COMPLETE });
return {
|
Fix missing geometry update | @@ -2715,6 +2715,7 @@ int main(int argc, char** argv) {
new_field_h, new_field_w, ged_state.tick_num,
&ged_state.scratch_field, &ged_state.undo_hist,
&ged_state.ged_cursor);
+ ged_update_internal_geometry(&ged_state);
ged_state.needs_remarking = true;
ged_state.is_draw_dirty = true;
ged_make_cursor_visible(&ged_state);
|
README: removed italic typeface. | @@ -326,14 +326,14 @@ To configure Unit modules for other versions of PHP (including versions you
have customized), repeat the following command for each one:
```
-# ./configure php --module=<_prefix_> --config=<_script-name_> --lib-path=<_pathname_>
+# ./configure php --module=<prefix> --config=<script-name> --lib-path=<pathname>
```
where
* `--module` sets the filename prefix for the Unit module specific to the
PHP version (that is, the resulting module is called
- <_prefix_>.**unit.so**).
+ <prefix>.**unit.so**).
* `--config` specifies the filename of the **php-config** script for the
particular version of PHP.
@@ -369,14 +369,14 @@ To configure Unit modules for other versions of Python (including versions you
have customized), repeat the following command for each one:
```
-# ./configure python --module=<_prefix_> --config=<_script-name_>
+# ./configure python --module=<prefix> --config=<script-name>
```
where
* `--module` sets the filename prefix for the Unit module specific to the
Python version (that is, the resulting modules is called
- <_prefix_>.**unit.so**).
+ <prefix>.**unit.so**).
* `--config` specifies the filename of the **python-config** script for the
particular version of Python.
@@ -410,7 +410,7 @@ To compile the packages for Go:
```
# go env GOPATH
- # export GOPATH=<_path_>
+ # export GOPATH=<path>
```
2. Compile and install the package:
@@ -664,7 +664,7 @@ Delete the listener on *:8400:
| Object | Description |
| --- | --- |
-| `<_IP-address_>:<_port_>` | IP address and port on which Unit listens for requests to the named application. The IP address can be either a full address (`127.0.0.1:8300`) or a wildcard (`*:8300`).
+| `<IP-address>:<port>` | IP address and port on which Unit listens for requests to the named application. The IP address can be either a full address (`127.0.0.1:8300`) or a wildcard (`*:8300`).
| `application` | Application name.
Example:
|
docs/library: Update pyb.UART to correct pyboard UART availability.
On original pyboard UART 5 isn't available; added pyboard D availability. | @@ -48,13 +48,16 @@ Constructors
.. class:: pyb.UART(bus, ...)
- Construct a UART object on the given bus. ``bus`` can be 1-6, or 'XA', 'XB', 'YA', or 'YB'.
+ Construct a UART object on the given bus.
+ For Pyboard ``bus`` can be 1-4, 6, 'XA', 'XB', 'YA', or 'YB'.
+ For Pyboard Lite ``bus`` can be 1, 2, 6, 'XB', or 'YA'.
+ For Pyboard D ``bus`` can be 1-4, 'XA', 'YA' or 'YB'.
With no additional parameters, the UART object is created but not
initialised (it has the settings from the last initialisation of
the bus, if any). If extra arguments are given, the bus is initialised.
See ``init`` for parameters of initialisation.
- The physical pins of the UART busses are:
+ The physical pins of the UART busses on Pyboard are:
- ``UART(4)`` is on ``XA``: ``(TX, RX) = (X1, X2) = (PA0, PA1)``
- ``UART(1)`` is on ``XB``: ``(TX, RX) = (X9, X10) = (PB6, PB7)``
@@ -62,10 +65,22 @@ Constructors
- ``UART(3)`` is on ``YB``: ``(TX, RX) = (Y9, Y10) = (PB10, PB11)``
- ``UART(2)`` is on: ``(TX, RX) = (X3, X4) = (PA2, PA3)``
- The Pyboard Lite supports UART(1), UART(2) and UART(6) only. Pins are as above except:
+ The Pyboard Lite supports UART(1), UART(2) and UART(6) only, pins are:
+ - ``UART(1)`` is on ``XB``: ``(TX, RX) = (X9, X10) = (PB6, PB7)``
+ - ``UART(6)`` is on ``YA``: ``(TX, RX) = (Y1, Y2) = (PC6, PC7)``
- ``UART(2)`` is on: ``(TX, RX) = (X1, X2) = (PA2, PA3)``
+ The Pyboard D supports UART(1), UART(2), UART(3) and UART(4) only, pins are:
+
+ - ``UART(4)`` is on ``XA``: ``(TX, RX) = (X1, X2) = (PA0, PA1)``
+ - ``UART(1)`` is on ``YA``: ``(TX, RX) = (Y1, Y2) = (PA9, PA10)``
+ - ``UART(3)`` is on ``YB``: ``(TX, RX) = (Y9, Y10) = (PB10, PB11)``
+ - ``UART(2)`` is on: ``(TX, RX) = (X3, X4) = (PA2, PA3)``
+
+ *Note:* Pyboard D has ``UART(1)`` on ``YA``, unlike Pyboard and Pyboard Lite that both
+ have ``UART(1)`` on ``XB`` and ``UART(6)`` on ``YA``.
+
Methods
-------
|
Add git ID to amalgamated headers. | # tracker at <https://github.com/nemequ/simde/issues> or directly to
# the author so they can be merged back into the original version.
-import sys, re, os
+import sys, re, os, subprocess
amalgamate_include = re.compile('^\\s*#\\s*include\\s+\\"([^)]+)\\"\\s$')
already_included = []
@@ -50,5 +50,9 @@ if len(sys.argv) != 2:
sys.exit(1)
-print('/* AUTOMATICALLY GENERATED FILE, DO NOT MODIFY */\n')
+print('/* AUTOMATICALLY GENERATED FILE, DO NOT MODIFY */')
+
+git_id = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode().strip()
+print("/* {:s} */".format(git_id))
+
amalgamate(sys.argv[1], sys.stdout)
|
Update debug flags, so that -Og (optimalization for debugging) is used | @@ -147,8 +147,8 @@ endif()
# Set build type specific flags
# Debug
-set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_C_FLAGS}")
-set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_CXX_FLAGS}")
+set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG -Og ${CMAKE_C_FLAGS}")
+set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG -Og ${CMAKE_CXX_FLAGS}")
set(CMAKE_DEBUG_POSTFIX "d")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
HW: Fixing typo in dma.vhd | @@ -2355,7 +2355,7 @@ BEGIN
IF read_ctrl_fsm_q = ST_IDLE THEN
sd_c_q.rd_req <= sd_c_i.rd_req;
- rd_ctx_q <= sd_c_i.wr_ctx;
+ rd_ctx_q <= sd_c_i.rd_ctx;
ELSE
sd_c_q.rd_req <= '0';
END IF;
|
test: Print proper mambo command path | @@ -9,7 +9,7 @@ if [ -z "$P9MAMBO_BINARY" ]; then
fi
if [ ! -x "$P9MAMBO_PATH/$P9MAMBO_BINARY" ]; then
- echo "Could not find executable P9MAMBO_BINARY ($P9MAMBO_PATH/$MAMBO_BINARY). Skipping sreset_world test";
+ echo "Could not find executable P9MAMBO_BINARY ($P9MAMBO_PATH/$P9MAMBO_BINARY). Skipping sreset_world test";
exit 0;
fi
|
chat-cli: remove r/w specifiers for invite and banish
No longer supported. As such, we also don't include that in the
permission path anymore. | :: create chat
[%create nu-security path (unit glyph) (unit ?)]
[%delete path] :: delete chat
- [%invite ?(%r %w %rw) path (set ship)] :: allow
- [%banish ?(%r %w %rw) path (set ship)] :: disallow
+ [%invite path (set ship)] :: allow
+ [%banish path (set ship)] :: disallow
::
[%join target (unit glyph) (unit ?)] :: join target
[%leave target] :: nuke target
::
[%create leaf+";create [type] /chat-name (glyph)"]
[%delete leaf+";delete /chat-name"]
- [%invite leaf+";invite [rw | r | w] /chat-name ~ships"]
- [%banish leaf+";banish [rw | r | w] /chat-name ~ships"]
+ [%invite leaf+";invite /chat-name ~ships"]
+ [%banish leaf+";banish /chat-name ~ships"]
::
[%bind leaf+";bind [glyph] ~ship/chat-name"]
[%unbind leaf+";unbind [glyph]"]
==
==
;~((glue ace) (tag %delete) path)
- ;~((glue ace) (tag %invite) rw path ships)
- ;~((glue ace) (tag %banish) rw path ships)
+ ;~((glue ace) (tag %invite) path ships)
+ ;~((glue ace) (tag %banish) path ships)
::
;~ (glue ace)
(tag %join)
::
++ security
(perk %channel %village ~)
- :: +rw: read, write, or read-write
- ::
- ++ rw
- (perk %rw %r %w ~)
::
:: +glyph: shorthand character
::
:: +change-permission: modify permissions on a local chat
::
++ change-permission
- |= [allow=? rw=?(%r %w %rw) =path ships=(set ship)]
+ |= [allow=? =path ships=(set ship)]
^- (quip card state)
:_ all-state
- =; cards=(list card)
- ?. allow cards
- %+ weld cards
+ =; card=(unit card)
+ %+ weld (drop card)
+ ?. allow ~
%+ turn ~(tap in ships)
(cury invite-card path)
- %+ murn
- ^- (list term)
- ?- rw
- %r [%read ~]
- %w [%write ~]
- %rw [%read %write ~]
- ==
- |= =term
- ^- (unit card)
=. path
- =- (snoc `^path`- term)
[%chat (target-to-path our-self path)]
:: whitelist: empty if no matching permission, else true if whitelist
::
%- some
%^ act %do-permission %group-store
:- %group-action
- !>
+ !> ^- group-action
?: =(u.whitelist allow)
[%add ships path]
[%remove ships path]
|
Use LSAME for character comparison (Reference-LAPACK PR755) | * ..
* .. External Functions ..
INTEGER ILAENV
- EXTERNAL ILAENV
+ LOGICAL LSAME
+ EXTERNAL ILAENV, LSAME
* ..
* .. Executable Statements ..
*
*
* Will add the VECT OPTION HERE next release
VECT = OPTS(1:1)
- IF( VECT.EQ.'N' ) THEN
+ IF( LSAME( VECT, 'N' ) ) THEN
LHOUS = MAX( 1, 4*NI )
ELSE
* This is not correct, it need to call the ALGO and the stage2
|
Remove extraneous test macro. | @@ -393,8 +393,6 @@ Get the remote lock type required for the command
LockType
cfgLockRemoteType(ConfigCommand commandId)
{
- FUNCTION_TEST_VOID();
-
FUNCTION_TEST_BEGIN();
FUNCTION_TEST_PARAM(ENUM, commandId);
FUNCTION_TEST_END();
|
[drivers][hwtimer] Fix compilation warning | @@ -40,7 +40,7 @@ rt_inline rt_uint32_t timeout_calc(rt_hwtimer_t *timer, rt_hwtimerval_t *tv)
if (timeout <= overflow)
{
- counter = timeout*timer->freq;
+ counter = (rt_uint32_t)(timeout * timer->freq);
devi = tv_sec - (counter / (float)timer->freq) * i;
/* Minimum calculation error */
if (devi > devi_min)
@@ -65,7 +65,7 @@ rt_inline rt_uint32_t timeout_calc(rt_hwtimer_t *timer, rt_hwtimerval_t *tv)
timer->cycles = i;
timer->reload = i;
timer->period_sec = timeout;
- counter = timeout*timer->freq;
+ counter = (rt_uint32_t)(timeout * timer->freq);
return counter;
}
@@ -160,12 +160,12 @@ static rt_size_t rt_hwtimer_read(struct rt_device *dev, rt_off_t pos, void *buff
if (timer->info->cntmode == HWTIMER_CNTMODE_DW)
{
- cnt = (timer->freq * timer->period_sec) - cnt;
+ cnt = (rt_uint32_t)(timer->freq * timer->period_sec) - cnt;
}
t = overflow * timer->period_sec + cnt/(float)timer->freq;
- tv.sec = t;
- tv.usec = (t - tv.sec) * 1000000;
+ tv.sec = (rt_int32_t)t;
+ tv.usec = (rt_int32_t)((t - tv.sec) * 1000000);
size = size > sizeof(tv)? sizeof(tv) : size;
rt_memcpy(buffer, &tv, size);
|
t/lru-maintainer.t: check for WARM item earlier
item might get pushed back out as we keep doing work. also use the move
counter instead of static number, in case of timing goofups pushing the warm
item back out. | @@ -68,6 +68,8 @@ for (my $key = 0; $key < 100; $key++) {
}
last;
}
+ $stats = mem_stats($sock, "items");
+ isnt($stats->{"items:31:moves_to_warm"}, 0, "our canary moved to warm");
}
print $sock "set key$key 0 0 66560\r\n$value\r\n";
is(scalar <$sock>, "STORED\r\n", "stored key$key");
@@ -76,8 +78,6 @@ for (my $key = 0; $key < 100; $key++) {
{
my $stats = mem_stats($sock);
isnt($stats->{evictions}, 0, "some evictions happened");
- my $istats = mem_stats($sock, "items");
- isnt($istats->{"items:31:number_warm"}, 0, "our canary moved to warm");
use Data::Dumper qw/Dumper/;
}
|
add some missing openmpt keys
we really need switchable keymaps... | @@ -241,11 +241,11 @@ export const SongTracker = ({
if (selectedCell % 4 === 0) {
if (e.ctrlKey) {
if (e.shiftKey) {
- if (e.key === "Q") return transposeNoteCell(12);
- if (e.key === "A") return transposeNoteCell(-12);
+ if (e.key === "Q" || e.key === "+") return transposeNoteCell(12);
+ if (e.key === "A" || e.key === "_") return transposeNoteCell(-12);
} else {
- if (e.key === "q") return transposeNoteCell(1);
- if (e.key === "a") return transposeNoteCell(-1);
+ if (e.key === "q" || e.key === "=") return transposeNoteCell(1);
+ if (e.key === "a" || e.key === "-") return transposeNoteCell(-1);
}
return;
} else if (e.metaKey) {
@@ -275,7 +275,7 @@ export const SongTracker = ({
if (e.key === "l") editNoteCell(20);
if (e.key === ";") editNoteCell(21);
if (e.key === "'") editNoteCell(22);
- //if (e.key === "??") editNoteCell(23);
+ if (e.key === "\\") editNoteCell(23);
if (e.key === "z") editNoteCell(24);
if (e.key === "x") editNoteCell(25);
if (e.key === "c") editNoteCell(26);
|
Replay external velocities | @@ -256,6 +256,20 @@ static int parse_and_run_externalpose(const char *line, SurvivePlaybackData *dri
return 0;
}
+static int parse_and_run_externalvelocity(const char *line, SurvivePlaybackData *driver) {
+ char name[128] = {0};
+ SurviveVelocity pose;
+
+ if (driver->outputExternalPose) {
+ int rr = sscanf(line, "%s EXTERNAL_VELOCITY " SurviveVel_sformat "\n", name, &pose.Pos[0], &pose.Pos[1],
+ &pose.Pos[2], &pose.AxisAngleRot[0], &pose.AxisAngleRot[1], &pose.AxisAngleRot[2]);
+
+ SurviveContext *ctx = driver->ctx;
+ SURVIVE_INVOKE_HOOK(external_velocity, ctx, name, &pose);
+ }
+ return 0;
+}
+
static int parse_and_run_config(const char *line, SurvivePlaybackData *driver) {
const char *configStart = line;
SurviveContext *ctx = driver->ctx;
@@ -412,6 +426,9 @@ static int playback_pump_msg(struct SurviveContext *ctx, void *_driver) {
if (strcmp(op, "EXTERNAL_POSE") == 0) {
parse_and_run_externalpose(line, driver);
break;
+ } else if (strcmp(op, "EXTERNAL_VELOCITY") == 0) {
+ parse_and_run_externalvelocity(line, driver);
+ break;
}
case 'C':
if (op[1] == 0) {
|
netkvm: allow NDIS_OFFLOAD_PARAMETERS_REVISION > 3
In case of NDIS 6.50+ the revision of the structure is 4. | @@ -1076,7 +1076,7 @@ NDIS_STATUS OnSetRSCParameters(PPARANDIS_ADAPTER pContext, PNDIS_OFFLOAD_PARAMET
{
#if PARANDIS_SUPPORT_RSC
- if(op->Header.Revision != NDIS_OFFLOAD_PARAMETERS_REVISION_3)
+ if(op->Header.Revision < NDIS_OFFLOAD_PARAMETERS_REVISION_3)
return NDIS_STATUS_SUCCESS;
if((op->RscIPv4 != NDIS_OFFLOAD_PARAMETERS_NO_CHANGE) &&
|
fix cursor go out of screen | @@ -27,13 +27,15 @@ class Images:
def checkOverdisplay(self, pos1, pos2, limit):
start = 0
end = pos2 - pos1
+
+ if pos1 >= limit:
+ return 0, 0, 0, 0
+ if pos2 <= 0:
+ return 0, 0, 0, 0
+
if pos1 < 0:
start = -pos1
pos1 = 0
- if pos1 >= limit: # werid but still
- pos1 -= pos2 - limit
- pos2 = limit
- end = pos2 - pos1
if pos2 >= limit:
end -= pos2 - limit
pos2 = limit
@@ -48,7 +50,6 @@ class Images:
x1, x2, xstart, xend = self.checkOverdisplay(x1, x2, background.shape[1])
alpha_s = self.img[ystart:yend, xstart:xend, 3] / 255.0
alpha_l = 1.0 - alpha_s
-
for c in range(channel):
background[y1:y2, x1:x2, c] = (
self.img[ystart:yend, xstart:xend, c] + alpha_l * background[y1:y2, x1:x2, c])
|
Defensive avoid NaN | @@ -160,7 +160,7 @@ static void compute_ideal_colors_and_weights_1_comp(
highvalue = astc::max(value, highvalue);
}
- if (highvalue < lowvalue)
+ if (highvalue <= lowvalue)
{
lowvalue = 0.0f;
highvalue = 1e-7f;
@@ -292,7 +292,7 @@ static void compute_ideal_colors_and_weights_2_comp(
// It is possible for a uniform-color partition to produce length=0;
// this causes NaN issues so set to small value to avoid this problem
- if (highparam < lowparam)
+ if (highparam <= lowparam)
{
lowparam = 0.0f;
highparam = 1e-7f;
@@ -441,7 +441,7 @@ static void compute_ideal_colors_and_weights_3_comp(
// It is possible for a uniform-color partition to produce length=0;
// this causes NaN issues so set to small value to avoid this problem
- if (highparam < lowparam)
+ if (highparam <= lowparam)
{
lowparam = 0.0f;
highparam = 1e-7f;
@@ -563,7 +563,7 @@ static void compute_ideal_colors_and_weights_4_comp(
// It is possible for a uniform-color partition to produce length=0;
// this causes NaN issues so set to small value to avoid this problem
- if (highparam < lowparam)
+ if (highparam <= lowparam)
{
lowparam = 0.0f;
highparam = 1e-7f;
@@ -1001,7 +1001,7 @@ void compute_quantized_weights_for_decimation(
// Quantize the weight set using both the specified low/high bounds and standard 0..1 bounds
// TODO: Oddity to investigate; triggered by test in issue #265.
- if (high_bound < low_bound)
+ if (high_bound <= low_bound)
{
low_bound = 0.0f;
high_bound = 1.0f;
|
Makefile: use __NO_STRING_INLINES for libs under Linux | @@ -46,7 +46,7 @@ ifeq ($(OS),Linux)
ARCH_LDFLAGS := -L/usr/local/include \
-lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt -ldl
ARCH_SRCS := $(sort $(wildcard linux/*.c))
- LIBS_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+ LIBS_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D__NO_STRING_INLINES.
ifeq ("$(wildcard /usr/include/bfd.h)","")
WARN_LIBRARY += binutils-devel
|
Reduce pandoc-only Markdown syntax in README
This improves readability when viewing the README on GitHub. | @@ -54,11 +54,11 @@ Change the working directory to the given path.
Parameters:
-`directory`:
+`directory`
: Path of the directory which is to become the new working directory.
-### env {#system-env}
+### env
`env ()`
@@ -69,6 +69,7 @@ Returns:
- A table mapping environment variables names to their string value
(table).
+### getenv
`getenv (var)`
@@ -77,7 +78,7 @@ is no such value.
Parameters:
-`var`:
+`var`
: name of the environment variable (string)
Returns:
@@ -103,7 +104,7 @@ List the contents of a directory.
Parameters:
-`directory`:
+`directory`
: Path of the directory whose contents should be listed (string).
Defaults to `.`.
@@ -128,10 +129,10 @@ necessary.
Parameters:
-`dirname`:
+`dirname`
: name of the new directory
-`create_parent`:
+`create_parent`
: create parent directories if necessary
### rmdir
@@ -143,13 +144,13 @@ then delete the directory and its contents recursively.
Parameters:
-`dirname`:
+`dirname`
: name of the directory to delete
-`recursive`:
+`recursive`
: delete content recursively
-### setenv {#system-setenv}
+### setenv
`setenv (var, value)`
@@ -157,13 +158,13 @@ Set the specified environment variable to a new value.
Parameters:
-`var`:
+`var`
: name of the environment variable (string).
-`value`:
+`value`
: new value (string).
-### tmpdirname {#system-tmpdirname}
+### tmpdirname
`tmpdirname ()`
@@ -200,12 +201,12 @@ action.
Parameters:
-`environment`:
+`environment`
: Environment variables and their values to be set before
running `callback`. (table with string keys and string
values)
-`callback`:
+`callback`
: Action to execute in the custom environment (function)
Returns:
@@ -213,7 +214,7 @@ Returns:
- The result(s) of the call to `callback`
-### with\_tmpdir {#system-with_tmpdir}
+### with\_tmpdir
`with_tmpdir ([parent_dir,] templ, callback)`
@@ -222,15 +223,15 @@ The directory is deleted after use.
Parameters:
-`parent_dir`:
+`parent_dir`
: Parent directory to create the directory in (string). If this
parameter is omitted, the system's canonical temporary directory is
used.
-`templ`:
+`templ`
: Directory name template (string).
-`callback`:
+`callback`
: Function which takes the name of the temporary directory as its
first argument (function).
|
out_kafka: fix flb_time_sleep() args | @@ -347,7 +347,7 @@ int produce_message(struct flb_time *tm, msgpack_object *map,
* to enqueue this message, if we exceed 10 times, we just
* issue a full retry of the data chunk.
*/
- flb_time_sleep(1000, config);
+ flb_time_sleep(1000);
rd_kafka_poll(ctx->producer, 0);
/* Issue a re-try */
|
docs: security: enable memory protection section for ESP32-C2/ESP32-C6 | @@ -75,7 +75,7 @@ Flash Encryption Best Practices
Please refer to the :doc:`DS Peripheral Guide <../api-reference/peripherals/ds>` for detailed documentation.
-.. only:: SOC_MEMPROT_SUPPORTED
+.. only:: SOC_MEMPROT_SUPPORTED or SOC_CPU_IDRAM_SPLIT_USING_PMP
Memory Protection
~~~~~~~~~~~~~~~~~
|
manifest: Use a specialized block exit that doesn't write code. | @@ -5482,6 +5482,22 @@ static void manifest_library(lily_parse_state *parser)
lily_next_token(lex);
}
+static void manifest_block_exit(lily_parse_state *parser)
+{
+ lily_block_type block_type = parser->emit->block->block_type;
+
+ if (block_type == block_file)
+ lily_raise_syn(parser->raiser, "'}' outside of a block.");
+ else if (block_type == block_class)
+ hide_block_vars(parser);
+ /* Otherwise it's an enum, and there's nothing more to do for those. */
+
+ parser->current_class = NULL;
+ lily_gp_restore(parser->generics, 0);
+ lily_emit_leave_scope_block(parser->emit);
+ lily_next_token(parser->lex);
+}
+
static void manifest_loop(lily_parse_state *parser)
{
lily_lex_state *lex = parser->lex;
@@ -5544,7 +5560,7 @@ static void manifest_loop(lily_parse_state *parser)
"Invalid keyword %s for manifest.", lex->label);
}
else if (lex->token == tk_right_curly)
- parse_block_exit(parser);
+ manifest_block_exit(parser);
else if (lex->token == tk_eof) {
lily_block *b = parser->emit->block;
|
no SLEPC_BIN dir | @@ -44,18 +44,6 @@ check_rms
fi
}
-@test "[$testname] Verify module ${PKG}_BIN is defined and exists ($LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
- BIN=${PKG}_BIN
- if [ -z ${!BIN} ];then
- flunk "${PKG}_BIN directory not defined"
- fi
-
- if [ ! -d ${!BIN} || -z "${!BIN}" ];then
- flunk "directory ${!BIN} does not exist"
- fi
-}
-
-
# ----------
# Lib Tests
# ----------
|
build: use isMaster function | @@ -158,7 +158,7 @@ stage("Build artifacts") {
parallel generateArtifactStages()
}
-maybeStage("Deploy Homepage", env.BRANCH_NAME=="master") {
+maybeStage("Deploy Homepage", isMaster()) {
node("frontend") {
docker.withRegistry("https://${registry}",
'docker-hub-elektra-jenkins') {
|
API: Use Markdown instead of Doxygen formatting | @@ -45,7 +45,7 @@ A C or C++ source file that wants to use Elektra should include:
#include <kdb.h>
To link an executable with the Elektra library, one way is to
-use the @c pkg-config tool:
+use the `pkg-config` tool:
$ gcc -o application `pkg-config --cflags --libs elektra` application.c
|
Error on no unzip, quieter download message | @@ -44,11 +44,24 @@ set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -Og")
set(CMAKE_EXE_LINKER_FLAGS_INIT "-specs=nosys.specs -Wl,--gc-sections,--no-wchar-size-warning")
# stdlibs
+set(STDLIB_HASHTYPE "SHA256")
set(STDLIB_PATH ${CMAKE_CURRENT_LIST_DIR}/stdlib)
set(STDLIB_URL https://get.pimoroni.com/stdlibs.zip)
-set(STDLIB_HASH "SHA256=867eb82d2329c962a5aa389f3b5a4a2efd6d75e5c7d464c92ed7b595f76eb90f")
+set(STDLIB_HASH "${STDLIB_HASHTYPE}=867eb82d2329c962a5aa389f3b5a4a2efd6d75e5c7d464c92ed7b595f76eb90f")
+find_program(UNZIP NAMES unzip)
+if(NOT UNZIP)
+ message(FATAL_ERROR "Failed to find required program: \"unzip\"\n(maybe you need to \"apt install unzip\")\n")
+endif()
+
+# file() is great, but it doesn't tell the user what it's downloading
+if(EXISTS ${STDLIB_PATH}/stdlibs.zip)
+ file(${STDLIB_HASHTYPE} ${STDLIB_PATH}/stdlibs.zip FOUND_HASH)
+endif()
+if(NOT EXISTS ${STDLIB_PATH}/stdlibs.zip OR NOT STDLIB_HASH STREQUAL "${STDLIB_HASHTYPE}=${FOUND_HASH}")
message("Downloading stdlibs...")
+endif()
+
file(DOWNLOAD ${STDLIB_URL} ${STDLIB_PATH}/stdlibs.zip EXPECTED_HASH ${STDLIB_HASH} SHOW_PROGRESS STATUS DOWNLOAD_STATUS)
list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
@@ -65,7 +78,7 @@ if(NOT EXISTS ${STDLIB_PATH}/pic)
# CMake 3.18
#file(ARCHIVE_EXTRACT INPUT ${STDLIB_PATH}/stdlibs.zip DESTINATION ${STDLIB_PATH})
- execute_process(COMMAND unzip -u ${STDLIB_PATH}/stdlibs.zip -d ${STDLIB_PATH} RESULT_VARIABLE UNZIP_STATUS)
+ execute_process(COMMAND ${UNZIP} -u ${STDLIB_PATH}/stdlibs.zip -d ${STDLIB_PATH} RESULT_VARIABLE UNZIP_STATUS)
if(NOT ${UNZIP_STATUS} EQUAL 0)
message(FATAL_ERROR "Failed to extract stdlibs: ${UNZIP_STATUS}\n")
|
tests: internal: sp: pass dummy tag | @@ -240,7 +240,9 @@ static void test_select_keys()
out_buf = NULL;
out_size = 0;
- ret = flb_sp_test_do(sp, task, data_buf, data_size,
+ ret = flb_sp_test_do(sp, task,
+ "samples", 7,
+ data_buf, data_size,
&out_buf, &out_size);
if (ret == -1) {
flb_error("[sp test] error processing check '%s'", check->name);
|
rearrange according to alphabetical order | apartment|aparment|apartmen|apt
bangunan|bgn
+dewan
kondominium|kondo
pangsapuri|p/puri
-dewan
+residensi|residen
rumah|rmh
rumah kediaman
rumah pangsa
-residensi|residen
menara
\ No newline at end of file
|
Add pkg-config package to Vagrantfile.
Newer Ubuntu versions do not install this package by default. | @@ -75,7 +75,8 @@ Vagrant.configure(2) do |config|
#-----------------------------------------------------------------------------------------------------------------------
echo 'Install Build Tools' && date
apt-get install -y devscripts build-essential lintian git cloc txt2man debhelper libssl-dev zlib1g-dev libperl-dev \
- libxml2-dev liblz4-dev liblz4-tool libpq-dev valgrind lcov autoconf-archive zstd libzstd-dev bzip2 libbz2-dev
+ libxml2-dev liblz4-dev liblz4-tool libpq-dev valgrind lcov autoconf-archive zstd libzstd-dev bzip2 libbz2-dev \
+ pkg-config
#-----------------------------------------------------------------------------------------------------------------------
echo 'Install Docker' && date
|
pack: validate return value of msgpack_unpack_next() | @@ -360,7 +360,7 @@ void flb_pack_print(char *data, size_t bytes)
size_t off = 0, cnt = 0;
msgpack_unpacked_init(&result);
- while (msgpack_unpack_next(&result, data, bytes, &off)) {
+ while (msgpack_unpack_next(&result, data, bytes, &off) == MSGPACK_UNPACK_SUCCESS) {
/* Check if we are processing an internal Fluent Bit record */
ret = pack_print_fluent_record(cnt, result);
if (ret == 0) {
@@ -667,7 +667,7 @@ int flb_msgpack_raw_to_json_str(char *buf, size_t buf_size,
msgpack_unpacked_init(&result);
ret = msgpack_unpack_next(&result, buf, buf_size, &off);
- if (ret == -1) {
+ if (ret != MSGPACK_UNPACK_SUCCESS) {
return -1;
}
@@ -732,7 +732,7 @@ int flb_msgpack_expand_map(char *map_data, size_t map_size,
}
msgpack_unpacked_init(&result);
- if (!(i=msgpack_unpack_next(&result, map_data, map_size, &off))){
+ if ( (i=msgpack_unpack_next(&result, map_data, map_size, &off)) != MSGPACK_UNPACK_SUCCESS ){
return -1;
}
if (result.data.type != MSGPACK_OBJECT_MAP) {
@@ -1381,7 +1381,7 @@ flb_sds_t flb_msgpack_raw_to_gelf(char *buf, size_t buf_size,
msgpack_unpacked_init(&result);
ret = msgpack_unpack_next(&result, buf, buf_size, &off);
- if (ret == -1) {
+ if (ret != MSGPACK_UNPACK_SUCCESS) {
return NULL;
}
|
Release: Add information about `kdb find` | @@ -76,7 +76,7 @@ We added even more functionality, which could not make it to the highlights:
- <<TODO>>
- <<TODO>>
- <<TODO>>
-
+- The new tool `kdb find` lists keys of the database matching a certain regular expression. *(Markus Raab)*
## New Plugins
|
testcase/kernel: Use P_PID for checking whether specific PID is our child or not
This is a testcase whether specific PID is our child or not.
A idtype should be P_PID for this test. | @@ -297,7 +297,7 @@ static void tc_sched_waitid(void)
/* Check for The TCB corresponding to this PID is not our child. */
- ret_chk = waitid(P_GID, 0, &info, WEXITED);
+ ret_chk = waitid(P_PID, 0, &info, WEXITED);
TC_ASSERT_EQ("waitid", ret_chk, ERROR);
TC_ASSERT_EQ("waitid", errno, ECHILD);
|
utility: comment out part of test
see | @@ -32,8 +32,10 @@ static void test_elektraRstrip ()
strncpy (text, "", MAX_LENGTH);
succeed_if_same_string (elektraRstrip (text, NULL), "");
+ /*
elektraRstrip (text, &last);
succeed_if_same_string (last, text);
+ */
strncpy (text, "No Trailing Whitespace", MAX_LENGTH);
succeed_if_same_string (elektraRstrip (text, NULL), "No Trailing Whitespace");
|
Invite: allow dismissal of join request
Fixes urbit/landscape#782 | @@ -206,8 +206,9 @@ function InviteActions(props: {
app?: string;
uid?: string;
}) {
- const { resource, api, app, uid } = props;
+ const { status, resource, api, app, uid } = props;
const inviteAccept = useInviteAccept(resource, api, app, uid);
+ const set = useGroupState(s => s.set);
const inviteDecline = useCallback(async () => {
if (!(app && uid)) {
@@ -216,15 +217,18 @@ function InviteActions(props: {
await api.invite.decline(app, uid);
}, [app, uid]);
- const hideJoin = useCallback(async () => {
+ const hideJoin = useCallback(async (e) => {
+ if(status?.progress === 'done') {
+ set(s => {
+ delete s.pendingJoin[resource]
+ });
+ e.stopPropagation();
+ return;
+ }
await api.groups.hide(resource);
- }, [api, resource]);
+ }, [api, resource, status]);
- const { status } = props;
if (status) {
- if(status.progress === 'done') {
- return null;
- }
return (
<Row gapX="2" alignItems="center" height={4}>
<StatelessAsyncButton
@@ -232,7 +236,7 @@ function InviteActions(props: {
backgroundColor="white"
onClick={hideJoin}
>
- Cancel
+ {status?.progress === 'done' ? 'Dismiss' : 'Cancel'}
</StatelessAsyncButton>
</Row>
);
|
build: support new FLB_HTTP_SERVER | @@ -12,6 +12,7 @@ endif()
include(GNUInstallDirs)
include(ExternalProject)
include(cmake/FindJournald.cmake)
+include(cmake/FindMonkey.cmake)
# Output paths
set(FLB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -44,6 +45,7 @@ option(FLB_BUFFERING "Enable buffering support" No)
option(FLB_POSIX_TLS "Force POSIX thread storage" No)
option(FLB_WITHOUT_INOTIFY "Disable inotify support" No)
option(FLB_SQLDB "Enable SQL embedded DB" No)
+option(FLB_HTTP_SERVER "Enable HTTP Server" No)
# Metrics: Experimental Feature, disabled by default on 0.12 series
# but enabled in the upcoming 0.13 release. Note that development
@@ -149,6 +151,7 @@ if(FLB_DEV)
set(FLB_DEBUG On)
set(FLB_TRACE On)
set(FLB_METRICS On)
+ set(FLB_HTTP_SERVER On)
set(FLB_TESTS_INTERNAL On)
endif()
@@ -175,8 +178,7 @@ include_directories(
lib/flb_libco
lib/sha1
lib/msgpack-2.1.3/include
- lib/monkey/include
- lib/monkey/mk_core/include
+ ${MONKEY_INCLUDE_DIR}
)
# On Windows, the core uses libevent
@@ -213,7 +215,11 @@ macro(MK_SET_OPTION option value)
endmacro()
MK_SET_OPTION(MK_SYSTEM_MALLOC ON)
+if(FLB_HTTP_SERVER)
+ add_subdirectory(lib/monkey/ EXCLUDE_FROM_ALL)
+else()
add_subdirectory(lib/monkey/mk_core EXCLUDE_FROM_ALL)
+endif()
# SSL/TLS: add encryption support
if(FLB_OUT_TD)
@@ -256,8 +262,14 @@ if(FLB_STATS)
FLB_DEFINITION(FLB_HAVE_STATS)
endif()
+if(FLB_HTTP_SERVER)
+ FLB_DEFINITION(FLB_HAVE_HTTP_SERVER)
+endif()
+
FLB_DEFINITION(FLB_HAVE_FLUSH_LIBCO)
+if(NOT TARGET co)
add_subdirectory(lib/flb_libco)
+endif()
# Systemd Journald support
if(JOURNALD_FOUND)
@@ -356,6 +368,7 @@ if(FLB_REGEX)
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/onigmo
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lib/onigmo/configure ${AUTOCONF_HOST_OPT} --with-pic --disable-shared --enable-static --prefix=<INSTALL_DIR>
CFLAGS=-std=gnu99\ -Wall\ -pipe\ -g3\ -O3\ -funroll-loops
+ CPPFLAGS=-DONIG_ESCAPE_REGEX_T_COLLISION=1
BUILD_COMMAND ${MAKE}
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/
INSTALL_COMMAND $(MAKE) install)
|
s5j/mct: retrieve TCLK freq from clock driver
Instead of using hard-coded clock frequency, retrieve it from the clock
driver. | #include "chip/s5jt200_mct.h"
#include "s5j_mct.h"
+#include "s5j_clock.h"
/****************************************************************************
* Pre-processor Definitions
@@ -91,12 +92,6 @@ struct s5j_mct_priv_s {
/****************************************************************************
* Private Functions
****************************************************************************/
-static unsigned int s5j_mct_getoscclock(void)
-{
- /* TODO: get TCLKB from CLK DRIVER */
- return 26000000;
-}
-
static uint32_t mct_getreg32(FAR struct s5j_mct_priv_s *priv, uint32_t offset)
{
return getreg32(priv->base_addr + offset);
@@ -110,7 +105,7 @@ static void mct_putreg32(FAR struct s5j_mct_priv_s *priv, uint32_t offset,
static int s5j_mct_setclock(uint32_t freq)
{
- uint32_t tclkb = s5j_mct_getoscclock();
+ uint32_t tclkb = s5j_clk_get_rate(CLK_DFT_OSCCLK);
uint32_t cfg = getreg32(S5J_MCT_CFG) & 0xFFFFF800;
uint32_t prescaler = (tclkb / freq - 1);
|
Tweak liveness analysis for return statements | @@ -133,6 +133,7 @@ type livenessHelper struct {
tm *t.Map
vars map[t.ID]int // Maps from local variable name to livenesses index.
loops map[a.Loop]*loopLivenesses
+ final livenesses
}
func (g *gen) findVars() error {
@@ -152,14 +153,16 @@ func (g *gen) findVars() error {
}
if f.Effect().Coroutine() {
+ h.final = make(livenesses, len(h.vars))
r := make(livenesses, len(h.vars))
if err := h.doBlock(r, f.Body(), 0); err != nil {
return err
}
+ h.final.reconcile(r)
g.currFunk.varResumables = map[t.ID]bool{}
for i, v := range g.currFunk.varList {
- g.currFunk.varResumables[v.Name()] = r[i] == livenessStrong
+ g.currFunk.varResumables[v.Name()] = h.final[i] == livenessStrong
}
}
@@ -401,7 +404,7 @@ func (h *livenessHelper) doRet(r livenesses, n *a.Ret, depth uint32) error {
switch n.Keyword() {
case t.IDReturn:
- // No-op.
+ h.final.reconcile(r)
case t.IDYield:
r.raiseNoneToWeak()
default:
|
[scripts] Make tracevis work for MemPool | @@ -13,14 +13,14 @@ import progressbar
# 3 -> pc (hex with 0x prefix)
# 4 -> instruction
# 5 -> args
-LINE_REGEX = r' *(\d+) +(\d+) +([3M1S0U]) +(0x[0-9a-f]+) ([.\w]+) +(.+)#'
+LINE_REGEX = r' *(\d+) +(\d+) +([3M1S0U]?) *(0x[0-9a-f]+) ([.\w]+) +(.+)#'
# regex matches a line of instruction retired by the accelerator
# 2 -> privilege level
# 3 -> pc (hex with 0x prefix)
# 4 -> instruction
# 5 -> args
-ACC_LINE_REGEX = r' +([3M1S0U]) +(0x[0-9a-f]+) ([.\w]+) +(.+)#'
+ACC_LINE_REGEX = r' +([3M1S0U]?) *(0x[0-9a-f]+) ([.\w]+) +(.+)#'
re_line = re.compile(LINE_REGEX)
re_acc_line = re.compile(ACC_LINE_REGEX)
|
Improve ownship detection for EFBs that care | @@ -295,21 +295,24 @@ func makeOwnshipReport() bool {
// See p.16.
msg[0] = 0x0A // Message type "Ownship".
- // Ownship Target Identify (see 3.5.1.2 of GDL-90 Specifications)
- // First half of byte is 0 for 'No Traffic Alert'
- // Second half of byte is 0 for 'ADS-B with ICAO'
- msg[1] = 0x00 // Alert status, address type.
-
+ // Retrieve ICAO code from settings
code, _ := hex.DecodeString(globalSettings.OwnshipModeS)
- if len(code) != 3 {
+
+ // Ownship Target Identify (see 3.5.1.2 of GDL-90 Specifications)
+ // First half of byte is 0 for Alert type of 'No Traffic Alert'
+ // Second half of byte is 0 for traffic type 'ADS-B with ICAO'
+ // Send 0x01 by default, unless ICAO is set, send 0x00
+ if (len(code) == 3 && code[0] != 0xF0 && code[0] != 0x00) {
+ msg[1] = 0x00 // ADS-B Out with ICAO
+ msg[2] = code[0] // Mode S address.
+ msg[3] = code[1] // Mode S address.
+ msg[4] = code[2] // Mode S address.
+ } else {
+ msg[1] = 0x01 // ADS-B Out with self-assigned code
// Reserved dummy code.
msg[2] = 0xF0
msg[3] = 0x00
msg[4] = 0x00
- } else {
- msg[2] = code[0] // Mode S address.
- msg[3] = code[1] // Mode S address.
- msg[4] = code[2] // Mode S address.
}
var tmp []byte
|
Cirrus: Install ronn on macOS | @@ -50,10 +50,13 @@ mac_task:
- | # Install Ruby
brew install [email protected]
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
- - > # Install Ruby gems
- gem install test-unit --user-install --no-document
+ - | # Install Ruby gems
+ gem install ronn test-unit --user-install --no-document
script:
+ - |
+ export PATH="/usr/local/opt/[email protected]/bin:$PATH"
+ export PATH="$HOME/.gem/ruby/$(ruby -e 'puts RUBY_VERSION' | sed 's/\.[0-9]$/.0/')/bin:$PATH"
- SYSTEM_DIR="$PWD/kdbsystem"
- mkdir build && cd build
- cmake -GNinja -DPLUGINS=ALL -DBINDINGS=ALL -DKDB_DB_SYSTEM="$SYSTEM_DIR" ..
|
removes the upstream/downstream read_cb buffer copies | @@ -1161,11 +1161,7 @@ _proxy_sock_read_downstream_cb(uv_stream_t* don_u,
_proxy_conn_close(con_u);
}
else {
- uv_buf_t fub_u;
-
- fub_u.len = siz_w;
- fub_u.base = c3_malloc(siz_w);
- memcpy(fub_u.base, buf_u->base, siz_w);
+ uv_buf_t fub_u = uv_buf_init(buf_u->base, siz_w);
u3_proxy_writ* ruq_u = _proxy_writ_new(con_u, (c3_y*)fub_u.base);
@@ -1179,10 +1175,6 @@ _proxy_sock_read_downstream_cb(uv_stream_t* don_u,
_proxy_writ_free(ruq_u);
}
}
-
- if ( 0 != buf_u->base ) {
- free(buf_u->base);
- }
}
/* _proxy_sock_read_upstream_cb(): read from upstream, writing to downstream
@@ -1198,11 +1190,7 @@ _proxy_sock_read_upstream_cb(uv_stream_t* upt_u,
_proxy_conn_close(con_u);
}
else {
- uv_buf_t fub_u;
-
- fub_u.len = siz_w;
- fub_u.base = c3_malloc(siz_w);
- memcpy(fub_u.base, buf_u->base, siz_w);
+ uv_buf_t fub_u = uv_buf_init(buf_u->base, siz_w);
u3_proxy_writ* ruq_u = _proxy_writ_new(con_u, (c3_y*)fub_u.base);
@@ -1216,10 +1204,6 @@ _proxy_sock_read_upstream_cb(uv_stream_t* upt_u,
_proxy_writ_free(ruq_u);
}
}
-
- if ( 0 != buf_u->base ) {
- free(buf_u->base);
- }
}
/* _proxy_fire(): send pending buf upstream, setup mutual read/write
|
OpenCanopy: Fix re-entrance initialisation | @@ -1760,6 +1760,8 @@ BootPickerViewInitialize (
mBootPicker.Hdr.Obj.OffsetX = mBootPickerContainer.Obj.Width / 2;
mBootPicker.Hdr.Obj.OffsetY = 0;
+ mBootPicker.SelectedEntry = NULL;
+
// TODO: animations should be tied to UI objects, not global
// Each object has its own list of animations.
// How to animate addition of one or more boot entries?
|
Fix installation of development version project-generator | @@ -44,6 +44,7 @@ jobs:
- name: Install Python module
run: |
pip3 install --user -r requirements.txt
+ pip3 uninstall --user -y project-generator
pip3 install --user git+https://github.com/mbrossard/project_generator.git@development
- name: Install Embedded Arm Toolchain
@@ -63,7 +64,7 @@ jobs:
- name: Compile
run: |
- export PATH=/usr/lib/ccache:${{ runner.temp }}/arm-gcc/bin/:$PATH
+ export PATH=/usr/lib/ccache:${{ runner.temp }}/arm-gcc/bin/:/home/runner/.local/bin:$PATH
python tools/progen_compile.py --release --parallel
- name: Display results
|
drivebase: add state getter | // SPDX-License-Identifier: MIT
// Copyright (c) 2019 Laurens Valk
+#include <contiki.h>
+
#include <pbio/error.h>
#include <pbio/drivebase.h>
#include <pbio/math.h>
static pbio_drivebase_t __db;
+// Get the physical state of a single motor
+static pbio_error_t drivebase_get_state(pbio_drivebase_t *db,
+ int32_t *time_now,
+ int32_t *distance_count,
+ int32_t *distance_rate_count,
+ int32_t *heading_count,
+ int32_t *heading_rate_count) {
+
+ pbio_error_t err;
+
+ // Read current state of this motor: current time, speed, and position
+ *time_now = clock_usecs();
+
+ int32_t angle_left;
+ err = pbio_tacho_get_angle(db->left->tacho, &angle_left);
+ if (err != PBIO_SUCCESS) {
+ return err;
+ }
+
+ int32_t angle_right;
+ err = pbio_tacho_get_angle(db->left->tacho, &angle_right);
+ if (err != PBIO_SUCCESS) {
+ return err;
+ }
+
+ int32_t rate_left;
+ err = pbio_tacho_get_angular_rate(db->left->tacho, &rate_left);
+ if (err != PBIO_SUCCESS) {
+ return err;
+ }
+
+ int32_t rate_right;
+ err = pbio_tacho_get_angular_rate(db->left->tacho, &rate_right);
+ if (err != PBIO_SUCCESS) {
+ return err;
+ }
+
+ *distance_count = db->drive_counts_per_sum*(angle_left + angle_right);
+ *distance_rate_count = db->drive_counts_per_sum*(rate_left + rate_right);
+
+ *heading_count = db->turn_counts_per_diff*(angle_left - angle_right);
+ *heading_rate_count = db->turn_counts_per_diff*(rate_left - rate_right);
+
+ return PBIO_SUCCESS;
+}
+
static pbio_error_t pbio_drivebase_setup(pbio_drivebase_t *db,
pbio_servo_t *left,
pbio_servo_t *right,
|
add timer lock | @@ -921,6 +921,7 @@ static void rtthread_timer_wrapper(void *timerobj)
#define TIMER_ID_MAX 50
static struct timer_obj *_g_timerid[TIMER_ID_MAX];
static int timerid_idx = 0;
+RT_DEFINE_SPINLOCK(_timer_id_lock);
void timer_id_init(void)
{
@@ -969,14 +970,14 @@ int timer_id_put(int id)
_g_timerid[id] = NULL;
return 0;
}
-int timer_id_lock()
+void timer_id_lock()
{
-/* todo */
+ rt_hw_spin_lock(&_timer_id_lock);
}
-int timer_id_unlock()
+void timer_id_unlock()
{
- /* todo */
+ rt_hw_spin_unlock(&_timer_id_lock);
}
/**
* @brief Create a per-process timer.
|
Fix json_fuzzer for QUIRK_ALLOW_BACKSLASH_X rename | @@ -230,7 +230,8 @@ void set_quirks(wuffs_json__decoder* dec, uint32_t hash_12_bits) {
WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_QUESTION_MARK,
WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_SINGLE_QUOTE,
WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_V,
- WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_X,
+ WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_X_AS_BYTES,
+ WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_X_AS_CODE_POINTS,
WUFFS_JSON__QUIRK_ALLOW_BACKSLASH_ZERO,
WUFFS_JSON__QUIRK_ALLOW_COMMENT_BLOCK,
WUFFS_JSON__QUIRK_ALLOW_COMMENT_LINE,
|
Removed duplicated gnu9
gnu9 is defined from L.79 to L.82. | @@ -79,15 +79,11 @@ BuildRequires: ohpc-buildroot
%if "%{compiler_family}" == "gnu9"
BuildRequires: gnu9-compilers%{PROJ_DELIM} >= 9.2.0
Requires: gnu9-compilers%{PROJ_DELIM} >= 9.2.0
-%endif
+%endif # gnu9
%if "%{compiler_family}" == "gnu8"
BuildRequires: gnu8-compilers%{PROJ_DELIM} >= 8.3.0
Requires: gnu8-compilers%{PROJ_DELIM} >= 8.3.0
%endif # gnu8
-%if "%{compiler_family}" == "gnu9"
-BuildRequires: gnu9-compilers%{PROJ_DELIM} >= 9.2.0
-Requires: gnu9-compilers%{PROJ_DELIM} >= 9.2.0
-%endif # gnu9
%if "%{compiler_family}" == "intel"
%if 0%{OHPC_BUILD}
|
Build: Improve detection of OpenSSL on macOS | @@ -179,7 +179,6 @@ before_install:
brew install libev
brew install lua
brew install openssl
- export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
brew install python@2; brew link --overwrite python@2
brew install python || brew upgrade python
brew install qt
|
chip/mec1322/lfw/ec_lfw.c: Format with clang-format
BRANCH=none
TEST=none | @@ -42,7 +42,6 @@ const struct spi_device_t spi_devices[] = {
};
const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices);
-
void timer_init()
{
uint32_t val = 0;
@@ -71,17 +70,13 @@ void timer_init()
/* Start counting in timer 0 */
MEC1322_TMR32_CTL(0) |= BIT(5);
-
}
-static int spi_flash_readloc(uint8_t *buf_usr,
- unsigned int offset,
+static int spi_flash_readloc(uint8_t *buf_usr, unsigned int offset,
unsigned int bytes)
{
- uint8_t cmd[4] = {SPI_FLASH_READ,
- (offset >> 16) & 0xFF,
- (offset >> 8) & 0xFF,
- offset & 0xFF};
+ uint8_t cmd[4] = { SPI_FLASH_READ, (offset >> 16) & 0xFF,
+ (offset >> 8) & 0xFF, offset & 0xFF };
if (offset + bytes > CONFIG_FLASH_SIZE_BYTES)
return EC_ERROR_INVAL;
@@ -91,8 +86,8 @@ static int spi_flash_readloc(uint8_t *buf_usr,
int spi_image_load(uint32_t offset)
{
- uint8_t *buf = (uint8_t *) (CONFIG_RW_MEM_OFF +
- CONFIG_PROGRAM_MEMORY_BASE);
+ uint8_t *buf =
+ (uint8_t *)(CONFIG_RW_MEM_OFF + CONFIG_PROGRAM_MEMORY_BASE);
uint32_t i;
BUILD_ASSERT(CONFIG_RO_SIZE == CONFIG_RW_SIZE);
@@ -102,7 +97,6 @@ int spi_image_load(uint32_t offset)
spi_flash_readloc(&buf[i], offset + i, SPI_CHUNK_SIZE);
return 0;
-
}
void udelay(unsigned us)
@@ -129,7 +123,6 @@ int timestamp_expired(timestamp_t deadline, const timestamp_t *now)
return now->le.lo >= deadline.le.lo;
}
-
timestamp_t get_time(void)
{
timestamp_t ts;
@@ -169,7 +162,6 @@ void fault_handler(void)
MEC1322_WDG_CTL |= 1;
while (1)
;
-
}
void jump_to_image(uintptr_t init_addr)
@@ -212,10 +204,8 @@ void uart_init(void)
void system_init(void)
{
-
uint32_t wdt_sts = MEC1322_VBAT_STS & MEC1322_VBAT_STS_WDT;
- uint32_t rst_sts = MEC1322_PCR_CHIP_PWR_RST &
- MEC1322_PWR_RST_STS_VCC1;
+ uint32_t rst_sts = MEC1322_PCR_CHIP_PWR_RST & MEC1322_PWR_RST_STS_VCC1;
if (rst_sts || wdt_sts)
MEC1322_VBAT_RAM(MEC1322_IMAGETYPE_IDX) = EC_IMAGE_RO;
@@ -228,7 +218,6 @@ enum ec_image system_get_image_copy(void)
void lfw_main()
{
-
uintptr_t init_addr;
/* install vector table */
|
Update driver_vive.c
Squelch warning message after ten occurrences | @@ -2072,10 +2072,13 @@ static int parse_and_process_raw1_lightcap(SurviveObject *obj, uint16_t time, ui
// second LH to find out...
if ((data & 0x0Au) != 0) {
+ static int unknown_count = 0;
+ if(unknown_count++ < 10) {
// Currently I've only ever seen 0x1 if the 1 bit is set; I doubt they left 3 bits on the table
// though....
SV_WARN("Not entirely sure what this data is; errors may occur (%d, 0x%02x)\n", idx, data);
dump_binary = true;
+ }
// has_errors = true;
goto exit_loop;
}
|
Export PhInitializeTreeNewColumnMenuEx | @@ -286,17 +286,18 @@ NTAPI
PhInitializeTreeNewColumnMenu(
_Inout_ PPH_TN_COLUMN_MENU_DATA Data
);
-// end_phapppub
#define PH_TN_COLUMN_MENU_NO_VISIBILITY 0x1
#define PH_TN_COLUMN_MENU_SHOW_RESET_SORT 0x2
-VOID PhInitializeTreeNewColumnMenuEx(
+PHAPPAPI
+VOID
+NTAPI
+PhInitializeTreeNewColumnMenuEx(
_Inout_ PPH_TN_COLUMN_MENU_DATA Data,
_In_ ULONG Flags
);
-// begin_phapppub
PHAPPAPI
BOOLEAN
NTAPI
|
dev-tools/hwloc: update download url | @@ -19,7 +19,7 @@ Summary: Portable Hardware Locality
License: BSD-3-Clause
Group: %{PROJ_NAME}/dev-tools
Url: http://www.open-mpi.org/projects/hwloc/
-Source0: https://download.open-mpi.org/release/hwloc/v2.0/%{pname}-%{version}.tar.bz2
+Source0: https://download.open-mpi.org/release/hwloc/v2.1/%{pname}-%{version}.tar.bz2
BuildRequires: autoconf
BuildRequires: automake
|
Remove old kvsets from cursor's iter vector. Don't assume all kvsets were picked when the cursor was created. | @@ -2173,6 +2173,7 @@ cn_tree_capped_cursor_update(struct pscan *cur, struct cn_tree *tree)
bool allocated;
int i;
u64 dgen = 0;
+ u64 node_oldest_dgen;
struct perfc_set * pc = cn_pc_capped_get(tree->cn);
node = tree->ct_root;
@@ -2185,8 +2186,6 @@ cn_tree_capped_cursor_update(struct pscan *cur, struct cn_tree *tree)
cur->bh = NULL;
cur->eof = 0;
- old_cnt = new_cnt = 0;
-
view = vtc_alloc();
if (ev(!view))
return merr(ENOMEM);
@@ -2194,7 +2193,8 @@ cn_tree_capped_cursor_update(struct pscan *cur, struct cn_tree *tree)
/* Identify new kvsets and the old ones that are still valid.
*/
rmlock_rlock(&tree->ct_lock, &lock);
- iterc = cn_ns_kvsets(&node->tn_ns);
+
+ old_cnt = new_cnt = 0;
list_for_each_entry (le, &node->tn_kvset_list, le_link) {
struct kvset * ks = le->le_kvset;
@@ -2220,25 +2220,27 @@ cn_tree_capped_cursor_update(struct pscan *cur, struct cn_tree *tree)
dgen = dgen ?: ks_dgen;
new_cnt++;
}
+
+ le = list_last_entry(&node->tn_kvset_list, struct kvset_list_entry, le_link);
+ node_oldest_dgen = kvset_get_dgen(le->le_kvset);
rmlock_runlock(lock);
- perfc_add(pc, PERFC_BA_CNCAPPED_NEW, new_cnt);
+ /* Find the oldest kvset in cur->iterv[] that's still alive in the node.
+ */
+ for (i = cur->iterc - 1; i >= 0; i--) {
+ struct kv_iterator *it = cur->iterv[i];
+ u64 ks_dgen = kvset_get_dgen(kvset_from_iter(it));
- old_cnt = iterc - new_cnt;
+ if (ks_dgen >= node_oldest_dgen)
+ break;
+ }
+
+ old_cnt = i < 0 ? 0 : i;
+
+ perfc_add(pc, PERFC_BA_CNCAPPED_NEW, new_cnt);
perfc_add(pc, PERFC_BA_CNCAPPED_OLD, old_cnt);
- /* [HSE_REVISIT] Something has gone awry with this optimization,
- * need to figure it out. Going forward, we should double-check
- * that the old_cnt kvsets in cur->iterv[] are indeed the ones
- * we think they are...
- *
- * Meanwhile, we can simply destroy this cursor and rebuild it
- * from the ground up (caller will retry a few times).
- */
- if (ev(old_cnt > cur->iterc)) {
- err = merr(EAGAIN);
- goto errout;
- }
+ iterc = old_cnt + new_cnt;
/* The cursor's kvset list contains kvsets that are either
* 1. no longer part of the cn tree (compacted away), or
|
Do not remove PYLIB_SRC_EXT during make clean/distclean
Commit removed lockfile from
mainUtils, but did not remove a reference to its source directory in the
make clean/distclean target. As a result, because LOCKFILE_DIR is no
longer defined, the make clean/distclean target removes the
PYLIB_SRC_EXT directory. | @@ -193,7 +193,6 @@ installcheck: installcheck-bash
$(MAKE) -C gpload_test $@
clean distclean:
- rm -rf $(PYLIB_SRC_EXT)/$(LOCKFILE_DIR)
rm -rf $(PYLIB_SRC_EXT)/$(PYLINT_DIR)
rm -rf $(PYLIB_SRC_EXT)/$(LOGILAB_COMMON_DIR)
rm -rf $(PYLIB_SRC_EXT)/$(LOGILAB_ASTNG_DIR)
|
Add option to use _PROCESS or buffer option input for win32 driver | @@ -129,10 +129,12 @@ uart_thread(void* param) {
esp_sys_sem_t sem;
FILE* file = NULL;
- while (com_port == NULL);
-
esp_sys_sem_create(&sem, 0); /* Create semaphore for delay functions */
+ while (com_port == NULL) {
+ esp_sys_sem_wait(&sem, 1); /* Add some delay with yield */
+ }
+
fopen_s(&file, "log_file.txt", "w+"); /* Open debug file in write mode */
while (1) {
/*
@@ -149,9 +151,9 @@ uart_thread(void* param) {
/* Send received data to input processing module */
#if ESP_CFG_INPUT_USE_PROCESS
esp_input_process(data_buffer, (size_t)bytes_read);
-#else
+#else /* ESP_CFG_INPUT_USE_PROCESS */
esp_input(data_buffer, (size_t)bytes_read);
-#endif
+#endif /* !ESP_CFG_INPUT_USE_PROCESS */
/* Write received data to output debug file */
if (file != NULL) {
|
Fix boost checks when a versioned python is not found | @@ -78,8 +78,12 @@ find_package(Boost OPTIONAL_COMPONENTS
python3
${PYILMBASE_BOOST_PY3_COMPONENT})
set(_pyilmbase_have_perver_boost)
+if(PYILMBASE_BOOST_PY2_COMPONENT)
string(TOUPPER ${PYILMBASE_BOOST_PY2_COMPONENT} PYILMBASE_PY2_UPPER)
+endif()
+if(PYILMBASE_BOOST_PY3_COMPONENT)
string(TOUPPER ${PYILMBASE_BOOST_PY3_COMPONENT} PYILMBASE_PY3_UPPER)
+endif()
if(Boost_PYTHON2_FOUND OR Boost_${PYILMBASE_PY2_UPPER}_FOUND)
set(_pyilmbase_have_perver_boost TRUE)
if(NOT Boost_${PYILMBASE_PY2_UPPER}_FOUND)
|
Remove test_tool from ya.conf.json | "zipatcher": { "description": "Apply zipatch from file or Arcanum pull request" },
"ymake": { "description": "Run ymake", "visible": false },
"ymake_dev": { "description": "Run ymake dev version", "visible": false },
- "test_tool": { "description": "Test tools for tests", "visible": false },
"maven_import_sandbox_uploader": { "description": "Sandbox uploader for maven-import cmd", "visible": false },
"cmake": { "description": "Run cmake" },
"ninja": { "description": "Run ninja" },
{"host": {"os": "LINUX", "arch": "aarch64"}, "default": true}
]
},
- "test_tool": {
- "tools": {
- "test_tool": { "bottle": "test_tool", "executable": "test_tool" }
- },
- "platforms": [
- {"host": {"os": "LINUX"}, "default": true},
- {"host": {"os": "FREEBSD"}, "default": true},
- {"host": {"os": "WIN"}, "default": true},
- {"host": {"os": "DARWIN"}, "default": true},
- {"host": {"os": "LINUX", "arch": "aarch64"}, "default": true}
- ]
- },
"maven_import_sandbox_uploader": {
"tools": {
"maven_import_sandbox_uploader": { "bottle": "maven_import_sandbox_uploader", "executable": "maven_import_sandbox_uploader" }
"ymake": ["ymake"]
}
},
- "test_tool": {
- "formula": {
- "sandbox_id": [405318190],
- "match": "test_tool"
- },
- "executable": {
- "test_tool": ["test_tool"]
- }
- },
"maven_import_sandbox_uploader": {
"formula": {
"sandbox_id": 210952169,
|
build: fix unicode errors on Windows 10 | @@ -46,8 +46,8 @@ def exec_process(cmdline, silent=True, input=None, **kwargs):
stdout, stderr = sub.communicate(input=input)
returncode = sub.returncode
if PY3:
- stderr = stderr.decode(sys.stderr.encoding)
- stdout = stdout.decode(sys.stdout.encoding)
+ stderr = stderr.decode(sys.stderr.encoding, errors='replace')
+ stdout = stdout.decode(sys.stdout.encoding, errors='replace')
if not silent:
sys.stdout.write(stdout)
sys.stderr.write(stderr)
|
driver/accel_lis2dw12.h: Format with clang-format
BRANCH=none
TEST=none | @@ -193,16 +193,13 @@ enum lis2dw12_fs {
(2 << (31 - __builtin_clz(_gain / LIS2DW12_FS_2G_GAIN)))
/* Gain value from selected Full Scale. */
-#define LIS2DW12_FS_GAIN(_fs) \
- (LIS2DW12_FS_2G_GAIN << (30 - __builtin_clz(_fs)))
+#define LIS2DW12_FS_GAIN(_fs) (LIS2DW12_FS_2G_GAIN << (30 - __builtin_clz(_fs)))
/* Reg value from Full Scale. */
-#define LIS2DW12_FS_REG(_fs) \
- (30 - __builtin_clz(_fs))
+#define LIS2DW12_FS_REG(_fs) (30 - __builtin_clz(_fs))
/* Normalized FS value from Full Scale. */
-#define LIS2DW12_NORMALIZE_FS(_fs) \
- (1 << (30 - __builtin_clz(_fs)))
+#define LIS2DW12_NORMALIZE_FS(_fs) (1 << (30 - __builtin_clz(_fs)))
/*
* Sensor resolution in number of bits.
|
Run make check inside mock build | @@ -104,6 +104,9 @@ make
%{__install} -D -p -m 0644 conf/twampd.limits %{buildroot}%{_sysconfdir}/twamp-server/twamp-server.limits
%{__install} -D -p -m 0644 conf/twampd.limits %{buildroot}%{_sysconfdir}/twamp-server/twamp-server.limits.default
+%check
+make check
+
%clean
rm -rf $RPM_BUILD_ROOT
|
Tweak to the tile fetching order | @@ -287,7 +287,7 @@ namespace carto {
}
}
for (std::pair<MapTile, int> childTileCount : childTileCountMap) {
- if (childTileCount.second >= 2) {
+ if (childTileCount.second > 1) {
long long tileId = getTileId(childTileCount.first);
if (!prefetchTile(tileId, false)) {
fetchTileList.push_back({ childTileCount.first, false, PARENT_PRIORITY_OFFSET });
@@ -295,12 +295,16 @@ namespace carto {
}
}
- // Sort the fetch tile list
- std::stable_sort(fetchTileList.begin(), fetchTileList.end(), [](const FetchTileInfo& fetchTile1, const FetchTileInfo& fetchTile2) {
+ // Sort the fetch tile list.
+ // The sorting order is based on priority delta, preloading flag and finally on whether the tile has parents in the fetch list.
+ std::stable_sort(fetchTileList.begin(), fetchTileList.end(), [&childTileCountMap](const FetchTileInfo& fetchTile1, const FetchTileInfo& fetchTile2) {
if (fetchTile1.priorityDelta != fetchTile2.priorityDelta) {
return fetchTile1.priorityDelta > fetchTile2.priorityDelta;
}
+ if (fetchTile1.preloading != fetchTile2.preloading) {
return fetchTile1.preloading < fetchTile2.preloading;
+ }
+ return (childTileCountMap[fetchTile1.tile.getParent()] > 1) < (childTileCountMap[fetchTile2.tile.getParent()] > 1);
});
// Fetch the tiles
|
chip/it83xx/peci.c: Format with clang-format
BRANCH=none
TEST=none | @@ -23,10 +23,8 @@ enum peci_status {
PECI_STATUS_BUSERR = 0x40,
PECI_STATUS_RCV_ERRCODE = 0x80,
PECI_STATUS_ERR_NEED_RST = (PECI_STATUS_BUSERR | PECI_STATUS_EXTERR),
- PECI_STATUS_ANY_ERR = (PECI_STATUS_RCV_ERRCODE |
- PECI_STATUS_BUSERR |
- PECI_STATUS_EXTERR |
- PECI_STATUS_WR_FCS_ERR |
+ PECI_STATUS_ANY_ERR = (PECI_STATUS_RCV_ERRCODE | PECI_STATUS_BUSERR |
+ PECI_STATUS_EXTERR | PECI_STATUS_WR_FCS_ERR |
PECI_STATUS_RD_FCS_ERR),
PECI_STATUS_ANY_BIT = 0xFE,
PECI_STATUS_TIMEOUT = 0xFF,
@@ -109,7 +107,6 @@ int peci_transaction(struct peci_data *peci)
(peci->cmd_code == PECI_CMD_WR_IAMSR) ||
(peci->cmd_code == PECI_CMD_WR_PCI_CFG) ||
(peci->cmd_code == PECI_CMD_WR_PCI_CFG_LOCAL)) {
-
/* write length include Cmd Code + AW FCS */
IT83XX_PECI_HOWRLR = peci->w_len + 2;
@@ -157,17 +154,14 @@ int peci_transaction(struct peci_data *peci)
peci_current_task = TASK_ID_INVALID;
if (index < peci->timeout_us) {
-
status = IT83XX_PECI_HOSTAR;
/* any error */
if (IT83XX_PECI_HOSTAR & PECI_STATUS_ANY_ERR) {
-
if (IT83XX_PECI_HOSTAR & PECI_STATUS_ERR_NEED_RST)
peci_reset();
} else if (IT83XX_PECI_HOSTAR & PECI_STATUS_FINISH) {
-
/* The read data field of the PECI protocol. */
for (index = 0x00; index < peci->r_len; index++)
peci->r_buf[index] = IT83XX_PECI_HORDDR;
|
Tests: don't exceed 79 characters. | @@ -121,8 +121,9 @@ class TestUnitControl(TestUnit):
data = data.encode()
with self._control_sock() as sock:
- req = ('PUT ' + path + (' HTTP/1.1\nHost: localhost\n'
- 'Content-Length: ') + str(len(data)) + '\r\n\r\n').encode() + data
+ req = ('PUT ' + path + ' HTTP/1.1\nHost: localhost\n'
+ + 'Content-Length: ' + str(len(data))
+ + '\r\n\r\n').encode() + data
sock.sendall(req)
|
[fix] Couldn't compile *.s src files | @@ -55,6 +55,20 @@ $(if $(strip $(LOCALS)),$(eval $(LOCALS): $(S_SRC)
@$(CROSS_COMPILE)gcc $$(AFLAGS) -c $$< -o $$@))
endef
+define add_s_file
+$(eval S_SRC := $(1:$(BSP_ROOT)/%=%)) \
+$(eval S_SRC := $(S_SRC:$(RTT_ROOT)/%=%)) \
+$(eval SOBJ := $(1:%.s=%.o)) \
+$(eval SOBJ := $(SOBJ:$(BSP_ROOT)/%=$(BSP_BUILD_DIR)/%)) \
+$(eval SOBJ := $(SOBJ:$(RTT_ROOT)/%=$(RTT_BUILD_DIR)/%)) \
+$(eval LOCALS := $(addprefix $(BUILD_DIR)/,$(SOBJ))) \
+$(eval OBJS += $(LOCALS)) \
+$(if $(strip $(LOCALS)),$(eval $(LOCALS): $(S_SRC)
+ @if [ ! -d $$(@D) ]; then mkdir -p $$(@D); fi
+ @echo cc $$<
+ @$(CROSS_COMPILE)gcc $$(AFLAGS) -c $$< -o $$@))
+endef
+
add_flg = $(eval CFLAGS += $1) \
$(eval AFLAGS += $1) \
$(eval CXXFLAGS += $1)
@@ -89,6 +103,9 @@ $(if $(SRCS),$(foreach f,$(SRCS),$(call add_cxx_file,$(f))))
SRCS := $(strip $(filter %.S,$(SRC_FILES)))
$(if $(SRCS),$(foreach f,$(SRCS),$(call add_S_file,$(f))))
+SRCS := $(strip $(filter %.s,$(SRC_FILES)))
+$(if $(SRCS),$(foreach f,$(SRCS),$(call add_s_file,$(f))))
+
CFLAGS += $(CPPPATHS)
CXXFLAGS += $(CPPPATHS)
AFLAGS += $(CPPPATHS)
|
Configurations/windows-makefile.tmpl: HTMLDOCS are files, not directories
Remove them using "del", not "rmdir"
Fixes | ##
## {- join("\n## ", @autowarntext) -}
{-
+ use File::Basename;
+
our $sover_dirname = platform->shlib_version_as_filename();
my $build_scheme = $target{build_scheme};
@@ -111,10 +113,22 @@ MISC_SCRIPTS={-
&& $unified_info{attributes}->{scripts}->{$_}->{misc} }
@{$unified_info{scripts}})
-}
-HTMLDOCS1={- join(" ", @{$unified_info{htmldocs}->{man1}}) -}
-HTMLDOCS3={- join(" ", @{$unified_info{htmldocs}->{man3}}) -}
-HTMLDOCS5={- join(" ", @{$unified_info{htmldocs}->{man5}}) -}
-HTMLDOCS7={- join(" ", @{$unified_info{htmldocs}->{man7}}) -}
+HTMLDOCS1={- our @HTMLDOCS1 = @{$unified_info{htmldocs}->{man1}};
+ join(" ", @HTMLDOCS1) -}
+HTMLDOCS3={- our @HTMLDOCS3 = @{$unified_info{htmldocs}->{man3}};
+ join(" ", @HTMLDOCS3) -}
+HTMLDOCS5={- our @HTMLDOCS5 = @{$unified_info{htmldocs}->{man5}};
+ join(" ", @HTMLDOCS5) -}
+HTMLDOCS7={- our @HTMLDOCS7 = @{$unified_info{htmldocs}->{man7}};
+ join(" ", @HTMLDOCS7) -}
+HTMLDOCS1_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS1;
+ join(' ', sort keys %dirs) -}
+HTMLDOCS3_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS3;
+ join(' ', sort keys %dirs) -}
+HTMLDOCS5_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS5;
+ join(' ', sort keys %dirs) -}
+HTMLDOCS7_BLDDIRS={- my %dirs = map { dirname($_) => 1 } @HTMLDOCS7;
+ join(' ', sort keys %dirs) -}
APPS_OPENSSL={- use File::Spec::Functions;
"\"".catfile("apps","openssl")."\"" -}
@@ -401,10 +415,10 @@ libclean:
-del /Q /F $(LIBS) libcrypto.* libssl.* ossl_static.pdb
clean: libclean
- -rmdir /Q /S $(HTMLDOCS1)
- -rmdir /Q /S $(HTMLDOCS3)
- -rmdir /Q /S $(HTMLDOCS5)
- -rmdir /Q /S $(HTMLDOCS7)
+ -rmdir /Q /S $(HTMLDOCS1_BLDDIRS)
+ -rmdir /Q /S $(HTMLDOCS3_BLDDIRS)
+ -rmdir /Q /S $(HTMLDOCS5_BLDDIRS)
+ -rmdir /Q /S $(HTMLDOCS7_BLDDIRS)
{- join("\n\t", map { "-del /Q /F $_" } @PROGRAMS) -}
-del /Q /F $(MODULES)
-del /Q /F $(SCRIPTS)
|
Fix typo in mbedtls_pk_can_do_ext() code documentation | @@ -288,7 +288,7 @@ int mbedtls_pk_can_do_ext( const mbedtls_pk_context *ctx, psa_algorithm_t alg )
psa_reset_key_attributes( &attributes );
/*
- * Common case: the key alg & alg2 only allows alg.
+ * Common case: the key alg or alg2 only allows alg.
* This will match PSA_ALG_RSA_PKCS1V15_CRYPT & PSA_ALG_IS_ECDH
* directly.
* This would also match ECDSA/RSA_PKCS1V15_SIGN/RSA_PSS with
|
memory.c made posix compliant | @@ -43,18 +43,18 @@ int xdag_free_all(void)
#include <pthread.h>
#include <sys/mman.h>
#include <errno.h>
+#include <limits.h>
#define MEM_PORTION ((size_t)1 << 25)
#define TMPFILE_TEMPLATE "xdag-tmp-XXXXXX"
#define TMPFILE_TEMPLATE_LEN 15
-#define TMPFILE_PATH_LEN 1024
static int g_fd = -1;
static size_t g_pos = 0, g_fsize = 0, g_size = 0;
static void *g_mem;
static pthread_mutex_t g_mem_mutex = PTHREAD_MUTEX_INITIALIZER;
-static char g_tmpfile_path[TMPFILE_PATH_LEN] = "";
-static char g_tmpfile[TMPFILE_PATH_LEN + TMPFILE_TEMPLATE_LEN];
+static char g_tmpfile_path[PATH_MAX] = "";
+static char g_tmpfile[PATH_MAX];
void xdag_mem_tempfile_path(const char *tempfile_path)
{
@@ -75,9 +75,9 @@ int xdag_mem_init(size_t size)
size |= MEM_PORTION - 1;
size++;
- size_t wrote = snprintf(g_tmpfile, TMPFILE_PATH_LEN + TMPFILE_TEMPLATE_LEN,"%s%s", g_tmpfile_path, TMPFILE_TEMPLATE);
- if (wrote >= TMPFILE_PATH_LEN + TMPFILE_TEMPLATE_LEN){
- xdag_fatal("Error: Temporary file path exceed the max length that is 1024 characters");
+ size_t wrote = snprintf(g_tmpfile, PATH_MAX,"%s%s", g_tmpfile_path, TMPFILE_TEMPLATE);
+ if (wrote >= PATH_MAX){
+ xdag_fatal("Error: Temporary file path exceed the max length that is %d characters", PATH_MAX);
return -1;
}
g_fd = mkstemp(g_tmpfile);
|
[docs] update env document
append some information about menuconfig -s | Binary files a/documentation/env/figures/menuconfig_s_auto_update.png and b/documentation/env/figures/menuconfig_s_auto_update.png differ
|
Add docs and function specs to Console.ex | defmodule Console do
@compile {:no_warn_undefined, [:console]}
@compile {:no_warn_undefined, [AVMPort]}
+ @moduledoc """
+ Functions for writing to the console.
+ """
+ @doc """
+ Print a string to the console.
+ This is the preferred method for writing a string to the console
+ when a micro controller (i.e. ESP32). This function uses less
+ system resources, and should be faster in most cases.
+
+ This operation will only write string data.
+ The output is not suffixed with a newline character or sequence.
+ To print an elixir/erlang term, use :erlang.display/1
+
+ returns :ok if the data was written, or {:error, reason}, if there was
+ an error.
+ """
+ @spec print(charlist() | binary()) :: :ok | {:error, term()}
def print(string),
do: :console.print(string)
+ @doc """
+ Print a string to the console.
+
+ This operation will only write string data.
+ The output is not suffixed with a newline character or sequence.
+ To print an elixir/erlang term, use :erlang.display/1
+
+ The first parameter is optional, and if supplied it will be used as
+ the registered name for the console process, otherwise :stdio is used.
+
+ returns :ok if the data was written, or {:error, reason}, if there was
+ an error.
+ """
+ @spec puts(pid(), charlist() | binary()) :: :ok | {:error, term()}
def puts(device \\ :stdio, item) do
pid =
case :erlang.whereis(device) do
@@ -49,6 +80,18 @@ defmodule Console do
defp write(console, string),
do: AVMPort.call(console, {:puts, string})
+ @doc """
+ Flush any previously written data.
+
+ Flush any data previously written using the `puts/1` function.
+
+ Supplying the pid is only necessary if `puts/2` was used with an
+ optional name other than :stdio.
+
+ returns :ok if the data was written, or {:error, reason}, if there was
+ an error.
+ """
+ @spec flush(pid()) :: :ok | {:error, term()}
def flush(console \\ :erlang.whereis(:stdio)),
do: AVMPort.call(console, :flush)
end
|
Make clean before debsource | @@ -681,7 +681,7 @@ update_dch_version: VERSION debian/changelog
@perl -0777 -pi -e 's/(\().*?(\))/`echo -n "("; echo -n $(VERSION)-$(DEBIAN_RELEASE); echo -n ")"`/e' debian/changelog
.PHONY: preparedeb
-preparedeb:
+preparedeb: clean
@quilt pop -a || true
( cd ..; tar czf ${PKG_NAME}_${VERSION}.orig.tar.gz --exclude-vcs --exclude=debian --exclude=.pc ${PKG_NAME})
|
u3: handle partial writes in snapshot system | @@ -353,10 +353,17 @@ _ce_image_open(u3e_image* img_u)
static void
_ce_patch_write_control(u3_ce_patch* pat_u)
{
+ ssize_t ret_i;
c3_w len_w = sizeof(u3e_control) +
(pat_u->con_u->pgs_w * sizeof(u3e_line));
- if ( len_w != write(pat_u->ctl_i, pat_u->con_u, len_w) ) {
+ if ( len_w != (ret_i = write(pat_u->ctl_i, pat_u->con_u, len_w)) ) {
+ if ( 0 < ret_i ) {
+ fprintf(stderr, "loom: patch ctl partial write: %zu\r\n", (size_t)ret_i);
+ }
+ else {
+ fprintf(stderr, "loom: patch ctl write: %s\r\n", strerror(errno));
+ }
c3_assert(0);
}
}
@@ -548,8 +555,20 @@ _ce_patch_write_page(u3_ce_patch* pat_u,
c3_w pgc_w,
c3_w* mem_w)
{
+ ssize_t ret_i;
+
c3_assert(-1 != lseek(pat_u->mem_i, pgc_w * pag_siz_i, SEEK_SET));
- c3_assert(pag_siz_i == write(pat_u->mem_i, mem_w, pag_siz_i));
+
+ if ( pag_siz_i != (ret_i = write(pat_u->mem_i, mem_w, pag_siz_i)) ) {
+ if ( 0 < ret_i ) {
+ fprintf(stderr, "loom: patch page partial write: %zu\r\n",
+ (size_t)ret_i);
+ }
+ else {
+ fprintf(stderr, "loom: patch page write: %s\r\n", strerror(errno));
+ }
+ c3_assert(0);
+ }
}
/* _ce_patch_count_page(): count a page, producing new counter.
@@ -773,8 +792,14 @@ _ce_patch_apply(u3_ce_patch* pat_u)
fprintf(stderr, "loom: patch apply seek: %s\r\n", strerror(errno));
c3_assert(0);
}
- if ( -1 == write(fid_i, mem_w, pag_siz_i) ) {
+ if ( pag_siz_i != (ret_i = write(fid_i, mem_w, pag_siz_i)) ) {
+ if ( 0 < ret_i ) {
+ fprintf(stderr, "loom: patch apply partial write: %zu\r\n",
+ (size_t)ret_i);
+ }
+ else {
fprintf(stderr, "loom: patch apply write: %s\r\n", strerror(errno));
+ }
c3_assert(0);
}
}
@@ -911,8 +936,14 @@ _ce_image_copy(u3e_image* fom_u, u3e_image* tou_u)
fprintf(stderr, "loom: image copy seek: %s\r\n", strerror(errno));
return c3n;
}
- if ( -1 == write(tou_u->fid_i, mem_w, pag_siz_i) ) {
+ if ( pag_siz_i != (ret_i = write(tou_u->fid_i, mem_w, pag_siz_i)) ) {
+ if ( 0 < ret_i ) {
+ fprintf(stderr, "loom: image copy partial write: %zu\r\n",
+ (size_t)ret_i);
+ }
+ else {
fprintf(stderr, "loom: image copy write: %s\r\n", strerror(errno));
+ }
return c3n;
}
}
|
Fix problem with offset in wpa_receive_from not being updated correctly
In cases where a large amount of data is to be transferred over a non-UDP socket, the offset would not be updated correctly.
This patch makes sure that the offset is always updated according to the amount read. | @@ -564,27 +564,28 @@ int wpa_ctrl_recvfrom(int sock, char *buf, size_t len
ssize_t amount = 0;
size_t recv_len;
char *pos;
- int res;
+
#ifdef CONFIG_CTRL_IFACE_UDP
UNUSED(flags);
#endif
- while ((amount >= 0) && ((amount + offset) < CTRL_HEADER_SIZE)) {
+ while ((offset += amount) < CTRL_HEADER_SIZE) {
#ifdef CONFIG_CTRL_IFACE_UDP
amount = recvfrom(sock, buf + offset, CTRL_HEADER_SIZE - offset, 0, from, fromlen);
#else
amount = read(sock, buf + offset, CTRL_HEADER_SIZE - offset);
#endif
- }
if (amount < 0) {
return amount;
- } else {
+ }
+ }
+
msg_size = wpa_ctrl_get_header(buf);
offset = 0;
amount = 0;
buf[CTRL_HEADER_SIZE] = '\0';
wpa_printf(MSG_EXCESSIVE, "received message size: %d ('%s')", msg_size, buf);
- }
- while ((amount >= 0) && ((amount + offset) < msg_size)) {
+
+ while ((offset += amount) < msg_size) {
if (msg_size > len) { // This is BAD!!! read out the message to keep alignment.
pos = buf;
} else {
@@ -594,18 +595,16 @@ int wpa_ctrl_recvfrom(int sock, char *buf, size_t len
#ifdef CONFIG_CTRL_IFACE_UDP
amount = recvfrom(sock, pos, recv_len, 0, from, fromlen);
#else
- amount += read(sock, pos, recv_len);
+ amount = read(sock, pos, recv_len);
#endif
+ if (amount < 0) {
+ return amount;
+ }
}
if (msg_size > len) {
return -1; // Buffer too small for the message, return error
}
- if (amount >= 0) {
- res = amount + offset;
- } else {
- res = amount;
- }
- return res;
+ return msg_size;
}
static int _wpa_ctrl_sendto(int sock, const char *buf, size_t len
|
Fix regression: Ensure that all samples are tested via ctest
Pass BUILD_ENCLAVES option to test-samples.cmake | @@ -86,7 +86,8 @@ if (WIN32)
COMMAND
${CMAKE_COMMAND} -DHAS_QUOTE_PROVIDER=${HAS_QUOTE_PROVIDER}
-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
- -DBUILD_DIR=${PROJECT_BINARY_DIR} -DPREFIX_DIR=${CMAKE_INSTALL_PREFIX}
+ -DBUILD_ENCLAVES=${BUILD_ENCLAVES} -DBUILD_DIR=${PROJECT_BINARY_DIR}
+ -DPREFIX_DIR=${CMAKE_INSTALL_PREFIX}
-DNUGET_PACKAGE_PATH=${NUGET_PACKAGE_PATH}
-DCOMPILER_SUPPORTS_SNMALLOC=on -DUSE_DEBUG_MALLOC=${USE_DEBUG_MALLOC} -P
${CMAKE_CURRENT_SOURCE_DIR}/test-samples.cmake)
@@ -96,7 +97,8 @@ else ()
COMMAND
${CMAKE_COMMAND} -DHAS_QUOTE_PROVIDER=${HAS_QUOTE_PROVIDER}
-DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
- -DBUILD_DIR=${PROJECT_BINARY_DIR} -DPREFIX_DIR=${CMAKE_INSTALL_PREFIX}
+ -DBUILD_ENCLAVES=${BUILD_ENCLAVES} -DBUILD_DIR=${PROJECT_BINARY_DIR}
+ -DPREFIX_DIR=${CMAKE_INSTALL_PREFIX}
-DCOMPILER_SUPPORTS_SNMALLOC=${COMPILER_SUPPORTS_SNMALLOC}
-DUSE_DEBUG_MALLOC=${USE_DEBUG_MALLOC} -P
${CMAKE_CURRENT_SOURCE_DIR}/test-samples.cmake)
|
tls: mbedtls: retry read/write
Refer to document we should retry read/write
if one of below errors occurred.
MBEDTLS_ERR_SSL_WANT_READ
MBEDTLS_ERR_SSL_WANT_WRITE
MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS
MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS | @@ -328,9 +328,14 @@ static int tls_net_read(struct flb_upstream_conn *u_conn,
struct tls_session *session = (struct tls_session *) u_conn->tls_session;
ret = mbedtls_ssl_read(&session->ssl, buf, len);
- if (ret == MBEDTLS_ERR_SSL_WANT_READ) {
+ if (ret == MBEDTLS_ERR_SSL_WANT_READ ||
+ ret == MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS ||
+ ret == MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS) {
return FLB_TLS_WANT_READ;
}
+ else if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
+ return FLB_TLS_WANT_WRITE;
+ }
else if (ret < 0) {
mbedtls_strerror(ret, err_buf, sizeof(err_buf));
flb_error("[tls] SSL error: %s", err_buf);
@@ -355,7 +360,9 @@ static int tls_net_write(struct flb_upstream_conn *u_conn,
ret = mbedtls_ssl_write(&session->ssl,
(unsigned char *) data + total,
len - total);
- if (ret == MBEDTLS_ERR_SSL_WANT_WRITE) {
+ if (ret == MBEDTLS_ERR_SSL_WANT_WRITE ||
+ ret == MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS ||
+ ret == MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS) {
return FLB_TLS_WANT_WRITE;
}
else if (ret == MBEDTLS_ERR_SSL_WANT_READ) {
|
Configure MSVS to build sources in different directories.
To avoid name conflicts with image.cpp which is in two places. | <WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
+ <ObjectFileName>$(IntDir)\_\_\%(RelativeDir)</ObjectFileName>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
+ <ObjectFileName>$(IntDir)\_\_\%(RelativeDir)</ObjectFileName>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ObjectFileName>$(IntDir)\_\_\%(RelativeDir)</ObjectFileName>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <ObjectFileName>$(IntDir)\_\_\%(RelativeDir)</ObjectFileName>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
|
chat-cli: address review comments | security
;~ plug
path
- (punt ;~(pfix ace resource))
+ (punt ;~(pfix ace group))
(punt ;~(pfix ace glyph))
(punt ;~(pfix ace (fuss 'y' 'n')))
==
:: ;~(pfix ace ;~(plug i.opt $(opt t.opt)))
:: --
::
- ++ resource ;~((glue net) ship sym)
+ ++ group ;~((glue net) ship sym)
++ tag |*(a=@tas (cold a (jest a))) ::TODO into stdlib
++ ship ;~(pfix sig fed:ag)
++ path ;~(pfix net ;~(plug urs:ab (easy ~))) ::NOTE short only, tmp
:: +mang: un/managed indicator prefix
::
- ++ mang
- ;~ pose
- (cold %| (jest '~/'))
- (cold %& (easy ~))
- ==
+ :: deprecated, as sig prefix is no longer used
+ ::
+ ++ mang (cold %& (easy ~))
:: +tarl: local target, as /path
::
++ tarl (stag our-self path)
=/ =target [with-group our-self path]
=/ real-path=^path (target-to-path target)
=/ group-path=^path ?~(ugroup ship+real-path (en-path:resource u.ugroup))
- ?< &(?=(%channel security) with-group)
=/ =policy
?- security
%channel *open:policy
|
driver_vive: revert check introduced vive wands are working again | @@ -1450,7 +1450,7 @@ static bool read_event(SurviveObject *w, uint16_t time, uint8_t **readPtr, uint8
SurviveContext *ctx = w->ctx;
// If we're looking at light data, return
- if ((*payloadPtr & 0xE0) == 0)
+ if (!HAS_FLAG(*payloadPtr, 0xE0))
return true;
/*
|
Update system_ARMCR5.c | @@ -154,7 +154,7 @@ void simulation_exit()
void $Sub$$main(void)
{
- //enable_caches(); // Initalize caches right away. Implmentation varies by core
+ //enable_caches(); // Initalize caches right away. Implementation varies by core
//$Super$$main(); // calls original main()
|
docs: Fix some specifications and formatting
issue | @@ -16,7 +16,7 @@ Assuming `<L610 Root>` to be the root directory of L610 OpenCPU SDK:
3. Copy `BoAT-X-Framework/vendor/platform/Fibocom-L610/L610RootDirCode/my_contract.cpp.abi.c` into `<L610 Root>`.
-3. Copy `BoAT-X-Framework/vendor/platform/Fibocom-L610/L610RootDirCode/my_contract.cpp.abi.h` into `<L610 Root>`.
+4. Copy `BoAT-X-Framework/vendor/platform/Fibocom-L610/L610RootDirCode/my_contract.cpp.abi.h` into `<L610 Root>`.
After copying these files, the directory structure should look like:
@@ -40,7 +40,7 @@ After copying these files, the directory structure should look like:
## File Modification
-### 1. Add BoAT-X Framework static libraries .a files onto L610 platform
+### 1. Add BoAT-X-Framework static libraries .a files onto L610 platform
Open `<L610 Root>/cmake/toolchain-gcc.cmake`.
Add the following two lines as below:
@@ -49,7 +49,7 @@ Add the following two lines as below:
set(libboatvendor_file_name ${CMAKE_CURRENT_SOURCE_DIR}/BoAT-X-Framework/lib/libboatvendor.a)
-### 2. Add the BoAT-X Framework header files
+### 2. Add the BoAT-X-Framework header files
Open `<L610 Root>/CMakeLists.txt`.
Find include_directories(xxx), add the following content in the last new line:
@@ -64,16 +64,16 @@ In curly braces below `if(CONFIG_APPIMG_LOAD_FLASH)`, find `target_link_librarie
target_link_libraries(${target} PRIVATE ${libboatwallet_file_name} ${libboatvendor_file_name} ${libc_file_name} ${libm_file_name}
-### 4. Add demo and smart contract files of BoAT-X-Framework
+### 4. Add BoAT-X-Framework demo & sample smart contracts into compile directory
Open `<L610 Root>/CMakeList.txt`.
In curly braces below `if(CONFIG_APPIMG_LOAD_FLASH)`,find `add_appimg(${target} xxx)` and add `demo.c my_contract.cpp.abi.c` at the end, such as:
add_appimg(${target} ${flash_ldscript} demo.c my_contract.cpp.abi.c)
-## Compile BoAT-X Framework Static library
+## Compile BoAT-X-Framework Static library
-### 1. Compile BoAT-X Framework static library (under Linux)
+### 1. Compile BoAT-X-Framework static library (under Linux)
#### a. Configure the target platform in directory `<L610 Root>/BoAT-X-Framework/Makefile`
|
Fix stack buffer overflow in webserver
Add the code to check that the resulting string is null-terminated.
Add the code for url length to respect the buffer sizes. | @@ -81,13 +81,21 @@ int http_separate_header(const char *src, int *method, char *url, int *httpver)
*method = HTTP_METHOD_POST;
} else if (strncmp(src, "DELETE", 6) == 0) {
*method = HTTP_METHOD_DELETE;
+ } else {
+ HTTP_LOGE("Error: Invalid request method!!\n");
+ return HTTP_ERROR;
}
/* Get url */
url_start = divide[0] + 1;
url_length = divide[1] - url_start;
+ if (url_length <= 0 || url_length > HTTP_CONF_MAX_REQUEST_HEADER_URL_LENGTH) {
+ HTTP_LOGE("Error: Invalid url length!!\n");
+ return HTTP_ERROR;
+ }
strncpy(url, src + url_start, url_length);
+ url[url_length] = '\0';
/* Get http version */
httpver_start = divide[1] + 1;
@@ -161,6 +169,11 @@ int http_separate_keyvalue(const char *src, char *key, char *value)
int value_position = 0;
int src_len = strlen(src);
+ if (src_len > HTTP_CONF_MAX_KEY_LENGTH) {
+ HTTP_LOGE("Error: src_len is over the key buffer size.\n");
+ return HTTP_ERROR;
+ }
+
for (i = 0; i < src_len; i++) {
if (src[i] != ':') {
key[i] = src[i];
@@ -172,6 +185,10 @@ int http_separate_keyvalue(const char *src, char *key, char *value)
}
for (i = value_position; i < src_len; i++) {
+ if ((i - value_position) >= HTTP_CONF_MAX_VALUE_LENGTH) {
+ HTTP_LOGE("Error: The length is over the value buffer size.\n");
+ return HTTP_ERROR;
+ }
value[i - value_position] = src[i];
}
value[i - value_position] = '\0';
|
Solve minor bug in plugin manager when trying to clear a plugin which is null. | @@ -245,6 +245,11 @@ int plugin_manager_unregister(plugin_manager manager, plugin p)
int plugin_manager_clear(plugin_manager manager, plugin p)
{
+ if (p == NULL)
+ {
+ return 1;
+ }
+
/* Remove the plugin from the plugins set */
int result = plugin_manager_unregister(manager, p);
|
update changelog for 1.3.8.1 release | # -*- mode: sh; fill-column: 120; -*-
+Version 1.3.8.1 (20 August 2019)
+
+[General]
+
+ * updated SLURM version to address CVE-2019-12838
+ * fix path during slurm account creation (https://github.com/openhpc/ohpc/issues/1017)
+ * apply patches to MPICH build to support job launch with hostnames that do not end in a number
+ (https://github.com/openhpc/ohpc/issues/1016)
+
+[Component Version Changes]
+
+ * mpich-gnu8-ohpc (3.3 -> 3.3.1)
+ * mpich-intel-ohpc (3.3 -> 3.3.1)
+ * slurm-contribs-ohpc (18.08.7 -> 18.08.8)
+ * slurm-devel-ohpc (18.08.7 -> 18.08.8)
+ * slurm-example-configs-ohpc (18.08.7 -> 18.08.8)
+ * slurm-libpmi-ohpc (18.08.7 -> 18.08.8)
+ * slurm-ohpc (18.08.7 -> 18.08.8)
+ * slurm-openlava-ohpc (18.08.7 -> 18.08.8)
+ * slurm-pam_slurm-ohpc (18.08.7 -> 18.08.8)
+ * slurm-perlapi-ohpc (18.08.7 -> 18.08.8)
+ * slurm-slurmctld-ohpc (18.08.7 -> 18.08.8)
+ * slurm-slurmd-ohpc (18.08.7 -> 18.08.8)
+ * slurm-slurmdbd-ohpc (18.08.7 -> 18.08.8)
+ * slurm-sview-ohpc (18.08.7 -> 18.08.8)
+ * slurm-torque-ohpc (18.08.7 -> 18.08.8)
+
+----------------------------------------------------------------------------------------------------------------------
+
Version 1.3.8 (11 June 2019)
[General]
|
clear console on CTRL/CMD+K | @@ -2570,7 +2570,7 @@ static const struct
{"export", NULL, "export native game", onConsoleExportCommand},
{"import", NULL, "import sprites from .gif", onConsoleImportCommand},
{"del", NULL, "delete file or dir", onConsoleDelCommand},
- {"cls", NULL, "clear screen", onConsoleClsCommand},
+ {"cls", "clear", "clear screen", onConsoleClsCommand},
{"demo", NULL, "install demo carts", onConsoleInstallDemosCommand},
{"config", NULL, "edit TIC config", onConsoleConfigCommand},
{"version", NULL, "show the current version", onConsoleVersionCommand},
@@ -2912,22 +2912,10 @@ static void checkNewVersion(Console* console)
}
}
-static void tick(Console* console)
+static void processKeyboard(Console* console)
{
tic_mem* tic = console->tic;
- // process scroll
- {
- tic80_input* input = &console->tic->ram.input;
-
- if(input->mouse.scrolly)
- {
- enum{Scroll = 3};
- s32 delta = input->mouse.scrolly > 0 ? -Scroll : Scroll;
- setScroll(console, console->scroll.pos + delta);
- }
- }
-
if(tic->ram.input.keyboard.data != 0)
{
if(keyWasPressed(tic_key_up)) onHistoryUp(console);
@@ -2961,6 +2949,13 @@ static void tick(Console* console)
console->cursor.delay = CONSOLE_CURSOR_DELAY;
}
+ if(tic->api.key(tic, tic_key_ctrl)
+ && tic->api.key(tic, tic_key_k))
+ {
+ onConsoleClsCommand(console, NULL);
+ return;
+ }
+
char sym = getKeyboardText();
if(sym)
@@ -2979,6 +2974,25 @@ static void tick(Console* console)
console->cursor.delay = CONSOLE_CURSOR_DELAY;
}
}
+}
+
+static void tick(Console* console)
+{
+ tic_mem* tic = console->tic;
+
+ // process scroll
+ {
+ tic80_input* input = &console->tic->ram.input;
+
+ if(input->mouse.scrolly)
+ {
+ enum{Scroll = 3};
+ s32 delta = input->mouse.scrolly > 0 ? -Scroll : Scroll;
+ setScroll(console, console->scroll.pos + delta);
+ }
+ }
+
+ processKeyboard(console);
if(console->tickCounter == 0)
{
|
CMP test_verification.csv: add missing test case for -untrusted with non-matching cert | @@ -35,6 +35,7 @@ expected,description, -section,val, -recipient,val, -expect_sender,val, -srvcert
0,trusted file does not exist, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,idontexist,BLANK,,BLANK, -unprotected_errors,BLANK,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,
0,untrusted missing arg, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,,BLANK, -unprotected_errors,BLANK,,,,,,,,
+1,untrusted not matching cert, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,root.crt,BLANK, -unprotected_errors,BLANK,,,,,,,,
0,untrusted empty file, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,empty.txt,BLANK, -unprotected_errors,BLANK,,,,,,,,
0,untrusted random file, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,random.bin,BLANK, -unprotected_errors,BLANK,,,,,,,,
0,untrusted file does not exist, -section,, -recipient,_CA_DN,BLANK,,BLANK,, -trusted,trusted.crt, -untrusted,idontexist,BLANK, -unprotected_errors,BLANK,,,,,,,,
|
net/lwip: clean up the validation of NS message
This patch clean up the validation of NS message and
also add one more exception handling for NS message.
There's no multicast address possible at target address
field in NS message. | @@ -404,18 +404,13 @@ void nd6_input(struct pbuf *p, struct netif *inp)
return;
}
- if (IP6H_HOPLIM(ip6_current_header()) != 255) {
- /* silently discard a NS messsage with invalid hop limit */
- pbuf_free(p);
- ND6_STATS_INC(nd6.proterr);
- ND6_STATS_INC(nd6.drop);
- return;
- }
-
ns_hdr = (struct ns_header *)p->payload;
- if (ND6H_CODE(ns_hdr) != 0) {
- /* silently discard a NS message with invalid code */
+ if ((IP6H_HOPLIM(ip6_current_header()) != 255) ||
+ (ND6H_CODE(ns_hdr) != 0) ||
+ ip6_addr_ismulticast(&ND6H_NS_TARGET_ADDR(ns_hdr))) {
+ /* RFC 4861 clause 7.1.1.
+ * Validation of Ns message */
pbuf_free(p);
ND6_STATS_INC(nd6.proterr);
ND6_STATS_INC(nd6.drop);
|
[rtdbg] Update some comments on rtdbg.h. | * In your C/C++ file, enable/disable DEBUG_ENABLE macro, and then include this
* header file.
*
- * #undef DBG_SECTION_NAME // avoid the macro is already defined
- * #undef DBG_LEVEL
- * #undef DBG_COLOR
- * #undef DBG_ENABLE
- *
* #define DBG_SECTION_NAME "[ MOD]"
* #define DBG_ENABLE // enable debug macro
* #define DBG_LEVEL DBG_INFO
|
log BUGFIX expecting parameter which was not supposed to be passed with the LY_VCODE_XP_INEXPR message
Fixes | @@ -192,7 +192,7 @@ size_t LY_VCODE_INSTREXP_len(const char *str);
#define LY_VCODE_INDEV LYVE_SYNTAX_YANG, "Deviate \"%s\" does not support keyword \"%s\"."
#define LY_VCODE_INREGEXP LYVE_SYNTAX_YANG, "Regular expression \"%s\" is not valid (\"%s\": %s)."
#define LY_VCODE_XP_EOE LYVE_XPATH, "Unterminated string delimited with %c (%.15s)."
-#define LY_VCODE_XP_INEXPR LYVE_XPATH, "Invalid character number %u of expression \'%.*s\'."
+#define LY_VCODE_XP_INEXPR LYVE_XPATH, "Invalid character number %u of expression \'%s\'."
#define LY_VCODE_DEV_NODETYPE LYVE_REFERENCE, "Invalid deviation of %s node - it is not possible to %s \"%s\" property."
#define LY_VCODE_DEV_NOT_PRESENT LYVE_REFERENCE, "Invalid deviation %s \"%s\" property \"%s\" which is not present."
|
S2S ocean params fix | @@ -3894,7 +3894,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100]
{"scaledValueOfFirstFixedSurface", GRIB_TYPE_LONG, 29315},
{NULL, },
},
- {&daily_average, &predefined_level, &has_bitmap},
+ {&daily_average, &given_level, &has_bitmap},
},
{
"average_salinity_in_the_upper_300_m_o2d.s2",
@@ -3991,7 +3991,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100]
{NULL, },
},
- {&daily_average, &predefined_level, &has_bitmap},
+ {&daily_average, &given_level, &has_bitmap},
},
{
"eastward_sea_water_velocity_o2d.s2",
@@ -4013,7 +4013,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100]
{NULL, },
},
- {&daily_average, &predefined_level, &has_bitmap},
+ {&daily_average, &given_level, &has_bitmap},
},
{
"northward_sea_water_velocity_o2d.s2",
@@ -4035,7 +4035,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100]
{NULL, },
},
- {&daily_average, &predefined_level, &has_bitmap},
+ {&daily_average, &given_level, &has_bitmap},
},
{
"sea-ice_thickness_o2d.s2",
@@ -4057,7 +4057,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100]
{NULL, },
},
- {&daily_average, &predefined_level, &has_bitmap},
+ {&daily_average, &given_level, &has_bitmap},
},
{
"sea_surface_height_o2d.s2",
@@ -4079,7 +4079,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100]
{NULL, },
},
- {&daily_average, &predefined_level, &has_bitmap},
+ {&daily_average, &given_level, &has_bitmap},
},
{
"sea_surface_practical_salinity_o2d.s2",
@@ -4101,7 +4101,7 @@ uerra, eswi-enfo:total_cloud_cover_sfc maximum value 96.4844 is not in [100,100]
{NULL, },
},
- {&daily_average, &predefined_level, &has_bitmap},
+ {&daily_average, &given_level, &has_bitmap},
},
};
|
decisions: add major constraints&assumptions | @@ -30,6 +30,15 @@ The main purpose of the decision process is to get a common understanding of the
- Decision PRs do not significantly change anything but one decision.
- Changes not changing the decision step or the direction of the decision are not decision PRs.
- The person merging the decision PR must be someone else as the person that created the decision.
+- The purpose of decisions is to have clear descriptions of technical problems and solutions.
+ There is no claim that decisions contain everything that was said.
+ In particular corrections of wrong decision text is, if at all, only visible via git history.
+ Rather it is important that decisions:
+ - contain everything relevant, and
+ - what is written is technically correct.
+- Participants are explicitly allowed to skip discussions and only read the decisions text.
+ If the problem is not yet clear, only partial reviews are encouraged.
+ @markus2330 will do so of time budget reasons and to make sure the decisions stay understandable.
## Assumptions
@@ -43,6 +52,7 @@ The main purpose of the decision process is to get a common understanding of the
- 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 writer's mind beforehand.
Instead the decision process is a supported learning process.
+- People focus on getting the best solutions and not to wish for the impossible.
## Considered Alternatives
|
artik053: add netif flags on wlan_init()
This commit is to add netif flags for lwIP stack to handle ARP,
Broadcast and IGMP multicast packets, those flags should be configured
on netif | @@ -43,6 +43,7 @@ static err_t wlan_init(struct netif *netif)
netif->name[1] = 'l';
snprintf(netif->d_ifname, IFNAMSIZ, "wl%d", netif->num);
+ netif->flags = NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET | NETIF_FLAG_BROADCAST | NETIF_FLAG_IGMP;
return ERR_OK;
}
@@ -62,5 +63,4 @@ void wlan_initup(struct netif *dev)
wlan_netif = netif_add(dev, &ipaddr, &netmask, &gw,
NULL, wlan_init, tcpip_input);
- wlan_netif->flags |= NETIF_FLAG_IGMP;
}
|
haptic: Rename iHapticEffect interface to HapticEffect | @@ -169,9 +169,7 @@ func (he *HapticCustom) cHapticEffect() *C.SDL_HapticEffect {
// HapticEffect union that contains the generic template for any haptic effect.
// (https://wiki.libsdl.org/SDL_HapticEffect)
-type HapticEffect C.SDL_HapticEffect
-
-type iHapticEffect interface {
+type HapticEffect interface {
cHapticEffect() *C.SDL_HapticEffect
}
@@ -297,7 +295,7 @@ func (h *Haptic) Query() (uint32, error) {
// EffectSupported reports whether an effect is supported by a haptic device.
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
// (https://wiki.libsdl.org/SDL_HapticEffectSupported)
-func (h *Haptic) EffectSupported(he iHapticEffect) (bool, error) {
+func (h *Haptic) EffectSupported(he HapticEffect) (bool, error) {
ret := int(C.SDL_HapticEffectSupported(
h.cptr(),
he.cHapticEffect()))
@@ -307,7 +305,7 @@ func (h *Haptic) EffectSupported(he iHapticEffect) (bool, error) {
// NewEffect creates a new haptic effect on a specified device.
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
// (https://wiki.libsdl.org/SDL_HapticNewEffect)
-func (h *Haptic) NewEffect(he iHapticEffect) (int, error) {
+func (h *Haptic) NewEffect(he HapticEffect) (int, error) {
ret := int(C.SDL_HapticNewEffect(
h.cptr(),
he.cHapticEffect()))
@@ -317,7 +315,7 @@ func (h *Haptic) NewEffect(he iHapticEffect) (int, error) {
// UpdateEffect updates the properties of an effect.
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
// (https://wiki.libsdl.org/SDL_HapticUpdateEffect)
-func (h *Haptic) UpdateEffect(effect int, data iHapticEffect) error {
+func (h *Haptic) UpdateEffect(effect int, data HapticEffect) error {
return errorFromInt(int(
C.SDL_HapticUpdateEffect(
h.cptr(),
|
sysdeps/managarm: add support for the DRM_IOCTL_MODE_CURSOR ioctl | @@ -2072,17 +2072,58 @@ int sys_ioctl(int fd, unsigned long request, void *arg, int *result) {
return 0;
}
case DRM_IOCTL_MODE_CURSOR: {
- static bool infoPrinted = false;
- if(!infoPrinted) {
- mlibc::infoLogger() << "mlibc: Cursor-specific DRM ioctl()s are not supported"
- << frg::endlog;
- infoPrinted = true;
- }
auto param = reinterpret_cast<drm_mode_cursor *>(arg);
- if(param->handle)
- mlibc::infoLogger() << "mlibc: DRM_IOCTL_MODE_CURSOR to ("
- << param->x << ", " << param->y << ")" << frg::endlog;
- return ENXIO;
+
+ HelAction actions[4];
+ globalQueue.trim();
+
+ managarm::fs::CntRequest<MemoryAllocator> req(getSysdepsAllocator());
+ req.set_req_type(managarm::fs::CntReqType::PT_IOCTL);
+ req.set_command(request);
+
+ req.set_drm_flags(param->flags);
+ req.set_drm_crtc_id(param->crtc_id);
+
+ if (param->flags == DRM_MODE_CURSOR_MOVE) {
+ req.set_drm_x(param->x);
+ req.set_drm_y(param->y);
+ } else if (param->flags == DRM_MODE_CURSOR_BO) {
+ req.set_drm_width(param->width);
+ req.set_drm_height(param->height);
+ req.set_drm_handle(param->handle);
+ } else {
+ mlibc::infoLogger() << "\e[35mmlibc: invalid flags in DRM_IOCTL_MODE_CURSOR\e[39m" << frg::endlog;
+ return EINVAL;
+ }
+
+ frigg::String<MemoryAllocator> ser(getSysdepsAllocator());
+ req.SerializeToString(&ser);
+ actions[0].type = kHelActionOffer;
+ actions[0].flags = kHelItemAncillary;
+ actions[1].type = kHelActionSendFromBuffer;
+ actions[1].flags = kHelItemChain;
+ actions[1].buffer = ser.data();
+ actions[1].length = ser.size();
+ actions[2].type = kHelActionRecvInline;
+ actions[2].flags = 0;
+ HEL_CHECK(helSubmitAsync(handle, actions, 3,
+ globalQueue.getQueue(), 0, 0));
+
+ auto element = globalQueue.dequeueSingle();
+ auto offer = parseSimple(element);
+ auto send_req = parseSimple(element);
+ auto recv_resp = parseInline(element);
+
+ HEL_CHECK(offer->error);
+ HEL_CHECK(send_req->error);
+ HEL_CHECK(recv_resp->error);
+
+ managarm::fs::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
+ resp.ParseFromArray(recv_resp->data, recv_resp->length);
+ __ensure(resp.error() == managarm::fs::Errors::SUCCESS);
+
+ *result = resp.result();
+ return 0;
}
case TCGETS: {
auto param = reinterpret_cast<struct termios *>(arg);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.