-
Notifications
You must be signed in to change notification settings - Fork 0
/
new_inode.c
22 lines (20 loc) · 1.12 KB
/
new_inode.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* new_inode.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ylagtab <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 11:21:57 by ylagtab #+# #+# */
/* Updated: 2020/02/17 16:14:44 by ylagtab ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_ls.h"
t_inode *new_inode(t_inode *inode, struct stat *st, char *path, char *name)
{
ft_bzero(inode, sizeof(t_inode));
inode->st = *st;
ft_strncpy(inode->path, path, PATH_MAX);
ft_strncpy(inode->name, name, NAME_MAX);
return (inode);
}