Home | History | Annotate | Download | only in squashfs-tools

Lines Matching defs:pathname

520 int print_filename(char *pathname, struct inode *inode)
530 printf("%s\n", pathname);
590 t->tm_mday, t->tm_hour, t->tm_min, pathname);
824 int set_attributes(char *pathname, int mode, uid_t uid, gid_t guid, time_t time,
829 if(utime(pathname, &times) == -1) {
831 pathname, strerror(errno));
836 if(chown(pathname, uid, guid) == -1) {
838 "on %s, because %s\n", pathname,
845 if((set_mode || (mode & 07000)) && chmod(pathname, (mode_t) mode) == -1) {
847 pathname, strerror(errno));
851 write_xattr(pathname, xattr);
935 int open_wait(char *pathname, int flags, mode_t mode)
945 return open(pathname, flags, mode);
962 void queue_file(char *pathname, int file_fd, struct inode *inode)
974 file->pathname = strdup(pathname);
982 void queue_dir(char *pathname, struct dir *dir)
993 file->pathname = strdup(pathname);
999 int write_file(struct inode *inode, char *pathname)
1008 file_fd = open_wait(pathname, O_CREAT | O_WRONLY |
1012 pathname, strerror(errno));
1027 queue_file(pathname, file_fd, inode);
1067 int create_inode(char *pathname, struct inode *i)
1069 TRACE("create_inode: pathname %s\n", pathname);
1074 unlink(pathname);
1076 if(link(created_inode[i->inode_number - 1], pathname) == -1) {
1091 if(write_file(i, pathname))
1100 unlink(pathname);
1102 if(symlink(i->symlink, pathname) == -1) {
1104 "%s, because %s\n", pathname,
1109 write_xattr(pathname, i->xattr);
1112 if(lchown(pathname, i->uid, i->gid) == -1)
1115 "%s\n", pathname,
1130 unlink(pathname);
1132 if(mknod(pathname, chrdev ? S_IFCHR : S_IFBLK,
1138 pathname, strerror(errno));
1141 set_attributes(pathname, i->mode, i->uid,
1148 "block", pathname);
1156 unlink(pathname);
1158 if(mknod(pathname, S_IFIFO, 0) == -1) {
1160 "because %s\n", pathname,
1164 set_attributes(pathname, i->mode, i->uid, i->gid,
1171 ERROR("create_inode: socket %s ignored\n", pathname);
1179 created_inode[i->inode_number - 1] = strdup(pathname);
1278 void free_path(struct pathname *paths)
1296 struct pathname *add_path(struct pathname *paths, char *target, char *alltarget)
1306 paths = malloc(sizeof(struct pathname));
1348 * at leaf pathname component
1371 * at leaf pathname component and child components exist
1398 struct pathnames *add_subdir(struct pathnames *paths, struct pathname *path)
1403 sizeof(struct pathname *));
1431 struct pathname *path = paths->path[n];
1496 char *pathname;
1505 res = asprintf(&pathname, "%s/%s", parent_name, name);
1527 free(pathname);
1586 char *pathname;
1596 res = asprintf(&pathname, "%s/%s", parent_name, name);
1601 dir_scan(pathname, start_block, offset, new);
1602 free(pathname);
1604 update_info(pathname);
1609 print_filename(pathname, i);
1612 create_inode(pathname, i);
1618 free(pathname);
1909 struct pathname *process_extract_files(struct pathname *path, char *filename)
2015 /* write attributes for directory file->pathname */
2016 set_attributes(file->pathname, file->mode, file->uid,
2018 free(file->pathname);
2086 set_attributes(file->pathname, file->mode, file->uid,
2089 ERROR("Failed to write %s, skipping\n", file->pathname);
2090 unlink(file->pathname);
2092 free(file->pathname);
2509 struct pathname *path = NULL;
2643 ERROR("\t-d[est] <pathname>\tunsquash to <pathname>, "