9pfs: fix qemu_mknodat(S_IFSOCK) on macOS
authorChristian Schoenebeck <qemu_oss@crudebyte.com>
Fri, 29 Apr 2022 10:25:11 +0000 (12:25 +0200)
committerChristian Schoenebeck <qemu_oss@crudebyte.com>
Sun, 1 May 2022 12:02:08 +0000 (14:02 +0200)
commit055ab89327bab83f1bd07e9de07f7628643d3d8d
treeb476decdd015728b60259ac232b83ace55f7379e
parent096af171274cc76c51bf11366ae257391ddfed2a
9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

mknod() on macOS does not support creating sockets, so divert to
call sequence socket(), bind() and fchmodat() respectively if S_IFSOCK
was passed with mode argument.

Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <2e7b5ecd7a6d83a538db4e8a22d8fb03e9e0f06e.1651228001.git.qemu_oss@crudebyte.com>
[C.S. - Use AT_SYMLINK_NOFOLLOW instead of AT_SYMLINK_NOFOLLOW_ANY. ]
Link: https://lore.kernel.org/qemu-devel/3704033.BMyLRrx2Jx@silver/
hw/9pfs/9p-util-darwin.c