iso9660.c revision 2603474ff9be2418900581da1af5cccc9f13cae1
/*
* volume_id - reads filesystem label and uuid
*
* Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
*
* under the terms of the GNU General Public License as published by the
* Free Software Foundation version 2 of the License.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include "libvolume_id.h"
#include "libvolume_id-private.h"
#include "util.h"
#define ISO_SUPERBLOCK_OFFSET 0x8000
#define ISO_SECTOR_SIZE 0x800
#define ISO_VD_PRIMARY 0x1
#define ISO_VD_SUPPLEMENTARY 0x2
#define ISO_VD_END 0xff
#define ISO_VD_MAX 16
struct iso_volume_descriptor {
} PACKED;
struct high_sierra_volume_descriptor {
} PACKED;
{
struct iso_volume_descriptor *is;
struct high_sierra_volume_descriptor *hs;
return -1;
int vd_offset;
int i;
dbg("read label from PVD\n");
dbg("looking for SVDs\n");
for (i = 0; i < ISO_VD_MAX; i++) {
break;
continue;
dbg("Joliet extension found\n");
dbg("SVD label is identical, use the possibly longer PVD one\n");
break;
}
goto found;
}
}
goto found;
}
goto found;
}
return -1;
return 0;
}