X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudev_rules.h;h=ac7388e8a18891be1f4fe84396803234ad80d93c;hb=b2946df41965632c80012921a2cacbf83bc3dd80;hp=4f95121f307fe393608c4bfeaca7e5541393e7c4;hpb=7d563a17f3967890331daf08d43f2f005418139b;p=elogind.git diff --git a/udev/udev_rules.h b/udev/udev_rules.h index 4f95121f3..ac7388e8a 100644 --- a/udev/udev_rules.h +++ b/udev/udev_rules.h @@ -1,20 +1,19 @@ /* * Copyright (C) 2003-2004 Greg Kroah-Hartman - * Copyright (C) 2004-2006 Kay Sievers + * Copyright (C) 2004-2008 Kay Sievers * - * This program is free software; you can redistribute it and/or modify it - * 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., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * This program is free software: you can redistribute it and/or modify + * 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 . */ #ifndef UDEV_RULES_H @@ -111,16 +110,20 @@ struct udev_rules { struct udev *udev; char *buf; size_t bufsize; - size_t current; int resolve_names; }; +struct udev_rules_iter { + struct udev_rules *rules; + size_t current; +}; + extern int udev_rules_init(struct udev *udev, struct udev_rules *rules, int resolve_names); extern void udev_rules_cleanup(struct udev_rules *rules); -extern void udev_rules_iter_init(struct udev_rules *rules); -extern struct udev_rule *udev_rules_iter_next(struct udev_rules *rules); -extern struct udev_rule *udev_rules_iter_label(struct udev_rules *rules, const char *label); +extern void udev_rules_iter_init(struct udev_rules_iter *iter, struct udev_rules *rules); +extern struct udev_rule *udev_rules_iter_next(struct udev_rules_iter *iter); +extern struct udev_rule *udev_rules_iter_label(struct udev_rules_iter *iter, const char *label); extern int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev); extern int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev);