file.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * ARC firmware interface.
  7. *
  8. * Copyright (C) 1994, 1995, 1996, 1999 Ralf Baechle
  9. * Copyright (C) 1999 Silicon Graphics, Inc.
  10. */
  11. #include <asm/fw/arc/types.h>
  12. #include <asm/sgialib.h>
  13. LONG
  14. ArcGetDirectoryEntry(ULONG FileID, struct linux_vdirent *Buffer,
  15. ULONG N, ULONG *Count)
  16. {
  17. return ARC_CALL4(get_vdirent, FileID, Buffer, N, Count);
  18. }
  19. LONG
  20. ArcOpen(CHAR *Path, enum linux_omode OpenMode, ULONG *FileID)
  21. {
  22. return ARC_CALL3(open, Path, OpenMode, FileID);
  23. }
  24. LONG
  25. ArcClose(ULONG FileID)
  26. {
  27. return ARC_CALL1(close, FileID);
  28. }
  29. LONG
  30. ArcRead(ULONG FileID, VOID *Buffer, ULONG N, ULONG *Count)
  31. {
  32. return ARC_CALL4(read, FileID, Buffer, N, Count);
  33. }
  34. LONG
  35. ArcGetReadStatus(ULONG FileID)
  36. {
  37. return ARC_CALL1(get_rstatus, FileID);
  38. }
  39. LONG
  40. ArcWrite(ULONG FileID, PVOID Buffer, ULONG N, PULONG Count)
  41. {
  42. return ARC_CALL4(write, FileID, Buffer, N, Count);
  43. }
  44. LONG
  45. ArcSeek(ULONG FileID, struct linux_bigint *Position, enum linux_seekmode SeekMode)
  46. {
  47. return ARC_CALL3(seek, FileID, Position, SeekMode);
  48. }
  49. LONG
  50. ArcMount(char *name, enum linux_mountops op)
  51. {
  52. return ARC_CALL2(mount, name, op);
  53. }
  54. LONG
  55. ArcGetFileInformation(ULONG FileID, struct linux_finfo *Information)
  56. {
  57. return ARC_CALL2(get_finfo, FileID, Information);
  58. }
  59. LONG ArcSetFileInformation(ULONG FileID, ULONG AttributeFlags,
  60. ULONG AttributeMask)
  61. {
  62. return ARC_CALL3(set_finfo, FileID, AttributeFlags, AttributeMask);
  63. }