The return values 12 and 13 are not used spectially except as return
value. No description and definition about them. so I change them to
generic errno.
Signed-off-by: Fan Chengniang <fancn.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
#include "ctree.h"
#include "ioctl.h"
#include "utils.h"
+#include <errno.h>
#define BTRFS_QGROUP_NFILTERS_INCREASE (2 * BTRFS_QGROUP_FILTER_MAX)
#define BTRFS_QGROUP_NCOMPS_INCREASE (2 * BTRFS_QGROUP_COMP_MAX)
out = calloc(sizeof(*out) + sizeof(out->qgroups[0]) * (nitems + n), 1);
if (out == NULL) {
fprintf(stderr, "ERROR: Not enough memory\n");
- return 13;
+ return -ENOMEM;
}
if (*inherit) {
if (qgroupid == 0) {
fprintf(stderr, "ERROR: bad qgroup specification\n");
- return 12;
+ return -EINVAL;
}
if (*inherit)
if (!p) {
bad:
fprintf(stderr, "ERROR: bad copy specification\n");
- return 12;
+ return -EINVAL;
}
*p = 0;
qgroup_src = parse_qgroupid(arg);