/* vi:set cindent tabstop=2 shiftwidth=2: */ /* * libvxfs - library for reading Veritas Journaled FileSystem (VxFS) * Copyright (c) 1999 Martin Hinner * * libvxfs.h: VxFS library defines and prototypes * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id$ */ #ifndef __LIBVXFS_H #define __LIBVXFS_H #include #include struct vxdirent { char name[256]; int inode; struct vxdirent *next; }; struct vxdirstream { struct vxdirent *first, *current; }; typedef struct vxdirstream VXDIR; extern int vxfd; /* VxFS device file */ extern int vxbsize; /* VxFS logical block size */ extern struct vxfs_super vxsb; /* VxFS mounted superblock */ extern struct vxfs_inode *vxilistino; /* Inode list inode */ extern struct vxfs_inode *vxstructuralilistino; /* Inode list inode */ extern int vxdebug; /* Debug mode */ extern int vxverbose; /* Verbose mode (errors, ...) */ /* * misc.c */ extern void vxdebugon (void); extern void vxdebugoff (void); extern void vxverboseon (void); extern void vxverboseoff (void); /* * super.c */ extern int vx_open (char *device, int subpart); extern int vx_readsuper (void); /* * olt.c */ extern int vx_readolt (void); /* * block.c */ extern void *vxread (int blknum, int count); extern int vxopendev (char *device); extern void vxclosedev (void); extern struct uw_vtoc *vxreaduwvtoc (void); extern int vxsetpart (int part); /* * bmap.c */ extern int vxbmap_ext4 (struct vxfs_inode *ino, int block); extern int vxbmap_typed (struct vxfs_inode *ino, int block); extern int vxbmap_typeddev (struct vxfs_inode *ino, int block); /* * inode.c */ extern struct vxfs_inode *vxiget (int ino); extern struct vxfs_inode *vxigetstructural (int ino); extern struct vxfs_inode *vxblkiget (int extent, int ino); extern void vxiput (struct vxfs_inode *ino); extern void vxidump (struct vxfs_inode *ino); /* * iread.c */ extern void *vxiread (struct vxfs_inode *ino, int blknum, int count); /* * dir.c */ extern VXDIR *vxopendir (struct vxfs_inode *ino); extern struct vxdirent *vxreaddir (VXDIR * dir); extern void vxrewinddir (VXDIR * dir); extern int vxclosedir (VXDIR * dir); extern int vxlookup (const char *filename); /* * cwd.h */ extern int vxsavecwd (char *device, int subpart, char *dir); extern int vxreadcwd (char *device, int *subpart, char *dir); extern int vxdeletecwd (void); #endif /* __LIBVXFS_H */