00001 00002 /* 00003 * Copyright 2008 Red Hat Inc., Durham, North Carolina. 00004 * All Rights Reserved. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 * Authors: 00021 * "Daniel Kopecek" <dkopecek@redhat.com> 00022 */ 00023 00024 #pragma once 00025 #ifndef FSDEV_H 00026 #define FSDEV_H 00027 00028 #include <stddef.h> 00029 #include <stdint.h> 00030 #include <sys/stat.h> 00031 00032 typedef struct { 00033 dev_t *ids; 00034 uint16_t cnt; 00035 } fsdev_t; 00036 00037 fsdev_t *fsdev_init(const char **fs, size_t fs_cnt); 00038 fsdev_t *fsdev_strinit(const char *fs_names); 00039 void fsdev_free(fsdev_t * lfs); 00040 00041 int fsdev_search(fsdev_t * lfs, void *id); 00042 int fsdev_path(fsdev_t * lfs, const char *path); 00043 int fsdev_fd(fsdev_t * lfs, int fd); 00044 00045 #endif /* FSDEV_H */