View | Details | Raw Unified | Return to bug 261572 | Differences between
and this patch

Collapse All | Expand All

(-)b/sbin/ifconfig/af_link.c (-5 / +22 lines)
Lines 61-71 print_ether(const struct ether_addr *addr, const char *prefix) Link Here
61
{
61
{
62
	char *ether_format = ether_ntoa(addr);
62
	char *ether_format = ether_ntoa(addr);
63
63
64
	if (f_ether != NULL && strcmp(f_ether, "dash") == 0) {
64
	if (f_ether != NULL) {
65
		char *format_char;
65
		if (strcmp(f_ether, "dash") == 0) {
66
66
			char *format_char;
67
		while ((format_char = strchr(ether_format, ':')) != NULL) {
67
68
			*format_char = '-';
68
			while ((format_char = strchr(ether_format, ':')) != NULL) {
69
				*format_char = '-';
70
			}
71
		} else if (strcmp(f_ether, "dotted") == 0) {
72
			/* Indices 0 and 1 is kept as is. */
73
			ether_format[ 2] = ether_format[ 3];
74
			ether_format[ 3] = ether_format[ 4];
75
			ether_format[ 4] = '.';
76
			ether_format[ 5] = ether_format[ 6];
77
			ether_format[ 6] = ether_format[ 7];
78
			ether_format[ 7] = ether_format[ 9];
79
			ether_format[ 8] = ether_format[10];
80
			ether_format[ 9] = '.';
81
			ether_format[10] = ether_format[12];
82
			ether_format[11] = ether_format[13];
83
			ether_format[12] = ether_format[15];
84
			ether_format[13] = ether_format[16];
85
			ether_format[14] = '\0';
69
		}
86
		}
70
	}
87
	}
71
	printf("\t%s %s\n", prefix, ether_format);
88
	printf("\t%s %s\n", prefix, ether_format);
(-)b/sbin/ifconfig/ifconfig.8 (+2 lines)
Lines 153-158 Separate address segments with a dash Link Here
153
.It Cm default
153
.It Cm default
154
Default format,
154
Default format,
155
.Cm colon
155
.Cm colon
156
.It Cm dotted
157
Separate address segments with a dot
156
.El
158
.El
157
.It Cm inet
159
.It Cm inet
158
Adjust the display of inet address subnet masks:
160
Adjust the display of inet address subnet masks:

Return to bug 261572