esp_system, vfs: fix incomplete blocking reads in vfs_cdcacm
Blocking read from cdcacm VFS could return less bytes than requested. This didn’t match the behaviour of other VFS drivers, and higher level code could misbehave.
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
// Copyright 2019-2020 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -62,7 +54,7 @@ ssize_t esp_usb_console_flush(void);
|
||||
|
||||
ssize_t esp_usb_console_read_buf(char* buf, size_t buf_size);
|
||||
|
||||
bool esp_usb_console_read_available(void);
|
||||
ssize_t esp_usb_console_available_for_read(void);
|
||||
|
||||
bool esp_usb_console_write_available(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user