source: mainline/uspace/lib/ext4/libext4_inode.h@ 22fb7ab

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 22fb7ab was d1538a1, checked in by Martin Sucha <sucha14@…>, 13 years ago

Add missing copyright headers to ext4

Those files are based on ext2 filesystem driver code.

  • Property mode set to 100644
File size: 4.1 KB
RevLine 
[eb91db7]1/*
[d1538a1]2 * Copyright (c) 2011 Martin Sucha
[f22d5ef0]3 * Copyright (c) 2012 Frantisek Princ
[eb91db7]4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * - Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * - Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * - The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30/** @addtogroup libext4
31 * @{
[38542dc]32 */
[eb91db7]33
34#ifndef LIBEXT4_LIBEXT4_INODE_H_
35#define LIBEXT4_LIBEXT4_INODE_H_
36
[f73b291]37#include <block.h>
[9875711]38#include <sys/types.h>
[b53a733]39#include "libext4_types.h"
[9b9d37bb]40
41extern uint32_t ext4_inode_get_mode(ext4_superblock_t *, ext4_inode_t *);
[fe27eb4]42extern void ext4_inode_set_mode(ext4_superblock_t *, ext4_inode_t *, uint32_t);
[3712434]43extern uint32_t ext4_inode_get_uid(ext4_inode_t *);
[fe27eb4]44extern void ext4_inode_set_uid(ext4_inode_t *, uint32_t);
[9b9d37bb]45extern uint64_t ext4_inode_get_size(ext4_superblock_t *, ext4_inode_t *);
[052e82d]46extern void ext4_inode_set_size(ext4_inode_t *, uint64_t);
[3712434]47extern uint32_t ext4_inode_get_access_time(ext4_inode_t *);
[fe27eb4]48extern void ext4_inode_set_access_time(ext4_inode_t *, uint32_t);
[3712434]49extern uint32_t ext4_inode_get_change_inode_time(ext4_inode_t *);
[fe27eb4]50extern void ext4_inode_set_change_inode_time(ext4_inode_t *, uint32_t);
[3712434]51extern uint32_t ext4_inode_get_modification_time(ext4_inode_t *);
[fe27eb4]52extern void ext4_inode_set_modification_time(ext4_inode_t *, uint32_t);
[3712434]53extern uint32_t ext4_inode_get_deletion_time(ext4_inode_t *);
[fe27eb4]54extern void ext4_inode_set_deletion_time(ext4_inode_t *, uint32_t);
[3712434]55extern uint32_t ext4_inode_get_gid(ext4_inode_t *);
[fe27eb4]56extern void ext4_inode_set_gid(ext4_inode_t *, uint32_t);
[3712434]57extern uint16_t ext4_inode_get_links_count(ext4_inode_t *);
[fe27eb4]58extern void ext4_inode_set_links_count(ext4_inode_t *, uint16_t);
[38542dc]59extern uint64_t ext4_inode_get_blocks_count(ext4_superblock_t *,
60 ext4_inode_t *);
61extern int ext4_inode_set_blocks_count(ext4_superblock_t *, ext4_inode_t *,
62 uint64_t);
[7b9381b]63extern uint32_t ext4_inode_get_flags(ext4_inode_t *);
[fe27eb4]64extern void ext4_inode_set_flags(ext4_inode_t *, uint32_t);
65extern uint32_t ext4_inode_get_generation(ext4_inode_t *);
66extern void ext4_inode_set_generation(ext4_inode_t *, uint32_t);
[b191acae]67extern uint64_t ext4_inode_get_file_acl(ext4_inode_t *, ext4_superblock_t *);
[38542dc]68extern void ext4_inode_set_file_acl(ext4_inode_t *, ext4_superblock_t *,
69 uint64_t);
[fe27eb4]70
71extern uint32_t ext4_inode_get_direct_block(ext4_inode_t *, uint32_t);
72extern void ext4_inode_set_direct_block(ext4_inode_t *, uint32_t, uint32_t);
73extern uint32_t ext4_inode_get_indirect_block(ext4_inode_t *, uint32_t);
74extern void ext4_inode_set_indirect_block(ext4_inode_t *, uint32_t, uint32_t);
[acd869e]75extern ext4_extent_header_t * ext4_inode_get_extent_header(ext4_inode_t *);
[fe27eb4]76extern bool ext4_inode_is_type(ext4_superblock_t *, ext4_inode_t *, uint32_t);
[7b9381b]77extern bool ext4_inode_has_flag(ext4_inode_t *, uint32_t);
[b3d7277]78extern void ext4_inode_clear_flag(ext4_inode_t *, uint32_t);
79extern void ext4_inode_set_flag(ext4_inode_t *, uint32_t);
[43a9968]80extern bool ext4_inode_can_truncate(ext4_superblock_t *, ext4_inode_t *);
[7b9381b]81
[eb91db7]82#endif
83
84/**
85 * @}
86 */
Note: See TracBrowser for help on using the repository browser.