<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/share/man/man9/extattr.9, branch release/7.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2008-02-24T05:45:17+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2008-02-24T05:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a9c219fa3cec18ef9f30edec6fa106bf0e2d423d'/>
<id>a9c219fa3cec18ef9f30edec6fa106bf0e2d423d</id>
<content type='text'>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move macros describing extended attributes in UFS from</title>
<updated>2007-03-06T08:13:21+00:00</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2007-03-06T08:13:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a9093e846d7be8771b7ed509c37bb39cec26c565'/>
<id>a9093e846d7be8771b7ed509c37bb39cec26c565</id>
<content type='text'>
&lt;sys/extattr.h&gt; to &lt;ufs/ufs/extattr.h&gt;. Move description
of extended attributes in UFS from man9/extattr.9 to
man5/fs.5.

Note that restore will not compile until &lt;sys/extattr.h&gt;
and &lt;ufs/ufs/extattr.h&gt; have been updated.

Suggested by:	Robert Watson
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
&lt;sys/extattr.h&gt; to &lt;ufs/ufs/extattr.h&gt;. Move description
of extended attributes in UFS from man9/extattr.9 to
man5/fs.5.

Note that restore will not compile until &lt;sys/extattr.h&gt;
and &lt;ufs/ufs/extattr.h&gt; have been updated.

Suggested by:	Robert Watson
</pre>
</div>
</content>
</entry>
<entry>
<title>Declare a `struct extattr' that defines the format of an extended</title>
<updated>2007-02-26T06:18:53+00:00</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2007-02-26T06:18:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fdece2b8f73a053931da1593a869c2eb6437bddd'/>
<id>fdece2b8f73a053931da1593a869c2eb6437bddd</id>
<content type='text'>
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 &lt; pe; p = pn) {
		p0 = p;
		bcopy(p, &amp;ul, sizeof(ul));
		pn = p + ul;
		/* make sure this entry is complete */
		if (pn &gt; 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 &lt; eaend; eap = EXTATTR_NEXT(eap)){
		/* make sure this entry is complete */
		if (EXTATTR_NEXT(eap) &gt; eaend)
			break;
		if (eap-&gt;ea_namespace != nspace ||
		    eap-&gt;ea_namelength != length ||
		    bcmp(eap-&gt;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 :-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt; pe; p = pn) {
		p0 = p;
		bcopy(p, &amp;ul, sizeof(ul));
		pn = p + ul;
		/* make sure this entry is complete */
		if (pn &gt; 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 &lt; eaend; eap = EXTATTR_NEXT(eap)){
		/* make sure this entry is complete */
		if (EXTATTR_NEXT(eap) &gt; eaend)
			break;
		if (eap-&gt;ea_namespace != nspace ||
		    eap-&gt;ea_namelength != length ||
		    bcmp(eap-&gt;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 :-)
</pre>
</div>
</content>
</entry>
<entry>
<title>Use 'manual page' instead of 'man page' for consistency.</title>
<updated>2005-06-28T20:15:19+00:00</updated>
<author>
<name>Hiten Pandya</name>
<email>hmp@FreeBSD.org</email>
</author>
<published>2005-06-28T20:15:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=571dba6ec9f25ecf7582dc2192daf1ceea70065f'/>
<id>571dba6ec9f25ecf7582dc2192daf1ceea70065f</id>
<content type='text'>
Approved by:	re (hrs)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Approved by:	re (hrs)
</pre>
</div>
</content>
</entry>
<entry>
<title>Mdoc Janitor:</title>
<updated>2003-10-23T02:33:03+00:00</updated>
<author>
<name>Hiten Pandya</name>
<email>hmp@FreeBSD.org</email>
</author>
<published>2003-10-23T02:33:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=559eb8d2e3f5b22fda7535e64f86c7862c763eab'/>
<id>559eb8d2e3f5b22fda7535e64f86c7862c763eab</id>
<content type='text'>
  * Fix hard sentence breaks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  * Fix hard sentence breaks.
</pre>
</div>
</content>
</entry>
<entry>
<title>Document VOP_LISTEXTATTR(9).</title>
<updated>2003-06-05T14:20:48+00:00</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2003-06-05T14:20:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1792c88d10e5295aec92bafa1c2f59205957e5c9'/>
<id>1792c88d10e5295aec92bafa1c2f59205957e5c9</id>
<content type='text'>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
</pre>
</div>
</content>
</entry>
<entry>
<title>The vnode operations for extended attributes no longer suffer from</title>
<updated>2003-06-04T04:01:44+00:00</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2003-06-04T04:01:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d160576639cd4ad0ddb47fb718c4739bcbe3f3a7'/>
<id>d160576639cd4ad0ddb47fb718c4739bcbe3f3a7</id>
<content type='text'>
the features (bugs) in the BUGS section related to querying the
required buffer size, or telling if an overflow occured.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the features (bugs) in the BUGS section related to querying the
required buffer size, or telling if an overflow occured.
</pre>
</div>
</content>
</entry>
<entry>
<title>Uniformly refer to a file system as "file system".</title>
<updated>2002-12-12T17:26:04+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2002-12-12T17:26:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8d5d039f80a8d31947f4e84af20e8a56d0009c32'/>
<id>8d5d039f80a8d31947f4e84af20e8a56d0009c32</id>
<content type='text'>
Approved by:	re
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Approved by:	re
</pre>
</div>
</content>
</entry>
<entry>
<title>More file system &gt; filesystem</title>
<updated>2002-05-16T05:21:58+00:00</updated>
<author>
<name>Tom Rhodes</name>
<email>trhodes@FreeBSD.org</email>
</author>
<published>2002-05-16T05:21:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0e85d620bccbb25075a28e2ba2d82333a0f1eb17'/>
<id>0e85d620bccbb25075a28e2ba2d82333a0f1eb17</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>mdoc(7) police: Use the new .In macro for #include statements.</title>
<updated>2001-10-01T16:09:29+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2001-10-01T16:09:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=32eef9aeb1f39a1623cea55da147c89abbd5b9a5'/>
<id>32eef9aeb1f39a1623cea55da147c89abbd5b9a5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
