diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-03-21 16:16:55 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-03-21 16:16:55 +0100 |
commit | 7808297b0fcb5a8033fd2d55854d065d8b1719e8 (patch) | |
tree | 29f09b45745df1775085206e9233c7b1525f4dbb /extras | |
parent | 10a9bff1c3038468a2aec0c2e9c701f0125c5685 (diff) |
volume_id: remove all partition table support
Diffstat (limited to 'extras')
-rw-r--r-- | extras/volume_id/README | 8 | ||||
-rw-r--r-- | extras/volume_id/libvolume_id/util.c | 8 | ||||
-rw-r--r-- | extras/volume_id/libvolume_id/util.h | 1 | ||||
-rw-r--r-- | extras/volume_id/libvolume_id/volume_id.c | 5 | ||||
-rw-r--r-- | extras/volume_id/libvolume_id/volume_id.h | 15 | ||||
-rw-r--r-- | extras/volume_id/vol_id.8 | 6 |
6 files changed, 9 insertions, 34 deletions
diff --git a/extras/volume_id/README b/extras/volume_id/README index 640a9e47ac..969f301a4c 100644 --- a/extras/volume_id/README +++ b/extras/volume_id/README @@ -1,15 +1,15 @@ -vol_id - partition, filesystem, disklabel reader +vol_id - volume, filesystem, disklabel reader This program is normally called from a udev rule, to provide udev with the -name, uuid or the filesystem type of a partition to name a device node. +name, uuid or the filesystem type of a volume to name a device node. vol_id opens the blockdevice node specified at the commandline. The following commandline switches are supported to specify what vol_id should print: --export prints all values -h prints help text - -l prints the label of the partition - -u prints the uuid of the partition + -l prints the label of the volume + -u prints the uuid of the volume vol_id will only return successful if the string asked for, is not empty. All trailing whitespace will be removed, spaces replaced by underscore diff --git a/extras/volume_id/libvolume_id/util.c b/extras/volume_id/libvolume_id/util.c index 361d7058d0..0ad8ce66b2 100644 --- a/extras/volume_id/libvolume_id/util.c +++ b/extras/volume_id/libvolume_id/util.c @@ -68,8 +68,6 @@ static char *usage_to_string(enum volume_id_usage usage_id) switch (usage_id) { case VOLUME_ID_FILESYSTEM: return "filesystem"; - case VOLUME_ID_PARTITIONTABLE: - return "partitiontable"; case VOLUME_ID_OTHER: return "other"; case VOLUME_ID_RAID: @@ -86,12 +84,6 @@ static char *usage_to_string(enum volume_id_usage usage_id) return NULL; } -void volume_id_set_usage_part(struct volume_id_partition *part, enum volume_id_usage usage_id) -{ - part->usage_id = usage_id; - part->usage = usage_to_string(usage_id); -} - void volume_id_set_usage(struct volume_id *id, enum volume_id_usage usage_id) { id->usage_id = usage_id; diff --git a/extras/volume_id/libvolume_id/util.h b/extras/volume_id/libvolume_id/util.h index f6c57fb66d..8cb1abd360 100644 --- a/extras/volume_id/libvolume_id/util.h +++ b/extras/volume_id/libvolume_id/util.h @@ -64,7 +64,6 @@ enum endian { extern void volume_id_set_unicode16(char *str, size_t len, const uint8_t *buf, enum endian endianess, size_t count); extern void volume_id_set_usage(struct volume_id *id, enum volume_id_usage usage_id); -extern void volume_id_set_usage_part(struct volume_id_partition *part, enum volume_id_usage usage_id); extern void volume_id_set_label_raw(struct volume_id *id, const uint8_t *buf, size_t count); extern void volume_id_set_label_string(struct volume_id *id, const uint8_t *buf, size_t count); extern void volume_id_set_label_unicode16(struct volume_id *id, const uint8_t *buf, enum endian endianess, size_t count); diff --git a/extras/volume_id/libvolume_id/volume_id.c b/extras/volume_id/libvolume_id/volume_id.c index fdecf396c4..718d74e5b6 100644 --- a/extras/volume_id/libvolume_id/volume_id.c +++ b/extras/volume_id/libvolume_id/volume_id.c @@ -1,5 +1,5 @@ /* - * volume_id - reads filesystem label and uuid + * volume_id - reads volume label and uuid * * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org> * @@ -221,8 +221,5 @@ void volume_id_close(struct volume_id *id) volume_id_free_buffer(id); - if (id->partitions != NULL) - free(id->partitions); - free(id); } diff --git a/extras/volume_id/libvolume_id/volume_id.h b/extras/volume_id/libvolume_id/volume_id.h index d370bae6c8..8ddffc96de 100644 --- a/extras/volume_id/libvolume_id/volume_id.h +++ b/extras/volume_id/libvolume_id/volume_id.h @@ -1,5 +1,5 @@ /* - * volume_id - reads partition label and uuid + * volume_id - reads volume label and uuid * * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org> * @@ -31,21 +31,11 @@ enum volume_id_usage { VOLUME_ID_UNPROBED, VOLUME_ID_OTHER, VOLUME_ID_FILESYSTEM, - VOLUME_ID_PARTITIONTABLE, VOLUME_ID_RAID, VOLUME_ID_DISKLABEL, VOLUME_ID_CRYPTO, }; -struct volume_id_partition { - enum volume_id_usage usage_id; - char *usage; - char *type; - uint64_t off; - uint64_t len; - uint8_t partition_type_raw; -}; - struct volume_id { uint8_t label_raw[VOLUME_ID_LABEL_SIZE]; size_t label_raw_len; @@ -58,9 +48,6 @@ struct volume_id { char *type; char type_version[VOLUME_ID_FORMAT_SIZE]; - struct volume_id_partition *partitions; - size_t partition_count; - int fd; uint8_t *sbbuf; size_t sbbuf_len; diff --git a/extras/volume_id/vol_id.8 b/extras/volume_id/vol_id.8 index 6ffe7ce220..092911ad4c 100644 --- a/extras/volume_id/vol_id.8 +++ b/extras/volume_id/vol_id.8 @@ -21,13 +21,13 @@ should print: print all values in key/value format to import them into the environment. .TP .BI -l -print the label of the partition +print the label of the volume .TP .BI -t -print the type of the partition +print the type of the volume .TP .BI -u -print the uuid of the partition +print the uuid of the volume .RE .SH EXIT STATUS .B vol_id |