OSDN Git Service

Rename write_entry() to commit_entry().
authorrelan <relan@users.noreply.github.com>
Fri, 23 Dec 2016 17:34:59 +0000 (20:34 +0300)
committerrelan <relan@users.noreply.github.com>
Mon, 16 Jan 2017 06:29:08 +0000 (09:29 +0300)
This function doesn't just write an entry, it also constructs a new node
and adds it into the tree.

libexfat/node.c

index 52123fd..5b623be 100644 (file)
@@ -926,7 +926,7 @@ static int find_slot(struct exfat* ef, struct exfat_node* dir,
        return 0;
 }
 
-static int write_entry(struct exfat* ef, struct exfat_node* dir,
+static int commit_entry(struct exfat* ef, struct exfat_node* dir,
                const le16_t* name, cluster_t cluster, off_t offset, uint16_t attrib)
 {
        struct exfat_node* node;
@@ -1026,7 +1026,7 @@ static int create(struct exfat* ef, const char* path, uint16_t attrib)
                exfat_put_node(ef, dir);
                return rc;
        }
-       rc = write_entry(ef, dir, name, cluster, offset, attrib);
+       rc = commit_entry(ef, dir, name, cluster, offset, attrib);
        if (rc != 0)
        {
                exfat_put_node(ef, dir);