[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/4] block: Convert open calls to qemu_open
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/4] block: Convert open calls to qemu_open |
Date: |
Wed, 13 Jun 2012 12:26:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
Am 08.06.2012 17:42, schrieb Corey Bryant:
> This patch converts all block layer open calls to qemu_open. This
> enables all block layer open paths to dup(X) a pre-opened file
> descriptor if the filename is of the format /dev/fd/X. This is
> useful if QEMU is restricted from opening certain files.
>
> Note that this adds the O_CLOEXEC flag to the changed open paths
> when the O_CLOEXEC macro is defined.
>
> v2:
> -Convert calls to qemu_open instead of file_open (address@hidden)
> -Mention introduction of O_CLOEXEC (address@hidden)
>
> Signed-off-by: Corey Bryant <address@hidden>
> @@ -950,7 +950,7 @@ static int floppy_probe_device(const char *filename)
> if (strstart(filename, "/dev/fd", NULL))
> prio = 50;
Good to have this context here. I think this has to be removed in
another patch or all our file descriptors will become host_floppy...
>
> - fd = open(filename, O_RDONLY | O_NONBLOCK);
> + fd = qemu_open(filename, O_RDONLY | O_NONBLOCK);
> if (fd < 0) {
> goto out;
> }
Kevin
- [Qemu-devel] [PATCH v2 3/4] osdep: Enable qemu_open to dup pre-opened fd, (continued)
- [Qemu-devel] [PATCH v2 3/4] osdep: Enable qemu_open to dup pre-opened fd, Corey Bryant, 2012/06/08
- [Qemu-devel] [PATCH v2 4/4] block: Convert open calls to qemu_open, Corey Bryant, 2012/06/08
- [Qemu-devel] [PATCH v2 1/4] qapi: Convert getfd and closefd, Corey Bryant, 2012/06/08
- Re: [Qemu-devel] [PATCH v2 0/4] file descriptor passing using passfd, Corey Bryant, 2012/06/08
- [Qemu-devel] [PATCH v2 2/4] qapi: Add passfd QMP command, Corey Bryant, 2012/06/08
- [Qemu-devel] [PATCH v2 0/4] file descriptor passing using passfd, Corey Bryant, 2012/06/08
- Re: [Qemu-devel] [PATCH v2 0/4] file descriptor passing using passfd, Corey Bryant, 2012/06/08
- Re: [Qemu-devel] [PATCH v2 0/4] file descriptor passing using passfd, Kevin Wolf, 2012/06/13