blob: d2466f5b214886f824585d36c5eb51a496c454fc [file] [log] [blame]
/*
* Copyright (c) 2019 Peter Bigot Consulting, LLC
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/fs/fs.h>
#include "fs_impl.h"
const char *fs_impl_strip_prefix(const char *path,
const struct fs_mount_t *mp)
{
static const char *const root = "/";
if ((path == NULL) || (mp == NULL)) {
return path;
}
path += mp->mountp_len;
return *path ? path : root;
}