summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-02-16 21:58:25 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:28 -0700
commitab2e5bd94631eb3fcc66ec0aaa031d83a2de1604 (patch)
treef860decb0cc2cda9b2da9abdfcc30c2eba6c0ba7
parent50e5de03d16be3e35e65cdf65f552807ad24e996 (diff)
[PATCH] fix up bug created for udevtest in previous partition creation patch.
-rw-r--r--udev-add.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/udev-add.c b/udev-add.c
index 3b3ebd5bbb..a3bc0df579 100644
--- a/udev-add.c
+++ b/udev-add.c
@@ -196,17 +196,24 @@ static int create_node(struct udevice *dev, int fake)
}
}
- if (!fake)
+ if (!fake) {
info("creating device node '%s'", filename);
make_node(filename, dev->major, dev->minor, dev->mode, uid, gid);
+ } else {
+ info("creating device node '%s', major = '%d', minor = '%d', "
+ "mode = '%#o', uid = '%d', gid = '%d'", filename,
+ dev->major, dev->minor, (mode_t)dev->mode, uid, gid);
+ }
/* create partitions if requested */
if (dev->partitions > 0) {
info("creating device partition nodes '%s[1-%i]'", filename, dev->partitions);
- for (i = 1; i <= dev->partitions; i++) {
- sprintf(partitionname, "%s%i", filename, i);
- make_node(partitionname, dev->major, dev->minor + i,
- dev->mode, uid, gid);
+ if (!fake) {
+ for (i = 1; i <= dev->partitions; i++) {
+ sprintf(partitionname, "%s%i", filename, i);
+ make_node(partitionname, dev->major,
+ dev->minor + i, dev->mode, uid, gid);
+ }
}
}