1/****************************************************************************
2 * fs/driver/fs_unregisterblockdriver.c
3 *
4 * Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved.
5 * Based on NuttX originally from nuttx source (nuttx/fs/ and nuttx/drivers/)
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 *     http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 ****************************************************************************/
20
21/****************************************************************************
22 * Included Files
23 ****************************************************************************/
24
25#include "vfs_config.h"
26
27#include "fs/driver.h"
28
29#include "string.h"
30#include "errno.h"
31
32/****************************************************************************
33 * Public Functions
34 ****************************************************************************/
35
36/****************************************************************************
37 * Name: unregister_blockdriver
38 *
39 * Description:
40 *   Remove the block driver inode at 'path' from the pseudo-file system
41 *
42 ****************************************************************************/
43
44int unregister_blockdriver(const char *path)
45{
46  if (path == NULL || strlen(path) >= PATH_MAX || strncmp("/dev/", path, DEV_PATH_LEN) != 0)
47    {
48      return EINVAL;
49    }
50
51  return -ENOSYS;
52}
53