Lines Matching +full:next +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0
32 /* sys_write only can write MAX_RW_COUNT aka 2G-4K bytes at most */ in xwrite()
37 if (rv == -EINTR || rv == -EAGAIN) in xwrite()
52 count -= rv; in xwrite()
74 umode_t mode; member
75 struct hash *next; member
87 umode_t mode, char *name) in find_link() argument
90 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) { in find_link()
91 if ((*p)->ino != ino) in find_link()
93 if ((*p)->minor != minor) in find_link()
95 if ((*p)->major != major) in find_link()
97 if (((*p)->mode ^ mode) & S_IFMT) in find_link()
99 return (*p)->name; in find_link()
104 q->major = major; in find_link()
105 q->minor = minor; in find_link()
106 q->ino = ino; in find_link()
107 q->mode = mode; in find_link()
108 strcpy(q->name, name); in find_link()
109 q->next = NULL; in find_link()
120 *p = q->next; in free_hash()
154 INIT_LIST_HEAD(&de->list); in dir_add()
155 strscpy(de->name, name, nlen); in dir_add()
156 de->mtime = mtime; in dir_add()
157 list_add(&de->list, &dir_list); in dir_add()
164 list_del(&de->list); in dir_utime()
165 do_utime(de->name, de->mtime); in dir_utime()
181 static __initdata umode_t mode; variable
200 mode = parsed[1]; in parse_header()
234 byte_count -= n; in eat()
241 static void __init read_into(char *buf, unsigned size, enum state next) in read_into() argument
246 state = next; in read_into()
250 next_state = next; in read_into()
271 if ((remains -= n) != 0) in do_collect()
285 error("incorrect cpio method used: use -H newc option"); in do_header()
296 if (S_ISLNK(mode)) { in do_header()
305 if (S_ISREG(mode) || !body_len) in do_header()
316 eat(next_header - this_header); in do_skip()
336 (st.mode ^ fmode) & S_IFMT) { in clean_path()
337 if (S_ISDIR(st.mode)) in clean_path()
347 char *old = find_link(major, minor, ino, mode, collected); in maybe_link()
350 return (init_link(old, collected) < 0) ? -1 : 1; in maybe_link()
365 if (collected[name_len - 1] != '\0') { in do_name()
376 clean_path(collected, mode); in do_name()
377 if (S_ISREG(mode)) { in do_name()
383 wfile = filp_open(collected, openflags, mode); in do_name()
390 vfs_fchmod(wfile, mode); in do_name()
392 vfs_truncate(&wfile->f_path, body_len); in do_name()
395 } else if (S_ISDIR(mode)) { in do_name()
396 init_mkdir(collected, mode); in do_name()
398 init_chmod(collected, mode); in do_name()
400 } else if (S_ISBLK(mode) || S_ISCHR(mode) || in do_name()
401 S_ISFIFO(mode) || S_ISSOCK(mode)) { in do_name()
403 init_mknod(collected, mode, rdev); in do_name()
405 init_chmod(collected, mode); in do_name()
418 do_utime_path(&wfile->f_path, mtime); in do_copy()
428 body_len -= byte_count; in do_copy()
436 if (collected[name_len - 1] != '\0') { in do_symlink()
470 return len - byte_count; in write_buffer()
479 return -1; in flush_buffer()
484 len -= written; in flush_buffer()
488 len -= written; in flush_buffer()
496 static unsigned long my_inptr __initdata; /* index of next byte to be processed in inbuf */
523 len -= written; in unpack_to_rootfs()
528 len--; in unpack_to_rootfs()
553 len -= my_inptr; in unpack_to_rootfs()
613 size = phys_initrd_size + (phys_initrd_start - start); in reserve_initrd_mem()
623 pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region\n", in reserve_initrd_mem()
636 pr_cont(" - disabling initrd\n"); in reserve_initrd_mem()
647 memblock_free((void *)aligned_start, aligned_end - aligned_start); in free_initrd_mem()
670 memset((void *)initrd_start, 0, initrd_end - initrd_start); in kexec_free_initrd()
697 written = xwrite(file, (char *)initrd_start, initrd_end - initrd_start, in populate_initrd_image()
699 if (written != initrd_end - initrd_start) in populate_initrd_image()
701 written, initrd_end - initrd_start); in populate_initrd_image()
721 err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start); in do_populate_rootfs()
740 bin_attr_initrd.size = initrd_end - initrd_start; in do_populate_rootfs()