Changeset 264

Show
Ignore:
Timestamp:
04/14/11 21:04:23 (13 months ago)
Author:
marek
Message:

ap51-flash: show some more output in non-debug mode

Signed-off-by: Marek Lindner <lindner_marek@…>

Location:
ap51-flash-ng
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • ap51-flash-ng/proto.c

    r263 r264  
    255255                                node->image_state.flash_size = node->router_type->image->ci_info.kernel_fsize; 
    256256                                node->image_state.offset = node->router_type->image->ci_info.kernel_offset; 
    257 #if defined(DEBUG) 
     257 
    258258                                fprintf(stderr, "[%02x:%02x:%02x:%02x:%02x:%02x]: %s: tftp client asks for '%s', serving kernel portion of: %s (%i blocks) ...\n", 
    259259                                        node->his_mac_addr[0], node->his_mac_addr[1], node->his_mac_addr[2], 
     
    261261                                        node->router_type->desc, file_name, node->router_type->image->path, 
    262262                                        ((node->image_state.flash_size + TFTP_PAYLOAD_SIZE - 1) / TFTP_PAYLOAD_SIZE)); 
    263 #endif 
    264263                        } else { 
    265264                                node->image_state.file_size = node->router_type->image->ci_info.rootfs_size; 
    266265                                node->image_state.flash_size = node->router_type->image->ci_info.rootfs_fsize; 
    267266                                node->image_state.offset = node->router_type->image->ci_info.rootfs_offset; 
    268 #if defined(DEBUG) 
     267 
    269268                                fprintf(stderr, "[%02x:%02x:%02x:%02x:%02x:%02x]: %s: tftp client asks for '%s', serving rootfs portion of: %s (%i blocks) ...\n", 
    270269                                        node->his_mac_addr[0], node->his_mac_addr[1], node->his_mac_addr[2], 
     
    272271                                        node->router_type->desc, file_name, node->router_type->image->path, 
    273272                                        ((node->image_state.flash_size + TFTP_PAYLOAD_SIZE - 1) / TFTP_PAYLOAD_SIZE)); 
    274 #endif 
    275273                        } 
    276274                        break; 
    277275                case FLASH_MODE_TFTP_CLIENT: 
    278 #if defined(DEBUG) 
    279276                        fprintf(stderr, "[%02x:%02x:%02x:%02x:%02x:%02x]: %s: tftp client asks for '%s', serving: %s (%i blocks) ...\n", 
    280277                                node->his_mac_addr[0], node->his_mac_addr[1], node->his_mac_addr[2], 
     
    282279                                node->router_type->desc, file_name, node->router_type->image->path, 
    283280                                ((node->router_type->image->flash_size + TFTP_PAYLOAD_SIZE - 1) / TFTP_PAYLOAD_SIZE)); 
    284 #endif 
    285281                        break; 
    286282                } 
  • ap51-flash-ng/router_types.c

    r258 r264  
    8484                /* we detected a router that we have no image for */ 
    8585                if ((*router_type)->image->file_size < 1) { 
    86 #if defined(DEBUG) 
    8786                        fprintf(stderr, "[%02x:%02x:%02x:%02x:%02x:%02x]: is of type '%s' that we have no image for\n", 
    8887                                node->his_mac_addr[0], node->his_mac_addr[1], node->his_mac_addr[2], 
    8988                                node->his_mac_addr[3], node->his_mac_addr[4], node->his_mac_addr[5], 
    9089                                (*router_type)->desc); 
    91 #endif 
     90 
    9291                        node->status = NODE_STATUS_NO_FLASH; 
    9392                        ret = 0; 
     
    9998                node->router_priv = priv; 
    10099 
    101 #if defined(DEBUG) 
    102100                fprintf(stderr, "[%02x:%02x:%02x:%02x:%02x:%02x]: type '%s' detected\n", 
    103101                        node->his_mac_addr[0], node->his_mac_addr[1], node->his_mac_addr[2], 
    104102                        node->his_mac_addr[3], node->his_mac_addr[4], node->his_mac_addr[5], 
    105103                        node->router_type->desc); 
    106 #endif 
    107104 
    108105                if (!(*router_type)->detect_post)