Something went wrong on our end
Select Git revision
-
William Roberts authored
secilc is being used without -f which is causing a file_contexts file to be generated in the root of the tree where the build tools run: $ stat $T/file_contexts File: 'file_contexts' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: fc00h/64512d Inode: 5508958 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/wcrobert) Gid: ( 1000/wcrobert) Access: 2017-03-23 11:23:41.691538047 -0700 Modify: 2017-03-23 11:23:41.691538047 -0700 Change: 2017-03-23 11:23:41.691538047 -0700 Test: remove $T/file_contexts, touch a policy file and make sepolicy, ensure file is not regenerated. Also, ensure hikey builds and boots. Change-Id: I0d15338a540dba0194c65a1436647c7d38fe3c79 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
William Roberts authoredsecilc is being used without -f which is causing a file_contexts file to be generated in the root of the tree where the build tools run: $ stat $T/file_contexts File: 'file_contexts' Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: fc00h/64512d Inode: 5508958 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 1000/wcrobert) Gid: ( 1000/wcrobert) Access: 2017-03-23 11:23:41.691538047 -0700 Modify: 2017-03-23 11:23:41.691538047 -0700 Change: 2017-03-23 11:23:41.691538047 -0700 Test: remove $T/file_contexts, touch a policy file and make sepolicy, ensure file is not regenerated. Also, ensure hikey builds and boots. Change-Id: I0d15338a540dba0194c65a1436647c7d38fe3c79 Signed-off-by:
William Roberts <william.c.roberts@intel.com>
io_uring.c 802 B
#include <err.h>
#include <errno.h>
#include <liburing.h>
#include <stdlib.h>
#include "stopwatch.h"
struct io_uring ring;
void init(__attribute__((unused)) int fd) {
int res = io_uring_queue_init(1, &ring, 0);
if (res < 0) {
errno = -res;
err(EXIT_FAILURE, "io_uring_setup failed");
}
}
unsigned do_read(int fd, void *buf, size_t count) {
start_watch();
struct io_uring_sqe *sqe = io_uring_get_sqe(&ring);
io_uring_prep_read(sqe, fd, buf, count, 0);
int res = io_uring_submit_and_wait(&ring, 1);
stop_watch();
if (res < 0) err(EXIT_FAILURE, "io_uring_submit_and_wait failed");
struct io_uring_cqe *cqe;
res = io_uring_peek_cqe(&ring, &cqe);
if (res < 0) err(EXIT_FAILURE, "io_uring_peek_cqe failed");
if (cqe->res < 0) err(EXIT_FAILURE, "read request failed");
return 1;
}