mirror of
https://github.com/genodelabs/genode.git
synced 2025-05-31 14:40:54 +00:00
parent
f996697fd5
commit
1feaf75605
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2012-2013 Genode Labs GmbH
|
* Copyright (C) 2012-2015 Genode Labs GmbH
|
||||||
*
|
*
|
||||||
* This file is part of the Genode OS framework, which is distributed
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
* under the terms of the GNU General Public License version 2.
|
* under the terms of the GNU General Public License version 2.
|
||||||
@ -22,13 +22,19 @@
|
|||||||
|
|
||||||
namespace File_system {
|
namespace File_system {
|
||||||
|
|
||||||
using namespace Genode;
|
using Genode::Noncopyable;
|
||||||
|
|
||||||
|
class Chunk_base;
|
||||||
|
|
||||||
|
template <unsigned> class Chunk;
|
||||||
|
template <unsigned, typename> class Chunk_index;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Common base class of both 'Chunk' and 'Chunk_index'
|
* Common base class of both 'Chunk' and 'Chunk_index'
|
||||||
*/
|
*/
|
||||||
class Chunk_base : Noncopyable
|
class File_system::Chunk_base : Noncopyable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -90,7 +96,7 @@ namespace File_system {
|
|||||||
* Chunk of bytes used as leaf in hierarchy of chunk indices
|
* Chunk of bytes used as leaf in hierarchy of chunk indices
|
||||||
*/
|
*/
|
||||||
template <unsigned CHUNK_SIZE>
|
template <unsigned CHUNK_SIZE>
|
||||||
class Chunk : public Chunk_base
|
class File_system::Chunk : public Chunk_base
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -170,7 +176,7 @@ namespace File_system {
|
|||||||
|
|
||||||
|
|
||||||
template <unsigned NUM_ENTRIES, typename ENTRY_TYPE>
|
template <unsigned NUM_ENTRIES, typename ENTRY_TYPE>
|
||||||
class Chunk_index : public Chunk_base
|
class File_system::Chunk_index : public Chunk_base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -436,6 +442,5 @@ namespace File_system {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__RAM_FS__CHUNK_H_ */
|
#endif /* _INCLUDE__RAM_FS__CHUNK_H_ */
|
||||||
|
@ -4,6 +4,13 @@
|
|||||||
* \date 2012-04-11
|
* \date 2012-04-11
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2011-2015 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU General Public License version 2.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _INCLUDE__RAM_FS__DIRECTORY_H_
|
#ifndef _INCLUDE__RAM_FS__DIRECTORY_H_
|
||||||
#define _INCLUDE__RAM_FS__DIRECTORY_H_
|
#define _INCLUDE__RAM_FS__DIRECTORY_H_
|
||||||
|
|
||||||
@ -15,9 +22,10 @@
|
|||||||
#include <ram_fs/file.h>
|
#include <ram_fs/file.h>
|
||||||
#include <ram_fs/symlink.h>
|
#include <ram_fs/symlink.h>
|
||||||
|
|
||||||
namespace File_system {
|
namespace File_system { class Directory; }
|
||||||
|
|
||||||
class Directory : public Node
|
|
||||||
|
class File_system::Directory : public Node
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -216,6 +224,5 @@ namespace File_system {
|
|||||||
|
|
||||||
size_t num_entries() const { return _num_entries; }
|
size_t num_entries() const { return _num_entries; }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__RAM_FS__DIRECTORY_H_ */
|
#endif /* _INCLUDE__RAM_FS__DIRECTORY_H_ */
|
||||||
|
@ -4,6 +4,13 @@
|
|||||||
* \date 2012-04-11
|
* \date 2012-04-11
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012-2015 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU General Public License version 2.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _INCLUDE__RAM_FS__FILE_H_
|
#ifndef _INCLUDE__RAM_FS__FILE_H_
|
||||||
#define _INCLUDE__RAM_FS__FILE_H_
|
#define _INCLUDE__RAM_FS__FILE_H_
|
||||||
|
|
||||||
@ -14,9 +21,10 @@
|
|||||||
#include <ram_fs/node.h>
|
#include <ram_fs/node.h>
|
||||||
#include <ram_fs/chunk.h>
|
#include <ram_fs/chunk.h>
|
||||||
|
|
||||||
namespace File_system {
|
namespace File_system { class File; }
|
||||||
|
|
||||||
class File : public Node
|
|
||||||
|
class File_system::File : public Node
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -101,6 +109,5 @@ namespace File_system {
|
|||||||
mark_as_updated();
|
mark_as_updated();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__RAM_FS__FILE_H_ */
|
#endif /* _INCLUDE__RAM_FS__FILE_H_ */
|
||||||
|
@ -4,6 +4,13 @@
|
|||||||
* \date 2012-04-11
|
* \date 2012-04-11
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012-2015 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU General Public License version 2.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _INCLUDE__RAM_FS__NODE_H_
|
#ifndef _INCLUDE__RAM_FS__NODE_H_
|
||||||
#define _INCLUDE__RAM_FS__NODE_H_
|
#define _INCLUDE__RAM_FS__NODE_H_
|
||||||
|
|
||||||
@ -12,9 +19,10 @@
|
|||||||
#include <file_system/node.h>
|
#include <file_system/node.h>
|
||||||
#include <util/list.h>
|
#include <util/list.h>
|
||||||
|
|
||||||
namespace File_system {
|
namespace File_system { class Node; }
|
||||||
|
|
||||||
class Node : public Node_base, public List<Node>::Element
|
|
||||||
|
class File_system::Node : public Node_base, public List<Node>::Element
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -53,6 +61,4 @@ namespace File_system {
|
|||||||
virtual size_t write(char const *src, size_t len, seek_off_t) = 0;
|
virtual size_t write(char const *src, size_t len, seek_off_t) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__RAM_FS__NODE_H_ */
|
#endif /* _INCLUDE__RAM_FS__NODE_H_ */
|
||||||
|
@ -4,15 +4,23 @@
|
|||||||
* \date 2012-04-11
|
* \date 2012-04-11
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012-2015 Genode Labs GmbH
|
||||||
|
*
|
||||||
|
* This file is part of the Genode OS framework, which is distributed
|
||||||
|
* under the terms of the GNU General Public License version 2.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _INCLUDE__RAM_FS__SYMLINK_H_
|
#ifndef _INCLUDE__RAM_FS__SYMLINK_H_
|
||||||
#define _INCLUDE__RAM_FS__SYMLINK_H_
|
#define _INCLUDE__RAM_FS__SYMLINK_H_
|
||||||
|
|
||||||
/* local includes */
|
/* local includes */
|
||||||
#include <ram_fs/node.h>
|
#include <ram_fs/node.h>
|
||||||
|
|
||||||
namespace File_system {
|
namespace File_system { class Symlink; }
|
||||||
|
|
||||||
class Symlink : public Node
|
|
||||||
|
class File_system::Symlink : public Node
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -42,6 +50,5 @@ namespace File_system {
|
|||||||
|
|
||||||
file_size_t length() const { return _len; }
|
file_size_t length() const { return _len; }
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* _INCLUDE__RAM_FS__SYMLINK_H_ */
|
#endif /* _INCLUDE__RAM_FS__SYMLINK_H_ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user