zftape-init.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef _ZFTAPE_INIT_H
  2. #define _ZFTAPE_INIT_H
  3. /*
  4. * Copyright (C) 1996, 1997 Claus Heine.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; see the file COPYING. If not, write to
  15. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  16. *
  17. * $Source: /homes/cvs/ftape-stacked/ftape/zftape/zftape-init.h,v $
  18. * $Revision: 1.2 $
  19. * $Date: 1997/10/05 19:19:05 $
  20. *
  21. * This file contains definitions and macro for the vfs
  22. * interface defined by zftape
  23. *
  24. */
  25. #include <linux/ftape-header-segment.h>
  26. #include "../lowlevel/ftape-tracing.h"
  27. #include "../lowlevel/ftape-ctl.h"
  28. #include "../lowlevel/ftape-read.h"
  29. #include "../lowlevel/ftape-write.h"
  30. #include "../lowlevel/ftape-bsm.h"
  31. #include "../lowlevel/ftape-io.h"
  32. #include "../lowlevel/ftape-buffer.h"
  33. #include "../lowlevel/ftape-format.h"
  34. #include "../zftape/zftape-rw.h"
  35. #ifdef MODULE
  36. #define ftape_status (*zft_status)
  37. #endif
  38. extern const ftape_info *zft_status; /* needed for zftape-vtbl.h */
  39. #include "../zftape/zftape-vtbl.h"
  40. struct zft_cmpr_ops {
  41. int (*write)(int *write_cnt,
  42. __u8 *dst_buf, const int seg_sz,
  43. const __u8 __user *src_buf, const int req_len,
  44. const zft_position *pos, const zft_volinfo *volume);
  45. int (*read)(int *read_cnt,
  46. __u8 __user *dst_buf, const int req_len,
  47. const __u8 *src_buf, const int seg_sz,
  48. const zft_position *pos, const zft_volinfo *volume);
  49. int (*seek)(unsigned int new_block_pos,
  50. zft_position *pos, const zft_volinfo *volume,
  51. __u8 *buffer);
  52. void (*lock) (void);
  53. void (*reset) (void);
  54. void (*cleanup)(void);
  55. };
  56. extern struct zft_cmpr_ops *zft_cmpr_ops;
  57. /* zftape-init.c defined global functions.
  58. */
  59. extern int zft_cmpr_register(struct zft_cmpr_ops *new_ops);
  60. extern int zft_cmpr_lock(int try_to_load);
  61. #endif