acpi: validate hotplug selector on access
[qemu.git] / include / qemu / selfmap.h
blob80cf920fbadbe2ed5f19ad5cc08f50f60df38da9
1 /*
2 * Utility functions to read our own memory map
4 * Copyright (c) 2020 Linaro Ltd
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
9 #ifndef SELFMAP_H
10 #define SELFMAP_H
12 typedef struct {
13 unsigned long start;
14 unsigned long end;
16 /* flags */
17 bool is_read;
18 bool is_write;
19 bool is_exec;
20 bool is_priv;
22 unsigned long offset;
23 gchar *dev;
24 uint64_t inode;
25 gchar *path;
26 } MapInfo;
29 /**
30 * read_self_maps:
32 * Read /proc/self/maps and return a list of MapInfo structures.
34 GSList *read_self_maps(void);
36 /**
37 * free_self_maps:
38 * @info: a GSlist
40 * Free a list of MapInfo structures.
42 void free_self_maps(GSList *info);
44 #endif /* _SELFMAP_H_ */