sysv.c revision 2603474ff9be2418900581da1af5cccc9f13cae1
/*
* volume_id - reads filesystem label and uuid
*
* Copyright (C) 2005 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 SYSV_NICINOD 100
#define SYSV_NICFREE 50
struct sysv_super
{
} PACKED;
#define XENIX_NICINOD 100
#define XENIX_NICFREE 100
struct xenix_super {
} PACKED;
#define SYSV_SUPERBLOCK_BLOCK 0x01
#define SYSV_MAGIC 0xfd187e20
#define XENIX_SUPERBLOCK_BLOCK 0x18
#define XENIX_MAGIC 0x2b5544
#define SYSV_MAX_BLOCKSIZE 0x800
{
struct sysv_super *vs;
struct xenix_super *xs;
unsigned int boff;
vs = (struct sysv_super *)
return -1;
goto found;
}
}
xs = (struct xenix_super *)
return -1;
goto found;
}
}
return -1;
return 0;
}