Lines Matching refs:key_fd
1610 int ret, dev_fd, key_fd; in do_rpmb_write_key() local
1625 key_fd = STDIN_FILENO; in do_rpmb_write_key()
1627 key_fd = open(argv[2], O_RDONLY); in do_rpmb_write_key()
1628 if (key_fd < 0) { in do_rpmb_write_key()
1635 ret = DO_IO(read, key_fd, frame_in.key_mac, sizeof(frame_in.key_mac)); in do_rpmb_write_key()
1661 if (key_fd != STDIN_FILENO) in do_rpmb_write_key()
1662 close(key_fd); in do_rpmb_write_key()
1721 int i, ret, dev_fd, data_fd, key_fd = -1; in do_rpmb_read_block() local
1780 key_fd = STDIN_FILENO; in do_rpmb_read_block()
1782 key_fd = open(argv[5], O_RDONLY); in do_rpmb_read_block()
1783 if (key_fd < 0) { in do_rpmb_read_block()
1789 ret = DO_IO(read, key_fd, key, sizeof(key)); in do_rpmb_read_block()
1860 if (key_fd != -1 && key_fd != STDIN_FILENO) in do_rpmb_read_block()
1861 close(key_fd); in do_rpmb_read_block()
1868 int ret, dev_fd, key_fd, data_fd; in do_rpmb_write_block() local
1927 key_fd = STDIN_FILENO; in do_rpmb_write_block()
1929 key_fd = open(argv[4], O_RDONLY); in do_rpmb_write_block()
1930 if (key_fd < 0) { in do_rpmb_write_block()
1936 ret = DO_IO(read, key_fd, key, sizeof(key)); in do_rpmb_write_block()
1970 if (key_fd != STDIN_FILENO) in do_rpmb_write_block()
1971 close(key_fd); in do_rpmb_write_block()