:: Re: [DNG] Systemd Shims
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Rainer Weikusat
日付:  
To: dng
題目: 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.