home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Utilities / Partition Logic 0.68 / partlogic-0.68.iso / system / headers / sys / ntfs.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-10  |  2.3 KB  |  58 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2007 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  ntfs.h
  20. //
  21.  
  22. // This file contains definitions and structures for using and manipulating
  23. // the Microsoft(R) NTFS filesystem in Visopsys.
  24.  
  25. #if !defined(_NTFS_H)
  26.  
  27. #include <sys/disk.h>
  28. #include <sys/progress.h>
  29.  
  30. typedef struct {
  31.   unsigned char jmpBoot[3];             // 00 - 02 Jmp to boot code
  32.   char oemName[8];                // 03 - 0A OEM Name
  33.   unsigned short bytesPerSect;        // 0B - 0C Bytes per sector
  34.   unsigned char sectsPerClust;        // 0D - 0D Sectors per cluster
  35.   unsigned char unused1[7];             // 0D - 14 Unused
  36.   unsigned char media;            // 15 - 15 Media descriptor byte
  37.   unsigned char unused2[2];             // 16 - 17 Unused
  38.   unsigned short sectsPerTrack;        // 18 - 19 Sectors per track
  39.   unsigned short numHeads;        // 1A - 1B Number of heads
  40.   unsigned char unused3[8];             // 1C - 23 Unused
  41.   unsigned biosDriveNum;            // 24 - 27 BIOS drive number
  42.   unsigned long long sectorsPerVolume;  // 28 - 2F Sectors per volume
  43.   unsigned long long mftStart;          // 30 - 37 LCN of VCN 0 of the $MFT
  44.   unsigned long long mftMirrStart;      // 38 - 3F LCN of VCN 0 of the $MFTMirr
  45.   unsigned clustersPerMft;              // 40 - 43 Clusters per MFT Record
  46.   unsigned clustersPerIndex;            // 44 - 47 Clusters per Index Record
  47.   unsigned long long volSerial;         // 48 - 4F Volume serial number
  48.   unsigned char pad[432];
  49.  
  50. } __attribute__((packed)) ntfsBootFile;
  51.  
  52. // Functions in libntfs
  53. int ntfsGetResizeConstraints(const char *, unsigned *, unsigned *);
  54. int ntfsResize(const char *, unsigned, progress *);
  55.  
  56. #define _NTFS_H
  57. #endif
  58.