51 {
AList *aP = 0, *aNow;
57 if ((maxSz =
List(&aP, iPath, iFD, 1)) <= 0)
58 return maxSz == 0 || maxSz == -ENOTSUP;
63 Buff = (
char *)malloc(maxSz);
68 while(aNow && (rc =
Get(aNow->Name, Buff, maxSz, iPath, iFD)) >= 0
69 && (rc = Set(aNow->Name, Buff, aNow->Vlen, oPath, oFD)) >= 0)
81 if ((sz =
Get(Aname, 0, 0, iPath, iFD)) <= 0)
82 return (!sz || sz == -ENOTSUP ? 0 : sz);
86 if (!(bP = (
char *)malloc(sz)))
89 snprintf(eBuff,
sizeof(eBuff),
"copy attr %s from", Aname);
90 Say->
Emsg(
"XAttr", ENOMEM, eBuff, iPath);
97 if ((rc =
Get(Aname, bP, sz, iPath, iFD)) > 0)
98 {
if ((rc =
Set(Aname, bP, rc, oPath, oFD)) < 0 && rc == -ENOTSUP) rc = 0;}
99 else if (rc < 0 && rc == -ENOTSUP) rc = 0;
virtual int Get(const char *Aname, void *Aval, int Avsz, const char *Path, int fd=-1)=0
virtual int Set(const char *Aname, const void *Aval, int Avsz, const char *Path, int fd=-1, int isNew=0)=0