Changeset 0013b9ce in mainline for uspace/srv/fs/tmpfs/tmpfs_ops.c


Ignore:
Timestamp:
2008-11-23T12:27:15Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7782030
Parents:
f714576
Message:

libfs operation link() should return standard error code instead of mere
true/false.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    rf714576 r0013b9ce  
    7676static void tmpfs_node_put(void *);
    7777static void *tmpfs_create_node(dev_handle_t, int);
    78 static bool tmpfs_link_node(void *, void *, const char *);
     78static int tmpfs_link_node(void *, void *, const char *);
    7979static int tmpfs_unlink_node(void *, void *);
    8080static int tmpfs_destroy_node(void *);
     
    309309}
    310310
    311 bool tmpfs_link_node(void *prnt, void *chld, const char *nm)
     311int tmpfs_link_node(void *prnt, void *chld, const char *nm)
    312312{
    313313        tmpfs_dentry_t *parentp = (tmpfs_dentry_t *) prnt;
     
    318318        tmpfs_name_t *namep = malloc(sizeof(tmpfs_name_t));
    319319        if (!namep)
    320                 return false;
     320                return ENOMEM;
    321321        tmpfs_name_initialize(namep);
    322322        size_t len = strlen(nm);
     
    324324        if (!namep->name) {
    325325                free(namep);
    326                 return false;
     326                return ENOMEM;
    327327        }
    328328        strcpy(namep->name, nm);
     
    344344        }
    345345
    346         return true;
     346        return EOK;
    347347}
    348348
Note: See TracChangeset for help on using the changeset viewer.