reiserfs.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright 2000-2002 by Hans Reiser, licensing governed by reiserfs/README
  3. *
  4. * GRUB -- GRand Unified Bootloader
  5. * Copyright (C) 2000, 2001 Free Software Foundation, Inc.
  6. *
  7. * (C) Copyright 2003 Sysgo Real-Time Solutions, AG <www.elinos.com>
  8. * Pavel Bartusek <pba@sysgo.de>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  23. */
  24. /* An implementation for the ReiserFS filesystem ported from GRUB.
  25. * Some parts of this code (mainly the structures and defines) are
  26. * from the original reiser fs code, as found in the linux kernel.
  27. */
  28. #define SECTOR_SIZE 0x200
  29. #define SECTOR_BITS 9
  30. /* Error codes */
  31. typedef enum
  32. {
  33. ERR_NONE = 0,
  34. ERR_BAD_FILENAME,
  35. ERR_BAD_FILETYPE,
  36. ERR_BAD_GZIP_DATA,
  37. ERR_BAD_GZIP_HEADER,
  38. ERR_BAD_PART_TABLE,
  39. ERR_BAD_VERSION,
  40. ERR_BELOW_1MB,
  41. ERR_BOOT_COMMAND,
  42. ERR_BOOT_FAILURE,
  43. ERR_BOOT_FEATURES,
  44. ERR_DEV_FORMAT,
  45. ERR_DEV_VALUES,
  46. ERR_EXEC_FORMAT,
  47. ERR_FILELENGTH,
  48. ERR_FILE_NOT_FOUND,
  49. ERR_FSYS_CORRUPT,
  50. ERR_FSYS_MOUNT,
  51. ERR_GEOM,
  52. ERR_NEED_LX_KERNEL,
  53. ERR_NEED_MB_KERNEL,
  54. ERR_NO_DISK,
  55. ERR_NO_PART,
  56. ERR_NUMBER_PARSING,
  57. ERR_OUTSIDE_PART,
  58. ERR_READ,
  59. ERR_SYMLINK_LOOP,
  60. ERR_UNRECOGNIZED,
  61. ERR_WONT_FIT,
  62. ERR_WRITE,
  63. ERR_BAD_ARGUMENT,
  64. ERR_UNALIGNED,
  65. ERR_PRIVILEGED,
  66. ERR_DEV_NEED_INIT,
  67. ERR_NO_DISK_SPACE,
  68. ERR_NUMBER_OVERFLOW,
  69. MAX_ERR_NUM
  70. } reiserfs_error_t;
  71. extern int reiserfs_set_blk_dev(block_dev_desc_t *rbdd, int part);
  72. extern int reiserfs_ls (char *dirname);
  73. extern int reiserfs_open (char *filename);
  74. extern int reiserfs_read (char *buf, unsigned len);
  75. extern int reiserfs_mount (unsigned part_length);