:: Re: [DNG] Systemd Shims
Etusivu
Poista viesti
Vastaa
Lähettäjä: Rainer Weikusat
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] Systemd Shims
Edward Bartolo <edbarx@???> writes:

[...]


>         strcpy(text, "auto lo\n");
>         fprintf(fp, text);


None of these 2 line pairs is really needed: You can always just use the
literal string directly, eg,

fputs("auto lo\n", fp);


[...]


>         char command[1024];
>         strcpy(command, "/sbin/iwlist wlan0 scanning | /bin/grep ESSID");
>         int q = exec(command, s);


or

exec("/sbin/iwlist wlan0 scanning | /bin/grep ESSID", s)

here.