r = btrfs_subvol_get_quota_fd(fd, "a);
if (r >= 0) {
- (*ret)->usage = quota.referred;
+ (*ret)->usage = quota.referenced;
(*ret)->usage_exclusive = quota.exclusive;
- (*ret)->limit = quota.referred_max;
+ (*ret)->limit = quota.referenced_max;
(*ret)->limit_exclusive = quota.exclusive_max;
}
return rm_rf_dangerous(i->path, false, true, false);
default:
- return -ENOTSUP;
+ return -EOPNOTSUPP;
}
}
}
default:
- return -ENOTSUP;
+ return -EOPNOTSUPP;
}
if (!new_path)
if (!nn)
return -ENOMEM;
- if (renameat2(AT_FDCWD, i->path, AT_FDCWD, new_path, RENAME_NOREPLACE) < 0)
- return -errno;
+ r = rename_noreplace(AT_FDCWD, i->path, AT_FDCWD, new_path);
+ if (r < 0)
+ return r;
/* Restore the immutable bit, if it was set before */
if (file_attr & FS_IMMUTABLE_FL)
break;
default:
- return -ENOTSUP;
+ return -EOPNOTSUPP;
}
if (r < 0)
}
default:
- return -ENOTSUP;
+ return -EOPNOTSUPP;
}
return 0;
return 0;
}
-int image_set_limit(Image *i, uint64_t referred_max) {
+int image_set_limit(Image *i, uint64_t referenced_max) {
assert(i);
if (path_equal(i->path, "/") ||
return -EROFS;
if (i->type != IMAGE_SUBVOLUME)
- return -ENOTSUP;
+ return -EOPNOTSUPP;
- return btrfs_quota_limit(i->path, referred_max);
+ return btrfs_quota_limit(i->path, referenced_max);
}
int image_name_lock(const char *name, int operation, LockFile *ret) {