Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 5 of 5) sorted by relevance

/init/
Ddo_mounts_md.c124 int fd; in md_setup_drive() local
174 fd = ksys_open(name, 0, 0); in md_setup_drive()
175 if (fd < 0) { in md_setup_drive()
180 if (ksys_ioctl(fd, SET_ARRAY_INFO, 0) == -EBUSY) { in md_setup_drive()
184 ksys_close(fd); in md_setup_drive()
203 err = ksys_ioctl(fd, SET_ARRAY_INFO, (long)&ainfo); in md_setup_drive()
213 err = ksys_ioctl(fd, ADD_NEW_DISK, in md_setup_drive()
224 ksys_ioctl(fd, ADD_NEW_DISK, (long)&dinfo); in md_setup_drive()
228 err = ksys_ioctl(fd, RUN_ARRAY, 0); in md_setup_drive()
237 ksys_close(fd); in md_setup_drive()
[all …]
Ddo_mounts.c510 int fd; in change_floppy() local
515 fd = ksys_open("/dev/root", O_RDWR | O_NDELAY, 0); in change_floppy()
516 if (fd >= 0) { in change_floppy()
517 ksys_ioctl(fd, FDEJECT, 0); in change_floppy()
518 ksys_close(fd); in change_floppy()
521 fd = ksys_open("/dev/console", O_RDWR, 0); in change_floppy()
522 if (fd >= 0) { in change_floppy()
523 ksys_ioctl(fd, TCGETS, (long)&termios); in change_floppy()
525 ksys_ioctl(fd, TCSETSF, (long)&termios); in change_floppy()
526 ksys_read(fd, &c, 1); in change_floppy()
[all …]
Dinitramfs.c14 static ssize_t __init xwrite(int fd, const char *p, size_t count) in xwrite() argument
20 ssize_t rv = ksys_write(fd, p, count); in xwrite()
570 int fd; in clean_rootfs() local
575 fd = ksys_open("/", O_RDONLY, 0); in clean_rootfs()
576 WARN_ON(fd < 0); in clean_rootfs()
577 if (fd < 0) in clean_rootfs()
582 ksys_close(fd); in clean_rootfs()
587 num = ksys_getdents64(fd, dirp, BUF_SIZE); in clean_rootfs()
607 num = ksys_getdents64(fd, dirp, BUF_SIZE); in clean_rootfs()
610 ksys_close(fd); in clean_rootfs()
[all …]
Ddo_mounts_rd.c58 identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) in identify_ramdisk_image() argument
83 ksys_lseek(fd, start_block * BLOCK_SIZE, 0); in identify_ramdisk_image()
84 ksys_read(fd, buf, size); in identify_ramdisk_image()
129 ksys_lseek(fd, start_block * BLOCK_SIZE + 0x200, 0); in identify_ramdisk_image()
130 ksys_read(fd, buf, size); in identify_ramdisk_image()
143 ksys_lseek(fd, (start_block+1) * BLOCK_SIZE, 0); in identify_ramdisk_image()
144 ksys_read(fd, buf, size); in identify_ramdisk_image()
171 ksys_lseek(fd, start_block * BLOCK_SIZE, 0); in identify_ramdisk_image()
Ddo_mounts_initrd.c110 int fd = ksys_open("/dev/root.old", O_RDWR, 0); in handle_initrd() local
118 if (fd < 0) { in handle_initrd()
119 error = fd; in handle_initrd()
121 error = ksys_ioctl(fd, BLKFLSBUF, 0); in handle_initrd()
122 ksys_close(fd); in handle_initrd()