udev_device.c revision 1aa1e24848903d11780db1ade355be73ad61a937
/*
* udev_utils.c - generic stuff used by udev
*
* Copyright (C) 2004, 2005 Kay Sievers <kay.sievers@vrfy.org>
*
* under the terms of the GNU General Public License as published by the
* Free Software Foundation version 2 of the License.
*
* 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, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
#include "udev.h"
#include "udev_rules.h"
struct udevice *udev_device_init(void)
{
return NULL;
/* set sysfs device to local storage, can be overridden if needed */
/* default node permissions */
return udev;
}
{
}
{
const char *attr;
/* read it from sysfs */
}
return makedev(0, 0);
}
{
int retval = 0;
/* device node or netif */
if (udev->ignore_device) {
info("device event will be ignored");
return 0;
}
/* create node, store in db */
else
info("device node creation supressed");
return 0;
}
struct name_entry *name_loop;
if (udev->ignore_device) {
info("device event will be ignored");
return 0;
}
/* get data from db, remove db-entry, delete node */
/* restore stored persistent data */
return 0;
}
/* default devices */
if (udev->ignore_device)
info("device event will be ignored");
return retval;
}