From a45de4a0cdc144289b3fe22d60eb7764be729b67 Mon Sep 17 00:00:00 2001 From: charles Date: Fri, 29 Apr 2005 18:09:16 +0000 Subject: [PATCH] *** empty log message *** --- Makefile | 4 ++-- yaffs_tagsvalidity.c | 35 +++++++++++++++++++++++++++++++++++ yaffs_tagsvalidity.h | 27 +++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 yaffs_tagsvalidity.c create mode 100644 yaffs_tagsvalidity.h diff --git a/Makefile b/Makefile index b9477b0..06dd925 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # -# $Id: Makefile,v 1.1 2004-12-17 23:14:51 charles Exp $ +# $Id: Makefile,v 1.2 2005-04-29 18:11:30 charles Exp $ # ## Change or override KERNELDIR to your kernel @@ -118,7 +118,7 @@ YAFFS2_CONFIGS = $(YAFFS_CONFIGS) -DCONFIG_YAFFS_YAFFS2 CFLAGS = -D__KERNEL__ -DMODULE $(YAFFS2_CONFIGS) -I$(KERNELDIR)/include -O2 -g -Wall -OBJS = yaffs_fs.o yaffs_guts.o yaffs_ramem.o yaffs_mtdif.o yaffs_ecc.o yaffs_tagscompat.o yaffs_ramem2k.o yaffs_packedtags2.o yaffs_mtdif2.o +OBJS = yaffs_fs.o yaffs_guts.o yaffs_ramem.o yaffs_mtdif.o yaffs_ecc.o yaffs_tagscompat.o yaffs_ramem2k.o yaffs_packedtags2.o yaffs_mtdif2.o yaffs_tagsvalidity.o all: yaffs.o diff --git a/yaffs_tagsvalidity.c b/yaffs_tagsvalidity.c new file mode 100644 index 0000000..14b8ed0 --- /dev/null +++ b/yaffs_tagsvalidity.c @@ -0,0 +1,35 @@ + +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * + * Copyright (C) 2002 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering + * + * Created by Charles Manning + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * $Id: yaffs_tagsvalidity.c,v 1.1 2005-04-29 18:09:16 charles Exp $ + */ +//yaffs_tagsvalidity.c + +#include "yaffs_tagsvalidity.h" + + + +void yaffs_InitialiseTags(yaffs_ExtendedTags *tags) +{ + memset(tags,0,sizeof(yaffs_ExtendedTags)); + tags->validMarker0 = 0xAAAAAAAA; + tags->validMarker1 = 0x55555555; +} + +int yaffs_ValidateTags(yaffs_ExtendedTags *tags) +{ + return (tags->validMarker0 == 0xAAAAAAAA && + tags->validMarker1 == 0x55555555); + +} + diff --git a/yaffs_tagsvalidity.h b/yaffs_tagsvalidity.h new file mode 100644 index 0000000..f0ed4d8 --- /dev/null +++ b/yaffs_tagsvalidity.h @@ -0,0 +1,27 @@ + +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * + * Copyright (C) 2002 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering + * + * Created by Charles Manning + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * $Id: yaffs_tagsvalidity.h,v 1.1 2005-04-29 18:09:16 charles Exp $ + */ +//yaffs_tagsvalidity.h + + +#ifndef __YAFFS_TAGS_VALIDITY_H__ +#define __YAFFS_TAGS_VALIDITY_H__ + +#include "yaffs_guts.h" + +void yaffs_InitialiseTags(yaffs_ExtendedTags *tags); +int yaffs_ValidateTags(yaffs_ExtendedTags *tags); +#endif + -- 2.30.2