style: format code with clang-format [skip ci]

This commit is contained in:
Aphlita
2026-04-26 01:55:04 +00:00
committed by Rbb666
parent e17a3a6e85
commit cf937c7896
@@ -367,8 +367,7 @@ rt_err_t dfs_9pfs_del_tag(struct p9_protocol *p9p)
static int p9_to_fs_err(int rc)
{
const int p9_err[] =
{
const int p9_err[] = {
[0] = RT_EOK,
[-P9_ERROR] = -EIO,
[-P9_UNKNOWN_VERSION] = -ENOSYS,
@@ -428,10 +427,18 @@ static rt_uint8_t fs_to_p9_flags(rt_uint32_t raw_flags)
switch (raw_flags & 3)
{
case O_RDONLY: flags = OREAD; break;
case O_WRONLY: flags = OWRITE; break;
case O_RDWR: flags = ORDWR; break;
default: RT_ASSERT(0); break;
case O_RDONLY:
flags = OREAD;
break;
case O_WRONLY:
flags = OWRITE;
break;
case O_RDWR:
flags = ORDWR;
break;
default:
RT_ASSERT(0);
break;
}
if (raw_flags & O_TRUNC)
@@ -490,7 +497,8 @@ static int p9_walk_path_raw(struct p9_connection *conn, const char *path,
size = put_value32(conn, size, new_fid);
size = put_value16(conn, size, 0); /* Fill later */
do {
do
{
split = strchrnul(path, '/');
len = split - path;
@@ -908,8 +916,7 @@ static int dfs_9pfs_getdents(struct dfs_file *fd, struct dirent *dirp, uint32_t
return count;
}
static const struct dfs_file_ops _9pfs_fops =
{
static const struct dfs_file_ops _9pfs_fops = {
.open = dfs_9pfs_open,
.close = dfs_9pfs_close,
.read = dfs_9pfs_read,
@@ -1162,8 +1169,7 @@ static int dfs_9pfs_rename(struct dfs_filesystem *fs,
return p9_to_fs_err(rc);
}
static const struct dfs_filesystem_ops _9pfs =
{
static const struct dfs_filesystem_ops _9pfs = {
.name = "9p",
.flags = DFS_FS_FLAG_DEFAULT,
.fops = &_9pfs_fops,