OSDN Git Service

Add pointer to parent for each node.
authorrelan <relan@users.noreply.github.com>
Sat, 28 Nov 2009 17:22:40 +0000 (17:22 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:10 +0000 (08:26 +0300)
libexfat/exfat.h
libexfat/node.c

index ba19bac..5887a43 100644 (file)
@@ -34,6 +34,7 @@
 
 struct exfat_node
 {
+       struct exfat_node* parent;
        struct exfat_node* child;
        struct exfat_node* next;
        struct exfat_node* prev;
index 6ea45ee..071d463 100644 (file)
@@ -326,6 +326,7 @@ int exfat_cache_directory(struct exfat* ef, struct exfat_node* dir)
        opendir(dir, &it);
        while ((rc = readdir(ef, dir, &node, &it)) == 0)
        {
+               node->parent = dir;
                if (current != NULL)
                {
                        current->next = node;