Ticket #6318: src_bin_listport.patch
File src_bin_listport.patch, 1.6 KB (added by , 14 years ago) |
---|
-
src/bin/listport.c
1 1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 2 2 // 3 3 // Copyright (c) 2001-2003, OpenBeOS 4 // Copyright (c) 2010, Haiku Inc. 4 5 // 5 6 // This software is part of the OpenBeOS distribution and is covered 6 7 // by the OpenBeOS license. 7 8 // 8 9 // 9 10 // File: listport.c 10 // Author: Daniel Reinhold (danielre@users.sf.net) 11 // Author: Daniel Reinhold (danielre@users.sf.net), output fix by 12 // Jorma Karvonen (karvonen.jorma @ gmail.com) 11 13 // Description: lists all open ports in the system, organized by team 12 14 // 13 15 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ … … 21 23 void show_port_totals (void); 22 24 23 25 24 25 26 int 26 27 main(int argc, char **argv) 27 28 { … … 73 74 return; 74 75 } 75 76 76 printf("\nTEAM % 4ld (%s):\n", id, this_team.args);77 printf(" IDname capacity queued\n");78 printf("---------------------------------------------------- \n");77 printf("\nTEAM %5ld (%s):\n", id, this_team.args); 78 printf(" ID name capacity queued\n"); 79 printf("-----------------------------------------------------------\n"); 79 80 80 81 while (get_next_port_info(id, &cookie, &this_port) == B_OK) { 81 printf("% 5ld %28s %8ld %6ld\n",82 printf("%10ld %30s %8ld %6ld\n", 82 83 this_port.port, 83 84 this_port.name, 84 85 this_port.capacity,