(t *kernel.Task, valueAddr hostarch.Addr, size uint)
| 335 | } |
| 336 | |
| 337 | func copyInXattrValue(t *kernel.Task, valueAddr hostarch.Addr, size uint) (string, error) { |
| 338 | if size > linux.XATTR_SIZE_MAX { |
| 339 | return "", linuxerr.E2BIG |
| 340 | } |
| 341 | buf := make([]byte, size) |
| 342 | if _, err := t.CopyInBytes(valueAddr, buf); err != nil { |
| 343 | return "", err |
| 344 | } |
| 345 | return gohacks.StringFromImmutableBytes(buf), nil |
| 346 | } |
| 347 | |
| 348 | func copyOutXattrValue(t *kernel.Task, valueAddr hostarch.Addr, size uint, value string) (int, error) { |
| 349 | if size == 0 { |
no test coverage detected
searching dependent graphs…