Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move macros describing extended attributes in UFS from | mckusick | 2007-03-06 | 1 | -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 extended | mckusick | 2007-02-26 | 1 | -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. | hmp | 2005-06-28 | 1 | -1/+1 |
| | | | | Approved by: re (hrs) | ||||
* | Mdoc Janitor: | hmp | 2003-10-23 | 1 | -1/+2 |
| | | | | * Fix hard sentence breaks. | ||||
* | Document VOP_LISTEXTATTR(9). | rwatson | 2003-06-05 | 1 | -1/+3 |
| | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories | ||||
* | The vnode operations for extended attributes no longer suffer from | rwatson | 2003-06-04 | 1 | -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". | ru | 2002-12-12 | 1 | -5/+5 |
| | | | | Approved by: re | ||||
* | More file system > filesystem | trhodes | 2002-05-16 | 1 | -5/+5 |
| | |||||
* | mdoc(7) police: Use the new .In macro for #include statements. | ru | 2001-10-01 | 1 | -3/+3 |
| | |||||
* | Removed whitespace at end-of-line; no content changes. I simply did | schweikh | 2001-07-14 | 1 | -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. | dd | 2001-06-24 | 1 | -1/+1 |
| | |||||
* | o The revenge of the mdoc(7) police: | rwatson | 2001-03-16 | 1 | -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. | ru | 2001-03-16 | 1 | -1/+1 |
| | |||||
* | o Update some of the kernel man pages associated with extended attributes | rwatson | 2001-03-15 | 1 | -15/+40 |
| | | | | | | to reflect EA API change to explicit namespacing. Obtained from: TrustedBSD Project | ||||
* | Prepare for mdoc(7)NG. | ru | 2000-12-29 | 1 | -1/+1 |
| | |||||
* | remove fullstops from the end of .Xr lines in SEE ALSO sections. | ben | 2000-11-15 | 1 | -1/+1 |
| | |||||
* | Man pages for the VFS extended attribute and access control list vnops. | rwatson | 2000-01-05 | 1 | -0/+67 |
Reviewed by: eivind |