mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
AK: Remove custom %b format string specifier
This was a non-standard specifier alias for %02x. This patch replaces all uses of it with new-style formatting functions instead.
This commit is contained in:
parent
89d3b09638
commit
cb2c8f71f4
12 changed files with 27 additions and 28 deletions
|
@ -217,7 +217,7 @@ E1000NetworkAdapter::E1000NetworkAdapter(PCI::Address address, u8 irq)
|
|||
klog() << "E1000: Has EEPROM? " << m_has_eeprom;
|
||||
read_mac_address();
|
||||
const auto& mac = mac_address();
|
||||
klog() << "E1000: MAC address: " << String::format("%b", mac[0]) << ":" << String::format("%b", mac[1]) << ":" << String::format("%b", mac[2]) << ":" << String::format("%b", mac[3]) << ":" << String::format("%b", mac[4]) << ":" << String::format("%b", mac[5]);
|
||||
klog() << "E1000: MAC address: " << mac.to_string();
|
||||
|
||||
u32 flags = in32(REG_CTRL);
|
||||
out32(REG_CTRL, flags | ECTRL_SLU);
|
||||
|
@ -458,7 +458,7 @@ void E1000NetworkAdapter::send_raw(ReadonlyBytes payload)
|
|||
m_wait_queue.wait_on(nullptr, "E1000NetworkAdapter");
|
||||
}
|
||||
#ifdef E1000_DEBUG
|
||||
klog() << "E1000: Sent packet, status is now " << String::format("%b", descriptor.status) << "!";
|
||||
dbgln("E1000: Sent packet, status is now {:#02x}!", descriptor.status);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ void NetworkTask_main(void*)
|
|||
|
||||
#ifdef ETHERNET_VERY_DEBUG
|
||||
for (size_t i = 0; i < packet_size; i++) {
|
||||
klog() << String::format("%b", buffer[i]);
|
||||
klog() << String::format("%#02x", buffer[i]);
|
||||
|
||||
switch (i % 16) {
|
||||
case 7:
|
||||
|
@ -249,7 +249,7 @@ void handle_icmp(const EthernetFrameHeader& eth, const IPv4Packet& ipv4_packet,
|
|||
{
|
||||
auto& icmp_header = *static_cast<const ICMPHeader*>(ipv4_packet.payload());
|
||||
#ifdef ICMP_DEBUG
|
||||
klog() << "handle_icmp: source=" << ipv4_packet.source().to_string().characters() << ", destination=" << ipv4_packet.destination().to_string().characters() << ", type=" << String::format("%b", icmp_header.type()) << ", code=" << String::format("%b", icmp_header.code());
|
||||
dbgln("handle_icmp: source={}, destination={}, type={:#02x}, code={:#02x}", ipv4_packet.source().to_string(), ipv4_packet.destination().to_string(), icmp_header.type(), icmp_header.code());
|
||||
#endif
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue