summaryrefslogtreecommitdiff
path: root/libudev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-03-10 14:52:42 +0100
committerKay Sievers <kay.sievers@vrfy.org>2010-03-10 14:52:42 +0100
commitfbb31cd6e10fe66d2da781db0ba9a8d671a4c6aa (patch)
tree0f8ad4f66d9a0e6b89fab66125b620bb7223100e /libudev
parent455f792e4791e037eb0406005b92c345cf0baf56 (diff)
libbudev-private: rename udev_list_entry_get_flag()
Diffstat (limited to 'libudev')
-rw-r--r--libudev/libudev-device-private.c4
-rw-r--r--libudev/libudev-device.c4
-rw-r--r--libudev/libudev-list.c10
-rw-r--r--libudev/libudev-private.h9
4 files changed, 15 insertions, 12 deletions
diff --git a/libudev/libudev-device-private.c b/libudev/libudev-device-private.c
index 07249c3885..1bcf441237 100644
--- a/libudev/libudev-device-private.c
+++ b/libudev/libudev-device-private.c
@@ -39,7 +39,7 @@ int udev_device_update_db(struct udev_device *udev_device)
util_strscpyl(filename_tmp, sizeof(filename_tmp), filename, ".tmp", NULL);
udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device))
- if (udev_list_entry_get_flag(list_entry))
+ if (udev_list_entry_get_flags(list_entry))
goto file;
if (udev_device_get_num_fake_partitions(udev_device) != 0)
goto file;
@@ -102,7 +102,7 @@ file:
if (udev_device_get_watch_handle(udev_device) >= 0)
fprintf(f, "W:%i\n", udev_device_get_watch_handle(udev_device));
udev_list_entry_foreach(list_entry, udev_device_get_properties_list_entry(udev_device)) {
- if (!udev_list_entry_get_flag(list_entry))
+ if (!udev_list_entry_get_flags(list_entry))
continue;
fprintf(f, "E:%s=%s\n",
udev_list_entry_get_name(list_entry),
diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c
index b841745991..aec5fb57fe 100644
--- a/libudev/libudev-device.c
+++ b/libudev/libudev-device.c
@@ -1,7 +1,7 @@
/*
* libudev - interface to udev device information
*
- * Copyright (C) 2008-2009 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2008-2010 Kay Sievers <kay.sievers@vrfy.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1068,7 +1068,7 @@ int udev_device_add_devlink(struct udev_device *udev_device, const char *devlink
if (list_entry == NULL)
return -ENOMEM;
if (unique)
- udev_list_entry_set_flag(list_entry, 1);
+ udev_list_entry_set_flags(list_entry, 1);
return 0;
}
diff --git a/libudev/libudev-list.c b/libudev/libudev-list.c
index f6637fc92d..b5e96458cc 100644
--- a/libudev/libudev-list.c
+++ b/libudev/libudev-list.c
@@ -38,7 +38,7 @@ struct udev_list_entry {
struct udev_list_node *list;
char *name;
char *value;
- int flag;
+ unsigned int flags;
};
/* list head point to itself if empty */
@@ -258,16 +258,16 @@ const char *udev_list_entry_get_value(struct udev_list_entry *list_entry)
return list_entry->value;
}
-int udev_list_entry_get_flag(struct udev_list_entry *list_entry)
+unsigned int udev_list_entry_get_flags(struct udev_list_entry *list_entry)
{
if (list_entry == NULL)
return -EINVAL;
- return list_entry->flag;
+ return list_entry->flags;
}
-void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag)
+void udev_list_entry_set_flags(struct udev_list_entry *list_entry, unsigned int flags)
{
if (list_entry == NULL)
return;
- list_entry->flag = flag;
+ list_entry->flags = flags;
}
diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h
index e0c51dca05..5ee0c58be8 100644
--- a/libudev/libudev-private.h
+++ b/libudev/libudev-private.h
@@ -1,7 +1,7 @@
/*
* libudev - interface to udev device information
*
- * Copyright (C) 2008-2009 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2008-2010 Kay Sievers <kay.sievers@vrfy.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -82,6 +82,9 @@ const char *udev_device_get_devpath_old(struct udev_device *udev_device);
const char *udev_device_get_sysname_old(struct udev_device *udev_device);
int udev_device_set_devpath_old(struct udev_device *udev_device, const char *devpath_old);
const char *udev_device_get_knodename(struct udev_device *udev_device);
+int udev_device_add_tag(struct udev_device *udev_device, const char *tag);
+struct udev_list_entry *udev_device_get_tag_list_entry(struct udev_device *udev_device);
+int udev_device_has_tag(struct udev_device *udev_device, const char *tag);
int udev_device_set_knodename(struct udev_device *udev_device, const char *knodename);
int udev_device_get_timeout(struct udev_device *udev_device);
int udev_device_set_timeout(struct udev_device *udev_device, int timeout);
@@ -163,8 +166,8 @@ void udev_list_entry_insert_before(struct udev_list_entry *new, struct udev_list
void udev_list_entry_append(struct udev_list_entry *new, struct udev_list_node *list);
void udev_list_cleanup_entries(struct udev *udev, struct udev_list_node *name_list);
struct udev_list_entry *udev_list_get_entry(struct udev_list_node *list);
-int udev_list_entry_get_flag(struct udev_list_entry *list_entry);
-void udev_list_entry_set_flag(struct udev_list_entry *list_entry, int flag);
+unsigned int udev_list_entry_get_flags(struct udev_list_entry *list_entry);
+void udev_list_entry_set_flags(struct udev_list_entry *list_entry, unsigned int flags);
#define udev_list_entry_foreach_safe(entry, tmp, first) \
for (entry = first, tmp = udev_list_entry_get_next(entry); \
entry != NULL; \