From 50e5de03d16be3e35e65cdf65f552807ad24e996 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Mon, 16 Feb 2004 21:44:28 -0800 Subject: [PATCH] udev - create all partitions of blockdevice Here is the first try to create all partitons of a blockdevice, since removable media devices may need to acces the expected partition to revalidate the media. It uses the attribute syntax introduced with the last %s{file} patch. I'm using this with my multi-slot-flash-card-reader: SYSFS{model}="USB Storage-SMC ", NAME{all_partitions}="smartmedia" SYSFS{model}="USB Storage-CFC ", NAME{all_partitions}="compactflash" SYSFS{model}="USB Storage-MSC ", NAME{all_partitions}="memorystick" SYSFS{model}="USB Storage-MMC ", NAME{all_partitions}="multimedia" and I get: tree /udev/ /udev/ |-- memorystick |-- memorystick1 |-- memorystick10 |-- memorystick11 |-- memorystick12 |-- memorystick13 |-- memorystick14 |-- memorystick15 |-- memorystick2 |-- memorystick3 |-- memorystick4 |-- memorystick5 |-- memorystick6 |-- memorystick7 |-- memorystick8 |-- memorystick9 |-- multimedia |-- multimedia1 |-- multimedia10 |-- multimedia11 |-- multimedia12 |-- multimedia13 |-- multimedia14 |-- multimedia15 |-- multimedia2 |-- multimedia3 |-- multimedia4 |-- multimedia5 |-- multimedia6 |-- multimedia7 |-- multimedia8 |-- multimedia9 ... If needed, we can make the number of partions to create adjustable with the attribute? --- udev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'udev.h') diff --git a/udev.h b/udev.h index e615b4c8bb..e8f93ad5ad 100644 --- a/udev.h +++ b/udev.h @@ -46,6 +46,7 @@ struct udevice { int minor; unsigned int mode; /* not mode_t due to conflicting definitions in different libcs */ char symlink[NAME_SIZE]; + int partitions; /* private data that help us in building strings */ char bus_id[SYSFS_NAME_LEN]; -- cgit v1.2.3-54-g00ecf