Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2689 → Rev 2690

/trunk/uspace/srv/vfs/vfs.c
102,11 → 102,14
case VFS_SEEK:
vfs_seek(callid, &call);
break;
case VFS_TRUNCATE:
case VFS_UNMOUNT:
case VFS_CREATE:
case VFS_CLOSE:
case VFS_UNLINK:
case VFS_RENAME:
case VFS_OPENDIR:
case VFS_READDIR:
case VFS_CLOSEDIR:
default:
ipc_answer_0(callid, ENOTSUP);
break;
/trunk/uspace/srv/vfs/vfs_ops.c
745,18 → 745,6
/*
* Check if the FS implements mandatory VFS operations.
*/
if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_REGISTER)] != VFS_OP_DEFINED) {
dprintf("Operation VFS_REGISTER not defined by the client.\n");
return false;
}
if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] != VFS_OP_DEFINED) {
dprintf("Operation VFS_MOUNT not defined by the client.\n");
return false;
}
if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] != VFS_OP_DEFINED) {
dprintf("Operation VFS_UNMOUNT not defined by the client.\n");
return false;
}
if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] != VFS_OP_DEFINED) {
dprintf("Operation VFS_LOOKUP not defined by the client.\n");
return false;
777,7 → 765,7
/*
* Check if each operation is either not defined, defined or default.
*/
for (i = VFS_FIRST; i < VFS_LAST; i++) {
for (i = VFS_FIRST; i < VFS_LAST_CLNT; i++) {
if ((info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_NULL) &&
(info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_DEFAULT) &&
(info->ops[IPC_METHOD_TO_VFS_OP(i)] != VFS_OP_DEFINED)) {
/trunk/uspace/srv/vfs/vfs.h
47,22 → 47,33
#define IPC_METHOD_TO_VFS_OP(m) ((m) - VFS_FIRST)
 
typedef enum {
VFS_REGISTER = VFS_FIRST,
VFS_MOUNT,
VFS_UNMOUNT,
VFS_LOOKUP,
VFS_OPEN,
VFS_CREATE,
VFS_OPEN = VFS_FIRST,
VFS_CLOSE,
VFS_READ,
VFS_WRITE,
VFS_SEEK,
VFS_TRUNCATE,
VFS_RENAME,
VFS_OPENDIR,
VFS_READDIR,
VFS_CLOSEDIR,
VFS_UNLINK,
VFS_LAST, /* keep this the last member of the enum */
} vfs_request_t;
VFS_MOUNT,
VFS_UNMOUNT,
VFS_LAST_CMN, /* keep this the last member of this enum */
} vfs_request_cmn_t;
 
typedef enum {
VFS_LOOKUP = VFS_LAST_CMN,
VFS_LAST_CLNT, /* keep this the last member of this enum */
} vfs_request_clnt_t;
 
typedef enum {
VFS_REGISTER = VFS_LAST_CMN,
VFS_SEEK,
VFS_LAST_SRV, /* keep this the last member of this enum */
} vfs_request_srv_t;
 
 
/**
* An instance of this structure is associated with a particular FS operation.
* It tells VFS if the FS supports the operation or maybe if a default one
87,7 → 98,7
char name[FS_NAME_MAXLEN + 1];
/** Operations. */
vfs_op_t ops[VFS_LAST - VFS_FIRST];
vfs_op_t ops[VFS_LAST_CLNT - VFS_FIRST];
} vfs_info_t;
 
/**