projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rotation-api: pass session name explicitly
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
shm.c
diff --git
a/src/bin/lttng-sessiond/shm.c
b/src/bin/lttng-sessiond/shm.c
index 7bb52d4ee2feeb513d59079bf11813f319d8c48a..a6328d5f618fb4474d70b5d5966cf45d5ff4a121 100644
(file)
--- a/
src/bin/lttng-sessiond/shm.c
+++ b/
src/bin/lttng-sessiond/shm.c
@@
-16,7
+16,7
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _
GNU
_SOURCE
+#define _
LGPL
_SOURCE
#include <fcntl.h>
#include <limits.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <limits.h>
#include <sys/mman.h>
@@
-132,12
+132,20
@@
error:
*/
char *shm_ust_get_mmap(char *shm_path, int global)
{
*/
char *shm_ust_get_mmap(char *shm_path, int global)
{
- size_t mmap_size
= sysconf(_SC_PAGE_SIZE)
;
+ size_t mmap_size;
int wait_shm_fd, ret;
char *wait_shm_mmap;
int wait_shm_fd, ret;
char *wait_shm_mmap;
+ long sys_page_size;
assert(shm_path);
assert(shm_path);
+ sys_page_size = sysconf(_SC_PAGE_SIZE);
+ if (sys_page_size < 0) {
+ PERROR("sysconf PAGE_SIZE");
+ goto error;
+ }
+ mmap_size = sys_page_size;
+
wait_shm_fd = get_wait_shm(shm_path, mmap_size, global);
if (wait_shm_fd < 0) {
goto error;
wait_shm_fd = get_wait_shm(shm_path, mmap_size, global);
if (wait_shm_fd < 0) {
goto error;
This page took
0.026829 seconds
and
5
git commands to generate.