Lines Matching refs:buffer

145 init_volume_date(ISOVolDate *date, char *buffer)
147 memcpy(date, buffer, ISO_VOL_DATE_SIZE);
153 init_node_date(ISORecDate *date, char *buffer)
155 memcpy(date, buffer, sizeof(struct ISORecDate));
161 InitVolDesc(iso9660_volume *volume, char *buffer)
165 volume->volDescType = *(uint8 *)buffer;
166 buffer += sizeof(volume->volDescType);
170 strncpy(volume->stdIDString, buffer, kStdIDStringLen);
171 buffer += kStdIDStringLen;
173 volume->volDescVersion = *(uint8 *)buffer;
174 buffer += sizeof(volume->volDescVersion);
176 buffer += sizeof(volume->unused1); // skip unused 8th byte
180 strncpy(volume->systemIDString, buffer, kSystemIDStringLen);
181 buffer += kSystemIDStringLen;
186 strncpy(volume->volIDString, buffer, kVolIDStringLen);
187 buffer += kVolIDStringLen;
190 buffer += sizeof(volume->unused2) - 1; // skip unused 73-80 bytes
192 volume->volSpaceSize[LSB_DATA] = *(uint32 *)buffer;
193 buffer += sizeof(volume->volSpaceSize[LSB_DATA]);
194 volume->volSpaceSize[MSB_DATA] = *(uint32 *)buffer;
195 buffer += sizeof(volume->volSpaceSize[MSB_DATA]);
197 buffer += sizeof(volume->unused3) - 1; // skip unused 89-120 bytes
199 volume->volSetSize[LSB_DATA] = *(uint16*)buffer;
200 buffer += sizeof(volume->volSetSize[LSB_DATA]);
201 volume->volSetSize[MSB_DATA] = *(uint16*)buffer;
202 buffer += sizeof(volume->volSetSize[MSB_DATA]);
204 volume->volSeqNum[LSB_DATA] = *(uint16*)buffer;
205 buffer += sizeof(volume->volSeqNum[LSB_DATA]);
206 volume->volSeqNum[MSB_DATA] = *(uint16*)buffer;
207 buffer += sizeof(volume->volSeqNum[MSB_DATA]);
209 volume->logicalBlkSize[LSB_DATA] = *(uint16*)buffer;
210 buffer += sizeof(volume->logicalBlkSize[LSB_DATA]);
211 volume->logicalBlkSize[MSB_DATA] = *(uint16*)buffer;
212 buffer += sizeof(volume->logicalBlkSize[MSB_DATA]);
214 volume->pathTblSize[LSB_DATA] = *(uint32*)buffer;
215 buffer += sizeof(volume->pathTblSize[LSB_DATA]);
216 volume->pathTblSize[MSB_DATA] = *(uint32*)buffer;
217 buffer += sizeof(volume->pathTblSize[MSB_DATA]);
219 volume->lPathTblLoc[LSB_DATA] = *(uint16*)buffer;
220 buffer += sizeof(volume->lPathTblLoc[LSB_DATA]);
221 volume->lPathTblLoc[MSB_DATA] = *(uint16*)buffer;
222 buffer += sizeof(volume->lPathTblLoc[MSB_DATA]);
224 volume->optLPathTblLoc[LSB_DATA] = *(uint16*)buffer;
225 buffer += sizeof(volume->optLPathTblLoc[LSB_DATA]);
226 volume->optLPathTblLoc[MSB_DATA] = *(uint16*)buffer;
227 buffer += sizeof(volume->optLPathTblLoc[MSB_DATA]);
229 volume->mPathTblLoc[LSB_DATA] = *(uint16*)buffer;
230 buffer += sizeof(volume->mPathTblLoc[LSB_DATA]);
231 volume->mPathTblLoc[MSB_DATA] = *(uint16*)buffer;
232 buffer += sizeof(volume->mPathTblLoc[MSB_DATA]);
234 volume->optMPathTblLoc[LSB_DATA] = *(uint16*)buffer;
235 buffer += sizeof(volume->optMPathTblLoc[LSB_DATA]);
236 volume->optMPathTblLoc[MSB_DATA] = *(uint16*)buffer;
237 buffer += sizeof(volume->optMPathTblLoc[MSB_DATA]);
241 InitNode(volume, &volume->rootDirRec, buffer, NULL);
244 buffer += ISO_ROOT_DIR_REC_SIZE;
248 strncpy(volume->volSetIDString, buffer, kVolSetIDStringLen);
249 buffer += kVolSetIDStringLen;
254 strncpy(volume->pubIDString, buffer, kPubIDStringLen);
255 buffer += kPubIDStringLen;
260 strncpy(volume->dataPreparer, buffer, kDataPreparerLen);
261 buffer += kDataPreparerLen;
266 strncpy(volume->appIDString, buffer, kAppIDStringLen);
267 buffer += kAppIDStringLen;
272 strncpy(volume->copyright, buffer, kCopyrightLen);
273 buffer += kCopyrightLen;
278 strncpy(volume->abstractFName, buffer, kAbstractFNameLen);
279 buffer += kAbstractFNameLen;
283 strncpy(volume->biblioFName, buffer, kBiblioFNameLen);
284 buffer += kBiblioFNameLen;
286 init_volume_date(&volume->createDate, buffer);
287 buffer += ISO_VOL_DATE_SIZE;
289 init_volume_date(&volume->modDate, buffer);
290 buffer += ISO_VOL_DATE_SIZE;
292 init_volume_date(&volume->expireDate, buffer);
293 buffer += ISO_VOL_DATE_SIZE;
295 init_volume_date(&volume->effectiveDate, buffer);
296 buffer += ISO_VOL_DATE_SIZE;
298 volume->fileStructVers = *(uint8*)buffer;
304 parse_rock_ridge(iso9660_volume* volume, iso9660_inode* node, char* buffer,
316 TRACE(("RR: Start of extensions at %p\n", buffer));
319 buffer += length;
320 if (buffer + 2 >= end)
322 length = *(uint8*)(buffer + 2);
323 if (buffer + length > end)
328 switch (((int)buffer[0] << 8) + buffer[1]) {
334 node->attr.pxVer = *(uint8*)(buffer + bytePos++);
338 = *(mode_t*)(buffer + bytePos);
341 = *(mode_t*)(buffer + bytePos);
346 = *(nlink_t*)(buffer+bytePos);
349 = *(nlink_t*)(buffer + bytePos);
354 = *(uid_t*)(buffer + bytePos);
357 = *(uid_t*)(buffer + bytePos);
362 = *(gid_t*)(buffer + bytePos);
365 = *(gid_t*)(buffer + bytePos);
383 TRACE(("Buffer is at %p\n", buffer));
386 node->attr.slVer = *(uint8*)(buffer + bytePos++);
388 uint8 slFlags = *(uint8*)(buffer + bytePos++);
395 uint8 compFlag = *(uint8*)(buffer + bytePos++);
396 uint8 compLen = *(uint8*)(buffer + bytePos++);
428 memcpy(slName + addPos, buffer + bytePos,
513 node->attr.nmVer = *(uint8 *)(buffer + bytePos++);
514 flags = *(uint8 *)(buffer + bytePos++);
516 TRACE(("RR: nm buffer is %s, start at %p\n", (buffer + bytePos),
517 buffer + bytePos));
520 memcpy(altName + oldEnd, buffer + bytePos, length - 5);
542 node->startLBN[LSB_DATA] = *(uint32*)(buffer+4);
543 node->startLBN[MSB_DATA] = *(uint32*)(buffer+8);
545 char* buffer = (char*)block_cache_get(volume->fBlockCache,
547 if (buffer == NULL)
550 InitNode(volume, node, buffer, NULL, true);
581 if (buffer[0] == '\0') {
585 TRACE(("RR: Unknown tag %c%c\n", buffer[0], buffer[1]));
605 char buffer[ISO_PVD_SIZE];
662 retval = read_pos(volume->fdOfSession, offset, (void*)buffer,
669 if (strncmp(buffer + 1, kISO9660IDString, 5) == 0) {
670 if (*buffer == 0x01 && !isISO) {
676 InitVolDesc(volume, buffer);
698 } else if (*buffer == 0x02 && isISO && allowJoliet) {
703 if (buffer[88] == 0x25 && buffer[89] == 0x2f) {
704 switch (buffer[90]) {
715 InitNode(volume, &volume->rootDirRec, &buffer[156],
719 } else if (*(unsigned char *)buffer == 0xff) {
723 TRACE(("found header %d\n",*buffer));
812 "buffer of size %d\n", node.name, (int)nameBufferSize));
845 InitNode(iso9660_volume* volume, iso9660_inode* node, char* buffer,
848 uint8 recordLength = *(uint8*)buffer++;
852 buffer, recordLength));
859 char* end = buffer + recordLength;
869 node->extAttrRecLen = *(uint8*)buffer++;
872 node->startLBN[LSB_DATA] = *(uint32*)buffer;
873 buffer += 4;
874 node->startLBN[MSB_DATA] = *(uint32*)buffer;
875 buffer += 4;
879 node->dataLen[LSB_DATA] = *(uint32*)buffer;
880 buffer += 4;
881 node->dataLen[MSB_DATA] = *(uint32*)buffer;
882 buffer += 4;
886 init_node_date(&node->recordDate, buffer);
887 buffer += 7;
889 node->flags = *(uint8*)buffer;
890 buffer++;
893 node->fileUnitSize = *(uint8*)buffer;
894 buffer++;
897 node->interleaveGapSize = *(uint8*)buffer;
898 buffer++;
901 node->volSeqNum = *(uint32*)buffer;
902 buffer += 4;
905 nameLength = *(uint8*)buffer;
906 buffer++;
927 // on joliet discs, buffer[0] can be 0 for Unicoded filenames,
932 if (node->name_length == 1 && buffer[0] == 0) {
935 } else if (node->name_length == 1 && buffer[0] == 1) {
949 status_t status = unicode_to_utf8(buffer, &sourceLength,
967 node->name[i] = tolower(buffer[i]);
980 buffer += nameLength;
982 buffer++;
986 return parse_rock_ridge(volume, node, buffer, end, relocated);