tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
This commit is contained in:
+2
-2
@@ -285,7 +285,7 @@ static int fd_copy_directory(
|
||||
else if (S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode))
|
||||
q = fd_copy_node(dirfd(d), de->d_name, &buf, fdt, de->d_name);
|
||||
else
|
||||
q = -ENOTSUP;
|
||||
q = -EOPNOTSUPP;
|
||||
|
||||
if (q == -EEXIST && merge)
|
||||
q = 0;
|
||||
@@ -317,7 +317,7 @@ int copy_tree_at(int fdf, const char *from, int fdt, const char *to, bool merge)
|
||||
else if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode))
|
||||
return fd_copy_node(fdf, from, &st, fdt, to);
|
||||
else
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
int copy_tree(const char *from, const char *to, bool merge) {
|
||||
|
||||
@@ -91,10 +91,10 @@ int fw_add_masquerade(
|
||||
int r;
|
||||
|
||||
if (af != AF_INET)
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (protocol != 0 && protocol != IPPROTO_TCP && protocol != IPPROTO_UDP)
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
h = iptc_init("nat");
|
||||
if (!h)
|
||||
@@ -175,10 +175,10 @@ int fw_add_local_dnat(
|
||||
assert(add || !previous_remote);
|
||||
|
||||
if (af != AF_INET)
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (protocol != IPPROTO_TCP && protocol != IPPROTO_UDP)
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (local_port <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -60,7 +60,7 @@ static inline int fw_add_masquerade(
|
||||
const char *out_interface,
|
||||
const union in_addr_union *destination,
|
||||
unsigned destination_prefixlen) {
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int fw_add_local_dnat(
|
||||
@@ -76,7 +76,7 @@ static inline int fw_add_local_dnat(
|
||||
const union in_addr_union *remote,
|
||||
uint16_t remote_port,
|
||||
const union in_addr_union *previous_remote) {
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1535,7 +1535,7 @@ int unit_file_add_dependency(
|
||||
|
||||
if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
|
||||
log_error("Failed to enable unit: Unit %s is masked", *i);
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
r = install_info_add_auto(&c, *i);
|
||||
@@ -1613,7 +1613,7 @@ int unit_file_enable(
|
||||
state = unit_file_get_state(scope, root_dir, *i);
|
||||
if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) {
|
||||
log_error("Failed to enable unit: Unit %s is masked", *i);
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
r = install_info_add_auto(&c, *i);
|
||||
|
||||
@@ -369,7 +369,7 @@ int image_remove(Image *i) {
|
||||
return rm_rf_dangerous(i->path, false, true, false);
|
||||
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ int image_rename(Image *i, const char *new_name) {
|
||||
}
|
||||
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (!new_path)
|
||||
@@ -498,7 +498,7 @@ int image_clone(Image *i, const char *new_name, bool read_only) {
|
||||
break;
|
||||
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (r < 0)
|
||||
@@ -563,7 +563,7 @@ int image_read_only(Image *i, bool b) {
|
||||
}
|
||||
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -622,7 +622,7 @@ int image_set_limit(Image *i, uint64_t referenced_max) {
|
||||
return -EROFS;
|
||||
|
||||
if (i->type != IMAGE_SUBVOLUME)
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return btrfs_quota_limit(i->path, referenced_max);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
|
||||
r = lsetfilecon(path, fcon);
|
||||
|
||||
/* If the FS doesn't support labels, then exit without warning */
|
||||
if (r < 0 && errno == ENOTSUP)
|
||||
if (r < 0 && errno == EOPNOTSUPP)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) {
|
||||
r = lsetxattr(path, "security.SMACK64", label, strlen(label), 0);
|
||||
|
||||
/* If the FS doesn't support labels, then exit without warning */
|
||||
if (r < 0 && errno == ENOTSUP)
|
||||
if (r < 0 && errno == EOPNOTSUPP)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_
|
||||
break;
|
||||
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -6668,7 +6668,7 @@ int getpeersec(int fd, char **ret) {
|
||||
|
||||
if (isempty(s)) {
|
||||
free(s);
|
||||
return -ENOTSUP;
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
*ret = s;
|
||||
|
||||
Reference in New Issue
Block a user