ret = kernctl_snapshot(infd);
if (ret != 0) {
- perror("Getting sub-buffer snapshot.");
+ PERROR("Getting sub-buffer snapshot.");
ret = -errno;
}
ret = kernctl_snapshot_get_produced(infd, pos);
if (ret != 0) {
- perror("kernctl_snapshot_get_produced");
+ PERROR("kernctl_snapshot_get_produced");
ret = -errno;
}
ret = kernctl_snapshot_get_consumed(infd, pos);
if (ret != 0) {
- perror("kernctl_snapshot_get_consumed");
+ PERROR("kernctl_snapshot_get_consumed");
ret = -errno;
}
/* Get the full subbuffer size including padding */
err = kernctl_get_padded_subbuf_size(infd, &len);
if (err != 0) {
- perror("Getting sub-buffer len failed.");
+ PERROR("Getting sub-buffer len failed.");
err = kernctl_put_subbuf(infd);
if (err != 0) {
if (errno == EFAULT) {
- perror("Error in unreserving sub buffer\n");
+ PERROR("Error in unreserving sub buffer\n");
} else if (errno == EIO) {
/* Should never happen with newer LTTng versions */
- perror("Reader has been pushed by the writer, last sub-buffer corrupted.");
+ PERROR("Reader has been pushed by the writer, last sub-buffer corrupted.");
}
ret = -errno;
goto end;
err = kernctl_put_subbuf(infd);
if (err != 0) {
if (errno == EFAULT) {
- perror("Error in unreserving sub buffer\n");
+ PERROR("Error in unreserving sub buffer\n");
} else if (errno == EIO) {
/* Should never happen with newer LTTng versions */
- perror("Reader has been pushed by the writer, last sub-buffer corrupted.");
+ PERROR("Reader has been pushed by the writer, last sub-buffer corrupted.");
}
ret = -errno;
goto end;
/* Get subbuffer size without padding */
err = kernctl_get_subbuf_size(infd, &subbuf_size);
if (err != 0) {
- perror("Getting sub-buffer len failed.");
+ PERROR("Getting sub-buffer len failed.");
err = kernctl_put_subbuf(infd);
if (err != 0) {
if (errno == EFAULT) {
- perror("Error in unreserving sub buffer\n");
+ PERROR("Error in unreserving sub buffer\n");
} else if (errno == EIO) {
/* Should never happen with newer LTTng versions */
- perror("Reader has been pushed by the writer, last sub-buffer corrupted.");
+ PERROR("Reader has been pushed by the writer, last sub-buffer corrupted.");
}
ret = -errno;
goto end;
err = kernctl_put_next_subbuf(infd);
if (err != 0) {
if (errno == EFAULT) {
- perror("Error in unreserving sub buffer\n");
+ PERROR("Error in unreserving sub buffer\n");
} else if (errno == EIO) {
/* Should never happen with newer LTTng versions */
- perror("Reader has been pushed by the writer, last sub-buffer corrupted.");
+ PERROR("Reader has been pushed by the writer, last sub-buffer corrupted.");
}
ret = -errno;
goto end;