* Removed SyscallRestartWrapper comparison operators. They are not
needed, since we've got a cast operator. * Reverted r24927-r24929. There's no potential ambiguity anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24949 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
460c990c5d
commit
f13ba03959
@ -144,13 +144,6 @@ struct SyscallRestartWrapper {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator==(const Type& other) const { return fResult == other; }
|
|
||||||
bool operator!=(const Type& other) const { return fResult != other; }
|
|
||||||
bool operator<=(const Type& other) const { return fResult <= other; }
|
|
||||||
bool operator>=(const Type& other) const { return fResult >= other; }
|
|
||||||
bool operator<(const Type& other) const { return fResult < other; }
|
|
||||||
bool operator>(const Type& other) const { return fResult > other; }
|
|
||||||
|
|
||||||
operator Type() const { return fResult; }
|
operator Type() const { return fResult; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -660,7 +660,7 @@ common_user_io(int fd, off_t pos, void *buffer, size_t length, bool write)
|
|||||||
else
|
else
|
||||||
status = descriptor->ops->fd_read(descriptor, pos, buffer, &length);
|
status = descriptor->ops->fd_read(descriptor, pos, buffer, &length);
|
||||||
|
|
||||||
if (status < (status_t)B_OK)
|
if (status < B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if (movePosition)
|
if (movePosition)
|
||||||
@ -726,7 +726,7 @@ common_user_vector_io(int fd, off_t pos, const iovec *userVecs, size_t count,
|
|||||||
&length);
|
&length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status < (status_t)B_OK) {
|
if (status < B_OK) {
|
||||||
if (bytesTransferred == 0)
|
if (bytesTransferred == 0)
|
||||||
return status;
|
return status;
|
||||||
status = B_OK;
|
status = B_OK;
|
||||||
|
@ -894,7 +894,7 @@ _user_recvfrom(int socket, void *data, size_t length, int flags,
|
|||||||
socklen_t userAddressBufferSize = addressLength;
|
socklen_t userAddressBufferSize = addressLength;
|
||||||
result = common_recvfrom(socket, data, length, flags,
|
result = common_recvfrom(socket, data, length, flags,
|
||||||
userAddress != NULL ? (sockaddr*)address : NULL, &addressLength, false);
|
userAddress != NULL ? (sockaddr*)address : NULL, &addressLength, false);
|
||||||
if (result < (ssize_t)0)
|
if (result < 0)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
// copy address size and address back to userland
|
// copy address size and address back to userland
|
||||||
@ -945,7 +945,7 @@ _user_recvmsg(int socket, struct msghdr *userMessage, int flags)
|
|||||||
SyscallRestartWrapper<ssize_t> result;
|
SyscallRestartWrapper<ssize_t> result;
|
||||||
|
|
||||||
result = common_recvmsg(socket, &message, flags, false);
|
result = common_recvmsg(socket, &message, flags, false);
|
||||||
if (result < (ssize_t)0)
|
if (result < 0)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
// copy the address, the ancillary data, and the message header back to
|
// copy the address, the ancillary data, and the message header back to
|
||||||
@ -1072,7 +1072,7 @@ _user_getsockopt(int socket, int level, int option, void *userValue,
|
|||||||
SyscallRestartWrapper<status_t> error;
|
SyscallRestartWrapper<status_t> error;
|
||||||
error = common_getsockopt(socket, level, option, value, &length,
|
error = common_getsockopt(socket, level, option, value, &length,
|
||||||
false);
|
false);
|
||||||
if (error != (status_t)B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
// copy value back to userland
|
// copy value back to userland
|
||||||
@ -1114,7 +1114,7 @@ _user_getpeername(int socket, struct sockaddr *userAddress,
|
|||||||
SyscallRestartWrapper<status_t> error;
|
SyscallRestartWrapper<status_t> error;
|
||||||
error = prepare_userland_address_result(userAddress, _addressLength,
|
error = prepare_userland_address_result(userAddress, _addressLength,
|
||||||
addressLength, true);
|
addressLength, true);
|
||||||
if (error != (status_t)B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
// getpeername()
|
// getpeername()
|
||||||
@ -1122,7 +1122,7 @@ _user_getpeername(int socket, struct sockaddr *userAddress,
|
|||||||
socklen_t userAddressBufferSize = addressLength;
|
socklen_t userAddressBufferSize = addressLength;
|
||||||
error = common_getpeername(socket, (sockaddr*)address, &addressLength,
|
error = common_getpeername(socket, (sockaddr*)address, &addressLength,
|
||||||
false);
|
false);
|
||||||
if (error != (status_t)B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
// copy address size and address back to userland
|
// copy address size and address back to userland
|
||||||
@ -1144,7 +1144,7 @@ _user_getsockname(int socket, struct sockaddr *userAddress,
|
|||||||
SyscallRestartWrapper<status_t> error;
|
SyscallRestartWrapper<status_t> error;
|
||||||
error = prepare_userland_address_result(userAddress, _addressLength,
|
error = prepare_userland_address_result(userAddress, _addressLength,
|
||||||
addressLength, true);
|
addressLength, true);
|
||||||
if (error != (status_t)B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
// getsockname()
|
// getsockname()
|
||||||
@ -1152,7 +1152,7 @@ _user_getsockname(int socket, struct sockaddr *userAddress,
|
|||||||
socklen_t userAddressBufferSize = addressLength;
|
socklen_t userAddressBufferSize = addressLength;
|
||||||
error = common_getsockname(socket, (sockaddr*)address, &addressLength,
|
error = common_getsockname(socket, (sockaddr*)address, &addressLength,
|
||||||
false);
|
false);
|
||||||
if (error != (status_t)B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
// copy address size and address back to userland
|
// copy address size and address back to userland
|
||||||
@ -1186,7 +1186,7 @@ _user_socketpair(int family, int type, int protocol, int *userSocketVector)
|
|||||||
int socketVector[2];
|
int socketVector[2];
|
||||||
SyscallRestartWrapper<status_t> error;
|
SyscallRestartWrapper<status_t> error;
|
||||||
error = common_socketpair(family, type, protocol, socketVector, false);
|
error = common_socketpair(family, type, protocol, socketVector, false);
|
||||||
if (error != (status_t)B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
// copy FDs back to userland
|
// copy FDs back to userland
|
||||||
@ -1217,7 +1217,7 @@ _user_get_next_socket_stat(int family, uint32 *_cookie, struct net_stat *_stat)
|
|||||||
net_stat stat;
|
net_stat stat;
|
||||||
SyscallRestartWrapper<status_t> error;
|
SyscallRestartWrapper<status_t> error;
|
||||||
error = common_get_next_socket_stat(family, &cookie, &stat);
|
error = common_get_next_socket_stat(family, &cookie, &stat);
|
||||||
if (error != (status_t)B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
// copy cookie and data back to userland
|
// copy cookie and data back to userland
|
||||||
|
Loading…
Reference in New Issue
Block a user