Fix return value of try_to_free_disk_space().
authorAndre Noll <maan@congo.fml.local>
Thu, 24 Apr 2008 15:39:53 +0000 (17:39 +0200)
committerAndre Noll <maan@congo.fml.local>
Thu, 24 Apr 2008 15:39:53 +0000 (17:39 +0200)
We must never, ever return a system error without converting
it to a dss error code first.

dss.c

diff --git a/dss.c b/dss.c
index 238d8403659bd377a2fea92aad0713264cdbcd5e..3aa19d3c9a2b55aa1a352f95f195f676046f5b1b 100644 (file)
--- a/dss.c
+++ b/dss.c
@@ -341,7 +341,7 @@ static int try_to_free_disk_space(int low_disk_space)
        if (ret)
                goto out;
        DSS_CRIT_LOG("uhuhu: not enough disk space for a single snapshot\n");
-       ret= -ENOSPC;
+       ret = -ERRNO_TO_DSS_ERROR(ENOSPC);
 out:
        free_snapshot_list(&sl);
        return ret;