Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3246 → Rev 3247

/trunk/uspace/srv/fs/tmpfs/tmpfs.h
44,6 → 44,12
#define dprintf(...) printf(__VA_ARGS__)
#endif
 
typedef enum {
TMPFS_NONE,
TMPFS_FILE,
TMPFS_DIRECTORY
} tmpfs_dentry_type_t;
 
typedef struct tmpfs_dentry {
fs_index_t index; /**< TMPFS node index. */
link_t dh_link; /**< Dentries hash table link. */
50,11 → 56,7
struct tmpfs_dentry *sibling;
struct tmpfs_dentry *child;
hash_table_t names; /**< All names linking to this TMPFS node. */
enum {
TMPFS_NONE,
TMPFS_FILE,
TMPFS_DIRECTORY
} type;
tmpfs_dentry_type_t type;
unsigned lnkcnt; /**< Link count. */
size_t size; /**< File size if type is TMPFS_FILE. */
void *data; /**< File content's if type is TMPFS_FILE. */
/trunk/uspace/srv/fs/tmpfs/tmpfs_dump.c
117,9 → 117,9
entry.len = uint32_t_le2host(entry.len);
switch (entry.type) {
case 0:
case TMPFS_NONE:
break;
case 1:
case TMPFS_FILE:
fname = malloc(entry.len + 1);
if (fname == NULL)
return false;
161,7 → 161,7
return false;
break;
case 2:
case TMPFS_DIRECTORY:
fname = malloc(entry.len + 1);
if (fname == NULL)
return false;
195,7 → 195,7
default:
return false;
}
} while (entry.type != 0);
} while (entry.type != TMPFS_NONE);
return true;
}