equal
deleted
inserted
replaced
195 return 0; |
195 return 0; |
196 } |
196 } |
197 } |
197 } |
198 |
198 |
199 /*****************************************************************************/ |
199 /*****************************************************************************/ |
|
200 |
|
201 ssize_t ec_device_id_print(const ec_device_id_t *dev_id, char *buffer) |
|
202 { |
|
203 off_t off = 0; |
|
204 unsigned int i; |
|
205 |
|
206 switch (dev_id->type) { |
|
207 case ec_device_id_empty: |
|
208 off += sprintf(buffer + off, "none"); |
|
209 break; |
|
210 case ec_device_id_mac: |
|
211 off += sprintf(buffer + off, "MAC "); |
|
212 for (i = 0; i < ETH_ALEN; i++) { |
|
213 off += sprintf(buffer + off, "%02X", dev_id->octets[i]); |
|
214 if (i < ETH_ALEN - 1) off += sprintf(buffer + off, ":"); |
|
215 } |
|
216 break; |
|
217 } |
|
218 |
|
219 return off; |
|
220 } |
|
221 |
|
222 /*****************************************************************************/ |