summaryrefslogtreecommitdiffstats
path: root/share/man/man9/extattr.9
Commit message (Collapse)AuthorAgeFilesLines
* Move macros describing extended attributes in UFS frommckusick2007-03-061-55/+0
| | | | | | | | | | | <sys/extattr.h> to <ufs/ufs/extattr.h>. Move description of extended attributes in UFS from man9/extattr.9 to man5/fs.5. Note that restore will not compile until <sys/extattr.h> and <ufs/ufs/extattr.h> have been updated. Suggested by: Robert Watson
* Declare a `struct extattr' that defines the format of an extendedmckusick2007-02-261-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attribute. Also define some macros to manipulate one of these structures. Explain their use in the extattr.9 manual page. The next step will be to make a sweep through the kernel replacing the old pointer manipulation code. To get an idea of how they would be used, the ffs_findextattr() function in ufs/ffs/ffs_vnops.c is currently written as follows: /* * Vnode operating to retrieve a named extended attribute. * * Locate a particular EA (nspace:name) in the area (ptr:length), and return * the length of the EA, and possibly the pointer to the entry and to the data. */ static int ffs_findextattr(u_char *ptr, u_int length, int nspace, const char *name, u_char **eap, u_char **eac) { u_char *p, *pe, *pn, *p0; int eapad1, eapad2, ealength, ealen, nlen; uint32_t ul; pe = ptr + length; nlen = strlen(name); for (p = ptr; p < pe; p = pn) { p0 = p; bcopy(p, &ul, sizeof(ul)); pn = p + ul; /* make sure this entry is complete */ if (pn > pe) break; p += sizeof(uint32_t); if (*p != nspace) continue; p++; eapad2 = *p++; if (*p != nlen) continue; p++; if (bcmp(p, name, nlen)) continue; ealength = sizeof(uint32_t) + 3 + nlen; eapad1 = 8 - (ealength % 8); if (eapad1 == 8) eapad1 = 0; ealength += eapad1; ealen = ul - ealength - eapad2; p += nlen + eapad1; if (eap != NULL) *eap = p0; if (eac != NULL) *eac = p; return (ealen); } return(-1); } After applying the structure and macros, it would look like this: /* * Vnode operating to retrieve a named extended attribute. * * Locate a particular EA (nspace:name) in the area (ptr:length), and return * the length of the EA, and possibly the pointer to the entry and to the data. */ static int ffs_findextattr(u_char *ptr, u_int length, int nspace, const char *name, u_char **eapp, u_char **eac) { struct extattr *eap, *eaend; eaend = (struct extattr *)(ptr + length); for (eap = (struct extattr *)ptr; eap < eaend; eap = EXTATTR_NEXT(eap)){ /* make sure this entry is complete */ if (EXTATTR_NEXT(eap) > eaend) break; if (eap->ea_namespace != nspace || eap->ea_namelength != length || bcmp(eap->ea_name, name, length)) continue; if (eapp != NULL) *eapp = eap; if (eac != NULL) *eac = EXTATTR_CONTENT(eap); return (EXTATTR_CONTENT_SIZE(eap)); } return(-1); } Not only is it considerably shorter, but it hopefully more readable :-)
* Use 'manual page' instead of 'man page' for consistency.hmp2005-06-281-1/+1
| | | | Approved by: re (hrs)
* Mdoc Janitor:hmp2003-10-231-1/+2
| | | | * Fix hard sentence breaks.
* Document VOP_LISTEXTATTR(9).rwatson2003-06-051-1/+3
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* The vnode operations for extended attributes no longer suffer fromrwatson2003-06-041-4/+1
| | | | | the features (bugs) in the BUGS section related to querying the required buffer size, or telling if an overflow occured.
* Uniformly refer to a file system as "file system".ru2002-12-121-5/+5
| | | | Approved by: re
* More file system > filesystemtrhodes2002-05-161-5/+5
|
* mdoc(7) police: Use the new .In macro for #include statements.ru2001-10-011-3/+3
|
* Removed whitespace at end-of-line; no content changes. I simply didschweikh2001-07-141-2/+2
| | | | | | | | | | cd src/share; find man[1-9] -type f|xargs perl -pi -e 's/[ \t]+$//' BTW, what editors are the culprits? I'm using vim and it shows me whitespace at EOL in troff files with a thick blue block... Reviewed by: Silence from cvs diff -b MFC after: 7 days
* Remove duplicate words.dd2001-06-241-1/+1
|
* o The revenge of the mdoc(7) police:rwatson2001-03-161-3/+7
| | | | | | | | | - These pages abused Ar macro (they should have used Fa). - NULL and other numeric constants should be marked with Dv. - VOP_* in the ERRORS section for the EOPNOTSUPP entry should be marked with Fn. Submitted by: ru
* mdoc(7) police: empty lines outside displays cause warnings in -mdocNG.ru2001-03-161-1/+1
|
* o Update some of the kernel man pages associated with extended attributesrwatson2001-03-151-15/+40
| | | | | | to reflect EA API change to explicit namespacing. Obtained from: TrustedBSD Project
* Prepare for mdoc(7)NG.ru2000-12-291-1/+1
|
* remove fullstops from the end of .Xr lines in SEE ALSO sections.ben2000-11-151-1/+1
|
* Man pages for the VFS extended attribute and access control list vnops.rwatson2000-01-051-0/+67
Reviewed by: eivind
OpenPOWER on IntegriCloud