chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
volume_id: LVM - add uuid
[elogind.git]
/
extras
/
volume_id
/
lib
/
iso9660.c
diff --git
a/extras/volume_id/lib/iso9660.c
b/extras/volume_id/lib/iso9660.c
index be64a8b8af4e75d6d20f412cfee6b53228092504..1d8bdff878b59b1972269c2845740b236a66f4e3 100644
(file)
--- a/
extras/volume_id/lib/iso9660.c
+++ b/
extras/volume_id/lib/iso9660.c
@@
-35,9
+35,9
@@
#define ISO_VD_MAX 16
struct iso_volume_descriptor {
#define ISO_VD_MAX 16
struct iso_volume_descriptor {
- uint8_t
vd_
type;
- uint8_t
vd_
id[5];
- uint8_t v
d_v
ersion;
+ uint8_t type;
+ uint8_t id[5];
+ uint8_t version;
uint8_t flags;
uint8_t system_id[32];
uint8_t volume_id[32];
uint8_t flags;
uint8_t system_id[32];
uint8_t volume_id[32];
@@
-49,11
+49,11
@@
struct iso_volume_descriptor {
struct high_sierra_volume_descriptor {
uint8_t foo[8];
uint8_t type;
struct high_sierra_volume_descriptor {
uint8_t foo[8];
uint8_t type;
- uint8_t id[
4
];
+ uint8_t id[
5
];
uint8_t version;
} PACKED;
uint8_t version;
} PACKED;
-int volume_id_probe_iso9660(struct volume_id *id, uint64_t off)
+int volume_id_probe_iso9660(struct volume_id *id, uint64_t off
, uint64_t size
)
{
uint8_t *buf;
struct iso_volume_descriptor *is;
{
uint8_t *buf;
struct iso_volume_descriptor *is;
@@
-67,7
+67,7
@@
int volume_id_probe_iso9660(struct volume_id *id, uint64_t off)
is = (struct iso_volume_descriptor *) buf;
is = (struct iso_volume_descriptor *) buf;
- if (memcmp(is->
vd_
id, "CD001", 5) == 0) {
+ if (memcmp(is->id, "CD001", 5) == 0) {
int vd_offset;
int i;
int vd_offset;
int i;
@@
-81,9
+81,9
@@
int volume_id_probe_iso9660(struct volume_id *id, uint64_t off)
uint8_t svd_label[64];
is = (struct iso_volume_descriptor *) volume_id_get_buffer(id, off + vd_offset, 0x200);
uint8_t svd_label[64];
is = (struct iso_volume_descriptor *) volume_id_get_buffer(id, off + vd_offset, 0x200);
- if (is == NULL || is->
vd_
type == ISO_VD_END)
+ if (is == NULL || is->type == ISO_VD_END)
break;
break;
- if (is->
vd_
type != ISO_VD_SUPPLEMENTARY)
+ if (is->type != ISO_VD_SUPPLEMENTARY)
continue;
dbg("found SVD at offset 0x%llx", (unsigned long long) (off + vd_offset));
continue;
dbg("found SVD at offset 0x%llx", (unsigned long long) (off + vd_offset));
@@
-91,7
+91,7
@@
int volume_id_probe_iso9660(struct volume_id *id, uint64_t off)
memcmp(is->escape_sequences, "%/C", 3) == 0||
memcmp(is->escape_sequences, "%/E", 3) == 0) {
dbg("Joliet extension found");
memcmp(is->escape_sequences, "%/C", 3) == 0||
memcmp(is->escape_sequences, "%/E", 3) == 0) {
dbg("Joliet extension found");
- volume_id_set_unicode16(
(char *)
svd_label, sizeof(svd_label), is->volume_id, BE, 32);
+ volume_id_set_unicode16(svd_label, sizeof(svd_label), is->volume_id, BE, 32);
if (memcmp(id->label, svd_label, 16) == 0) {
dbg("SVD label is identical, use the possibly longer PVD one");
break;
if (memcmp(id->label, svd_label, 16) == 0) {
dbg("SVD label is identical, use the possibly longer PVD one");
break;