libudev-list.c revision e345e2670a8c17f5e1145cc554b7a7646e271032
/*
* 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 <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include "libudev.h"
#include "libudev-private.h"
struct udev_list {
char *name;
char *value;
};
{
char *list;
}
{
}
{
}
#if 0
{
}
#endif
{
}
{
}
{
/* avoid duplicate entries */
return list_loop;
}
}
if (sort) {
break;
}
}
return NULL;
return NULL;
}
return NULL;
}
}
return list_new;
}
{
}
{
}
}
{
if (list_empty(list))
return NULL;
}
{
/* empty list or no more emtries */
return NULL;
return node_to_entry(next);
}
{
if (list_entry == NULL)
return NULL;
return list_entry->name;
}
{
if (list_entry == NULL)
return NULL;
return list_entry->value;
}