]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: cleanup get_config_idmaps()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 16:16:56 +0000 (17:16 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 8 Dec 2020 16:16:56 +0000 (17:16 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index b1885ef155f6b0ecda2a21ba40c6b1cdb521202c..f93242f65528b33f803fd5a74ada8995a504f0a5 100644 (file)
@@ -3815,7 +3815,7 @@ static int get_config_idmaps(const char *key, char *retv, int inlen,
                               (map->idtype == ID_TYPE_UID) ? 'u' : 'g',
                               map->nsid, map->hostid, map->range);
                if (ret < 0 || ret >= __LXC_IDMAP_STR_BUF)
-                       return -1;
+                       return ret_errno(EIO);
 
                strprint(retv, inlen, "%s%s", buf, (listlen-- > 1) ? "\n" : "");
        }