From a25d547dd4a67783b939da6f2d592af01336aa6d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 5 Jun 2009 23:27:11 +0200 Subject: [PATCH] udevd: use enum instead of char in struct declaration --- udev/lib/libudev.h | 4 ++-- udev/udev-rules.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/udev/lib/libudev.h b/udev/lib/libudev.h index 9b51ea33..207dd821 100644 --- a/udev/lib/libudev.h +++ b/udev/lib/libudev.h @@ -1,7 +1,7 @@ /* * libudev - interface to udev device information * - * Copyright (C) 2008 Kay Sievers + * Copyright (C) 2008-2009 Kay Sievers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -76,8 +76,8 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const /* udev and kernel device events */ struct udev_monitor; -struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path); struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char *name); +struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char *socket_path); int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor); struct udev_monitor *udev_monitor_ref(struct udev_monitor *udev_monitor); void udev_monitor_unref(struct udev_monitor *udev_monitor); diff --git a/udev/udev-rules.c b/udev/udev-rules.c index e6452a6f..4e760a51 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008 Kay Sievers + * Copyright (C) 2008-2009 Kay Sievers * Copyright (C) 2008 Alan Jenkins * * This program is free software: you can redistribute it and/or modify @@ -166,7 +166,7 @@ struct token { union { unsigned char type; /* same as in rule and key */ struct { - unsigned char type; + enum token_type type:8; unsigned char flags; unsigned short token_count; unsigned int label_off; @@ -174,10 +174,10 @@ struct token { unsigned short filename_line; } rule; struct { - unsigned char type; + enum token_type type:8; + enum operation_type op:8; + enum string_glob_type glob:8; unsigned char flags; - unsigned char op; - unsigned char glob; unsigned int value_off; union { unsigned int attr_off; -- 2.39.5