Lines Matching refs:open

11    Options: -w   open writable (new driver opens readable unless -i)
603 printf(" -w force open with read/write flag\n");
676 sg_fd = open(fname, flags | O_NONBLOCK);
776 sg_fd = open(fname, O_RDWR);
1493 if ((sg_fd = open(file_name, oflags)) < 0) {
1675 if ((sg_fd = open(name, O_RDONLY)) < 0) {
1678 if ((sg_fd = open("/dev/sg0", O_RDONLY)) >= 0)
1680 sg_fd = open(name, O_RDONLY);
1683 printf("Unable to open sg device: %s, %s\n",
2265 if ((infd = open(inf, O_RDWR)) < 0) {
2267 ME "could not open %s for sg reading",
2291 infd = open(inf, O_RDONLY | O_DIRECT);
2293 infd = open(inf, O_RDONLY);
2296 ME "could not open %s for reading",
2327 if ((outfd = open(outf, O_RDWR)) < 0) {
2329 ME "could not open %s for sg writing",
2354 if ((outfd = open(outf, flags, 0666)) < 0) {
2357 "could not open %s for writing",
2363 if ((outfd = open(outf, O_WRONLY)) < 0) {
2366 "could not open %s for raw writing",
2655 if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
2750 if ((sg_fd = open(file_name, oflags)) < 0) {
3111 sg_fd = open(fname, O_RDONLY | O_NONBLOCK);
3295 sg_fd = open(fname, O_RDONLY | O_NONBLOCK);
3687 if ((sg_fd = open(file_name, oflags)) < 0) {
3858 sg_fd = open(file_name, O_RDONLY);
3860 perror(ME "open error");
4164 if ((sg_fd = open(file_name, O_RDONLY)) < 0) {
4217 sg_fd = open(file_name, O_RDWR | O_NONBLOCK);
4219 perror("sg_reset: open error");
4439 if ((sg_fd = open(file_name, oflags)) < 0) {
4605 fd = open(file_name, O_RDWR | O_NONBLOCK);
4607 fprintf(stderr, "Error trying to open %s\n", file_name);
4911 sg_fd = open(file_name, O_RDWR);
4913 perror("sg_test_rwbuf: open error");
4963 if ((sg_fd = open(file_name, O_RDONLY)) < 0) {
5814 fd = open(devices[k], O_RDONLY | O_NONBLOCK);
5850 fd = open(name, O_RDWR | O_NONBLOCK);
5855 fd = open(name, O_RDWR | O_NONBLOCK);
5863 "open on %s failed (%d)", name,
5995 fd = open(name, O_RDONLY);
6022 fd = open(name, O_RDWR | O_NONBLOCK);
6028 fd = open(name, O_RDWR | O_NONBLOCK);
6075 return open(name, O_RDWR);
6096 perror("sginfo(open)");
6322 if ((infd = open(inf, O_RDWR)) < 0) {
6324 ME "could not open %s for sg reading", inf);
6355 if ((infd = open(inf, O_RDONLY)) < 0) {
6357 ME "could not open %s for reading", inf);
6381 if ((outfd = open(outf, O_RDWR)) < 0) {
6383 ME "could not open %s for "
6426 open(outf, O_WRONLY | O_CREAT,
6430 "could not open %s for writing",
6436 if ((outfd = open(outf, O_WRONLY)) < 0) {
6438 ME "could not open %s "
6545 if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {
7334 if ((rcoll.infd = open(inf, O_RDWR)) < 0) {
7336 ME "could not open %s for sg reading",
7345 if ((rcoll.infd = open(inf, O_RDONLY)) < 0) {
7347 ME "could not open %s for reading",
7375 if ((rcoll.outfd = open(outf, O_RDWR)) < 0) {
7377 ME "could not open %s for sg writing",
7391 open(outf, O_WRONLY | O_CREAT,
7395 "could not open %s for writing",
7401 if ((rcoll.outfd = open(outf, O_WRONLY)) < 0) {
7404 "could not open %s for raw writing",
7636 if ((fd = open(proc_allow_dio, O_RDONLY)) >= 0) {