projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add lttv wrapper
[lttv.git]
/
ltt
/
branches
/
poly
/
libltt
/
libltt.c
diff --git
a/ltt/branches/poly/libltt/libltt.c
b/ltt/branches/poly/libltt/libltt.c
index 22523c65df6a5ec6a16dc235fd6520867f4deb27..662a05871521d5ac39c78649cfacf44ee4b01d85 100644
(file)
--- a/
ltt/branches/poly/libltt/libltt.c
+++ b/
ltt/branches/poly/libltt/libltt.c
@@
-23,15
+23,15
@@
*
*/
*
*/
-#i
nclude <linux/socket.h>
-#include <
linux/types
.h>
-#
include <linux/time.h>
-#include <linux/netlink.h>
+#i
fdef HAVE_CONFIG_H
+#include <
config
.h>
+#
endif
+
#include <libltt/libltt.h>
#include <libltt/libltt.h>
-#include <asm/socket.h>
#include <errno.h>
#include <stdio.h>
#include <errno.h>
#include <stdio.h>
+
/* Private interface */
enum {
/* Private interface */
enum {
@@
-292,7
+292,7
@@
int lttctl_destroy_handle(struct lttctl_handle *h)
int lttctl_create_trace(const struct lttctl_handle *h,
int lttctl_create_trace(const struct lttctl_handle *h,
- char *name, enum trace_mode mode)
+ char *name, enum trace_mode mode
, unsigned subbuf_size, unsigned n_subbufs
)
{
int err;
{
int err;
@@
-315,7
+315,9
@@
int lttctl_create_trace(const struct lttctl_handle *h,
strncpy(req.msg.trace_name, name, NAME_MAX);
req.msg.op = OP_CREATE;
strncpy(req.msg.trace_name, name, NAME_MAX);
req.msg.op = OP_CREATE;
- req.msg.args.mode = mode;
+ req.msg.args.new_trace.mode = mode;
+ req.msg.args.new_trace.subbuf_size = subbuf_size;
+ req.msg.args.new_trace.n_subbufs = n_subbufs;
err = lttctl_netlink_sendto(h, (void *)&req, req.nlh.nlmsg_len);
if(err < 0) goto senderr;
err = lttctl_netlink_sendto(h, (void *)&req, req.nlh.nlmsg_len);
if(err < 0) goto senderr;
@@
-327,13
+329,14
@@
int lttctl_create_trace(const struct lttctl_handle *h,
if(err != 0) {
errno = err;
lttctl_perror("Create Trace Error");
if(err != 0) {
errno = err;
lttctl_perror("Create Trace Error");
- return
-1
;
+ return
err
;
}
return 0;
senderr:
lttctl_perror("Create Trace Error");
}
return 0;
senderr:
lttctl_perror("Create Trace Error");
+ err = EPERM;
return err;
}
return err;
}
@@
-370,13
+373,14
@@
int lttctl_destroy_trace(const struct lttctl_handle *h,
if(err != 0) {
errno = err;
lttctl_perror("Destroy Trace Channels Error");
if(err != 0) {
errno = err;
lttctl_perror("Destroy Trace Channels Error");
- return
-1
;
+ return
err
;
}
return 0;
senderr:
lttctl_perror("Destroy Trace Channels Error");
}
return 0;
senderr:
lttctl_perror("Destroy Trace Channels Error");
+ err = EPERM;
return err;
}
return err;
}
@@
-415,12
+419,13
@@
int lttctl_start(const struct lttctl_handle *h,
if(err != 0) {
errno = err;
lttctl_perror("Start Trace Error");
if(err != 0) {
errno = err;
lttctl_perror("Start Trace Error");
- return
-1
;
+ return
err
;
}
return 0;
senderr:
}
return 0;
senderr:
+ err = EPERM;
lttctl_perror("Start Trace Error");
return err;
lttctl_perror("Start Trace Error");
return err;
@@
-459,12
+464,14
@@
int lttctl_stop(const struct lttctl_handle *h,
if(err != 0) {
errno = err;
lttctl_perror("Stop Trace Error");
if(err != 0) {
errno = err;
lttctl_perror("Stop Trace Error");
- return
-1
;
+ return
err
;
}
return 0;
senderr:
}
return 0;
senderr:
+ err = EPERM;
lttctl_perror("Stop Trace Error");
return err;
}
lttctl_perror("Stop Trace Error");
return err;
}
+
This page took
0.02383 seconds
and
4
git commands to generate.