summaryrefslogtreecommitdiffstats
path: root/sdcard/sdcard.c
diff options
context:
space:
mode:
authorYuncheol Heo <ycheo@google.com>2011-07-22 17:42:22 +0900
committerYuncheol Heo <ycheo@google.com>2011-07-22 22:05:27 +0900
commit2fc9fc7c8e26a35059ad39fe35ed256bfadb2891 (patch)
treece46178df983e588b1d23782c51f1b2f861876bb /sdcard/sdcard.c
parent1ffdb38213d177a83d74e1dc3bf41237dcbe8c9a (diff)
downloadcore-2fc9fc7c8e26a35059ad39fe35ed256bfadb2891.tar.gz
core-2fc9fc7c8e26a35059ad39fe35ed256bfadb2891.tar.bz2
core-2fc9fc7c8e26a35059ad39fe35ed256bfadb2891.zip
Fix returning errno values which should be negative.
Change-Id: Id6464b127678ca1d9f4afa7c99fcfce361f4ad4a
Diffstat (limited to 'sdcard/sdcard.c')
-rw-r--r--sdcard/sdcard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index bd00311d4..689cd2ab4 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -756,7 +756,7 @@ void handle_fuse_request(struct fuse *fuse, struct fuse_in_header *hdr, void *da
h->fd = open(path, req->flags);
if (h->fd < 0) {
ERROR("ERROR\n");
- fuse_status(fuse, hdr->unique, errno);
+ fuse_status(fuse, hdr->unique, -errno);
free(h);
return;
}
@@ -778,7 +778,7 @@ void handle_fuse_request(struct fuse *fuse, struct fuse_in_header *hdr, void *da
}
res = pread64(h->fd, buffer, req->size, req->offset);
if (res < 0) {
- fuse_status(fuse, hdr->unique, errno);
+ fuse_status(fuse, hdr->unique, -errno);
return;
}
fuse_reply(fuse, hdr->unique, buffer, res);
@@ -792,7 +792,7 @@ void handle_fuse_request(struct fuse *fuse, struct fuse_in_header *hdr, void *da
TRACE("WRITE %p(%d) %u@%llu\n", h, h->fd, req->size, req->offset);
res = pwrite64(h->fd, ((char*) data) + sizeof(*req), req->size, req->offset);
if (res < 0) {
- fuse_status(fuse, hdr->unique, errno);
+ fuse_status(fuse, hdr->unique, -errno);
return;
}
out.size = res;