modules-load.c revision 4cfa2c999dea269ddc646bfeba6c7f1021a73843
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte This file is part of systemd.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Copyright 2010 Lennart Poettering
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte systemd is free software; you can redistribute it and/or modify it
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte under the terms of the GNU General Public License as published by
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte the Free Software Foundation; either version 2 of the License, or
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (at your option) any later version.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte systemd is distributed in the hope that it will be useful, but
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte WITHOUT ANY WARRANTY; without even the implied warranty of
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte General Public License for more details.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte You should have received a copy of the GNU General Public License
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte along with systemd; If not, see <http://www.gnu.org/licenses/>.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(arguments = strv_new("/sbin/modprobe", "-sab", "--", NULL))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log_error("Failed to enumerate modules-load.d files: %s", strerror(-r));
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (*l == '#' || *l == 0)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(t = strdup(l))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte if (!(a = realloc(arguments, sizeof(char*) * (m+1)))) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log_error("Failed to increase module array size.");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte log_error("Failed to execute /sbin/modprobe: %m");