projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add client notification API
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
filter
/
memstream.h
diff --git
a/src/lib/lttng-ctl/filter/memstream.h
b/src/lib/lttng-ctl/filter/memstream.h
index 2cbb03559b154c322e0bb7f8f3c1518c72fa0f75..6990b6fd709189e99b55416b93e11cd5f7604389 100644
(file)
--- a/
src/lib/lttng-ctl/filter/memstream.h
+++ b/
src/lib/lttng-ctl/filter/memstream.h
@@
-19,9
+19,6
@@
* all copies or substantial portions of the Software.
*/
* all copies or substantial portions of the Software.
*/
-#define _GNU_SOURCE
-#include <config.h>
-
#ifdef LTTNG_HAVE_FMEMOPEN
#include <stdio.h>
#ifdef LTTNG_HAVE_FMEMOPEN
#include <stdio.h>
@@
-73,25
+70,25
@@
FILE *lttng_fmemopen(void *buf, size_t size, const char *mode)
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
-
perror
("fseek");
+
PERROR
("fseek");
goto error_close;
}
/* We keep the handle open, but can unlink the file on the VFS. */
ret = unlink(tmpname);
if (ret < 0) {
goto error_close;
}
/* We keep the handle open, but can unlink the file on the VFS. */
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return fp;
error_close:
ret = fclose(fp);
if (ret < 0) {
}
return fp;
error_close:
ret = fclose(fp);
if (ret < 0) {
-
perror
("close");
+
PERROR
("close");
}
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
}
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return NULL;
}
}
return NULL;
}
@@
-148,14
+145,14
@@
FILE *lttng_open_memstream(char **ptr, size_t *sizeloc)
*/
ret = unlink(tmpname);
if (ret < 0) {
*/
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return fp;
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
}
return fp;
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return NULL;
}
}
return NULL;
}
@@
-170,17
+167,17
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
ret = fflush(fp);
if (ret < 0) {
ret = fflush(fp);
if (ret < 0) {
-
perror
("fflush");
+
PERROR
("fflush");
return ret;
}
ret = fseek(fp, 0L, SEEK_END);
if (ret < 0) {
return ret;
}
ret = fseek(fp, 0L, SEEK_END);
if (ret < 0) {
-
perror
("fseek");
+
PERROR
("fseek");
return ret;
}
pos = ftell(fp);
if (ret < 0) {
return ret;
}
pos = ftell(fp);
if (ret < 0) {
-
perror
("ftell");
+
PERROR
("ftell");
return ret;
}
*size = pos;
return ret;
}
*size = pos;
@@
-191,7
+188,7
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
-
perror
("fseek");
+
PERROR
("fseek");
goto error_free;
}
/* Copy the entire file into the buffer */
goto error_free;
}
/* Copy the entire file into the buffer */
@@
-207,7
+204,7
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
}
ret = fclose(fp);
if (ret < 0) {
}
ret = fclose(fp);
if (ret < 0) {
-
perror
("fclose");
+
PERROR
("fclose");
return ret;
}
return 0;
return ret;
}
return 0;
@@
-215,7
+212,7
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
error_close:
ret = fclose(fp);
if (ret < 0) {
error_close:
ret = fclose(fp);
if (ret < 0) {
-
perror
("fclose");
+
PERROR
("fclose");
}
error_free:
free(*buf);
}
error_free:
free(*buf);
This page took
0.040725 seconds
and
5
git commands to generate.