Skip to content

Commit b33779e

Browse files
committed
Fix bugs in vfs_user.c,h changes.
1 parent 85d9fa9 commit b33779e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

source/daplink/drag-n-drop/vfs_user.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void vfs_user_file_change_handler(const vfs_filename_t filename, vfs_file_change
210210

211211
// Let the hook examine the filename. If it returned false then look for the standard
212212
// magic files.
213-
if (!vfs_user_magic_file_override(filename, &do_remount)) {
213+
if (!vfs_user_magic_file_hook(filename, &do_remount)) {
214214
// Compare the new file's name to our table of magic filenames.
215215
for (int32_t i = 0; i < ARRAY_SIZE(s_magic_file_info); ++i) {
216216
if (!memcmp(filename, s_magic_file_info[i].name, sizeof(vfs_filename_t))) {
@@ -264,7 +264,7 @@ void vfs_user_file_change_handler(const vfs_filename_t filename, vfs_file_change
264264
config_ram_set_disable_msd(true);
265265
break;
266266
default:
267-
assert(false);
267+
util_assert(false);
268268
}
269269
}
270270
else {

source/daplink/drag-n-drop/vfs_user.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#ifndef VFS_USER_H
2323
#define VFS_USER_H
2424

25+
#include <stdbool.h>
2526
#include "virtual_fs.h"
2627

2728
#ifdef __cplusplus
@@ -36,7 +37,7 @@ extern "C" {
3637
//! @param new_file_data Data being written to the file if _change_ is #VFS_FILE_CHANGED.
3738
//! @retval true The hook handled the change notification, the caller should do nothing else.
3839
//! @retval false The hook did nothing, continue with normal behaviour.
39-
__WEAK bool vfs_user_file_change_handler_hook(const vfs_filename_t filename,
40+
bool vfs_user_file_change_handler_hook(const vfs_filename_t filename,
4041
vfs_file_change_t change, vfs_file_t file, vfs_file_t new_file_data);
4142

4243
//! @brief Hook for magic files.
@@ -51,7 +52,7 @@ __WEAK bool vfs_user_file_change_handler_hook(const vfs_filename_t filename,
5152
//! @retval true The hook handled the specified file. A remount will be performed if requested,
5253
//! but otherwise no other standard behaviour is applied.
5354
//! @retval false The hook did not handle the file; continue with canonical behaviour.
54-
__WEAK bool vfs_user_magic_file_hook(const vfs_filename_t filename, bool *do_remount);
55+
bool vfs_user_magic_file_hook(const vfs_filename_t filename, bool *do_remount);
5556

5657
#ifdef __cplusplus
5758
}

0 commit comments

Comments
 (0)