Drop all duplicate newlines. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
return (u8 *)((unsigned long)dev + ptr);
}
-
/* struct btrfs_extent_item */
BTRFS_SETGET_FUNCS(extent_refs, struct btrfs_extent_item, refs, 64);
BTRFS_SETGET_STACK_FUNCS(stack_extent_refs, struct btrfs_extent_item, refs, 64);
btrfs_header_fsid(),
BTRFS_FSID_SIZE);
-
if (fsid_match) {
ret = 0;
break;
#define BTRFS_LAST_FREE_OBJECTID -256ULL
#define BTRFS_FIRST_CHUNK_TREE_OBJECTID 256ULL
-
/*
* The device items go into the chunk tree.
*
*/
#define BTRFS_STRING_ITEM_KEY 253
-
/* 32 bytes in various csum fields */
#define BTRFS_CSUM_SIZE 32
#define BTRFS_SUPER_FLAG_CHANGING_FSID (1ULL << 35)
#define BTRFS_SUPER_FLAG_CHANGING_FSID_V2 (1ULL << 36)
-
/*
* Items in the extent tree are used to record the objectid of the
* owner of the block and the number of references.
__le32 refs;
} __attribute__ ((__packed__));
-
#define BTRFS_EXTENT_FLAG_DATA (1ULL << 0)
#define BTRFS_EXTENT_FLAG_TREE_BLOCK (1ULL << 1)
__le32 count;
} __attribute__ ((__packed__));
-
/* Dev extents record used space on individual devices.
*
* The owner field points back to the chunk allocation mapping tree that
}
}
-
if (found_transid > fs_devices->latest_trans) {
fs_devices->latest_devid = devid;
fs_devices->latest_trans = found_transid;
}
-
static void alloc_single_indirect_block(struct ext2_inode *file_inode,
unsigned int *total_remaining_blocks,
unsigned int *no_blks_reqd)
if (le16_to_cpu(data->sblock.magic) != EXT2_MAGIC)
goto fail_noerr;
-
if (le32_to_cpu(data->sblock.revision_level) == 0) {
fs->inodesz = 128;
fs->gdsize = 32;
* ext4write : Based on generic ext4 protocol.
*/
-
#include <blk.h>
#include <log.h>
#include <malloc.h>
fs->inode_bmaps = NULL;
}
-
free(fs->gdtable);
fs->gdtable = NULL;
/*
*/
-
#include <config.h>
#include <linux/stddef.h>
#include <jffs2/jffs2.h>
#include <jffs2/jffs2.h>
#include <jffs2/compr_rubin.h>
-
void rubin_do_decompress(unsigned char *bits, unsigned char *in,
unsigned char *page_out, __u32 destlen)
{
* it should probably be dumped and replaced by something like jffs2reader!
*/
-
#include <config.h>
#include <malloc.h>
#include <div64.h>
#include "jffs2_private.h"
-
#define NODE_CHUNK 1024 /* size of memory allocation chunk in b_nodes */
#define SPIN_BLKSIZE 18 /* spin after having scanned 1<<BLKSIZE bytes */
#undef DEBUG_FRAGMENTS /* print fragment list after scan */
#undef DEBUG /* enable debugging messages */
-
#ifdef DEBUG
# define DEBUGF(fmt,args...) printf(fmt ,##args)
#else
return ret;
}
-
static void put_fl_mem_onenand(void *buf)
{
free(buf);
}
#endif
-
#if defined(CONFIG_CMD_FLASH)
#include <flash.h>
}
#endif
-
/*
* Generic jffs2 raw memory and node read routines.
*
struct b_node nodes[NODE_CHUNK];
};
-
static void
free_nodes(struct b_list *list)
{
return 1;
}
-
static u32
jffs2_1pass_fill_info(struct b_lists * pL, struct b_jffs2_info * piL)
{
return 0;
}
-
static struct b_lists *
jffs2_get_list(struct part_info * part, const char *who)
{
return (struct b_lists *)part->jffs2_priv;
}
-
/* Print directory / file contents */
u32
jffs2_1pass_ls(struct part_info * part, const char *fname)
return 0;
}
-
#if 0
putLabeledWord("found file at inode = ", inode);
putLabeledWord("read_inode returns = ", ret);
return ret;
}
-
/* Load a file from flash into memory. fname can be a full path */
u32
jffs2_1pass_load(char *dest, struct part_info * part, const char *fname)
#include <jffs2/jffs2.h>
-
struct b_node {
u32 offset;
struct b_node *next;
cramfs_memset(distance->lengths, 5, 32);
distance->count[5] = 32;
-
fill_code_tables(lengths);
fill_code_tables(distance);
-
decompress_huffman(stream, dest);
}
EXPORT_SYMBOL(sget);
-
static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags,
const char *name, void *data)
{
/* All UBIFS compressors */
struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT] = {NULL};
-
#ifdef __UBOOT__
struct crypto_comp {
#include "yaffs_attribs.h"
-
void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh)
{
obj->yst_uid = oh->yst_uid;
obj->yst_rdev = oh->yst_rdev;
}
-
void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj)
{
#ifdef CONFIG_YAFFS_WINCE
0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00,
};
-
/* Calculate the ECC for a 256-byte block of data */
void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc)
{
#ifndef __YAFFS_FLASH_H__
#define __YAFFS_FLASH_H__
-
#include "yaffs_guts.h"
int yflash_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber);
int yflash_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk,
#ifndef __YAFFS_FLASH2_H__
#define __YAFFS_FLASH2_H__
-
#include "yaffs_guts.h"
int yflash2_EraseBlockInNAND(struct yaffs_dev *dev, int blockNumber);
int yflash2_WriteChunkToNAND(struct yaffs_dev *dev, int nand_chunk,
static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
const u8 *buffer, int n_bytes, int use_reserve);
-
-
/* Function to calculate chunk and offset */
void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
return retval;
}
-
int yaffs_check_alloc_available(struct yaffs_dev *dev, int n_chunks)
{
int reserved_chunks;
}
-
static void yaffs_init_tnodes_and_objs(struct yaffs_dev *dev)
{
int i;
}
-
-
/*---------------------- Block Management and Page Allocation -------------*/
static void yaffs_deinit_blocks(struct yaffs_dev *dev)
if (!dev->chunk_bits)
goto alloc_error;
-
memset(dev->block_info, 0, n_blocks * sizeof(struct yaffs_block_info));
memset(dev->chunk_bits, 0, dev->chunk_bit_stride * n_blocks);
return YAFFS_OK;
return YAFFS_FAIL;
}
-
void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
{
struct yaffs_block_info *bi = yaffs_get_block_info(dev, block_no);
}
-
-
static int yaffs_do_xattrib_mod(struct yaffs_obj *obj, int set,
const YCHAR *name, const void *value, int size,
int flags)
bi->has_shrink_hdr = 1;
}
-
return new_chunk_id;
}
YAFFS_OK : YAFFS_FAIL;
}
-
/* yaffs_del_file deletes the whole file data
* and the inode associated with the file.
* It does not delete the links associated with the file.
yaffs_del_dir_contents(dev->lost_n_found);
}
-
struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
const YCHAR *name)
{
#define YAFFS_MIN_YAFFS2_CHUNK_SIZE 1024
#define YAFFS_MIN_YAFFS2_SPARE_SIZE 32
-
-
#define YAFFS_ALLOCATION_NOBJECTS 100
#define YAFFS_ALLOCATION_NTNODES 100
#define YAFFS_ALLOCATION_NLINKS 100
u8 as_bytes[8];
};
-
/* Stuff used for extended tags in YAFFS2 */
enum yaffs_ecc_result {
loff_t yaffs_oh_to_size(struct yaffs_obj_hdr *oh);
loff_t yaffs_max_file_size(struct yaffs_dev *dev);
-
#endif
#include "yportenv.h"
-
#include "yaffs_mtdif.h"
#include <linux/mtd/mtd.h>
#include <linux/time.h>
#include <linux/mtd/rawnand.h>
-
static inline void translate_spare2oob(const struct yaffs_spare *spare, u8 *oob)
{
oob[0] = spare->tb0;
nspare->eccres1 = nspare->eccres2 = 0; /* FIXME */
}
-
int nandmtd_WriteChunkToNAND(struct yaffs_dev *dev, int chunkInNAND,
const u8 *data, const struct yaffs_spare *spare)
{
/* Todo finish off the ei if required */
-
retval = mtd_erase(mtd, &ei);
if (retval == 0)
#define yaffs_dev_to_mtd(dev) ((struct mtd_info *)((dev)->driver_context))
#define yaffs_dev_to_lc(dev) ((struct yaffs_linux_context *)((dev)->os_context))
-
/* NB For use with inband tags....
* We assume that the data buffer is of size total_bytes_per_chunk so
* that we can also use it to load the tags.
return YAFFS_FAIL;
}
-
int nandmtd2_MarkNANDBlockBad(struct yaffs_dev *dev, int blockNo)
{
struct mtd_info *mtd = (struct mtd_info *)(dev->driver_context);
#include "yaffs_guts.h"
#include <malloc.h>
-
#include "yaffs_nandif.h"
#include "yaffs_packedtags2.h"
#include "yaffs_trace.h"
#include "yaffsfs.h"
-
/* NB For use with inband tags....
* We assume that the data buffer is of size totalBytersPerChunk so that
* we can also use it to load the tags.
"nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p",
nand_chunk, data, tags);
-
/* For yaffs2 writing there must be both data and tags.
* If we're using inband tags, then the tags are stuffed into
* the end of the data buffer.
}
-
static int ynandif_IsBlockOk(struct yaffs_dev *dev, int blockId)
{
struct ynandif_Geometry *geometry = (struct ynandif_Geometry *)(dev->driver_context);
return YAFFS_OK;
}
-
int ynandif_InitialiseNAND(struct yaffs_dev *dev)
{
struct ynandif_Geometry *geometry = (struct ynandif_Geometry *)(dev->driver_context);
return YAFFS_OK;
}
-
struct yaffs_dev *
yaffs_add_dev_from_geometry(const YCHAR *name,
const struct ynandif_Geometry *geometry)
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*/
-
#ifndef __YNANDIF_H__
#define __YNANDIF_H__
yaffs_add_dev_from_geometry(const YCHAR *name,
const struct ynandif_Geometry *geometry);
-
#endif
* a direct interface.
*/
-
#ifndef __YAFFS_OSGLUE_H__
#define __YAFFS_OSGLUE_H__
-
#include "yportenv.h"
void yaffsfs_Lock(void);
void yaffsfs_OSInitialisation(void);
-
#endif
unsigned sum; /* Just add up all the bytes in the tags */
};
-
static void yaffs_summary_clear(struct yaffs_dev *dev)
{
if (!dev->sum_tags)
sizeof(struct yaffs_summary_tags));
}
-
void yaffs_summary_deinit(struct yaffs_dev *dev)
{
kfree(dev->sum_tags);
} while (result == YAFFS_OK && n_bytes > 0);
yaffs_release_temp_buffer(dev, buffer);
-
if (result == YAFFS_OK)
bi->has_summary = 1;
-
return result;
}
#include "yaffs_packedtags2.h"
-
int yaffs_summary_init(struct yaffs_dev *dev);
void yaffs_summary_deinit(struct yaffs_dev *dev);
int blk);
void yaffs_summary_gc(struct yaffs_dev *dev, int blk);
-
#endif
static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk);
-
/********** Tags ECC calculations *********/
void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
unsigned yaffs_trace_mask = 0x0; /* Disable logging */
static int yaffs_errno;
-
void yaffs_bug_fn(const char *fn, int n)
{
printf("yaffs bug at %s:%d\n", fn, n);
return yaffs_errno;
}
-
int yaffsfs_GetError(void)
{
return yaffs_errno;
/* No locking used */
}
-
static const char *yaffs_file_type_str(struct yaffs_stat *stat)
{
switch (stat->st_mode & S_IFMT) {
} while (sizeOfFile > 0);
-
yaffs_close(outh);
}
yaffsfs_GetError(), yaffs_error_str());
}
-
void cmd_yaffs_umount(char *mp)
{
if (yaffs_unmount(mp) == -1)
make_a_file(yaffsName, bval, sizeOfFile);
}
-
void cmd_yaffs_read_file(char *fn)
{
read_a_file(fn);
}
-
void cmd_yaffs_mread_file(char *fn, char *addr)
{
int h;
yaffs_close(h);
}
-
void cmd_yaffs_mwrite_file(char *fn, char *addr, int size)
{
int outh;
yaffs_close(outh);
}
-
void cmd_yaffs_ls(const char *mountpt, int longlist)
{
int i;
yaffs_closedir(d);
}
-
void cmd_yaffs_mkdir(const char *dir)
{
int retval = yaffs_mkdir(dir, 0);
dev = obj->my_dev;
obj_id = obj->obj_id;
-
/* Check file size is consistent with tnode depth */
yaffs_addr_to_chunk(dev, obj->variant.file_variant.file_size,
&last_chunk, &offset_in_chunk);
int done = 0;
LIST_HEAD(hard_list);
-
while (ok && !done) {
ok = (yaffs2_checkpt_rd(dev, &cp, sizeof(cp)) == sizeof(cp));
if (cp.struct_type != sizeof(cp)) {
* a direct interface.
*/
-
#ifndef __YAFFSCFG_H__
#define __YAFFSCFG_H__
-
#include "yportenv.h"
#define YAFFSFS_N_HANDLES 100
#define YAFFSFS_N_DSC 20
-
struct yaffsfs_DeviceConfiguration {
const YCHAR *prefix;
struct yaffs_dev *dev;
};
-
#endif
short int useCount;
};
-
struct yaffsfs_DirSearchContxt {
struct yaffs_dirent de; /* directory entry */
YCHAR name[NAME_MAX + 1]; /* name of directory being searched */
* a direct interface.
*/
-
#ifndef __YAFFSFS_H__
#define __YAFFSFS_H__
#include "yaffscfg.h"
#include "yportenv.h"
-
#ifndef NAME_MAX
#define NAME_MAX 256
#endif
#define YAFFS_MAX_FILE_SIZE (0x800000000LL - 1)
-
struct yaffs_dirent {
long d_ino; /* inode number */
off_t d_off; /* offset to this dirent */
typedef struct opaque_structure yaffs_DIR;
-
-
struct yaffs_stat {
int st_dev; /* device */
int st_ino; /* inode */
#endif
};
-
struct yaffs_utimbuf {
unsigned long actime;
unsigned long modtime;
};
-
int yaffs_open(const YCHAR *path, int oflag, int mode) ;
int yaffs_close(int fd) ;
int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf);
int yaffs_futime(int fd, const struct yaffs_utimbuf *buf);
-
int yaffs_setxattr(const char *path, const char *name,
const void *data, int size, int flags);
int yaffs_lsetxattr(const char *path, const char *name,
int yaffs_llistxattr(const char *path, char *list, int size);
int yaffs_flistxattr(int fd, char *list, int size);
-
#ifdef CONFIG_YAFFS_WINCE
int yaffs_set_wince_times(int fd,
int yaffs_unmount2(const YCHAR *path, int force);
int yaffs_remount(const YCHAR *path, int force, int read_only);
-
int yaffs_sync(const YCHAR *path) ;
int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath);
void yaffs_bug_fn(const char *file_name, int line_no);
-
-
#define YCHAR char
#define YUCHAR unsigned char
#define _Y(x) x
#define yaffs_strncmp(a, b, c) strncmp(a, b, c)
#endif
-
void yaffs_qsort(void *aa, size_t n, size_t es,
int (*cmp)(const void *, const void *));
printf("yaffs: " fmt "\n", ##__VA_ARGS__); \
} while (0)
-
#define YAFFS_LOSTNFOUND_NAME "lost+found"
#define YAFFS_LOSTNFOUND_PREFIX "obj"
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*/
-
#ifndef __YPORTENV_H__
#define __YPORTENV_H__
typedef unsigned u32;
#endif
-
#ifdef CONFIG_YAFFS_PROVIDE_DEFS
/* File types */
-
#define DT_UNKNOWN 0
#define DT_FIFO 1
#define DT_CHR 2
#define DT_SOCK 12
#define DT_WHT 14
-
/*
* Attribute flags.
* These are or-ed together to select what has been changed.
#endif
-
-
#if defined CONFIG_YAFFS_WINCE
#include "ywinceenv.h"
-
#elif defined CONFIG_YAFFS_DIRECT
/* Direct interface */
#define ELOOP 40
#endif
-
/* Mode flags */
#ifndef S_IFMT
#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-
#ifndef S_IREAD
#define S_IREAD 0000400
#endif
* Sysgo AG, <www.elinos.com>, Pavel Bartusek <pba@sysgo.com>
*/
-
#include <config.h>
#include <fs_internal.h>
#include <zfs_common.h>
#include <zfs/dsl_dir.h>
#include <zfs/dsl_dataset.h>
-
#define ZPOOL_PROP_BOOTFS "bootfs"
-
/*
* For nvlist manipulation. (from nvpair.h)
*/
#define DATA_TYPE_NVLIST 19
#define DATA_TYPE_NVLIST_ARRAY 20
-
/*
* Macros to get fields in a bp or DVA.
*/
((zap_leaf_chunk_t *)(l->l_hash + ZAP_LEAF_HASH_NUMENTRIES(bs)))[idx]
#define ZAP_LEAF_ENTRY(l, bs, idx) (&ZAP_LEAF_CHUNK(l, bs, idx).l_entry)
-
/*
* Decompression Entry - lzjb
*/
#define NBBY 8
#endif
-
-
typedef int zfs_decomp_func_t(void *s_start, void *d_start,
uint32_t s_len, uint32_t d_len);
typedef struct decomp_entry {
};
-
-
-
static int
zlib_decompress(void *s, void *d,
uint32_t slen, uint32_t dlen)
{"gzip-9", zlib_decompress}, /* ZIO_COMPRESS_GZIP9 */
};
-
-
static int zio_read_data(blkptr_t *bp, zfs_endian_t endian,
void *buf, struct zfs_data *data);
return i;
}
-
/* Checksum Functions */
static void
zio_checksum_off(const void *buf __attribute__ ((unused)),
return ZFS_ERR_NONE;
}
-
/*
* Given a zap_leaf_phys_t, walk thru the zap leaf chunks to get the
* value for the property "name".
return ZFS_ERR_FILE_NOT_FOUND;
}
-
/* Verify if this is a fat zap header block */
static int
zap_verify(zap_phys_t *zap)
return 0;
}
-
/*
* Read in the data of a zap object and find the value for a matching
* property name.
return 0;
}
-
/*
* Get the dnode of an object number from the metadnode of an object set.
*
return err;
}
-
/*
* Given a MOS metadnode, get the metadnode of a given filesystem name (fsname),
* e.g. pool/rootfs, or a given object number (obj), e.g. the object number
fsname, snapname, filename);
}
-
err = get_filesystem_dnode(&(data->mos), fsname, dn, data);
if (err) {
return err;
}
-
zap_iterate(&dn, iterate_zap_fs, data);
err = dnode_get(&(data->mos), headobj, DMU_OT_DSL_DATASET, &dn, data);