int exfat_opendir(struct exfat* ef, struct exfat_node* dir,
struct exfat_iterator* it);
void exfat_closedir(struct exfat* ef, struct exfat_iterator* it);
-struct exfat_node* exfat_readdir(struct exfat* ef, struct exfat_iterator* it);
+struct exfat_node* exfat_readdir(struct exfat_iterator* it);
int exfat_lookup(struct exfat* ef, struct exfat_node** node,
const char* path);
int exfat_split(struct exfat* ef, struct exfat_node** parent,
it->current = NULL;
}
-struct exfat_node* exfat_readdir(struct exfat* ef, struct exfat_iterator* it)
+struct exfat_node* exfat_readdir(struct exfat_iterator* it)
{
if (it->current == NULL)
it->current = it->parent->child;
rc = exfat_opendir(ef, parent, &it);
if (rc != 0)
return rc;
- while ((*node = exfat_readdir(ef, &it)))
+ while ((*node = exfat_readdir(&it)))
{
if (compare_name(ef, buffer, (*node)->name) == 0)
{
return ret;
}
-static int parse_file_entries(struct exfat* ef, struct exfat_node* parent,
- struct exfat_node* node, const struct exfat_entry* entries, int n)
+static int parse_file_entries(struct exfat* ef, struct exfat_node* node,
+ const struct exfat_entry* entries, int n)
{
const struct exfat_entry_meta1* meta1;
const struct exfat_entry_meta2* meta2;
return -ENOMEM;
(*node)->entry_offset = *offset;
- rc = parse_file_entries(ef, parent, *node, entries, n);
+ rc = parse_file_entries(ef, *node, entries, n);
if (rc != 0)
{
free(*node);
}
static int commit_entry(struct exfat* ef, struct exfat_node* dir,
- const le16_t* name, cluster_t cluster, off_t offset, uint16_t attrib)
+ const le16_t* name, off_t offset, uint16_t attrib)
{
struct exfat_node* node;
const size_t name_length = utf16_length(name);
{
struct exfat_node* dir;
struct exfat_node* existing;
- cluster_t cluster = EXFAT_CLUSTER_BAD;
off_t offset = -1;
le16_t name[EXFAT_NAME_MAX + 1];
int rc;
exfat_put_node(ef, dir);
return rc;
}
- rc = commit_entry(ef, dir, name, cluster, offset, attrib);
+ rc = commit_entry(ef, dir, name, offset, attrib);
if (rc != 0)
{
exfat_put_node(ef, dir);
}
static int rename_entry(struct exfat* ef, struct exfat_node* dir,
- struct exfat_node* node, const le16_t* name, cluster_t new_cluster,
- off_t new_offset)
+ struct exfat_node* node, const le16_t* name, off_t new_offset)
{
const size_t name_length = utf16_length(name);
const int name_entries = DIV_ROUND_UP(name_length, EXFAT_ENAME_MAX);
struct exfat_node* node;
struct exfat_node* existing;
struct exfat_node* dir;
- cluster_t cluster = EXFAT_CLUSTER_BAD;
off_t offset = -1;
le16_t name[EXFAT_NAME_MAX + 1];
int rc;
exfat_put_node(ef, node);
return rc;
}
- rc = rename_entry(ef, dir, node, name, cluster, offset);
+ rc = rename_entry(ef, dir, node, name, offset);
if (rc != 0)
{
exfat_put_node(ef, dir);