mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00:00
Kernel: Unbreak building with extra debug macros, part 1
This commit is contained in:
parent
8c1888811f
commit
eac3bbdcee
9 changed files with 24 additions and 14 deletions
|
@ -24,9 +24,9 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <Kernel/IO.h>
|
||||
#include <Kernel/Net/E1000NetworkAdapter.h>
|
||||
#include <Kernel/Thread.h>
|
||||
#include <Kernel/IO.h>
|
||||
|
||||
//#define E1000_DEBUG
|
||||
|
||||
|
@ -394,7 +394,7 @@ void E1000NetworkAdapter::send_raw(ReadonlyBytes payload)
|
|||
disable_irq();
|
||||
size_t tx_current = in32(REG_TXDESCTAIL) % number_of_tx_descriptors;
|
||||
#ifdef E1000_DEBUG
|
||||
klog() << "E1000: Sending packet (" << length << " bytes)";
|
||||
klog() << "E1000: Sending packet (" << payload.size() << " bytes)";
|
||||
#endif
|
||||
auto* tx_descriptors = (e1000_tx_desc*)m_tx_descriptors_region->vaddr().as_ptr();
|
||||
auto& descriptor = tx_descriptors[tx_current];
|
||||
|
|
|
@ -106,7 +106,7 @@ KResult LocalSocket::bind(Userspace<const sockaddr*> user_address, socklen_t add
|
|||
auto path = String(address.sun_path, strnlen(address.sun_path, sizeof(address.sun_path)));
|
||||
|
||||
#ifdef DEBUG_LOCAL_SOCKET
|
||||
dbg() << "LocalSocket{" << this << "} bind(" << safe_address << ")";
|
||||
dbg() << "LocalSocket{" << this << "} bind(" << path << ")";
|
||||
#endif
|
||||
|
||||
mode_t mode = S_IFSOCK | (m_prebind_mode & 04777);
|
||||
|
@ -349,7 +349,6 @@ KResult LocalSocket::getsockopt(FileDescription& description, int level, int opt
|
|||
if (level != SOL_SOCKET)
|
||||
return Socket::getsockopt(description, level, option, value, value_size);
|
||||
|
||||
|
||||
socklen_t size;
|
||||
if (!Process::current()->validate_read_and_copy_typed(&size, value_size))
|
||||
return KResult(-EFAULT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue