From 1fdd452f47299be60cac9acbd8e7c864d9c174bd Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 23 Mar 2015 13:33:57 -0700 Subject: Always use strerror to report errno in recovery. Change-Id: I7009959043150fabf5853a43ee2448c7fbea176e --- fuse_sideload.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fuse_sideload.c') diff --git a/fuse_sideload.c b/fuse_sideload.c index 4e11e01e4..1dd84e97a 100644 --- a/fuse_sideload.c +++ b/fuse_sideload.c @@ -106,12 +106,12 @@ static void fuse_reply(struct fuse_data* fd, __u64 unique, const void *data, siz vec[0].iov_base = &hdr; vec[0].iov_len = sizeof(hdr); - vec[1].iov_base = data; + vec[1].iov_base = /* const_cast */(void*)(data); vec[1].iov_len = len; res = writev(fd->ffd, vec, 2); if (res < 0) { - printf("*** REPLY FAILED *** %d\n", errno); + printf("*** REPLY FAILED *** %s\n", strerror(errno)); } } @@ -430,7 +430,7 @@ int run_fuse_sideload(struct provider_vtab* vtab, void* cookie, char opts[256]; snprintf(opts, sizeof(opts), - ("fd=%d,user_id=%d,group_id=%d,max_read=%zu," + ("fd=%d,user_id=%d,group_id=%d,max_read=%u," "allow_other,rootmode=040000"), fd.ffd, fd.uid, fd.gid, block_size); -- cgit v1.2.3