Lines Matching refs:fd

121 			void			_RestoreAttributes(int fd);
325 write_line(int fd, const char* line)
331 write(fd, line, length);
332 write(fd, "\n", 1);
337 write_attributes(int fd, Inode* inode, attr_mode attrMode = kDiscIDAttributes)
356 write(fd, &count, sizeof(uint32));
370 write(fd, &type, sizeof(uint32));
373 write(fd, &length, 1);
374 write(fd, attribute->Name(), length);
377 write(fd, &size, sizeof(uint32));
379 write(fd, attribute->Data(), attribute->Size());
388 read_line(int fd, char* line, size_t length)
394 while (read(fd, &c, 1) == 1) {
414 read_attributes(int fd, Inode* inode)
417 if (read(fd, &count, sizeof(uint32)) != (ssize_t)sizeof(uint32))
428 if (read(fd, &type, sizeof(uint32)) != (ssize_t)sizeof(uint32)
429 || read(fd, &length, 1) != 1
430 || read(fd, name, length) != length
431 || read(fd, &size, sizeof(uint32)) != (ssize_t)sizeof(uint32))
453 read(fd, attribute->Data(), size);
653 int fd = _OpenAttributes(O_RDONLY);
654 if (fd < 0) {
742 if (fd >= 0) {
743 _RestoreAttributes(fd);
744 close(fd);
901 int fd = _OpenAttributes(O_RDONLY);
902 if (fd < 0)
905 _RestoreAttributes(fd);
907 close(fd);
912 Volume::_RestoreAttributes(int fd)
915 if (!read_line(fd, line, B_FILE_NAME_LENGTH))
921 if (!read_line(fd, line, B_FILE_NAME_LENGTH))
927 if (read_attributes(fd, fRootNode)) {
929 if (!read_attributes(fd, inode))
939 int fd = _OpenAttributes(O_WRONLY);
940 if (fd < 0)
943 write_line(fd, Name());
946 write_line(fd, inode->Name());
949 write_attributes(fd, fRootNode);
952 write_attributes(fd, inode);
955 close(fd);
969 int fd = _OpenAttributes(O_RDONLY, kSharedAttributes);
970 if (fd >= 0) {
971 read_attributes(fd, fRootNode);
972 close(fd);
975 fd = _OpenAttributes(O_RDONLY, kDeviceAttributes);
976 if (fd >= 0) {
977 read_attributes(fd, fRootNode);
978 close(fd);
990 int fd = _OpenAttributes(O_WRONLY, kSharedAttributes);
991 if (fd >= 0) {
992 write_attributes(fd, fRootNode, kSharedAttributes);
993 close(fd);
996 fd = _OpenAttributes(O_WRONLY, kDeviceAttributes);
997 if (fd >= 0) {
998 write_attributes(fd, fRootNode, kDeviceAttributes);
999 close(fd);
1391 cdda_identify_partition(int fd, partition_data* partition, void** _cookie)
1397 status_t status = read_table_of_contents(fd, toc, 2048);
1444 cdda_scan_partition(int fd, partition_data* partition, void* _cookie)
1463 Volume::DetermineName(compute_cddb_disc_id(*toc), fd, name, sizeof(name));