aboutsummaryrefslogtreecommitdiff
path: root/networking/nameif.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/nameif.c')
-rw-r--r--networking/nameif.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/networking/nameif.c b/networking/nameif.c
index f3b927158..e74a04213 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -63,11 +63,11 @@ static void serror(const char *s, ...)
63 va_start(ap, s); 63 va_start(ap, s);
64 64
65 if (use_syslog) { 65 if (use_syslog) {
66 openlog(applet_name, 0, LOG_LOCAL0); 66 openlog(bb_applet_name, 0, LOG_LOCAL0);
67 vsyslog(LOG_ERR, s, ap); 67 vsyslog(LOG_ERR, s, ap);
68 closelog(); 68 closelog();
69 } else { 69 } else {
70 verror_msg(s, ap); 70 bb_verror_msg(s, ap);
71 putc('\n', stderr); 71 putc('\n', stderr);
72 } 72 }
73 73
@@ -111,12 +111,12 @@ int nameif_main(int argc, char **argv)
111 use_syslog = 1; 111 use_syslog = 1;
112 break; 112 break;
113 default: 113 default:
114 show_usage(); 114 bb_show_usage();
115 } 115 }
116 } 116 }
117 117
118 if ((argc - optind) & 1) 118 if ((argc - optind) & 1)
119 show_usage(); 119 bb_show_usage();
120 120
121 if (optind < argc) { 121 if (optind < argc) {
122 char **a = argv + optind; 122 char **a = argv + optind;
@@ -126,7 +126,7 @@ int nameif_main(int argc, char **argv)
126 if (strlen(*a) > IF_NAMESIZE) 126 if (strlen(*a) > IF_NAMESIZE)
127 serror("interface name `%s' too long", *a); 127 serror("interface name `%s' too long", *a);
128 ch = xcalloc(1, sizeof(mactable_t)); 128 ch = xcalloc(1, sizeof(mactable_t));
129 ch->ifname = xstrdup(*a++); 129 ch->ifname = bb_xstrdup(*a++);
130 ch->mac = cc_macaddr(*a++); 130 ch->mac = cc_macaddr(*a++);
131 if (clist) 131 if (clist)
132 clist->prev = ch; 132 clist->prev = ch;
@@ -134,9 +134,9 @@ int nameif_main(int argc, char **argv)
134 clist = ch; 134 clist = ch;
135 } 135 }
136 } else { 136 } else {
137 ifh = xfopen(fname, "r"); 137 ifh = bb_xfopen(fname, "r");
138 138
139 while ((line = get_line_from_file(ifh)) != NULL) { 139 while ((line = bb_get_line_from_file(ifh)) != NULL) {
140 char *line_ptr; 140 char *line_ptr;
141 size_t name_length; 141 size_t name_length;
142 142
@@ -145,7 +145,7 @@ int nameif_main(int argc, char **argv)
145 continue; 145 continue;
146 name_length = strcspn(line_ptr, " \t"); 146 name_length = strcspn(line_ptr, " \t");
147 ch = xcalloc(1, sizeof(mactable_t)); 147 ch = xcalloc(1, sizeof(mactable_t));
148 ch->ifname = xstrndup(line_ptr, name_length); 148 ch->ifname = bb_xstrndup(line_ptr, name_length);
149 if (name_length > IF_NAMESIZE) 149 if (name_length > IF_NAMESIZE)
150 serror("interface name `%s' too long", ch->ifname); 150 serror("interface name `%s' too long", ch->ifname);
151 line_ptr += name_length; 151 line_ptr += name_length;