Lines Matching refs:pa

256 	struct ATTR *pa;
277 pa = attrtable[low];
278 if (pa->namelen < lth) {
279 pa = (struct ATTR*)realloc(pa,
281 attrtable[low] = pa;
287 pa = (struct ATTR*)malloc(sizeof(struct ATTR) + lth);
288 if (pa) {
298 attrtable[mid] = pa;
304 attrtable[0] = pa;
306 pa->key = key;
307 pa->namelen = 0;
308 pa->type = const_cpu_to_le32(0);
309 pa->inode = 0;
312 return (pa);
661 struct ATTR *pa;
665 pa = getattrentry(key,0);
666 if (pa) {
667 if (!pa->namelen)
672 for (i=0; 2*i<pa->namelen; i++)
673 name[i] = le16_to_cpu(pa->name[i]);
758 static void showattribute(const char *prefix, const struct ATTR *pa)
760 if (pa) {
761 if (pa->type) {
763 prefix, pa->key, (long long)pa->inode,
764 mftattrname(pa->type));
765 if (pa->namelen)
766 showname(" name ",(const char*)pa->name,
767 pa->namelen/2);
771 if (pa->namelen) {
773 prefix, pa->key);
774 showname(" name ",(const char*)pa->name,
775 pa->namelen/2);
778 prefix, pa->key);
1174 void copy_attribute(struct ATTR *pa, const char *buf, int length)
1179 if (pa) {
1183 pa->type = panew->type;
1184 pa->lsn = sle64_to_cpu(panew->lsn);
1185 pa->inode = MREF(le64_to_cpu(panew->inode));
1190 pa->type = old_aligned.type;
1191 pa->lsn = sle64_to_cpu(old_aligned.lsn);
1192 pa->inode = MREF(le64_to_cpu(old_aligned.inode));
1205 struct ATTR *pa;
1232 pa = getattrentry(le16_to_cpu(logr->target_attribute),
1234 if (pa) {
1235 copy_attribute(pa, buf, length);
1236 pa->namelen = len;
1238 memcpy(pa->name,&buf[extra],len);
1251 pa = getattrentry(i,0);
1252 if (pa) {
1253 copy_attribute(pa, buf + i, step);
1272 pa = getattrentry(key,len);
1273 if (pa) {
1274 pa->namelen = len;
1275 memcpy(pa->name,
1298 struct ATTR *pa;
1401 pa = getattrentry(attr,0);
1407 if (pa)
1408 showattribute(" ",pa);
1434 if (pa)
1435 showattribute(" ",pa);
1454 pa = getattrentry(attr,0);
1456 if (pa
1457 && !pa->inode
1458 && (pa->type == const_cpu_to_le32(0x80))
1462 showattribute(" ",pa);
1497 if (pa)
1498 showattribute(" ",pa);
1503 pa = getattrentry(attr,0);
1504 if (pa)
1505 showattribute(" ",pa);
1508 if (pa && (pa->namelen == 8) && !memcmp(pa->name, SDS, 8)) {
1519 if (pa && (pa->namelen == 8) && !memcmp(pa->name, I30, 8)) {
1562 pa = getattrentry(attr,0);
1563 if (pa)
1564 showattribute(" ",pa);
1632 pa = getattrentry(attr,0);
1633 if (pa)
1634 showattribute(" ",pa);
1646 pa = getattrentry(attr,0);
1647 if (pa)
1648 showattribute(" ",pa);
1649 if (pa
1650 && !pa->inode
1651 && (pa->type == const_cpu_to_le32(0x80))
1682 if (pa && pa->type)
1691 pa = getattrentry(attr,0);
1692 if (pa)
1693 showattribute(" ",pa);
1725 pa = getattrentry(attr,0);
1726 if (pa)
1727 showattribute(" ",pa);
1746 pa = getattrentry(attr,len);
1747 if (pa && redo) {
1752 copy_attribute(pa, buf, length);
1753 pa->namelen = len;
1755 memcpy(pa->name,&buf[extra],len);
1757 (long)le32_to_cpu(pa->type),
1758 mftattrname(pa->type));
1760 (long long)pa->lsn);
1762 (long long)pa->inode);
1792 pa = getattrentry(i,0);
1793 if (pa) {
1794 copy_attribute(pa, &buf[i], step);
1799 (long long)pa->inode,
1800 mftattrname(pa->type));
1801 if (pa->namelen)
1803 (char*)pa->name,
1804 pa->namelen/2);
1837 pa = getattrentry(key,l);
1838 if (pa) {
1839 pa->namelen = l;
1840 memcpy(pa->name,&buf[i+4],l);