Commit Graph

17 Commits

Author SHA1 Message Date
andvar 2e9df72ec3 fix various typos in comments. 2022-04-07 19:33:37 +00:00
manu fe10ff49c1 Use returned size and not buffer max length when displaying attribute
From Thomas Schmitt <scdbackup@gmx.net>
2014-06-20 15:22:01 +00:00
manu f56cc676bf Do not record a trailing \0
From Thomas Schmitt <scdbackup@gmx.net>
2014-06-20 14:55:31 +00:00
manu f8e3cc05a1 Fix off-by-one in hexdump display (getextattr -x), which displayed a
trailing garbage byte.
2012-06-17 08:09:29 +00:00
joerg 6818646ac8 Use __dead 2011-09-16 15:39:25 +00:00
wiz d738592f9d Fix typos, remove trailing whitespace. 2011-07-14 22:14:03 +00:00
manu a6ed313d9c Improve extended attribute commands:
- allow namespace to be omitted when using a namespace-prefixed attribute
  name, a la Linux.
- Improve hexdump for getextattr -x
- Add more display option for binary attributes, using vis(3)
- Add a -i option to setextattr to get the attribute value from file, so
  that we can set binary values
2011-07-14 15:25:27 +00:00
manu be95d60797 Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the
filesystem in which format extended attribute shall be listed.

There are currently two formats:
- NUL-terminated strings, used for listxattr(2), this is the default.
- one byte length-pprefixed, non NUL-terminated strings, used for
  extattr_list_file(2), which is obtanined by setting the
  EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)

This approach avoid the need for converting the list back and forth, except
in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may
have requested EXTATTR_LIST_PREFIXLEN.
2011-07-04 08:07:29 +00:00
manu d297a7739e Fix previous broken commit for extended attribute listing. 2011-06-28 07:24:14 +00:00
manu d8abff28ef Implement extended attribute listing for UFS1.
Modify lsextattr(8) so that it does not expect each attribute name to be
prefixed by its length. This enable extattr_list_(file|link|fd) to
return a buffer matching its documentation. This also makes the interface
similar to what Linux and FUSE do, which is nice for interoperability.

Note that since we had no EA implementation supporting listing, we do
not break anything.
2011-06-27 16:34:47 +00:00
wiz ddcaed45e1 This is installed in section 1, so make internal section the same.
Also use name under which it is installed as main internal name.
Comment out reference to extattr(2) which doesn't exist on NetBSD
(a reference to extattr(3) still remains).
2011-06-17 18:19:58 +00:00
joerg 4dfc56bdfa Don't use user input as format string 2011-05-24 12:25:05 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
elad fc534d00ff mark strpy safe 2006-06-17 08:32:42 +00:00
lukem 8573d5e23d appease gcc -Wuninitialized 2005-06-02 01:42:11 +00:00
wiz 59461d12f9 Add RCS Id, bump date for when it appeared in NetBSD, mention
NetBSD appearance in HISTORY section, fmt a paragraph.
2005-01-02 18:41:23 +00:00
thorpej 7ec7b5b2f6 Add a getextattr(1)/setextattr(1)/rmextattr(1)/lsextattr(1) utility
that gets, sets, removes, and lists file system extended attributes.

From FreeBSD.
2005-01-02 17:55:48 +00:00