udev_utils.c revision 17fcfb5972977b6a3aedca6ad2aa8d1fbfbc761d
/*
* 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 <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
#include <dirent.h>
#include <syslog.h>
#include <pwd.h>
#include <grp.h>
#include "udev.h"
struct name_entry *name_list_add(struct udev *udev, struct list_head *name_list, const char *name, int sort)
{
struct name_entry *name_loop;
struct name_entry *name_new;
/* avoid duplicate entries */
return name_loop;
}
}
if (sort)
break;
}
return NULL;
return name_new;
}
struct name_entry *name_list_key_add(struct udev *udev, struct list_head *name_list, const char *key, const char *value)
{
struct name_entry *name_loop;
struct name_entry *name_new;
continue;
continue;
return name_loop;
}
return NULL;
return name_new;
}
{
struct name_entry *name_loop;
struct name_entry *name_tmp;
int retval = 0;
continue;
continue;
retval = 1;
break;
}
return retval;
}
{
struct name_entry *name_loop;
struct name_entry *name_tmp;
}
}
/* calls function for every file found in specified directory */
int add_matching_files(struct udev *udev, struct list_head *name_list, const char *dirname, const char *suffix)
{
char filename[UTIL_PATH_SIZE];
return -1;
}
while (1) {
break;
continue;
/* look for file matching with specified suffix */
const char *ext;
continue;
continue;
}
}
return 0;
}
{
errno = 0;
else
} else
return uid;
}
{
errno = 0;
else
} else
return gid;
}