]> git.ipfire.org Git - thirdparty/util-linux.git/blame - include/idcache.h
libmount: fix comment referring to passno field
[thirdparty/util-linux.git] / include / idcache.h
CommitLineData
04a5cb58
KZ
1#ifndef UTIL_LINUX_IDCACHE_H
2#define UTIL_LINUX_IDCACHE_H
3
4#include <sys/types.h>
5#include <pwd.h>
6
7#define IDCACHE_FLAGS_NAMELEN (1 << 1)
8
9struct identry {
10 unsigned long int id;
11 char *name;
12 struct identry *next;
13};
14
15struct idcache {
16 struct identry *ent; /* first entry */
17 int width; /* name width */
18};
19
20
21extern struct idcache *new_idcache(void);
22extern void add_gid(struct idcache *cache, unsigned long int id);
23extern void add_uid(struct idcache *cache, unsigned long int id);
24
25extern void free_idcache(struct idcache *ic);
26extern struct identry *get_id(struct idcache *ic, unsigned long int id);
27
28#endif /* UTIL_LINUX_IDCACHE_H */