On Mon, Feb 13, 2017 at 4:45 PM, 'simon place' via golang-nuts <golang-nuts@googlegroups.com> wrote: > i have been tidying up some xattrib (extended file attribute) code, and had > what i thought was a cool idea. > > that idea used xattribs on symlinks. > > but when i tried this i found that syscall.Getxattr uses the sys call for > following syslinks, (it wraps SYS_GETXATTR) and that the corresponding > syscall for not following symlinks, (SYS_LGETXATTR) is not wrapped, although > an unused symbol for it is there. > > since this means there is no way to access xattribs on symlinks, whereas > wrapping the other symbol would have allowed both, i wonder why this > decision? > > basically i cant see why they aren’t all wrapped, isn't this an automated > process?
I doubt there was any decision. Syscall wrapping is not an automated process. The wrapped syscalls are listed explicitly. It can't be easily automated, because it is necessary to work out the right Go types to use for each syscall. Note that any changes in this area should be made to the golang.org/x/sys/unix repo, not to the syscall package in the main library. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.