On Fri, 2009-03-20 at 14:47 -0400, Oren Laadan wrote:
> 
> 
> +/* cr_write_fd_file - for regular files, directories, symbolic links
> */
> +static int cr_write_fd_file(struct cr_ctx *ctx, struct file *file)
> +{
> +       return cr_write_fname(ctx, &file->f_path, &ctx->fs_mnt);
> +}
> +
> +/* cr_inode_to_fdtype - determine the fd type given an inode */
> +static inline enum fd_type cr_inode_to_fdtype(struct inode *inode)
> +{
> +       switch (inode->i_mode & S_IFMT) {
> +       case S_IFREG:
> +               return CR_FD_FILE;
> +       case S_IFDIR:
> +               return CR_FD_DIR;
> +       }
> +       /* file type unsupported */
> +       return -EBADF;
> +}

These are cleanups and abstractions of a previous patch.  Please either
put them in that patch or separate them from the CR_FD_OBJREF patch.
They don't belong together.

-- Dave

_______________________________________________
Containers mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to