Revision 1a9978a5 hw/9pfs/virtio-9p-handle.c

b/hw/9pfs/virtio-9p-handle.c
591 591
     * We can get fd for regular files and directories only
592 592
     */
593 593
    if (!S_ISREG(st_mode) && !S_ISDIR(st_mode)) {
594
            return 0;
594
        errno = ENOTTY;
595
        return -1;
595 596
    }
596 597
    err = handle_open(ctx, path, O_RDONLY, &fid_open);
597 598
    if (err < 0) {

Also available in: Unified diff