Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (5 years ago)
Author:
bruno
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/networking/hostname.c

    r2725 r3232  
    1010 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    1111 */
     12
     13//usage:#define hostname_trivial_usage
     14//usage:       "[OPTIONS] [HOSTNAME | -F FILE]"
     15//usage:#define hostname_full_usage "\n\n"
     16//usage:       "Get or set hostname or DNS domain name\n"
     17//usage:     "\n    -s  Short"
     18//usage:     "\n    -i  Addresses for the hostname"
     19//usage:     "\n    -d  DNS domain name"
     20//usage:     "\n    -f  Fully qualified domain name"
     21//usage:     "\n    -F FILE Use FILE's content as hostname"
     22//usage:
     23//usage:#define hostname_example_usage
     24//usage:       "$ hostname\n"
     25//usage:       "sage\n"
     26//usage:
     27//usage:#define dnsdomainname_trivial_usage NOUSAGE_STR
     28//usage:#define dnsdomainname_full_usage ""
     29
    1230#include "libbb.h"
    1331
     
    136154                struct in_addr **h_addr_list = (struct in_addr **)hp->h_addr_list;
    137155                while (*h_addr_list) {
    138                     printf("%s ", inet_ntoa(**h_addr_list));
     156                    printf(h_addr_list[1] ? "%s " : "%s", inet_ntoa(**h_addr_list));
    139157                    h_addr_list++;
    140158                }
Note: See TracChangeset for help on using the changeset viewer.