mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 08:05:20 +00:00
utils: add lxc_getpagesize()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
127c6e703b
commit
e46361235c
@ -2359,3 +2359,14 @@ int lxc_make_tmpfile(char *template, bool rm)
|
|||||||
|
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t lxc_getpagesize(void)
|
||||||
|
{
|
||||||
|
int64_t pgsz;
|
||||||
|
|
||||||
|
pgsz = sysconf(_SC_PAGESIZE);
|
||||||
|
if (pgsz <= 0)
|
||||||
|
pgsz = 1 << 12;
|
||||||
|
|
||||||
|
return pgsz;
|
||||||
|
}
|
||||||
|
@ -467,5 +467,6 @@ extern bool has_fs_type(const char *path, fs_type_magic magic_val);
|
|||||||
extern bool is_fs_type(const struct statfs *fs, fs_type_magic magic_val);
|
extern bool is_fs_type(const struct statfs *fs, fs_type_magic magic_val);
|
||||||
extern bool lxc_nic_exists(char *nic);
|
extern bool lxc_nic_exists(char *nic);
|
||||||
extern int lxc_make_tmpfile(char *template, bool rm);
|
extern int lxc_make_tmpfile(char *template, bool rm);
|
||||||
|
extern uint64_t lxc_getpagesize(void);
|
||||||
|
|
||||||
#endif /* __LXC_UTILS_H */
|
#endif /* __LXC_UTILS_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user