linux_raid.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 <byteswap.h>
#include "libvolume_id.h"
#include "libvolume_id-private.h"
#include "util.h"
struct mdp0_super_block {
} PACKED;
struct mdp1_super_block {
} PACKED;
#define MD_RESERVED_BYTES 0x10000
#define MD_SB_MAGIC 0xa92b4efc
{
struct mdp0_super_block *mdp0;
union {
} uuid;
info("probing at offset 0x%llx, size 0x%llx\n",
if (size < 0x10000)
return -1;
return -1;
} else {
}
} else {
}
} else
return -1;
return 0;
}
{
struct mdp1_super_block *mdp1;
info("probing at offset 0x%llx, size 0x%llx\n",
return -1;
return -1;
return -1;
return 0;
}
{
/* version 0 at the end of the device */
return 0;
/* version 1.0 at the end of the device */
/* version 1.1 at the start of the device */
/* version 1.2 at 4k offset from the start */
else
return -1;
return 0;
}