summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-08-24 10:25:34 +0200
committerKay Sievers <kay.sievers@suse.de>2006-08-24 10:25:34 +0200
commit5780be9eab8e72dcce9d8bcfe15e8e1d3ae6bed8 (patch)
treea3bce8a5e8cd68067611b54934c17fe73ad87494
parentcea61f5c0303d7e2f0886688e789c091d7e4b9e2 (diff)
rename major/minor variable to maj/min to avoid warning
-rw-r--r--udev_db.c6
-rw-r--r--udev_device.c6
-rw-r--r--udevd.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/udev_db.c b/udev_db.c
index 99d73bd5af..797d0eeffb 100644
--- a/udev_db.c
+++ b/udev_db.c
@@ -122,7 +122,7 @@ int udev_db_get_device(struct udevice *udev, const char *devpath)
struct stat stats;
char filename[PATH_SIZE];
char line[PATH_SIZE];
- unsigned int major, minor;
+ unsigned int maj, min;
char *bufline;
char *buf;
size_t bufsize;
@@ -176,8 +176,8 @@ int udev_db_get_device(struct udevice *udev, const char *devpath)
count = sizeof(line);
memcpy(line, &bufline[2], count-2);
line[count-2] = '\0';
- sscanf(line, "%u:%u", &major, &minor);
- udev->devt = makedev(major, minor);
+ sscanf(line, "%u:%u", &maj, &min);
+ udev->devt = makedev(maj, min);
break;
case 'S':
if (count > sizeof(line))
diff --git a/udev_device.c b/udev_device.c
index b680246bf8..21af91b443 100644
--- a/udev_device.c
+++ b/udev_device.c
@@ -70,13 +70,13 @@ void udev_device_cleanup(struct udevice *udev)
dev_t udev_device_get_devt(struct udevice *udev)
{
const char *attr;
- unsigned int major, minor;
+ unsigned int maj, min;
/* read it from sysfs */
attr = sysfs_attr_get_value(udev->dev->devpath, "dev");
if (attr != NULL) {
- if (sscanf(attr, "%u:%u", &major, &minor) == 2)
- return makedev(major, minor);
+ if (sscanf(attr, "%u:%u", &maj, &min) == 2)
+ return makedev(maj, min);
}
return makedev(0, 0);
}
diff --git a/udevd.c b/udevd.c
index de7cace3e1..7c917fd56e 100644
--- a/udevd.c
+++ b/udevd.c
@@ -567,8 +567,8 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz
int i;
struct udevd_uevent_msg *msg;
char *physdevdriver_key = NULL;
- int major = 0;
- int minor = 0;
+ int maj = 0;
+ int min = 0;
msg = malloc(sizeof(struct udevd_uevent_msg) + buf_size);
if (msg == NULL)
@@ -604,13 +604,13 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz
else if (strncmp(key, "PHYSDEVDRIVER=", 14) == 0)
physdevdriver_key = key;
else if (strncmp(key, "MAJOR=", 6) == 0)
- major = strtoull(&key[6], NULL, 10);
+ maj = strtoull(&key[6], NULL, 10);
else if (strncmp(key, "MINOR=", 6) == 0)
- minor = strtoull(&key[6], NULL, 10);
+ min = strtoull(&key[6], NULL, 10);
else if (strncmp(key, "TIMEOUT=", 8) == 0)
msg->timeout = strtoull(&key[8], NULL, 10);
}
- msg->devt = makedev(major, minor);
+ msg->devt = makedev(maj, min);
msg->envp[i++] = "UDEVD_EVENT=1";
if (msg->driver == NULL && msg->physdevpath == NULL && physdevdriver_key != NULL) {