mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:17:45 +00:00
AK: Deprecate the old AK::Stream
This also removes a few cases where the respective header wasn't actually required to be included.
This commit is contained in:
parent
230cb3b0cb
commit
ae64b68717
38 changed files with 116 additions and 120 deletions
|
@ -5,7 +5,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <AK/DeprecatedMemoryStream.h>
|
||||
#include <Kernel/API/POSIX/errno.h>
|
||||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/FileSystem/Ext2FS/Inode.h>
|
||||
|
@ -41,7 +41,7 @@ ErrorOr<void> Ext2FSInode::write_indirect_block(BlockBasedFileSystem::BlockIndex
|
|||
VERIFY(blocks_indices.size() <= entries_per_block);
|
||||
|
||||
auto block_contents = TRY(ByteBuffer::create_uninitialized(fs().block_size()));
|
||||
OutputMemoryStream stream { block_contents };
|
||||
DeprecatedOutputMemoryStream stream { block_contents };
|
||||
auto buffer = UserOrKernelBuffer::for_kernel_buffer(stream.data());
|
||||
|
||||
VERIFY(blocks_indices.size() <= EXT2_ADDR_PER_BLOCK(&fs().super_block()));
|
||||
|
@ -64,7 +64,7 @@ ErrorOr<void> Ext2FSInode::grow_doubly_indirect_block(BlockBasedFileSystem::Bloc
|
|||
|
||||
auto block_contents = TRY(ByteBuffer::create_uninitialized(fs().block_size()));
|
||||
auto* block_as_pointers = (unsigned*)block_contents.data();
|
||||
OutputMemoryStream stream { block_contents };
|
||||
DeprecatedOutputMemoryStream stream { block_contents };
|
||||
auto buffer = UserOrKernelBuffer::for_kernel_buffer(stream.data());
|
||||
|
||||
if (old_blocks_length > 0) {
|
||||
|
@ -137,7 +137,7 @@ ErrorOr<void> Ext2FSInode::grow_triply_indirect_block(BlockBasedFileSystem::Bloc
|
|||
|
||||
auto block_contents = TRY(ByteBuffer::create_uninitialized(fs().block_size()));
|
||||
auto* block_as_pointers = (unsigned*)block_contents.data();
|
||||
OutputMemoryStream stream { block_contents };
|
||||
DeprecatedOutputMemoryStream stream { block_contents };
|
||||
auto buffer = UserOrKernelBuffer::for_kernel_buffer(stream.data());
|
||||
|
||||
if (old_blocks_length > 0) {
|
||||
|
@ -790,7 +790,7 @@ ErrorOr<void> Ext2FSInode::write_directory(Vector<Ext2FSDirectoryEntry>& entries
|
|||
dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]::write_directory(): New directory contents to write (size {}):", identifier(), directory_size);
|
||||
|
||||
auto directory_data = TRY(ByteBuffer::create_uninitialized(directory_size));
|
||||
OutputMemoryStream stream { directory_data };
|
||||
DeprecatedOutputMemoryStream stream { directory_data };
|
||||
|
||||
for (auto& entry : entries) {
|
||||
dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]::write_directory(): Writing inode: {}, name_len: {}, rec_len: {}, file_type: {}, name: {}", identifier(), entry.inode_index, u16(entry.name->length()), u16(entry.record_length), u8(entry.file_type), entry.name);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <AK/DeprecatedMemoryStream.h>
|
||||
#include <Kernel/API/POSIX/errno.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/Custody.h>
|
||||
|
@ -223,7 +223,7 @@ ErrorOr<size_t> OpenFileDescription::get_dir_entries(UserOrKernelBuffer& output_
|
|||
ErrorOr<void> error;
|
||||
u8 stack_buffer[PAGE_SIZE];
|
||||
Bytes temp_buffer(stack_buffer, sizeof(stack_buffer));
|
||||
OutputMemoryStream stream { temp_buffer };
|
||||
DeprecatedOutputMemoryStream stream { temp_buffer };
|
||||
|
||||
auto flush_stream_to_output_buffer = [&error, &stream, &remaining, &output_buffer]() -> bool {
|
||||
if (error.is_error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue