Rev 3593 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3593 | Rev 3665 | ||
---|---|---|---|
Line 57... | Line 57... | ||
57 | tmpfs_restore_recursion(int dev, off_t *bufpos, size_t *buflen, off_t *pos, |
57 | tmpfs_restore_recursion(int dev, off_t *bufpos, size_t *buflen, off_t *pos, |
58 | tmpfs_dentry_t *parent) |
58 | tmpfs_dentry_t *parent) |
59 | { |
59 | { |
60 | struct rdentry entry; |
60 | struct rdentry entry; |
61 | libfs_ops_t *ops = &tmpfs_libfs_ops; |
61 | libfs_ops_t *ops = &tmpfs_libfs_ops; |
- | 62 | int rc; |
|
62 | 63 | ||
63 | do { |
64 | do { |
64 | char *fname; |
65 | char *fname; |
65 | tmpfs_dentry_t *node; |
66 | tmpfs_dentry_t *node; |
66 | uint32_t size; |
67 | uint32_t size; |
Line 91... | Line 92... | ||
91 | free(fname); |
92 | free(fname); |
92 | return false; |
93 | return false; |
93 | } |
94 | } |
94 | fname[entry.len] = 0; |
95 | fname[entry.len] = 0; |
95 | 96 | ||
96 | if (!ops->link((void *) parent, (void *) node, fname)) { |
97 | rc = ops->link((void *) parent, (void *) node, fname); |
- | 98 | if (rc != EOK) { |
|
97 | ops->destroy((void *) node); |
99 | ops->destroy((void *) node); |
98 | free(fname); |
100 | free(fname); |
99 | return false; |
101 | return false; |
100 | } |
102 | } |
101 | free(fname); |
103 | free(fname); |
Line 132... | Line 134... | ||
132 | ops->destroy((void *) node); |
134 | ops->destroy((void *) node); |
133 | free(fname); |
135 | free(fname); |
134 | return false; |
136 | return false; |
135 | } |
137 | } |
136 | fname[entry.len] = 0; |
138 | fname[entry.len] = 0; |
137 | 139 | ||
138 | if (!ops->link((void *) parent, (void *) node, fname)) { |
140 | rc = ops->link((void *) parent, (void *) node, fname); |
- | 141 | if (rc != EOK) { |
|
139 | ops->destroy((void *) node); |
142 | ops->destroy((void *) node); |
140 | free(fname); |
143 | free(fname); |
141 | return false; |
144 | return false; |
142 | } |
145 | } |
143 | free(fname); |
146 | free(fname); |