test-udev.c revision 1298001ec5e320f9f9b6a9b925c8939b2579396d
/***
This file is part of systemd.
Copyright 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
Copyright 2004-2012 Kay Sievers <kay@vrfy.org>
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; 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;
}