libudev-enumerate.c revision 8753fadf2a6ecead372e71b8bf9336cf29f9c958
/*
* libudev - interface to udev device information
*
* Copyright (C) 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 "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <dirent.h>
#include "libudev.h"
#include "libudev-private.h"
struct list_head *device_list)
{
char path[UTIL_PATH_SIZE];
return -1;
char syspath[UTIL_PATH_SIZE];
continue;
}
return 0;
}
struct list_head *device_list)
{
char path[UTIL_PATH_SIZE];
return -1;
continue;
}
return 0;
}
{
static const char *delay_device_list[] = {
};
int i;
for (i = 0; delay_device_list[i] != NULL; i++) {
return 1;
}
}
return 0;
}
void *data),
void *data,
int *cb_rc)
{
char subsystem[UTIL_PATH_SIZE];
const char *name;
return -1;
name++;
return -1;
return 0;
}
/**
* udev_enumerate_devices:
* @udev_device: udev device
* @cb: function to be called for every property found
* @data: data to be passed to the function
*
* called. If the function returns 1, remaning properties will be
* ignored.
*
* Returns: the number of properties passed to the caller, or a negative value on error
**/
void *data)
{
char base[UTIL_PATH_SIZE];
struct list_head device_list;
struct util_name_entry *loop_device;
struct util_name_entry *tmp_device;
int cb_rc = 0;
int count = 0;
} else {
}
continue;
if (cb_rc == 0)
count++;
}
/* handle remaining delayed devices */
if (cb_rc == 0)
count++;
}
return count;
}