/[base]/head/share/man/man9/extattr.9
ViewVC logotype

Log of /head/share/man/man9/extattr.9

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 206622 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 14 19:08:06 2010 UTC (7 years, 5 months ago) by uqs
File length: 4181 byte(s)
Diff to previous 167259
mdoc: order prologue macros consistently by Dd/Dt/Os

Although groff_mdoc(7) gives another impression, this is the ordering
most widely used and also required by mdocml/mandoc.

Reviewed by:	ru
Approved by:	philip, ed (mentors)


Revision 167259 - (view) (download) (annotate) - [select for diffs]
Modified Tue Mar 6 08:13:21 2007 UTC (10 years, 7 months ago) by mckusick
File length: 4181 byte(s)
Diff to previous 167010
Move macros describing extended attributes in UFS from
<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


Revision 167010 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 26 06:18:53 2007 UTC (10 years, 7 months ago) by mckusick
File length: 5929 byte(s)
Diff to previous 147647
Declare a `struct extattr' that defines the format of an extended
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 :-)


Revision 147647 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jun 28 20:15:19 2005 UTC (12 years, 3 months ago) by hmp
File length: 4181 byte(s)
Diff to previous 121385
Use 'manual page' instead of 'man page' for consistency.

Approved by:	re (hrs)


Revision 121385 - (view) (download) (annotate) - [select for diffs]
Modified Thu Oct 23 02:33:03 2003 UTC (13 years, 11 months ago) by hmp
File length: 4178 byte(s)
Diff to previous 115876
Mdoc Janitor:

  * Fix hard sentence breaks.


Revision 115876 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jun 5 14:20:48 2003 UTC (14 years, 4 months ago) by rwatson
File length: 4179 byte(s)
Diff to previous 115803
Document VOP_LISTEXTATTR(9).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories


Revision 115803 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jun 4 04:01:44 2003 UTC (14 years, 4 months ago) by rwatson
File length: 4129 byte(s)
Diff to previous 107788
The vnode operations for extended attributes no longer suffer from
the features (bugs) in the BUGS section related to querying the
required buffer size, or telling if an overflow occured.


Revision 107788 - (view) (download) (annotate) - [select for diffs]
Modified Thu Dec 12 17:26:04 2002 UTC (14 years, 10 months ago) by ru
File length: 4327 byte(s)
Diff to previous 96711
Uniformly refer to a file system as "file system".

Approved by:	re


Revision 96711 - (view) (download) (annotate) - [select for diffs]
Modified Thu May 16 05:21:58 2002 UTC (15 years, 4 months ago) by trhodes
File length: 4322 byte(s)
Diff to previous 84306
More file system > filesystem


Revision 84306 - (view) (download) (annotate) - [select for diffs]
Modified Mon Oct 1 16:09:29 2001 UTC (16 years ago) by ru
File length: 4327 byte(s)
Diff to previous 79727
mdoc(7) police: Use the new .In macro for #include statements.


Revision 79727 - (view) (download) (annotate) - [select for diffs]
Modified Sat Jul 14 19:41:16 2001 UTC (16 years, 3 months ago) by schweikh
File length: 4360 byte(s)
Diff to previous 78686
Removed whitespace at end-of-line; no content changes. I simply did
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


Revision 78686 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 24 01:34:38 2001 UTC (16 years, 3 months ago) by dd
File length: 4362 byte(s)
Diff to previous 74355
Remove duplicate words.


Revision 74355 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 16 17:42:38 2001 UTC (16 years, 6 months ago) by rwatson
File length: 4366 byte(s)
Diff to previous 74349
o The revenge of the mdoc(7) police:

   - 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


Revision 74349 - (view) (download) (annotate) - [select for diffs]
Modified Fri Mar 16 13:50:50 2001 UTC (16 years, 6 months ago) by ru
File length: 4352 byte(s)
Diff to previous 74277
mdoc(7) police: empty lines outside displays cause warnings in -mdocNG.


Revision 74277 - (view) (download) (annotate) - [select for diffs]
Modified Thu Mar 15 03:13:58 2001 UTC (16 years, 7 months ago) by rwatson
File length: 4349 byte(s)
Diff to previous 70466
o Update some of the kernel man pages associated with extended attributes
  to reflect EA API change to explicit namespacing.

Obtained from:	TrustedBSD Project


Revision 70466 - (view) (download) (annotate) - [select for diffs]
Modified Fri Dec 29 09:18:45 2000 UTC (16 years, 9 months ago) by ru
File length: 2939 byte(s)
Diff to previous 68753
Prepare for mdoc(7)NG.


Revision 68753 - (view) (download) (annotate) - [select for diffs]
Modified Wed Nov 15 16:00:07 2000 UTC (16 years, 10 months ago) by ben
File length: 2936 byte(s)
Diff to previous 55430
remove fullstops from the end of .Xr lines in SEE ALSO sections.


Revision 55430 - (view) (download) (annotate) - [select for diffs]
Added Wed Jan 5 04:59:02 2000 UTC (17 years, 9 months ago) by rwatson
File length: 2938 byte(s)
Man pages for the VFS extended attribute and access control list vnops.

Reviewed by:	eivind


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.26