Files
MuditaOS/board/linux/libiosyscalls/include/internal.hpp
T
Lucjan BryndzaandLucjan Bryndza 43b9c45724 [EGD-4512] Prevent vfs crash before init (#1091)
Currently calling any method from class vfs
causes aplication crash when methods are called before
vfs.Init() call. This commit prevent to crash end return failure
instead. The fix is related to any any vfs methods and methods called
through the standard syscall.
It is only the hotfix and it will be removed when new VFS subsystem
will be ready.

Co-authored-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2020-11-26 13:29:36 +01:00

18 lines
487 B
C++

// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <stddef.h>
struct _FF_FILE;
struct _IO_FILE;
namespace vfsn::linux::internal
{
int ff_file_to_fd(_FF_FILE *fil);
_FF_FILE * fd_to_ff_file(int fd);
const char* relative_to_root( char *out_path, size_t out_path_len, const char *inpath );
bool is_ff_handle(_IO_FILE* descriptor);
bool vfs_is_initialized();
}