Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

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

    r3232 r3621  
    107107        OPT_s = 0x8,
    108108        OPT_F = 0x10,
    109         OPT_dfis = 0xf,
     109        OPT_dfi = 0x7,
    110110    };
    111111
     
    135135        opts = OPT_d;
    136136
    137     if (opts & OPT_dfis) {
     137    if (opts & OPT_dfi) {
    138138        /* Cases when we need full hostname (or its part) */
    139139        struct hostent *hp;
     
    160160            }
    161161        }
     162    } else if (opts & OPT_s) {
     163        strchrnul(buf, '.')[0] = '\0';
     164        puts(buf);
    162165    } else if (opts & OPT_F) {
    163166        /* Set the hostname */
Note: See TracChangeset for help on using the changeset viewer.