static int proxy_ioc_getversion(FsContext *fs_ctx, V9fsPath *path,

                                mode_t st_mode, uint64_t *st_gen)

{

    int err;



    /* Do not try to open special files like device nodes, fifos etc

     * we can get fd for regular files and directories only

     */

    if (!S_ISREG(st_mode) && !S_ISDIR(st_mode)) {

        errno = ENOTTY;

        return -1;

    }

    err = v9fs_request(fs_ctx->private, T_GETVERSION, st_gen, "s", path);

    if (err < 0) {

        errno = -err;

        err = -1;

    }

    return err;

}

static int proxy_ioc_getversion(FsContext *fs_ctx, V9fsPath *path,

                                mode_t st_mode, uint64_t *st_gen)

{

    int err;



    





    if (!S_ISREG(st_mode) && !S_ISDIR(st_mode)) {

        errno = ENOTTY;

        return -1;

    }

    err = v9fs_request(fs_ctx->private, T_GETVERSION, st_gen, "s", path);

    if (err < 0) {

        errno = -err;

        err = -1;

    }

    return err;

}

static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,

                                mode_t VAR_2, uint64_t *VAR_3)

{

    int VAR_4;



    





    if (!S_ISREG(VAR_2) && !S_ISDIR(VAR_2)) {

        errno = ENOTTY;

        return -1;

    }

    VAR_4 = v9fs_request(VAR_0->private, T_GETVERSION, VAR_3, "s", VAR_1);

    if (VAR_4 < 0) {

        errno = -VAR_4;

        VAR_4 = -1;

    }

    return VAR_4;

}

static int FUNC_0(FsContext *VAR_0, V9fsPath *VAR_1,
mode_t VAR_2, uint64_t *VAR_3)
{ int VAR_4; if (!S_ISREG(VAR_2) && !S_ISDIR(VAR_2)) { errno = ENOTTY; return -1; } VAR_4 = v9fs_request(VAR_0->private, T_GETVERSION, VAR_3, "s", VAR_1); if (VAR_4 < 0) { errno = -VAR_4; VAR_4 = -1; } return VAR_4; }