mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:42:43 +00:00 
			
		
		
		
	Kernel: Convert String::format() => String::formatted()
This commit is contained in:
		
							parent
							
								
									0058a1173e
								
							
						
					
					
						commit
						f4eff7df8f
					
				
					 4 changed files with 7 additions and 7 deletions
				
			
		|  | @ -163,7 +163,7 @@ KResultOr<size_t> FIFO::write(FileDescription&, u64, const UserOrKernelBuffer& b | ||||||
| 
 | 
 | ||||||
| String FIFO::absolute_path(const FileDescription&) const | String FIFO::absolute_path(const FileDescription&) const | ||||||
| { | { | ||||||
|     return String::format("fifo:%u", m_fifo_id); |     return String::formatted("fifo:{}", m_fifo_id); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| KResult FIFO::stat(::stat& st) const | KResult FIFO::stat(::stat& st) const | ||||||
|  |  | ||||||
|  | @ -53,11 +53,11 @@ public: | ||||||
| 
 | 
 | ||||||
|     String to_string() const |     String to_string() const | ||||||
|     { |     { | ||||||
|         return String::format( |         return String::formatted( | ||||||
|             "%s:%d -> %s:%d", |             "{}:{} -> {}:{}", | ||||||
|             m_local_address.to_string().characters(), |             m_local_address, | ||||||
|             m_local_port, |             m_local_port, | ||||||
|             m_peer_address.to_string().characters(), |             m_peer_address, | ||||||
|             m_peer_port); |             m_peer_port); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -210,7 +210,7 @@ UNMAP_AFTER_INIT NE2000NetworkAdapter::~NE2000NetworkAdapter() | ||||||
| void NE2000NetworkAdapter::handle_irq(const RegisterState&) | void NE2000NetworkAdapter::handle_irq(const RegisterState&) | ||||||
| { | { | ||||||
|     u8 status = in8(REG_RW_INTERRUPTSTATUS); |     u8 status = in8(REG_RW_INTERRUPTSTATUS); | ||||||
|     dbgln_if(NE2000_DEBUG, "NE2000NetworkAdapter: Got interrupt, status=0x{}", String::format("%02x", status)); |     dbgln_if(NE2000_DEBUG, "NE2000NetworkAdapter: Got interrupt, status={:#02x}", status); | ||||||
| 
 | 
 | ||||||
|     if (status & BIT_INTERRUPTMASK_PRX) { |     if (status & BIT_INTERRUPTMASK_PRX) { | ||||||
|         dbgln_if(NE2000_DEBUG, "NE2000NetworkAdapter: Interrupt for packet received"); |         dbgln_if(NE2000_DEBUG, "NE2000NetworkAdapter: Interrupt for packet received"); | ||||||
|  |  | ||||||
|  | @ -501,7 +501,7 @@ UNMAP_AFTER_INIT Thread* Scheduler::create_ap_idle_thread(u32 cpu) | ||||||
|     VERIFY(Processor::id() == 0); |     VERIFY(Processor::id() == 0); | ||||||
| 
 | 
 | ||||||
|     VERIFY(s_colonel_process); |     VERIFY(s_colonel_process); | ||||||
|     Thread* idle_thread = s_colonel_process->create_kernel_thread(idle_loop, nullptr, THREAD_PRIORITY_MIN, String::format("idle thread #%u", cpu), 1 << cpu, false); |     Thread* idle_thread = s_colonel_process->create_kernel_thread(idle_loop, nullptr, THREAD_PRIORITY_MIN, String::formatted("idle thread #{}", cpu), 1 << cpu, false); | ||||||
|     VERIFY(idle_thread); |     VERIFY(idle_thread); | ||||||
|     return idle_thread; |     return idle_thread; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling