ext.c revision b5e694267142042228a6cac99ecad6c4b4ef8759
/*
* 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 "util.h"
struct ext2_super_block {
} PACKED;
#define EXT_SUPER_MAGIC 0xEF53
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x00000004
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x00000008
#define EXT_SUPERBLOCK_OFFSET 0x400
#define EXT3_MIN_BLOCK_SIZE 0x400
#define EXT3_MAX_BLOCK_SIZE 0x1000
{
struct ext2_super_block *es;
return -1;
return -1;
dbg("invalid ext blocksize");
return -1;
}
/* check for external journal device */
return 0;
}
/* check for ext2 / ext3 */
else
return 0;
}