mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libvtoc: Introduce is_vol1() check
Introduce is_vol1() in vtoc.h and update the user in libzds.c Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com> Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
6bd93f475c
commit
e09c675b70
@@ -97,6 +97,13 @@ typedef struct volume_label
|
||||
unsigned long long formatted_blocks; /* valid when ldl_version >= f2 */
|
||||
} __attribute__ ((packed)) volume_label_t;
|
||||
|
||||
static inline int is_vol1(char *this)
|
||||
{
|
||||
char vol1[] = {0xe5, 0xd6, 0xd3, 0xf1, 0x00} /* "VOL1" in EBCDIC */;
|
||||
|
||||
return !strncmp(this, vol1, 4);
|
||||
}
|
||||
|
||||
typedef struct extent
|
||||
{
|
||||
u_int8_t typeind; /* extent type indicator */
|
||||
|
||||
Reference in New Issue
Block a user