diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-13 13:58:33 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-10-13 13:58:33 +0200 |
commit | 6c17dd42db026ff7aee6e04d95bb440e120bb052 (patch) | |
tree | a06092bca7250379025d7927815ac635dac1443c /fs | |
parent | ad8b97693ea3fbf15bc86964ba0a0707de3e0eda (diff) | |
parent | 7876018f73330338c029fa0ec32e59367354a123 (diff) | |
download | barebox-6c17dd42db026ff7aee6e04d95bb440e120bb052.tar.gz |
Merge branch 'for-next/selftest'
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fs.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -890,6 +890,21 @@ static int fillonedir(struct dir_context *ctx, const char *name, int namlen, return 0; } +int unreaddir(DIR *dir, const struct dirent *d) +{ + struct readdir_entry *entry; + + if (d != &dir->d) + return -EINVAL; + + entry = xzalloc(sizeof(*entry)); + entry->d = *d; + list_add_tail(&entry->list, &dir->entries); + + return 0; +} +EXPORT_SYMBOL(unreaddir); + struct dirent *readdir(DIR *dir) { struct readdir_entry *entry; |