X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Ffile.c;h=3ef7441df26d40ab7892b6978c49a713b35089bb;hb=2f70ca487bee8babe5aef27f00a2131ea86ebd50;hp=0eef0c09c29583d8daa938e27455dc9cd0694b98;hpb=56bef498f46ac3dd580f4bde3c8f3ed2fe688826;p=libguestfs.git diff --git a/daemon/file.c b/daemon/file.c index 0eef0c0..3ef7441 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -1,5 +1,5 @@ /* libguestfs - the guestfsd daemon - * Copyright (C) 2009 Red Hat Inc. + * Copyright (C) 2009 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,7 +58,11 @@ do_touch (char *path) return -1; } - close (fd); + if (close (fd) == -1) { + reply_with_perror ("close: %s", path); + return -1; + } + return 0; }