test-udev.c revision 04eaa66837260d86c27c9121b626ad6219690384
/*
* Copyright (C) 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
* Copyright (C) 2004-2008 Kay Sievers <kay.sievers@vrfy.org>
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <syslog.h>
#include <grp.h>
#include <sched.h>
#include <sys/signalfd.h>
#include "udev.h"
static int fake_filesystems(void) {
static const struct fakefs {
const char *src;
const char *target;
const char *error;
} fakefss[] = {
};
unsigned int i;
int err;
if (err < 0) {
goto out;
}
goto out;
}
for (i = 0; i < ELEMENTSOF(fakefss); i++) {
if (err < 0) {
return err;
}
}
out:
return err;
}
{
char syspath[UTIL_PATH_SIZE];
const char *devpath;
const char *action;
int err;
err = fake_filesystems();
if (err < 0)
return EXIT_FAILURE;
label_init("/dev");
log_error("action missing\n");
goto out;
}
log_error("devpath missing\n");
goto out;
}
goto out;
}
sigfillset(&mask);
goto out;
}
/* do what devtmpfs usually provides us */
else
} else {
}
}
if (err == 0)
out:
label_finish();
if (err != 0)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}