Changeset d60ce4a in mainline


Ignore:
Timestamp:
2013-07-25T12:56:08Z (11 years ago)
Author:
Ji?? Z?rev?cky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf9dc4e2
Parents:
d18c404
Message:

Remove UNLINK from the server.

Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/trace.c

    rd18c404 rd60ce4a  
    714714        o = oper_new("sync", 1, arg_def, V_ERRNO, 0, resp_def);
    715715        proto_add_oper(p, VFS_IN_SYNC, o);
    716         o = oper_new("unlink", 0, arg_def, V_ERRNO, 0, resp_def);
    717         proto_add_oper(p, VFS_IN_UNLINK, o);
    718716        o = oper_new("rename", 0, arg_def, V_ERRNO, 0, resp_def);
    719717        proto_add_oper(p, VFS_IN_RENAME, o);
  • uspace/srv/vfs/vfs.c

    rd18c404 rd60ce4a  
    109109                        vfs_fstat(callid, &call);
    110110                        break;
    111                 case VFS_IN_UNLINK:
    112                         vfs_unlink(callid, &call);
    113                         break;
    114111                case VFS_IN_UNLINK2:
    115112                        vfs_unlink2(callid, &call);
  • uspace/srv/vfs/vfs.h

    rd18c404 rd60ce4a  
    219219extern void vfs_truncate(ipc_callid_t, ipc_call_t *);
    220220extern void vfs_fstat(ipc_callid_t, ipc_call_t *);
    221 extern void vfs_unlink(ipc_callid_t, ipc_call_t *);
    222221extern void vfs_rename(ipc_callid_t, ipc_call_t *);
    223222extern void vfs_wait_handle(ipc_callid_t, ipc_call_t *);
  • uspace/srv/vfs/vfs_ops.c

    rd18c404 rd60ce4a  
    10631063}
    10641064
    1065 void vfs_unlink(ipc_callid_t rid, ipc_call_t *request)
    1066 {
    1067         int lflag = IPC_GET_ARG1(*request);
    1068        
    1069         char *path;
    1070         int rc = async_data_write_accept((void **) &path, true, 0, 0, 0, NULL);
    1071         if (rc != EOK) {
    1072                 async_answer_0(rid, rc);
    1073                 return;
    1074         }
    1075        
    1076         fibril_rwlock_write_lock(&namespace_rwlock);
    1077         lflag &= L_DIRECTORY;   /* sanitize lflag */
    1078         vfs_lookup_res_t lr;
    1079         rc = vfs_lookup_internal(path, lflag | L_UNLINK, &lr, NULL);
    1080         free(path);
    1081         if (rc != EOK) {
    1082                 fibril_rwlock_write_unlock(&namespace_rwlock);
    1083                 async_answer_0(rid, rc);
    1084                 return;
    1085         }
    1086 
    1087         /*
    1088          * The name has already been unlinked by vfs_lookup_internal().
    1089          * We have to get and put the VFS node to ensure that it is
    1090          * VFS_OUT_DESTROY'ed after the last reference to it is dropped.
    1091          */
    1092         vfs_node_t *node = vfs_node_get(&lr);
    1093         fibril_mutex_lock(&nodes_mutex);
    1094         node->lnkcnt--;
    1095         fibril_mutex_unlock(&nodes_mutex);
    1096         fibril_rwlock_write_unlock(&namespace_rwlock);
    1097         vfs_node_put(node);
    1098         async_answer_0(rid, EOK);
    1099 }
    1100 
    11011065void vfs_unlink2(ipc_callid_t rid, ipc_call_t *request)
    11021066{
Note: See TracChangeset for help on using the changeset viewer.