Pregunta

From fuse/examples/fsel.c

static struct fuse_operations fsel_oper = {
    .getattr    = fsel_getattr,
    .readdir    = fsel_readdir,
    .open       = fsel_open,
    .release    = fsel_release,
    .read       = fsel_read,
    .poll       = fsel_poll,
};

this is the definitionof fuse_operations

struct fuse_operations_compat25 {
    int (*getattr) (const char *, struct stat *);
    int (*readlink) (const char *, char *, size_t);
    int (*getdir) (const char *, fuse_dirh_t, fuse_dirfil_t);
    int (*mknod) (const char *, mode_t, dev_t);
    int (*mkdir) (const char *, mode_t);
    int (*unlink) (const char *);
    int (*rmdir) (const char *);
    .....
};

so what do those . mean? It's the first time I see that

¿Fue útil?

Solución

It means that the field that is named after the . will have that value.

For example, the gettr function pointer will point to the fsel_getattr function.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top