亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? icbspace.c

?? 存取UDF格式的DVD光盤的驅動程序
?? C
字號:
#include <stdio.h>#include <malloc.h>#include "chkudf.h"#include "protos.h"/*  * returns 1 if address 1 is greater than address 2, -1 if less than, and * 0 if equal. Used only by read_icb for sorting the icb list. */int compare_address(UINT16 ptn1, UINT16 ptn2, UINT32 addr1, UINT32 addr2){  if (ptn1 > ptn2) return 1;  if (ptn1 < ptn2) return -1;  if (addr1 > addr2) return 1;  if (addr1 < addr2) return -1;  return 0;}/* * The following routine takes a File Entry as input and tracks the space * used by the file data and by the Extended Attributes of that file. */int track_file_allocation(struct FileEntry *FE, UINT16 ptn){  int    file_length;  int    error, sizeAD, Prev_Typ;  struct long_ad *lad;  struct short_ad *sad;  struct AllocationExtentDesc *AED = NULL;   UINT16 ADlength;  UINT32 Location_AEDP, ad_offset;  UINT16 Next_ptn;  UINT32 Next_LBN;  UINT8 *ad_start;  BOOL   isLAD;  ad_offset = 0;   //Offset into the allocation descriptors  Next_ptn = 0;    //The partition ref no of the previous AD  Next_LBN = 0;    //The LBN of the sector after the previous AD  Prev_Typ = -1;   //The type of the previous AD  ADlength = U_endian32(FE->L_AD);  switch(U_endian16(FE->sICBTag.Flags) & ADTYPEMASK) {    case ADSHORT:    case ADLONG:             isLAD = (U_endian16(FE->sICBTag.Flags) & ADTYPEMASK) == ADLONG;             sizeAD = isLAD ?  sizeof(struct long_ad) : sizeof(struct short_ad);             file_length = 0;             ad_start = (UINT8 *)(FE + 1) + U_endian32(FE->L_EA);             printf("\n  [type=%s, ad_start=%p, ADlength=%d, info_length=%d]  ",				isLAD ? "LONG" : "SHORT", ad_start, ADlength,				U_endian32(FE->InfoLengthL));             while (ad_offset < ADlength) {               sad = (struct short_ad *)(ad_start + ad_offset);               lad = (struct long_ad *)(ad_start + ad_offset);               if (isLAD) {                  ptn = U_endian16(lad->Location_PartNo);               }               printf("\n    [ad_offset=%d, atype=%d, loc=%d, len=%d, file_length=%d]  ",					ad_offset,					U_endian32(sad->ExtentLength.Length32) >> 30,					U_endian32(sad->Location),					U_endian32(sad->ExtentLength.Length32) & 0x3FFFFFFF,					file_length);               if (U_endian32(sad->ExtentLength.Length32) & 0x3FFFFFFF) {                 switch(U_endian32(sad->ExtentLength.Length32) >> 30) {                   case E_RECORDED:                   case E_ALLOCATED:                                   track_filespace(ptn, U_endian32(sad->Location), U_endian32(sad->ExtentLength.Length32) & 0x3FFFFFFF);                                   if ((ptn == Next_ptn) && (U_endian32(sad->Location) == Next_LBN) &&                                        ((U_endian32(sad->ExtentLength.Length32) >> 30) == Prev_Typ)) {                                     Error.Code = ERR_SEQ_ALLOC;                                     Error.Sector = FE->sTag.uTagLoc;                                     Error.Expected = Next_LBN;                                     DumpError();                                   }                                   Next_ptn = ptn;                                   Next_LBN = U_endian32(sad->Location) + ((U_endian32(sad->ExtentLength.Length32) && 0x3FFFFFFF) >> bdivshift);                                   Prev_Typ = U_endian32(sad->ExtentLength.Length32) >> 30;                                   if (file_length >= U_endian32(FE->InfoLengthL)) {                                     printf(" (Tail)");                                   } else {                                     file_length += U_endian32(sad->ExtentLength.Length32) & 0x3FFFFFFF;                                   }                                   ad_offset += sizeAD;                                   break;                   case E_UNALLOCATED:                                   if (file_length >= U_endian32(FE->InfoLengthL)) {                                     printf(" (ILLEGAL TAIL)");                                   } else {                                     file_length += U_endian32(sad->ExtentLength.Length32) & 0x3FFFFFFF;                                   }                                   ad_offset += sizeAD;                                   printf(" --Unallocated Extent--");                                   break;                   case E_ALLOCEXTENT:                                   track_filespace(ptn, U_endian32(sad->Location), U_endian32(sad->ExtentLength.Length32) & 0x3FFFFFFF);                                   if (!AED) {                                     AED = (struct AllocationExtentDesc *)malloc(blocksize);                                   }                                   if (AED) {                                     Location_AEDP = U_endian32(sad->Location);                                     error = ReadLBlocks(AED, Location_AEDP, ptn, 1);                                     if (!error) {                                       error = CheckTag((struct tag *)AED, Location_AEDP, TAGID_ALLOC_EXTENT, 8, blocksize - 16);                                     }                                   } else {                                     error = 1;                                   }									if (error)									{										printf("Error=%d, Error.Code=%d\n", error, Error.Code);										DumpError();									}                                   if (error == 2) {                                     if (U_endian32(AED->sTag.uTagLoc) == 0xffffffff) {                                       error = 0;                                       Error.Code = 0;                                     } else {                                       DumpError();                                       error = 0;                                     }                                   }                                   if (!error) {                                     ad_start = (UINT8 *)(AED + 1);                                     ADlength = U_endian32(AED->L_AD);                                     ad_offset = 0;                                   } else {                                     ad_offset = ADlength;                                   }									printf("\n      [NEW ad_start=%p, ADlength=%d]  ",										ad_start, ADlength);                                   break;                 }               } else {                 ad_offset = ADlength;               }             }				printf("  [file_length=%d]  ", file_length);             if (file_length != U_endian32(FE->InfoLengthL)) {               if (((FE->InfoLengthL + blocksize - 1) & ~(blocksize - 1)) ==                    file_length) {                 printf(" **ADs rounded up");               } else {                 Error.Code = ERR_BAD_AD;                 Error.Sector = U_endian32(FE->sTag.uTagLoc);                 Error.Expected = U_endian32(FE->InfoLengthL);                 Error.Found = file_length;               }             }             free (AED);             break;    case ADNONE:             if (U_endian32(FE->InfoLengthL) != U_endian32(FE->L_AD)) {               Error.Code = ERR_BAD_AD;               Error.Sector = U_endian32(FE->sTag.uTagLoc);               Error.Expected = U_endian32(FE->InfoLengthL);               Error.Found = U_endian32(FE->L_AD);             }             break;  }  return error;}/*  * This routine walks an ICB hierarchy, marking space as allocated as it * goes.  The authoritative FE is noted in the FE_ptn and FE_LBN fields * of the entry in the ICB list. * * Currently, the space map does not have "owners" attached to allocation. * This means that on write once media, errors will be generated when more * than one File Entry in an ICB hierarchy identifies the same space. */int walk_icb_hierarchy(struct FileEntry *FE, UINT16 ptn, UINT32 Location,                    UINT32 Length, int ICB_offs){  int i, error;  /*   * Mark the ICB extent as allocated   */  track_filespace(ptn, Location, Length);  /*   * Read each sector in turn (1 sector == 1 ICB)   */  for (i = 0; i < (Length >> bdivshift); i++) {    error = ReadLBlocks(FE, Location + i, ptn, 1);    if (!error) {      if (!CheckTag((struct tag *)FE, Location + i, TAGID_FILE_ENTRY, 16, Length)) {        ICBlist[ICB_offs].LinkRec = U_endian16(FE->LinkCount);        ICBlist[ICB_offs].UniqueID_L = U_endian32(FE->UniqueIdL);        ICBlist[ICB_offs].FE_LBN = Location + i;        ICBlist[ICB_offs].FE_Ptn = ptn;        track_file_allocation(FE, ptn);      } else {        /*         * A descriptor was found that wasn't a File Entry.         */        ClearError();        if (!CheckTag((struct tag *)FE, Location + i, TAGID_INDIRECT, 16, Length)) {          walk_icb_hierarchy(FE, U_endian32(((struct IndirectEntry *)FE)->sIndirectICB.Location_LBN),                       U_endian16(((struct IndirectEntry *)FE)->sIndirectICB.Location_PartNo),                       U_endian32(((struct IndirectEntry *)FE)->sIndirectICB.ExtentLength.Length32) & 0x3FFFFFFF,                       ICB_offs);        } else {          DumpError();  // Wasn't a file entry, but should have been.        }      }    } else {      Error.Code = ERR_READ;      Error.Sector = Location;      i = Length;    }  /* Read/didn't read sector */  }    /* Do each ICB in the extent */  return error;}/* * This routine takes a partition, location, and length of an ICB extent as * input, marks the appropriate space as allocated in the space map,  * maintains a link count for the ICB, and returns the appropriate File * File Entry data in *FE. * * If FID == 0, this is a root entry or a re-read of an ICB.  If FID == 1, * this is the first read of an FE from a particular FID.  Note that the FE * might have been read before, but due to another FID.   * * Summary: *   FID == 0, space is not tracked and link counts not incremented. *   FID == 1, space is tracked and link counts are incremented. */int read_icb(struct FileEntry *FE, UINT16 ptn, UINT32 Location, UINT32 Length,              int FID){  UINT32 interval;  INT32  ICB_offs;  int    error, temp;  struct FileEntry *EA;  error = 0;  if (Length) {    /*     * If there's something to track...     */    ICB_offs = ICBlist_len >> 1; // start halfway for binary search    temp = ICB_offs;    interval = 1;    while (temp) {      interval <<= 1;      temp >>= 1;    }                          // set interval to 1/4 - 1/2 for binary search    temp = 1;              /* temp is used as a relative position                             * indicator.  If temp = 0, ICB_offs exactly                            * identifies the entry.  If temp = -1, ICB_offs                            * points to an entry that should come before the                            * new one.  If temp = 1, ICB_offs points to an                            * entry that should come after the new one (or                            * the end of the list)                            */                                    while ((interval > 0) && ICBlist_len) {      interval >>= 1;      temp = compare_address(ICBlist[ICB_offs].Ptn, ptn, ICBlist[ICB_offs].LBN, Location);      if (temp == 0) {        interval = 0;        if (FID) {          /*           * A FID was pointing to this ICB, which we already have tracked.           * Increment our link count to note the fact.           */          ICBlist[ICB_offs].Link++;        }        ReadLBlocks(FE, ICBlist[ICB_offs].FE_LBN, ICBlist[ICB_offs].FE_Ptn, 1);      } else if (temp == 1) {        ICB_offs -= interval;        if (ICB_offs < 0) ICB_offs = 0;      } else {        ICB_offs += interval;        if (ICB_offs >= ICBlist_len) ICB_offs = ICBlist_len - 1;      }    }    if (temp) {      /*       * No match was found in the tracked list.       * This code inserts an entry for a new ICB hierarchy.       * The above code may have left the pointer to a point either       * before or after the insertion point.       */      while ((temp == -1)  && (ICB_offs < (ICBlist_len - 1))) {        ICB_offs++;        temp = compare_address(ICBlist[ICB_offs].Ptn, ptn, ICBlist[ICB_offs].LBN, Location);      }        /*       * ICB_offs now points to the first entry greater than the one we        * are inserting or the end of the list.       */      ICBlist_len++;      if (ICBlist_len > ICBlist_alloc) {        ICBlist = realloc(ICBlist, (ICBlist_alloc + ICB_Alloc) * sizeof(struct _sICB_trk));        if (ICBlist) {          ICBlist_alloc += ICB_Alloc;        } else {          Error.Code = ERR_NO_ICB_MEM;        }      }      for (temp = ICBlist_len -1; temp > ICB_offs; temp--) {        ICBlist[temp] = ICBlist[temp - 1];      }      if ((compare_address(ICBlist[ICB_offs].Ptn, ptn, ICBlist[ICB_offs].LBN, Location) < 0) &&         (ICB_offs < (ICBlist_len - 1))) {        ICB_offs++;      }      ICBlist[ICB_offs].LBN = Location;      ICBlist[ICB_offs].Ptn = ptn;      ICBlist[ICB_offs].UniqueID_L = 0;      ICBlist[ICB_offs].LinkRec = 0;      if (FID) {        ICBlist[ICB_offs].Link = 1;      } else {        ICBlist[ICB_offs].Link = 0;      }      walk_icb_hierarchy(FE, ptn, Location, Length, ICB_offs);      switch(FE->sICBTag.FileType) {          case FILE_TYPE_UNSPECIFIED:                           Num_Type_Err++;                           break;          case FILE_TYPE_DIRECTORY:                           Num_Dirs++;                           break;          case FILE_TYPE_RAW:                           Num_Files++;                           break;      }      if (U_endian32(FE->sExtAttrICB.ExtentLength.Length32) & 0x3FFFFFFF) {        EA = (struct FileEntry *)malloc(blocksize);        if (EA) {          if (U_endian16(EA->sExtAttrICB.Location_PartNo) < PTN_no) {            printf(" EA: [%x:%08x]", U_endian16(FE->sExtAttrICB.Location_PartNo),                    U_endian32(FE->sExtAttrICB.Location_LBN));            read_icb(EA, U_endian16(FE->sExtAttrICB.Location_PartNo), U_endian32(FE->sExtAttrICB.Location_LBN),                  U_endian32(FE->sExtAttrICB.ExtentLength.Length32) & 0x3FFFFFFF, 0);          } else {            printf("\n**EA field contains illegal partition reference number.\n");          }          free(EA);        }      }       }  }        /* If something to track */        if (error) {    DumpError();  }  return error;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
九九精品视频在线看| 欧美日韩精品一区二区| 日韩和欧美的一区| 亚洲乱码一区二区三区在线观看| 精品国产3级a| 亚洲精品一区二区三区香蕉| 欧美xxxxx裸体时装秀| 欧美tickle裸体挠脚心vk| 日韩精品一区二区三区四区视频 | 欧美影院一区二区| 老汉av免费一区二区三区| 天堂va蜜桃一区二区三区 | 欧美日韩免费视频| 欧美午夜精品一区二区蜜桃 | 亚洲国产婷婷综合在线精品| 一二三区精品视频| 日韩高清中文字幕一区| 蜜桃视频在线观看一区| 国产一区二区福利视频| 成人福利视频在线| 在线不卡欧美精品一区二区三区| 色狠狠一区二区三区香蕉| 欧美在线你懂的| 欧美一区二区三区小说| 亚洲色图清纯唯美| 99久久久精品| 99久久99久久精品国产片果冻| 91在线精品秘密一区二区| 色欧美片视频在线观看 | 亚洲最新视频在线观看| 五月婷婷激情综合| 韩国毛片一区二区三区| 99久久久国产精品| 欧美一区二区三区不卡| 国产精品国产三级国产专播品爱网| 又紧又大又爽精品一区二区| 久久精品久久精品| 91免费国产在线观看| 日韩午夜精品电影| 亚洲免费毛片网站| 国产一区二区成人久久免费影院| thepron国产精品| 日韩一区二区在线看| 一区二区三区在线免费观看| 无码av免费一区二区三区试看| 狠狠色丁香久久婷婷综| 91麻豆国产香蕉久久精品| 欧美一区二区三区视频在线| 国产精品伦一区二区三级视频| 亚洲国产精品视频| 成人网在线播放| 日韩一区二区三区在线观看| 亚洲人成精品久久久久久| 极品尤物av久久免费看| 欧美日本在线一区| 日韩一区日韩二区| 色综合天天综合网天天狠天天| 日韩精品一区二区三区四区视频| 一区二区三区四区国产精品| 国产**成人网毛片九色| 日韩欧美一级在线播放| 亚洲成a人片在线观看中文| 成人精品视频一区二区三区| 久久众筹精品私拍模特| 精品盗摄一区二区三区| 中文一区在线播放 | 欧美日韩国产精品成人| 国产精品久久久久影视| 精品一区二区三区不卡 | 久久青草国产手机看片福利盒子 | 欧美日韩一二区| 亚洲欧美国产毛片在线| 97精品视频在线观看自产线路二| 久久天堂av综合合色蜜桃网| 麻豆精品久久久| 欧美一区二区人人喊爽| 午夜在线电影亚洲一区| 欧美日韩精品系列| 午夜激情一区二区| 在线播放亚洲一区| 日韩成人一级片| 久久精品人人做人人综合| 天天亚洲美女在线视频| 欧美性猛交xxxxxx富婆| 蜜臀精品久久久久久蜜臀| 3751色影院一区二区三区| 日韩不卡一二三区| 日韩精品专区在线| 激情小说亚洲一区| 国产欧美一区二区精品忘忧草 | 一区二区不卡在线播放| 欧美日韩午夜在线| 天天影视涩香欲综合网| 日韩精品中午字幕| 国产河南妇女毛片精品久久久| 国产色综合久久| 成人av网站在线观看免费| 亚洲欧美乱综合| 欧美一区二区三区思思人 | www久久久久| 国产精品自拍在线| 日韩毛片精品高清免费| 精品视频一区三区九区| 麻豆精品在线播放| 亚洲欧洲日本在线| 91精品国产美女浴室洗澡无遮挡| 精品一区二区三区欧美| 亚洲丝袜制服诱惑| 在线播放视频一区| 成人性生交大片免费看视频在线| 亚洲综合一区二区| 久久久精品中文字幕麻豆发布| 99r国产精品| 久久精品久久精品| 亚洲美女一区二区三区| 久久综合色8888| 91成人国产精品| 国产精品影视在线| 亚洲成人综合在线| 中文字幕成人av| 91精品国模一区二区三区| 成人美女视频在线观看| 青青草国产精品亚洲专区无| 18成人在线视频| 久久久久综合网| 欧美精品日日鲁夜夜添| 99re这里只有精品首页| 国产美女一区二区| 美国毛片一区二区三区| 亚洲国产一区二区视频| 亚洲婷婷综合色高清在线| 久久女同精品一区二区| 欧美猛男超大videosgay| 94色蜜桃网一区二区三区| 国产成人综合视频| 久久精品国产99国产| 天堂蜜桃一区二区三区| 亚洲图片欧美一区| 樱桃国产成人精品视频| 国产精品久久久久久久午夜片| 精品欧美久久久| 日韩小视频在线观看专区| 欧美日韩久久久久久| 欧美综合色免费| 一本色道**综合亚洲精品蜜桃冫| 国产成人在线视频网站| 国产中文一区二区三区| 韩国欧美国产一区| 久久黄色级2电影| 久久精品久久精品| 精品一区二区国语对白| 久草在线在线精品观看| 久久国产日韩欧美精品| 狂野欧美性猛交blacked| 免费成人美女在线观看| 日本成人中文字幕| 日本不卡在线视频| 乱中年女人伦av一区二区| 麻豆传媒一区二区三区| 国产在线麻豆精品观看| 国产精品一区二区久久精品爱涩 | 中文字幕人成不卡一区| 国产精品久久一卡二卡| 中文字幕欧美一| 亚洲美女少妇撒尿| 亚洲国产cao| 日韩精品欧美精品| 蜜臀久久久99精品久久久久久| 秋霞成人午夜伦在线观看| 激情伊人五月天久久综合| 国产精品香蕉一区二区三区| 丁香网亚洲国际| 色偷偷88欧美精品久久久| 欧美日韩免费高清一区色橹橹 | 久久久欧美精品sm网站| 国产视频一区不卡| 亚洲欧美另类综合偷拍| 午夜婷婷国产麻豆精品| 激情六月婷婷综合| 99久久婷婷国产综合精品| 欧美日韩国产影片| 久久久99免费| 一区二区三区美女视频| 七七婷婷婷婷精品国产| 成人一区二区三区视频在线观看 | 欧美tickling挠脚心丨vk| 国产欧美一区二区三区鸳鸯浴| 1024精品合集| 日本成人在线一区| 成年人网站91| 91精品福利在线一区二区三区| 久久免费电影网| 亚洲一区二区三区中文字幕| 久久99九九99精品| 在线一区二区视频| 久久久国产午夜精品| 午夜视频一区二区| 不卡一区二区三区四区| 日韩一区二区三区av| 亚洲精品国产一区二区三区四区在线|