Skip to content

Commit

Permalink
Do not bail out if mac address writing fails
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Mar 31, 2013
1 parent cb6ee65 commit f8a8de4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/usb_moded-mac.c
Expand Up @@ -46,6 +46,11 @@ void generate_random_mac (void)
random_ether_addr(addr);

g_ether = fopen("/etc/modprobe.d/g_ether.conf", "w");
if(!g_ether)
{
log_warning("Failed to write mac address to /etc/modprobe.d/g_ether.conf\n");
return;
}
fprintf(g_ether, "options g_ether host_addr=");

for(i=0; i<5; i++)
Expand Down

0 comments on commit f8a8de4

Please sign in to comment.