X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fuse%2Fguestmount.c;h=e1cb2d89e2a45ca390f9d8d7ff6f4414fbcba6e5;hb=74958b0ad44df6ed703cd3009983d04ade3a8e93;hp=27a4cef2e149027b06cefbfadf89ab64c4de4bc7;hpb=c0d73e0e60b99b87855364ff346551f5ff7efccb;p=libguestfs.git diff --git a/fuse/guestmount.c b/fuse/guestmount.c index 27a4cef..e1cb2d8 100644 --- a/fuse/guestmount.c +++ b/fuse/guestmount.c @@ -653,7 +653,17 @@ fg_write (const char *path, const char *buf, size_t size, dir_cache_invalidate (path); - return -ENOSYS; /* XXX */ + /* See fg_read. */ + const size_t limit = 2 * 1024 * 1024; + if (size > limit) + size = limit; + + int r; + r = guestfs_pwrite (g, path, buf, size, offset); + if (r == -1) + return error (); + + return r; } static int