Files
can-utils/isobusfs/isobusfs_srv_fh.c
T
Oleksij Rempel 939e4d7e8c isobusfs: change license to LGPL-2.0-only
Before more contributions will come, change the license and make this
project usable as a library.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
2024-02-04 19:15:25 +01:00

31 lines
765 B
C

// SPDX-License-Identifier: LGPL-2.0-only
// SPDX-FileCopyrightText: 2023 Oleksij Rempel <linux@rempel-privat.de>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "isobusfs_srv.h"
/* Command group: file handling */
int isobusfs_srv_rx_cg_fh(struct isobusfs_srv_priv *priv,
struct isobusfs_msg *msg)
{
int func = isobusfs_buf_to_function(msg->buf);
int ret = 0;
switch (func) {
case ISOBUSFS_FH_F_MOVE_FILE_REQ:
case ISOBUSFS_FH_F_DELETE_FILE_REQ:
case ISOBUSFS_FH_F_GET_FILE_ATTR_REQ:
case ISOBUSFS_FH_F_SET_FILE_ATTR_REQ:
case ISOBUSFS_FH_F_GET_FILE_DATETIME_REQ:
default:
isobusfs_srv_send_error(priv, msg,
ISOBUSFS_ERR_FUNC_NOT_SUPPORTED);
pr_warn("%s: unsupported function: %i", __func__, func);
}
return ret;
}