]> Git Repo - qemu.git/blob - hw/9pfs/9p-util.c
ide: bdrv_attach_dev() for empty CD-ROM
[qemu.git] / hw / 9pfs / 9p-util.c
1 /*
2  * 9p utilities
3  *
4  * Copyright IBM, Corp. 2017
5  *
6  * Authors:
7  *  Greg Kurz <[email protected]>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2 or later.
10  * See the COPYING file in the top-level directory.
11  */
12
13 #include "qemu/osdep.h"
14 #include "qemu/xattr.h"
15 #include "9p-util.h"
16
17 ssize_t fgetxattrat_nofollow(int dirfd, const char *filename, const char *name,
18                              void *value, size_t size)
19 {
20     char *proc_path = g_strdup_printf("/proc/self/fd/%d/%s", dirfd, filename);
21     int ret;
22
23     ret = lgetxattr(proc_path, name, value, size);
24     g_free(proc_path);
25     return ret;
26 }
This page took 0.025426 seconds and 4 git commands to generate.